Authentication Loop

After logging in with an account, it keeps asking me to login again

Hi. I can't reproduce the issue on a new account, please provide more information about your case.
Do you see script.google.com domain in the URL bar after logging in?
Do you have any errors in browser console? (press f12 to check)
Which browser do you use?
Have you clicked with the following sequence to log in -> Sign in with google >  Review permissions > select account > Additional settings > Go to page ?

Hi. I can't reproduce the issue on a new account, please provide more information about your case. Do you see script.google.com domain in the URL bar after logging in? Do you have any errors in browser console? (press f12 to check) Which browser do you use?
Have you clicked with the following sequence to log in -> Sign in with google > Review permissions > select account > Additional settings > Go to page ?

Thank you for taking the time to look into my issue,
I do see the script.google.com domain after logging in.
I am getting the following errors in the console
Cookie “_ga_devsite” does not have a proper “SameSite” attribute value. Soon, cookies without the “SameSite” attribute or with an invalid value will be treated as “Lax”. This means that the cookie will no longer be sent in third-party contexts. If your application depends on this cookie being available in such contexts, please add the “SameSite=No
and
Cookie “SEARCH_SAMESITE” with the “SameSite” attribute value “Lax” or “Strict” was omitted because of a cross-site redirect.ne“ attribute to it.
I have tried with Firefox, Chrome, Chrome on android and Edge
I am attaching screenshots in the order of events ss1, ss2, ss3 and ss4 which resemble the flow I followed

.

Honestly, I have no idea why this is happening, especially on multiple accounts/devices/browsers.
Can you see the app listed here https://myaccount.google.com/permissions ?

Honestly, I have no idea why this is happening, especially on multiple accounts/devices/browsers.
Can you see the app listed here https://myaccount.google.com/permissions ?

The App does not appear in the permissions list. It's the first time I have encountered something similar too.

I've tried everything. I even made a copy of the App and messed around with it but I had no good results. It keeps asking me to Review Permissions and the App is not registering in the Allowed Apps in the Google Permissions page. I tried from multiple devices and with different accounts.

After some intense Googling, I found this similar thread https://community.smartsheet.com/discussion/19876/smartsheet-merge-permissions-issue , but the solution is something I've already tried and did not work for me. Maybe it's related to accounts that contain more accounts.

Thank you for your feedback! Google has an issue tracker, where you can try to describe the issue, however it is likely that they will ask you to provide a more simple example, or say that they cannot reproduce it, so it's better to specify that only your account(s) are affected by this.
I can also try to submit a verification application but there is a chance that it gets rejected and I don't really understand the necessity of creation of a separate GCP project only for that purpose. Anyways, it requires some time, so i'll be able to try it later this month.


[Annoucement][Draft] IOptionsSnapshot is now a scoped service

In 1.x IOptionsSnapshot would only reload based on notified changes to its data source (e.g. config). In 2.0 the service is now scoped and reloaded per request instead.
IOptionsMonitor is the replacement.

Note the docs also need to be updated. https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration

This issue was moved to aspnet/Home#2390


Fix order of options to prevent swapping of lines

We got a lot of
Tue Nov 01 09:14:43 +0100 2016 /Stage[main]/Unattended_upgrades/Apt::Conf[options]/Apt::Setting[conf-options]/File[/etc/apt/apt.conf.d/10options]/content (notice): content changed '{md5}3223a58b66433a63aab1c2bb3467eb0c' to '{md5}5812e79a8e013327aba71e43f1ea3725'
Fixing the order of options fixes it.
I ran the tests, they all pass. I didn't create a new test because I don't know how to test for the order of lines.

Thanks @leonkoens !


Add EnsembleModel including tests and docs

Easy usage from python
model = cx.models.EnsembleModel(inputs=['images'], outputs=['predictions'],
                                models_root='/my/directory/with/models')

For details, see the docs.
closes #15

Coverage increased (+0.7%) to 85.806% when pulling<PHONE_NUMBER>926cd8dbb77a86e60e7c3bc5168a03 on ensemble into 47bab4f0539ec7d4c57e88c9a2ac186d55493cf1 on dev.


reverse volume control?

Right now, the default volume control has mute on the left and max volume on the right. Is it possible to reverse the control the volume, to have mute on the right and max on the left? Not really important if it can't be done.

Currently this is not possible since you will have to modify the JS code to change the markup and modify the CSS associated with it


[ADD] Number Theory Function: GCD using Euclidean Algorithm

To find the GCD of 'a' and 'b' using Euclidean Algorithm. I want to work on this issue.

@Subhoshri Go ahead. Make sure to write the most optimal code possible. And check that the code should give output for all the cases including, gcd(0,a), gcd(a,0) and gcd(0,0), where 'a' is any integer

Okay, will do that.


Appstudio update test-component-pac-yluc

Pipelines as Code configuration proposal

Pipelines as Code CI/test-component-pac-yluc-on-pull-request has successfully validated your commit.

StatusDurationName

✅ Succeeded
10 seconds
init

✅ Succeeded
13 seconds
clone-repository

✅ Succeeded
25 seconds
build-container

✅ Succeeded
17 seconds
inspect-image

✅ Succeeded
18 seconds
deprecated-base-image-check

✅ Succeeded
32 seconds
clamav-scan

✅ Succeeded
11 seconds
clair-scan

✅ Succeeded
16 seconds
sbom-json-check

✅ Succeeded
10 seconds
label-check

✅ Succeeded
11 seconds
optional-label-check

✅ Succeeded
6 seconds
show-sbom

✅ Succeeded
6 seconds
show-summary

Pipelines as Code CI/test-component-pac-yluc-on-pull-request has successfully validated your commit.

StatusDurationName

✅ Succeeded
7 seconds
init

✅ Succeeded
13 seconds
clone-repository

✅ Succeeded
40 seconds
build-container

✅ Succeeded
16 seconds
deprecated-base-image-check

✅ Succeeded
15 seconds
inspect-image

✅ Succeeded
12 seconds
clair-scan

✅ Succeeded
32 seconds
clamav-scan

✅ Succeeded
9 seconds
sbom-json-check

✅ Succeeded
11 seconds
label-check

✅ Succeeded
12 seconds
optional-label-check

✅ Succeeded
5 seconds
show-sbom

✅ Succeeded
7 seconds
show-summary


Enhance the look and feel of the cards on the homepage

I propose to add hover effects and make the cards more appealing

Where and how? As there is no coded website for this project.


slow to respond

After upgrading home assistant from 0.47 to 0.48 I can no longer use my TV remote because the volume commands take too long to respond. They used to be instant. For now I have downgraded to 0.47 because it uses an older version of this software.
https://github.com/home-assistant/home-assistant/issues/8330

From the hass component, the version that works is REQUIREMENTS = ['denonavr==0.3.1']

There is nothing in the library which might block the change volume command except the connection to the receiver or the receiver itself.
Please test if the command is delayed in HA or when connecting to the receiver. You could use a python console with the following commands:
>>> import denonavr
>>> d = denonavr.DenonAVR("[IP of your receiver]")
>>> d.volume_up()

You will get a "True" when the volume_up command was successfull
Btw. in HA 0.47 version 0.4.4 is integrated , but not 0.3.1.

I didn't get anywhere... any ideas? I tried two versions.
denonavr-0.3.1
# python3 -c 'import denonavr; d = denonavr.DenonAVR("[xxxx.61]"); d.volume_up()'
No mapping for network audio source None

denonavr-0.5.2
# python3 -c 'import denonavr; d = denonavr.DenonAVR("[xxxx.61]"); d.volume_up()'
Connection error: volume up command not sent

I'm not sure why it wasn't connecting earlier. Strange. Maybe it takes awhile after stopping home assistant. Or maybe it wasn't on? No idea. Anyway...
After connecting to the denon with both versions the first volume change is a bit slow, but after that it seems to be instant. The connection appears to be what is taking the time.
So I'm guessing the connection in HASS is persistent so maybe its the component in HASS and not the denonavr lib?
denonavr (0.4.4) results:
~# time python3 -c 'import denonavr; d = denonavr.DenonAVR("[x61]"); d.volume_down()'
No mapping for audio source None
Timeout retrieving data from host [<IP_ADDRESS>]

real    0m4.321s
user    0m0.240s
sys     0m0.016s

denonavr (0.5.2) results  . I tried a few times and its always 4.3 seconds.
# time python3 -c 'import denonavr; d = denonavr.DenonAVR("[x61]"); d.volume_up()'

real    0m4.341s
user    0m0.268s
sys     0m0.016s
root@homeauto:~#

Okay, now after the testing I went back to restart homeassistant and it's throwing errors. It's been consistently fine up until now.
It seems that maybe the denon receiver doesn't like when you switch library versions? Very strange. HASS is still using 0.4.4.
HASS is now reporting.
2017-07-12 22:24:43 ERROR (Thread-16) [DenonAVR] No mapping for audio source None
2017-07-12 22:24:54 ERROR (Thread-17) [DenonAVR] No mapping for audio source None
2017-07-12 22:25:05 ERROR (Thread-21) [DenonAVR] No mapping for audio source None
2017-07-12 22:25:16 ERROR (Thread-3) [DenonAVR] No mapping for audio source None

After power cycling the receiver and reconnecting my iphone to it, HASS seems fine again with it. Maybe if I upgrade to the latest HASS and do the same song and dance it'll work? Bizarre.

The device is polled by homeassistant, so there should be a delay to create a persistent connection.
Which receiver do you have? Two or three weeks ago there was a firmware update for my AVR-X 4100W and since then I have some connection issues too. Especially when the receiver is in standby or is just waking up it is sometimes rejecting any connection, even if controlling via IP should be allowed according to the settings. In those cases also the built in web interface is not working, so I assume denon broke something at least on my receiver.
For me it seems that this happens when the receiver is getting requests from a "unknown" IP for the first time. After I the first call was successfull the later request usually work out.
When you do a volume up/down call using the HASS web api, it is first performing the volume up/down call and then calling the update method of the library. Thus it is also possible that updating the receiver status (or a combination of command + update) could be the reason for the delay. But this would again lead to the connection issue mentioned before...or maybe a blocked event loop in HASS.
Do you get lots of "No mapping for audio source" messages? I mentioned the update method before, which is performed by HASS after each volume call. If the library does not know your current input source, it is trying to build up its source list again, which means 2-3 additional http calls. This would consume some additional time.
If you like I could check that, if you send me the XML answers of your receiver. You can do so by switching on your receiver, setting a reasonable input device and running the attached python file like this:
python denon_receiver_xml.py --host <IP_ADDRESS> --prefix AVR-X4100W
If you send me the XML files the script saved in the directory it was started from, I could check them.
denon_receiver_xml.zip

I have an AVR-1912. I haven't checked for Firmware updates in probably 6 months but I don't think there is anything for it since it is quite old.
Regarding the "No mapping for audio source". That seems to go away after things get reset and get in sync. Since I did the last tests, I haven't had any issues with the Denon but I'm still on denonavr 0.4.4. I didn't try the "song and dance" with 0.5.2.
avr.zip

I tried again to make it work in the 0.50.1 release of HASS and its still slow. I tried power cycling the receiver and changing sources etc but that didn't fix it. I attached the error log from hass.
denonerror.txt

@bbrendon: are you still getting those exceptions in homeassistant 0.53 or later?
I changed the error handling and all timeout exceptions should be caught. Except that socket.timeout exception which is looking like a bug in requests or urllib3.
Btw. starting with homeassistant 0.53 there is a configurable timeout you might increase to not get that many timeouts.

Okay thanks. I'll look at it again soon then. I'm on the latest HASS but have copied the old denonavr component to custom_components so it works between releases.

I tried it. Not good.
I renamed the denonavr I had under custom_components and restarted HASS. I noticed some errors in the logs like you mentioned (timeout), and changed the timeout to 8. After that I didn't notice any errors. It sat for awhile and about an hour later I went to watch TV and the volume control was very sluggish.
The TV remote sends a command to home assistant to turn up the volume using the denonavr component. The old version is much more responsive when holding down the volume up/down buttons.

Homeassistant is doing a status update of the receiver after each volume_up / down call. This is probably the reason for your runtime thing. Could you please check two things.

Did you set a name for the receiver in the configuration.yaml? If not please set one and try again. I think your receiver does not provide a "FriendlyName" tag. This could lead to an additional http call on every update.
Please check if the [your receivers IP]/goform/formMainZone_MainZoneXml.xml is slower than the [your receivers IP]/goform/formMainZone_MainZoneXmlStatus.xml interface for some reason. This was changed from version 0.5.0 on to support additional zones.

Yes. I have a name set.  Below is what I had during my last run.
Times listed below.

media_player:
  - platform: denonavr
    name: "denon"
    host: x.x.x.x
    timeout: 8

$ time curl -s x.x.x.x/goform/formMainZone_MainZoneXml.xml > /dev/null

real    0m0.037s
user    0m0.008s
sys     0m0.004s
$ time curl -s x.x.x.x/goform/formMainZone_MainZoneXmlStatus.xml > /dev/null

real    0m0.067s
user    0m0.012s
sys     0m0.000s

hmm that does not look too slow.
HASS seems to call the update() method after each volume_up, volume_down command. Thus could you please measure the runtime for the update() method in both versions of denonavr like you did before for volume_up, down?

Timing would be more accurate using timeit, otherwise importing and setting up the device would be measured too:
import timeit
timeit.timeit('d.update()', 'import denonavr; d = denonavr.DenonAVR("<IP_ADDRESS>", name="denon")', number=1)
timeit.timeit('d.volume_down()', 'import denonavr; d = denonavr.DenonAVR("<IP_ADDRESS>", name="denon")', number=1)

Below are the times. It looks like the different between 0.08 and 0.02 is significant when using it to control volume. Heh.
#######################################################
denonavr-0.4.4

>>> import timeit
>>> timeit.timeit('d.update()', 'import denonavr; d = denonavr.DenonAVR("x.x.x.x", name="denon")', number=1)
0.02673786273226142
>>> timeit.timeit('d.volume_down()', 'import denonavr; d = denonavr.DenonAVR("x.x.x.x", name="denon")', number=1)
0.006549206096678972
>>>
>>>

########################################
denonavr-0.5.4

>>> import timeit
>>> timeit.timeit('d.update()', 'import denonavr; d = denonavr.DenonAVR("x.x.x.x", name="denon")', number=1)
0.0855984422378242
>>> timeit.timeit('d.volume_down()', 'import denonavr; d = denonavr.DenonAVR("x.x.x.x", name="denon")', number=1)
0.006712955888360739
>>>

Just compared the processing times of http request + xml parsing with the whole update method. I can hardly see any difference between those times. Thus there does not seem to be any room for improvement.

I suppose maybe there isn't much that can be done.
All I can think of is making update a separate thread that doesn't run immediately when multiple actions  happen consecutively, but that sounds like a lot of work.
I'll just stay on 0.4.4. Maybe in the future I'll use IR to control the receiver instead and bypass the IP layer.
Another idea is to change the volume in larger increments thereby not having to hold down the volume button on the remote as much/long.
Another idea... Right now volume goes from RF to IP to HASS to IP to DENON. There might be a driver for my remote that would make it : RF to IP to DENON. I don't think its critical to control the Volume via HASS.
Anyway, I can think of many ways to slice this.

Did you try to use the websocket API of homeassistant?
I would expect from the websocket interface that you can send your volume commands to it at anytime without waiting for a response which fits to your remote control use case.

I don't see how the websocket would work. Could you elaborate? This is what I did figure out but it's an expensive command.
echo -ne MVDOWN\\r | /bin/nc.traditional -q0  x.x.xx.x 23

Okay, so I just spent an hour or so re-writing my remote integration so it first pulls the current volume level and then add/subtracts 0.05%. It's way better than the 0.5db up/down that is default.
The only problem is that it uses the denonavr component and the HASS Python REST API. So basically I'm more reliant on the old version.

I never understood why the newer version is noticeably slower for me. Do you know why? Or is it something only I'm experiencing?
I was thinking I could run the new denonavr version and probably change the volume repeat rate to be slower on the remote since I don't need it to be fast anymore.
Anyway, it's probably about time I stop mucking with this and we close it out.

I don't know neither...I'll fix the one bug which might create unneccessary queries when you don't enter a name for the receiver and none could be found in the XML, but this probably won't help you.
Querying the XML of the newer version seems to last a bit longer and they are also a bit bigger. I don't know if this explains the lower speed in your case completely.
But maybe I found a solution for your remote control issue. I just created a small test implementation for the websocket interface of home-assistant, I mentioned in my last post. You can find it here in github.
The results look as I expected. Sending 100 volume up or volume down commands just take 0.02 seconds. My receiver takes longer to process all the commands, but they won't block your remote control.
>>> import timeit
>>> timeit.timeit('hass.volume_down("receiver_wohnzimmer")', 'import hass_websocket; hass = hass_websocket.HassWebsocket("<IP_ADDRESS>"); hass.ws_connect()', number=100)
0.022905174180906093
>>> timeit.timeit('hass.volume_up("receiver_wohnzimmer")', 'import hass_websocket; hass = hass_websocket.HassWebsocket("<IP_ADDRESS>"); hass.ws_connect()', number=100)
0.021968359474699106

The implementation is very basic. It does not subscribe any messages, but even if you would do so it will be faster than the REST interface, because you can send and receive simultaneously...unless you don't wait for the update to send the next command ;)
Please feel free to test it.

Very cool.  THanks.

Closing. I no longer have a Denon.


Trouble Decoding logs from Kinesis

I'm having trouble properly decoding the Flagr logs from Kinesis stream.
Expected Behavior

Upon a POST request to the Flagr evaluation endpoint, I was expecting to see a json payload in Kinesis look like:
{
   "payload":{
      "evalContext":{
         "enableDebug":true,
         "entityContext":{
            "hello":"world"
         },
         "entityID":"a1234",
         "entityType":"kinesis",
         "flagID":1,
         "flagKey":"kzv4okmdqyskoxner"
      },
      "evalDebugLog":{
         "segmentDebugLogs":[
            {
               "msg":"matched all constraints. rollout yes. {BucketNum:201 DistributionArray:{VariantIDs:[19 20] PercentsAccumulated:[500 1000]} VariantID:19 RolloutPercent:100}",
               "segmentID":10
            }
         ]
      },
      "flagID":1,
      "flagKey":"kzv4okmdqyskoxner",
      "flagSnapshotID":145,
      "segmentID":10,
      "timestamp":"2020-05-27T21:05:20Z",
      "variantAttachment":{

      },
      "variantID":19,
      "variantKey":"on"
   }
}

Current Behavior

Instead, I get back a bytes object (in python) with gibberish characters at the beginning and end, but properly serialized json string in between:
b'\xf3\x89\x9a\xc2\n\x05a1234\x1a\xad\x04\x08\x00\x1a\xa8\x04{"payload":{"evalContext":{"enableDebug":true,"entityContext":{"hello":"world"},"entityID":"a1234","entityType":"kinesis","flagID":1,"flagKey":"kzv4okmdqyskoxner"},"evalDebugLog":{"segmentDebugLogs":[{"msg":"matched all constraints. rollout yes. {BucketNum:201 DistributionArray:{VariantIDs:[19 20] PercentsAccumulated:[500 1000]} VariantID:19 RolloutPercent:100}","segmentID":10}]},"flagID":1,"flagKey":"kzv4okmdqyskoxner","flagSnapshotID":145,"segmentID":10,"timestamp":"2020-05-27T21:05:20Z","variantAttachment":{},"variantID":19,"variantKey":"on"}}\x08\xfb\xec\xbd\r\xf7/\xde\x0f@\x08\xd4\x81\x06S\x17'

I also used awscli to watch, in real time, a base64 encoded log come through kinesis. When I try to decode the base64_string in python with base64.64decode(base64_string), I also replicate the giberrish characters before and after the valid serialized json. This indicates to me that I am not understanding how the json is encoded into base64 representation for kinesis.
Possible Solution

Steps to Reproduce (for bugs)

setup environment variables and build the service

FLAGR_RECORDER_ENABLED=true
FLAGR_RECORDER_TYPE=kinesis
FLAGR_RECORDER_KINESIS_STREAM_NAME=flagr-kinesis-wip
FLAGR_RECORDER_FRAME_OUTPUT_MODE=payload_raw_json
AWS_REGION=us-east-1

Terraform Kinesis Setup:
resource "aws_kinesis_stream" "flagr_stream" {
  name             = "flagr-kinesis-${terraform.workspace}"
  shard_count      = 1
  retention_period = 48

  shard_level_metrics = [
    "IncomingBytes",
    "OutgoingBytes",
  ]

  tags = local.default_tags
}

Create an Experiment Flag with logging turned on for kinesis

using python, create a consumer of the Kinesis messages

import json
import os
import random
import time

import boto3

session = boto3.Session()
client = session.client(
    'kinesis'
)

stream = 'flagr-kinesis-wip'
stream_details = client.describe_stream(StreamName=stream)
shard_id = stream_details['StreamDescription']['Shards'][0]['ShardId']
response = client.get_shard_iterator(
    StreamName=stream,
    ShardId=shard_id,
    ShardIteratorType='LATEST'
)
shard_iterator = response['ShardIterator']
while True:
    response = client.get_records(ShardIterator=shard_iterator, Limit=1)
    shard_iterator = response['NextShardIterator']
    for record in response['Records']:
        if 'Data' in record and len(record['Data']) > 0:
            print(record['Data'])

Using the Evaluation UI, POST a request on Flagr
View the message from Kinesis consumer

b'\xf3\x89\x9a\xc2\n\x05a1234\x1a\xad\x04\x08\x00\x1a\xa8\x04{"payload":{"evalContext":{"enableDebug":true,"entityContext":{"hello":"world"},"entityID":"a1234","entityType":"kinesis","flagID":1,"flagKey":"kzv4okmdqyskoxner"},"evalDebugLog":{"segmentDebugLogs":[{"msg":"matched all constraints. rollout yes. {BucketNum:201 DistributionArray:{VariantIDs:[19 20] PercentsAccumulated:[500 1000]} VariantID:19 RolloutPercent:100}","segmentID":10}]},"flagID":1,"flagKey":"kzv4okmdqyskoxner","flagSnapshotID":145,"segmentID":10,"timestamp":"2020-05-27T21:05:20Z","variantAttachment":{},"variantID":19,"variantKey":"on"}}\x08\xfb\xec\xbd\r\xf7/\xde\x0f@\x08\xd4\x81\x06S\x17'

Context

This is affecting our ability to stand up the service and try it out at our org. Once we have our data pipelines hooked up for analytics, we can then try out for feature flags and A/B testing.
Your Environment

Version used (flagr version 1.1.8):
Server type and version:
Operating System and version (uname -a):
Link to your project:

@jscottcronin thanks for the issue. I can jump into it, but it seems quite similar to another issue reported a while back, and since the implementation hasn't changed since then, it might be worth it to check out. Could you check the encoding config of your kinesis stream?
https://github.com/checkr/flagr/issues/267

@marceloboeira Thanks for the suggestion. #267 looks similar, though I'm unable to find the encoding within the AWS UI.
I ended up resolving this issue by applying firehose to the kinesis stream. Firehose now dumps the messages onto s3, and the message format looks good. Potentially the issue could have been in how I was reading from the stream with python, but at this point, I am not going to investigate any longer.
Thanks for the suggestion!

@danielfsousa Interesting. I ended up solving this by adding AWS Firehose, applying a lambda function, and dumping results in csv format on S3 which automatically goes into our data warehouse. the Lambda function I applied looks like:
import base64
from collections import OrderedDict
import csv
import io
import json

def convert_json_to_flat(json_record):
    """Flatten JSON Flagr record to ordered dict"""
    payload = json_record.get('payload', {})
    eval_context = payload.get('evalContext', {})

    return OrderedDict([
        ('raw', json.dumps(json_record)),
        ('error_msg', json_record.get('errorMessage', None)),

        ('eval_context_entity_id', eval_context.get('entityID', None)),
        ('eval_context_entity_context', json.dumps(eval_context.get('entityContext', {}))),
        ('eval_context_flag_id', eval_context.get('flagID', None)),
        ('eval_context_flag_key', eval_context.get('flagKey', None)),

        ('eval_debug_log', json.dumps(payload.get('evalDebugLog', {}))),

        ('flag_id', payload.get('flagID', None)),
        ('flag_key', payload.get('flagKey', None)),
        ('flag_snapshot_id', payload.get('flagSnapshotID', None)),
        ('segment_id', payload.get('segmentID', None)),
        ('timestamp', payload.get('timestamp', None)),
        ('variant_attachment', json.dumps(payload.get('variantAttachment', {}))),
        ('variant_id', payload.get('variantID', None)),
        ('variant_key', payload.get('variantKey', None)),
    ])

def convert_flat_to_csv_string(flat_record):
    """CSV record in string format"""
    delimiter = u'\u001F'
    fn = io.StringIO()

    csv_writer = csv.DictWriter(fn, fieldnames=flat_record.keys(), delimiter=delimiter)
    csv_writer.writerow(flat_record)
    csv_string = fn.getvalue()
    return csv_string

def lambda_handler(event, context):
    """converts each record in event to csv_string and encodes to base64"""
    output = []

    for record in event['records']:
        json_record = json.loads(base64.b64decode(record['data']).decode('utf-8'))
        flat_record = convert_json_to_flat(json_record)
        csv_string = convert_flat_to_csv_string(flat_record)
        output_record = {
            'recordId': record['recordId'],
            'result': 'Ok',
            'data': base64.b64encode(csv_string.encode('utf-8')).decode('utf-8')
        }
        output.append(output_record)
    return {'records': output}


ParsedDockerComposeFile fails if no parentFile (directory) is given in docker-compose file

This code causes a NullPointerException because of missing directory info.
File composeFile = new File("docker-compose-test.yml");
DockerComposeContainer<?> environment = new DockerComposeContainer<>(composeFile)
	.withExposedService("demo-app", 8080, Wait.forHttp("/demo").forPort(8080))
	.withTailChildContainers(false)
	.withLocalCompose(true)
	.withBuild(true)
	.withRemoveImages(RemoveImages.LOCAL);

This code works because of ./ as directory info.
File composeFile = new File("./docker-compose-test.yml");
DockerComposeContainer<?> environment = new DockerComposeContainer<>(composeFile)
	.withExposedService("demo-app", 8080, Wait.forHttp("/demo").forPort(8080))
	.withTailChildContainers(false)
	.withLocalCompose(true)
	.withBuild(true)
	.withRemoveImages(RemoveImages.LOCAL);

Exception
java.lang.NullPointerException: null
        at org.testcontainers.containers.ParsedDockerComposeFile.findImageNamesInDockerfile(ParsedDockerComposeFile.java:124)
        at org.testcontainers.containers.ParsedDockerComposeFile.parseAndValidate(ParsedDockerComposeFile.java:91)
        at org.testcontainers.containers.ParsedDockerComposeFile.<init>(ParsedDockerComposeFile.java:43)
        at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
        at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
        at org.testcontainers.containers.DockerComposeContainer.<init>(DockerComposeContainer.java:122)
        at org.testcontainers.containers.DockerComposeContainer.<init>(DockerComposeContainer.java:112)
        at org.testcontainers.containers.DockerComposeContainer.<init>(DockerComposeContainer.java:108)

This is a regression that has been introduced through changes in DockerComposeContainer.

This is a regression that has been introduced through changes in DockerComposeContainer.

@kiview I created a PR with the fix: https://github.com/testcontainers/testcontainers-java/pull/3866

Fixed via #3866


[iPad/Mac]a11y_Datagrid> controlled-selectable> A11y> 1 violations & 1 incomplete is appearing

Describe the bug
Datagrid>> "1 violations & 1 incomplete" is appearing for "controlled-selectable".
To Reproduce
Steps to reproduce the behavior:

Go to 'https://storybook-preview-dev--upbeat-sinoussi-f675aa.netlify.app/?path=/story/datagrid--controlled-selectable
Click on 'Accessibility" add on
"1 violations & 1 incomplete " is appearing

Expected behavior
"0 violations & 0 incomplete" should appear for datagrid> controlled-selectable.

OS
Version
Result

Win 10 (Chrome)
102.0.5005.63
(http://somup.com/c3jbiRu93S)

Win 10 (Firefox)
101.0
(http://somup.com/c3jbjnu90X)

Win 10 (Edge)
103.0.1264.37
(http://somup.com/c3jbjfu90F)

MAC (safari)
15.3
(http://somup.com/c3jbjcu901)

Ipad (safari)
v15.1
(http://somup.com/c3jbiLu93C)

The issue is still reproducible.
See Screen-cast : http://somup.com/c3jZjiUhbH
Thanks !

Note: reproducible only on Safari

Issue is reproducible only on safari.
See Screen-casts:
Safari : (http://somup.com/c36u1FvxQE)
Chrome : (http://somup.com/c36u1Tvx6f)


KAFKA-10847: Remove internal config for enabling the fix

Also update the upgrade guide indicating about the grace period KIP and its indication on the fix with throughput impact.
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

ping @mjsax @spena .

Merged to trunk; cherry-picked to 3.0.


Add quick links to logs in tasks table subview

@tpetr here's a new PR w/ cleaner commits

@tpetr I seem to have resolved the issue in 37237ce7c224c24a9b00a90590a24d6707c29b72. It also seems to be the root cause of my frequent server crashes. Would you please merge this commit into the hs_staging branch?

@tejasmanohar put the updates in hs_staging for you

@ssalinas thanks

@tpetr would you please merge this latest commit c947f2e073d4b258738b499dadaf125f1a5341ad into hs_staging? it wraps the  in a

@tpetr It looks like this wasn't merged properly. Is it possible to "revert" the merge through the GitHub interface or must it be done manually? https://help.github.com/articles/reverting-a-pull-request/
I think the issue was caused by merging https://github.com/HubSpot/Singularity/pull/560 partially manually before (guessing by the hs_staging label there)- maybe you can revert that as well?


Base Route and Middleware

Given that the routes have grown and will be growing in the future. It is necessary to have

a single file where all the routes are used.
a single middleware file where all the middleware  and the route middleware are used/registered

This way route and middleware are separated from the index file, thereby making it smaller, and cleaner.
Example:
-middleware/
--error.middleware.js
--another.middleware.js
--index.middleware.js // import all middleware and use them and export an instance of all the used middleware

Same for routes.

@anomic30 Check this out and assign it to me.


chore: setting up frontend superblock

Checklist:

[x] I have read and followed the contribution guidelines.
[x] I have read and followed the how to open a pull request guide.
[x] My pull request targets the main branch of freeCodeCamp.
[x] I have tested these changes either locally on my machine, or GitPod.

closing in favor of Tom's PR


Clean up Cargo.toml files for tests

What problem does your feature solve?
There are many inconsistencies and unnecessary lines in the Cargo.toml files for tests, such as https://github.com/stellar/rs-soroban-sdk/pull/426#discussion_r943588988.
What would you like to see?
Make them uniform and bring them in line with our current development guidelines.
What alternatives are there?
N/A

Some of them depend on proptest (eg. add_i32) and some don't (eg. add_i64), but as far as I can tell none of them are actually using it. contract_data, linear_memory, vec don't specify publish = false but other tests do.

Thanks, adding this to the August iteration because the publish = false are likely to cause issues with releasing at the end of the iteration.

I removed prop_test recently from the sdk repo, and the publish thing got fixed I think at some point.


Code in doc directory

E.g.  https://github.com/EdwardZheng0312/VisualanalysisAFM/blob/master/doc/correct_slope.py
This is kind of a duplicate of organize codebase.

We have fixed it.


DBZ-4971 Add triggers for 2.x paths in Github CI

https://issues.redhat.com/browse/DBZ-4971

@ani-sha Applied, thanks


quic: add dumb implementation to QuicSslConnectionInfo

Commit Message: overriding the existing implementation in the base class, so that those boring SSL calls to X509 methods won't cause any problem.
Risk Level: low
Testing: added new tests
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: n/a

/assign @RyanTheOptimist

@ggreenway for !google pass


chore: remove leftover expression

This is a follow-up to #2849. It looks like I was a little too quick to switch the statement and forgot to remove the typeof.

I've rolled these changes into #3693. Closing to avoid potential merge conflicts.


Can't build a fresh clone

Prerequisites

[x] I have written a descriptive issue title
[x] I have searched open and closed issues to ensure it has not already been reported

Description
A fresh clone does not build from the command line.
Steps to Reproduce
Scenaro 1

git clone git@github.com:NancyFx/Nancy.git
cd Nancy
bundle install
bundle exec rake
Observe errors: output-1.txt

Scenaro 2

git clone git@github.com:NancyFx/Nancy.git
cd Nancy
build.ps1
Observe errors: output-2.txt
Incidentally, the current directory is changed to test\Nancy.Authentication.Basic.Tests after the build script fails

System Configuration

Environment (Operating system, version and so on): Windows 10, with Visual Studio 2015 Enterprise
.NET Framework version: 4.6.1

I missed

If you don't have Visual Studio 2010 installed you'll need to download and install Visual Studio 2010 Shell from http://www.microsoft.com/en-us/download/details.aspx?id=1366

from https://github.com/NancyFx/Nancy/blob/master/how_to_build.txt and I presume that will fix scenario 1.
I'm not convinced it will fix scenario 2 though.

On OSX (El Capitan)
Using clone as of today
$ sh build.sh
Unhandled Exception: System.TypeInitializationException: The type initializer for 'Crypto' threw an exception. ---> System.TypeInitializationException: The type initializer for 'CryptoInitializer' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'System.Security.Cryptography.Native': The specified module could not be found.

Is this issue resolved now, given the recent changes ?

In Windows, scenario 2 seems to be fixed. I can't confirm Scenario 1 because I'm not willing to install the VS 2010 shell just for this, but I guess there's no problem there.


update ios instructions to add setting the directory

all the points are 1.s instead of the correct number

this is intentional, as it automatically converts the 1s to be correct

til


Optimize generateLabelString()

Ref: #19571
Results:
new:   BenchmarkGenerateLabelString-8   	36379892	        39.96 ns/op	       0 B/op	       0 allocs/op
old:   BenchmarkGenerateLabelString-8   	 5249149	       211.8 ns/op	      64 B/op	       4 allocs/op

Signed-off-by:  youhonglian<EMAIL_ADDRESS>

Thanks! Would you mind signing off your commit?

/test

/test

4.9 & 5.4 Jenkins runs hit flake https://github.com/cilium/cilium/issues/21735. Marking ready to merge.


Raise 404 instead of return

Raise a HTTPNotFound instead of returning it so it can get caught by our exception handler and a nice 404 page will be rendered instead.

Not really required for this, but I wonder if we can lint for returning a 404 instead of raising one somehow?

Considered it, there's at least one place where we really do want to return a HTTPNotFound so I'm not sure it's worth the effort.


Create interfaces for Audio and Input on Lwjgl backend

#5985 Lwjgl backend refactor.
Not many changes required. The only choice I've made is to create a new LwjglApplicationBase interface similar to what exists on Android that is implemented by all LwjglApplication implementations.

Concerns about the naming conventions used in these PR have raised on Discord channel. I agree with those concerns that implementations should not be named with "Impl" suffix but with a descriptive prefix. So, for instance, instead of naming the AndroidAudio implementation AndroidAudioImpl we should name it XXXXAndroidAudio being "XXXX" descriptive or "Default" if no better name.
This is a good time to make this change as only the Android PR has been merged.
Please give your thumbs up or thumbs down.

Seems OK to me. I'm OK with merging if no one has objections.

@NathanSweet I think now that we've waited for a while for objections, it'd be great if we could start merging the whole set of refactoring PRs. Due to all the renaming changes it's easy to have conflicts with other PRs and I think it'd be positive to let them mature for a while in Snapshot.


Deprecated or No Longer Supported?

Noticed PRs seem to be multiple months old.
Has the maintainer stopped supporting this plugin?
Has it been deprecated in favor of other plugins?

Hi @kyleknighted,
I've been extremely absent from my projects for some time now, only being able to do some minor contributions to OS projects (including my own). But CodeFlask is definitely not deprecated nor unsupported.
I'm planning to make this version more stable by fixing major bugs, so I can work on a newer version using contenteditable, which I believe will not only help with performance, but will also prevent odd UI bugs such as the ones in #47, #34, etc.


When "setupTestFrameworkScriptFile" is defined in config json, but file is missing, exits without error message

Do you want to request a feature or report a bug?
Bug
What is the current behavior?

When "setupTestFrameworkScriptFile" is defined in config json
and the named file is missing
exits without error message, only thing on stdout is a single blank line
with error code 1 (and nothing else)

If the current behavior is a bug, please provide the steps to reproduce and either a repl.it demo through https://repl.it/languages/jest or a minimal repository on GitHub that we can yarn install and yarn test.

See description above, contains steps to reproduce

What is the expected behavior?

When "setupTestFrameworkScriptFile" is defined in config json
and the named file is missing
exits with an error message: "Could not find the setupTestFrameworkScriptFile" (or similar)
with error code 1

Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
Versions:
$ ./node_modules/.bin/jest -v
v20.0.4
$ node -v
v6.10.3
$ yarn --version
0.19.1
$ npm -v
3.10.10

Config:
{
  "testEnvironment": "node",
  "bail": false,
  "timers": "fake",
  "roots": [
    "packages"
  ],
  "setupFiles": [],
  "setupTestFrameworkScriptFile": "./jest-setupTestFrameworkScriptFile.js",
  "testMatch": [
    "**/*.jest.js"
  ],
  "moduleFileExtensions": [
    "js",
    "json",
    "node"
  ],
  "notify": true
}

If your config is not in the root of the project you must temporarily add "rootDir": "../path/to/your/root". This is a known bug in current Jest version. See https://github.com/facebook/jest/issues/3613

@thymikee my config is in the root folder - so that appears to be a different issue altogether


habitat multiblock structure

asof — Today at 12:50 AM
what about a "habitat" multiblock structure
with a bunch of placement rules about what can go inside it
similar to the kind of concept behind nuclear reactor mods
and it'd produce different assortments of materials depending on its internal configuration
the custom machinery mod would be pretty good for this
wait this is absurdly complicated
not a good way to get string
it's an interesting puzzle potentially


Depend on issue in Kconfig template file

I have a networking specific Kconfig template file used in #8816
My Kconfig template file has this thing setup there
choice
	prompt "$(module-str)"
	default $(module)_LOG_LEVEL_WRN
	depends on $(module-dep)

I am trying to use the template like this:
module=NET_TCP
module-dep=NET_LOG && NET_TCP
module-str=Log level for TCP
source "subsys/net/Kconfig.template.log_config.net"

When using make menuconfig and when both NET_TCP and NET_LOG are enabled, the logging option is not shown and when searching NET_TCP_LOG_LEVEL in menuconfig, I see this:
NET_TCP_LOG_LEVEL(=)
NET_TCP_LOG_LEVEL_DBG(=n) "Debug"
NET_TCP_LOG_LEVEL_ERR(=n) "Error"
NET_TCP_LOG_LEVEL_INF(=n) "Info"
NET_TCP_LOG_LEVEL_OFF(=n) "Off"
NET_TCP_LOG_LEVEL_WRN(=n) "Warning"

If I have only one setting in module-dep, then everything works as expected. I would like to use the more complex depends on command as it would allow use of only one template file, now I am forced to create multiple template files with different set of dependencies.

@jukkar
This is by design, though designs can be argued. See the 'caveats' section in https://github.com/torvalds/linux/blob/master/Documentation/kbuild/kconfig-macro-language.txt.
$() is currently limited to producing (part of) a single token, and can only produce symbol names/strings. This makes sense inside quotes, as you don't want "foo $(bar) baz" to break if $(bar) expands to something with a " in it.
Outside quotes it's more arguable, but the feeling when we discussed it on LKML was that there would usually be a cleaner way to handle those multi-token cases in plain Kconfig. Always producing tokens simplifies the implementation a bit, and could prevent things from turning into the "Wild West" (though the case above isn't that bad).
Would this work?
if NET_LOG && NET_TCP

module=NET_TCP
module-str=Log level for TCP
source "subsys/net/Kconfig.template.log_config.net"

endif # NET_LOG && NET_TCP

What your code is actually doing is creating a reference to a symbol named NET_LOG && NET_TCP by the way, which isn't exactly obvious. The only checking that's done on the generated name at the moment is that it isn't empty.
The same approach could be used to define Make variables with spaces in them too, if you really wanted to, so that's where it came from. Maybe flagging some more things would be nice though...

Looks like Make also refuses to create a variable with an empty name:
empty =
$(empty) =

gives
Makefile:2: *** empty variable name.  Stop.

Hmm... looks like that doesn't flag an error currently though. The only check is that you don't generate an empty symbol name when expanding a macro.
Expansion probably ought to check that valid symbol names are generated, along with an added check for trying to create a preprocessor variable with an empty name. It's a bit mixed up now. Might be more harmful than useful to allow creating Kconfig symbols with weird names.
That's unrelated to the single-token thing though.

This is by design, though designs can be argued.

This is unfortunate, it looked like a clean solution.

Would this work?
if NET_LOG && NET_TCP

module = NET_TCP
module-str = Log level for TCP
source "subsys/net/Kconfig.template.log_config.net"

endif # NET_LOG && NET_TCP

Sure, that would work of course. It is just that I tried to avoid that in this case :)
Lets close this then as this is not going to work.


feat: swap to negativo17 as nvidia driver source

This reworks all the bits in akmods for nvidia:

removes nvidia driver version as only latest is supported
adds negativo17-fedora-nvidia repo to ublue-os-nvidia-addons RPM
removes extra metadata from the nvidia-vars create in image

This PR will require a corresponding PR in hwe to ensure proper repos are being used and the new package names are installed since negativo17 has some different package naming.

Despite initially clean builds which looked good (and tested good locally) when we got approvals, it seems like the timing matched up with a kernel update which is causing version skew with rpm repos.
Probably wait until Sunday afternoon to try merging again.


Feature/composite properties and authentication

Hi Tiago
I've been using your gosoap library but needed to pass in composite structures as measage parameters as well as include basic http authentication. Please have a look at my changes and merge, if you agree.
Regards,
Steven

Codecov Report

Merging #4 into master will decrease coverage by 1.53%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master       #4      +/-   ##
==========================================
- Coverage   71.09%   69.56%   -1.54%
==========================================
  Files           3        3
  Lines         173      184      +11
==========================================
+ Hits          123      128       +5
- Misses         47       51       +4
- Partials        3        5       +2

Impacted Files
Coverage Δ

soap.go
84.61% <0%> (-3.39%)
:arrow_down:

encode.go
61.29% <75%> (-0.45%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6ee32cf...d9038da. Read the comment docs.

Hi @Steven-aka-Steven!
Can you refactor the tests to match your changes?
Thank you!


Editing a step does not allow change of selection

When editing a step, you can edit the text OK but changing the selection does not get saved. It would be nice if you can adjust the selection - otherwise you are stuck forever with a erroneous selection.

Agreed! I’ll prioritize this fix this week 👍

This has been fixed in the latest update. If you edit a step, and then change (or remove) the selection, that will be recorded when you save those changes (along with any changes to the step's description). Thanks for the feedback here!

Thanks for this fix.  P.S. Would be nice to be able to edit/adjust the step line number too!

Agreed! I just filed this issue to track that additional enhancement: https://github.com/vsls-contrib/codetour/issues/36. If you have any thoughts on how the user experience could work, I’d love to hear it, since I’m not immediately sure how to best enable this. Thanks!


Miso Mosi pins not defined in library

I was using this library for Nordic semiconductor board Redbearlab nrf51822 board in arduino IDE PCA10028 board .Example code got compiled but I see garbage values in serial monitor. And failed connection . I had defined pins like as follows
#define SPI_CLOCK 8000000  // 1MHz
#define SPI_CLOCK 16    /////P0.25
#define CS   10    ////P0.14
#define MISO    17    /// P0.22 SDO
#define MOSI    18     ////P0.20  SDI
#define LED      13  ////P0.15
#define INT      12 ///P0.13
I need to know that do there is any support to change the default pin it is taking for spi communication. And where do I change it...???
Thank you....

@Devanshi15 So you are looking to connect the MPU9250 with your PCA10028? Provided the Arduino Code has support for SPI on PCA10028, it should work. SPI pins to a certain pins on any microcontroller and it is not a matter of just changing it? In fact, chances are there's only one SPI port on your board meaning you can't change it anyway.
The code snippet you provided does not give me any context to understand the problem. What does defining MISO/MOSI achieve? Where is it used in your code? It certainly isn't used in the example provided.
This library does not provide direct support changing the default pin for SPI communication. That would be up to you to change in your code. For example, if you were using a Teensy instead of PCA10028 you could use SPI.setMISO and SPI.setMOSI to change the port.

The Arduino SPI library uses the default port. This library uses the core arduino SPI library, which should use whatever is the default SPI port as specified by your board, provided your board has an SPI port. It should be a matter of searching up "nrf51822 pinout" and looking for the MISO/MOSI pins and connecting MISO (dev board) - MOSI (mpu9250) and MOSI (dev board) - MISO (mpu9250).

It is working fine when I try to serially communicate something. So, it should support this library too.
I'm not sure what you mean by this. What do you mean by "Serial" communication? As in via UART? That is completely irrelevant.


keep galera_cluster_name the same as juno

A juno deploy will have galera_cluster_name set to rpc_galera_cluster.
When upgrading to kilo, we need to keep this name the same (osad kilo
changes the default to openstack_galera_cluster) otherwise rolling
restarts of the cluster during upgrades will timeout and fail.
Closes: #308

:+1:

+1


Origin/feature/make swagger json links browsable

Purpose

Changes

Side effects

Ticket

It's Autumn Cleaning time, so I'm closing this PR. Feel free to re-open when development becomes active again.


Reducer ReturnType doesn't work with Redux combineReducers

Could you flush out your example more?  Unless I'm missing something, our reducers use combineReducers from Redux a lot and it complains when I try to use ReturnType to save on boilerplate code.  Is there a way to get them to play nicely together?  complains that A Action isn't same as PayloadAction.  Using your new 2.0 stuff and loving it.  Thanks for making it!

Hi @kralcifer-ms
Please include a full code sample so I could investigate

Here's a subset of how I have things set up.  We have many more actions, reducers, epics in our app but this is what a small piece of one looks like.
Actions.ts
import { ActionsUnion } from 'typesafe-actions';
import { coreActions } from './coreActions';

const actions = {
    coreActions,
};

export type RootAction = ActionsUnion<typeof actions>;

Reducer.ts
import { combineReducers, ReducersMapObject } from 'redux';
import core, * as fromCore from './coreReducer';

export interface IRootState {
    core: fromCore.ICoreState;
}

const reducers: ReducersMapObject = {
    core,
};

export const rootReducer = combineReducers<IRootState>(reducers);

coreActions.ts
import { buildAction } from 'typesafe-actions';
import { OrientationType } from '../utils/appUtils';

export const orientationChanged = buildAction('CORE_ORIENTATION_CHANGED').fsa((orientation: OrientationType) => ({ orientation }));

export const coreActions = {
    orientationChanged,
};

coreReducer.ts
import { combineReducers } from 'redux';
import { getType } from 'typesafe-actions';
import { RootAction } from '../actions/Actions';
import { orientationChanged } from '../actions/coreActions';
import { OrientationType } from '../utils/appUtils';

export interface ICoreState {
    orientation: OrientationType;
}

const orientation = (state: OrientationType = OrientationType.Portrait, action: RootAction) => {
    let newState: OrientationType;
    if (action.type === getType(orientationChanged)) {
        newState = action.payload.orientation;
    }

    return newState || state;
};

export const core = combineReducers<ICoreState>({
    orientation,
});

export default core;

export const getOrientation = (state: ICoreState) => state.orientation;

I would love to change the orientation reducer to this:
const orientation = (_state: OrientationType = OrientationType.Portrait, action: ReturnType<typeof orientationChanged>) => action.payload.orientation;

but when I do, combineReducers complains:

Argument of type '{ appReady: (state: boolean, action: { type: "Navigation/NAVIGATE"; routeName: string; } | { type...' is not assignable to parameter of type 'ReducersMapObject'.
Property 'orientation' is incompatible with index signature.
Type '(_state: OrientationType, action: PayloadAction<"CORE_ORIENTATION_CHANGED", { orientation: Orient...' is not assignable to type 'Reducer'.
Types of parameters 'action' and 'action' are incompatible.
Type 'A' is not assignable to type 'PayloadAction<"CORE_ORIENTATION_CHANGED", { orientation: OrientationType; }>'.
Type 'Action' is not assignable to type 'PayloadAction<"CORE_ORIENTATION_CHANGED", { orientation: OrientationType; }>'.
Property 'payload' is missing in type 'Action'.

@kralcifer-ms  Thanks for the details, one more thing is which version of redux types you're depending on?
If you're not sure please refer here: https://github.com/piotrwitek/react-redux-typescript-guide#type-definitions-for-react--redux

Nice.  Looks like I may have a mess there:
"react-redux": "5.0.5",
"redux": "3.7.0",
"@types/react-redux": "4.4.47",

I'll try bumping everything to v4 and see what I get.  Thank you!

Also here is a working example of combineReducers for the old API: https://github.com/piotrwitek/react-redux-typescript-guide/blob/master/playground/src/redux/todos/reducer.ts
Later I'll try to refactor it to the new API and see how that works

Well we've actually had a heated debate at work about the new stuff.  People aren't liking the .payload because if it's a number or string you lose the nice variable name that we previously had when we put things inside of a payload object.  Hence, the use of fsa as you see above.  We're actually having trouble figuring out how to use fsa for the scenarios where we want to pass 2 or 3 variables.  I was going to open an issue asking you for advice on that too.

The link you sent to todos reducer.ts is exactly what we have been doing but I was wanting to move us to your new stuff.

Wait a second I have something something nice for folks that like multi-argument style as well.
Actually I was thinking to give two kind of styles that are aligned with general accepted styles for entire JS community:

one bag object style argument -> which was a missing piece in typesafe-actions
multi argument style - for this style I have a new API which is much simpler and it's ready to be published.
Let me share with you a snipper of how that works from my unit tests:

const createUser = (id: number, name: string) => action('CREATE_USER', { id, name });
createUser(1, 'Piotr')
// type => { type: 'CREATE_USER'; payload: { id: number; name: string } }
// value => { type: 'CREATE_USER', payload: { id: 1, name: 'Piotr' } });

// advanced example
const fetchUser = {
  request: () => action('FETCH_USER_REQUEST'),
  success: (user: { id: number; name: string }) => action('FETCH_USER_SUCCESS', user),
  failure: (reason: string, traceId: string) => action('FETCH_USER_FAILURE', reason, traceId),
};

fetchUser.request();
fetchUser.success({ id: 1, name: 'Piotr' });
fetchUser.failure('not found', 'fake_trace_id');

If you can, please show it to your co-workers at work and tell me what you guys think about it.
Cheers!

looks exactly like what we want.  we'd love to try it.

I'll publish a new version later today

Resolved by new version release, please use v2.0.0-rc.0


feat: add jito rpc option

What is this for??
I can't see RPC startup script ...
Jito Mainnet Validator is already in the setup code.


Integration is not updating

First, thanks for all your work, good job!
I still have the problem that the integration do not update unless I reload it. I am using 1.2.1.
Please let me know if there is anything I can do to help you troubleshoot.
2023-12-27 10:03:48.520 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.polestar_estimate_distance_to_empty_miles fails
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.11/site-packages/anyio/_core/_sockets.py", line 189, in connect_tcp
    addr_obj = ip_address(remote_host)
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/ipaddress.py", line 54, in ip_address
    raise ValueError(f'{address!r} does not appear to be an IPv4 or IPv6 address')
ValueError: 'pc-api.polestar.com' does not appear to be an IPv4 or IPv6 address

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 114, in connect_tcp
    stream: anyio.abc.ByteStream = await anyio.connect_tcp(
                                   ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/anyio/_core/_sockets.py", line 192, in connect_tcp
    gai_res = await getaddrinfo(
              ^^^^^^^^^^^^^^^^^^
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.11/site-packages/httpcore/_exceptions.py", line 10, in map_exceptions
    yield
  File "/srv/homeassistant/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 113, in connect_tcp
    with anyio.fail_after(timeout):
  File "/srv/homeassistant/lib/python3.11/site-packages/anyio/_core/_tasks.py", line 119, in __exit__
    raise TimeoutError
TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.11/site-packages/httpx/_transports/default.py", line 66, in map_httpcore_exceptions
    yield
  File "/srv/homeassistant/lib/python3.11/site-packages/httpx/_transports/default.py", line 366, in handle_async_request
    resp = await self._pool.handle_async_request(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 262, in handle_async_request
    raise exc
  File "/srv/homeassistant/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 245, in handle_async_request
    response = await connection.handle_async_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/httpcore/_async/connection.py", line 99, in handle_async_request
    raise exc
  File "/srv/homeassistant/lib/python3.11/site-packages/httpcore/_async/connection.py", line 76, in handle_async_request
    stream = await self._connect(request)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/httpcore/_async/connection.py", line 124, in _connect
    stream = await self._network_backend.connect_tcp(**kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/httpcore/_backends/auto.py", line 31, in connect_tcp
    return await self._backend.connect_tcp(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 112, in connect_tcp
    with map_exceptions(exc_map):
  File "/usr/local/lib/python3.11/contextlib.py", line 155, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/srv/homeassistant/lib/python3.11/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
    raise to_exc(exc) from exc
httpcore.ConnectTimeout

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.11/site-packages/homeassistant/helpers/entity.py", line 698, in async_update_ha_state
    await self.async_device_update()
  File "/srv/homeassistant/lib/python3.11/site-packages/homeassistant/helpers/entity.py", line 959, in async_device_update
    await self.async_update()
  File "/home/homeassistant/.homeassistant/custom_components/polestar_api/sensor.py", line 530, in async_update
    await self._device.async_update()
  File "/home/homeassistant/.homeassistant/custom_components/polestar_api/polestar.py", line 50, in async_update
    await self.polestarApi.get_ev_data(self.vin)
  File "/home/homeassistant/.homeassistant/custom_components/polestar_api/pypolestar/polestar.py", line 130, in get_ev_data
    await call_api(lambda: self._get_odometer_data(vin))
  File "/home/homeassistant/.homeassistant/custom_components/polestar_api/pypolestar/polestar.py", line 122, in call_api
    await func()
  File "/home/homeassistant/.homeassistant/custom_components/polestar_api/pypolestar/polestar.py", line 65, in _get_odometer_data
    result = await self.get_graph_ql(params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/homeassistant/.homeassistant/custom_components/polestar_api/pypolestar/polestar.py", line 154, in get_graph_ql
    result = await self._client_session.get(url, params=params, headers=headers)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/httpx/_client.py", line 1757, in get
    return await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/httpx/_client.py", line 1530, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/httpx/_client.py", line 1617, in send
    response = await self._send_handling_auth(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/httpx/_client.py", line 1645, in _send_handling_auth
    response = await self._send_handling_redirects(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/httpx/_client.py", line 1682, in _send_handling_redirects
    response = await self._send_single_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/httpx/_client.py", line 1719, in _send_single_request
    response = await transport.handle_async_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/httpx/_transports/default.py", line 365, in handle_async_request
    with map_httpcore_exceptions():
  File "/usr/local/lib/python3.11/contextlib.py", line 155, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/srv/homeassistant/lib/python3.11/site-packages/httpx/_transports/default.py", line 83, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ConnectTimeout

any ideas why pc-api.polestar.com does not seem to resolve in your setup?

Not really, a ping does work. My piholes were outdated, I have updated them now, I'll see if that makes a difference.

i notice few days ago that polestar server sometimes give 502 error. maybe they can't handle so much request (not my issue, they didn't give me the correct api information)

The problem does not seem to be pihole, I am still getting an error. This time only timeout, as far as I can see.
Logger: homeassistant.config_entries
Source: config_entries.py:402
First occurred: December 28, 2023 at 19:44:51 (2 occurrences)
Last logged: 10:14:32

Error setting up entry Polestar EV for polestar_api
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.11/site-packages/anyio/_core/_sockets.py", line 221, in connect_tcp
    await event.wait()
  File "/srv/homeassistant/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 1778, in wait
    if await self._event.wait():
       ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/locks.py", line 213, in wait
    await fut
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 114, in connect_tcp
    stream: anyio.abc.ByteStream = await anyio.connect_tcp(
                                   ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/anyio/_core/_sockets.py", line 216, in connect_tcp
    async with create_task_group() as tg:
  File "/srv/homeassistant/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 593, in __aexit__
    raise CancelledError
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.11/site-packages/httpcore/_exceptions.py", line 10, in map_exceptions
    yield
  File "/srv/homeassistant/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 113, in connect_tcp
    with anyio.fail_after(timeout):
  File "/srv/homeassistant/lib/python3.11/site-packages/anyio/_core/_tasks.py", line 119, in __exit__
    raise TimeoutError
TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.11/site-packages/httpx/_transports/default.py", line 66, in map_httpcore_exceptions
    yield
  File "/srv/homeassistant/lib/python3.11/site-packages/httpx/_transports/default.py", line 366, in handle_async_request
    resp = await self._pool.handle_async_request(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 262, in handle_async_request
    raise exc
  File "/srv/homeassistant/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 245, in handle_async_request
    response = await connection.handle_async_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/httpcore/_async/connection.py", line 99, in handle_async_request
    raise exc
  File "/srv/homeassistant/lib/python3.11/site-packages/httpcore/_async/connection.py", line 76, in handle_async_request
    stream = await self._connect(request)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/httpcore/_async/connection.py", line 124, in _connect
    stream = await self._network_backend.connect_tcp(**kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/httpcore/_backends/auto.py", line 31, in connect_tcp
    return await self._backend.connect_tcp(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 112, in connect_tcp
    with map_exceptions(exc_map):
  File "/usr/local/lib/python3.11/contextlib.py", line 155, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/srv/homeassistant/lib/python3.11/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
    raise to_exc(exc) from exc
httpcore.ConnectTimeout

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.11/site-packages/homeassistant/config_entries.py", line 402, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/homeassistant/.homeassistant/custom_components/polestar_api/__init__.py", line 48, in async_setup_entry
    await polestarApi.init()
  File "/home/homeassistant/.homeassistant/custom_components/polestar_api/polestar.py", line 30, in init
    await self.polestarApi.init()
  File "/home/homeassistant/.homeassistant/custom_components/polestar_api/pypolestar/polestar.py", line 24, in init
    await self.auth.get_token()
  File "/home/homeassistant/.homeassistant/custom_components/polestar_api/pypolestar/auth.py", line 26, in get_token
    code = await self._get_code()
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/homeassistant/.homeassistant/custom_components/polestar_api/pypolestar/auth.py", line 58, in _get_code
    query_params = await self._get_resume_path()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/homeassistant/.homeassistant/custom_components/polestar_api/pypolestar/auth.py", line 113, in _get_resume_path
    result = await self._client_session.get("https://polestarid.eu.polestar.com/as/authorization.oauth2", params=params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/httpx/_client.py", line 1757, in get
    return await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/httpx/_client.py", line 1530, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/httpx/_client.py", line 1617, in send
    response = await self._send_handling_auth(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/httpx/_client.py", line 1645, in _send_handling_auth
    response = await self._send_handling_redirects(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/httpx/_client.py", line 1682, in _send_handling_redirects
    response = await self._send_single_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/httpx/_client.py", line 1719, in _send_single_request
    response = await transport.handle_async_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.11/site-packages/httpx/_transports/default.py", line 365, in handle_async_request
    with map_httpcore_exceptions():
  File "/usr/local/lib/python3.11/contextlib.py", line 155, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/srv/homeassistant/lib/python3.11/site-packages/httpx/_transports/default.py", line 83, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ConnectTimeout

Same issue here

https://github.com/leeyuentuen/polestar_api/pull/26 catch httpx exception
let try the last beta 1.2.8: https://github.com/leeyuentuen/polestar_api/releases/tag/1.2.8

@tomasrudh☝

duplicated issue. continue in this issue:
https://github.com/leeyuentuen/polestar_api/issues/43


CommonMark conformance

What do project maintainers think about CommonMark initiative to create full and unambigous specification for basic Markdown (without extensions). Is (or will be) it planned for a some point of time?
The current specification is there: http://spec.commonmark.org/
Repository with reference implementation and conformance tests is there: https://github.com/jgm/CommonMark
Conformance to CommonMark will fix bugs such as #230 and will help to avoid them in future. And, that is more important, will reduce the inconsistencies between implementations.
Result of Redcarpet 3.2.0 (command line utility) on CommonMark 0.6 conformance tests is: 213 tests passed, 256 failed, 0 skipped.
The testing was done like so:
git clone https://github.com/jgm/CommonMark.git
cd CommonMark
# install re2c like: brew install re2c
make
make test # Testing of reference implementation: 469 tests passed, 0 failed, 0 skipped.
gem install redcarpet
PROG=redcarpet make test # 213 tests passed, 256 failed, 0 skipped.

So apparently Sundown is deprecated now in favor of CommonMark? The CommonMark reference implementation is here, but presumably there will be other parsers which conform to the standard.

presumably there will be other parsers which conform to the standard.

There are.

Hi, I'm interested in CommonMark conformance to maximize compatibility between http://github.com/diaspora/diaspora (using RedCarpet) and http://github.com/friendica/friendica (written in PHP). Is it still in the works?

Hi there,
Sorry, I've never commented here but here are some thoughts about this:

Conforming to CommonMark would sure fix a bunch of bugs that have been there forever and improve the match between how Redcarpet behaves and how people expect it to behave.
If Redcarpet supports CommonMark, it would be in version 4.0 since we would introduce breaking changes (e.g. translating tabs to spaces wouldn't be done anymore). The main problem with this is that the 3.x series should certainly still be supported for fixing eventual security issues ; some people may still want the original Markdown or may not be able to upgrade easily given that they've written a lot of documents conforming with the "buggy" behaviors of Redcarpet.
Some people use this library over other Markdown parsers because of the speed and the easy API. CommonMarker doesn't provide as much options as Redcapet does but provides a similar API for render object. Though, it's not quite the same and I'm not a huge fan of it. However, maybe that something that can be improved !
I haven't used CommonMarker in any production project but since, as far as I remember, CommonMark generates an AST before generating the final output, it should be slower and more memory consuming than Redcarpet. If CommonMarker is used by GitHub, it's certainly battle-tested and pretty efficient but maybe Redcarpet is still a better fit for tinier projects. Just thinking out loud here, I'm maybe totally wrong as I didn't benchmark anything !

A general message about the project for people skimming this thread: I'm sorry Redcarpet isn't really active anymore but my resources are pretty limited since I'm committed to other open source projects and still a student. Feel free to use any existing alternative ; this project isn't the great tool it used to be when it was maintained by Vicent.

Hello there,
Just commenting to say that Redcarpet will not conform to CommonMark in the near future. That would require a lot of work and would be counter productive as there already are alternatives like CommonMarker. This library will still be maintained for people using "plain old" Markdown.
I'm giving this a close ; thanks !


Make rich text soft line breaks configurable with rich text features

The current implementation of line breaks in our rich text editor is hard-coded at the editor level. The aim for this PR is to make that configurable like other rich text features.
Fixes #4445.

@thibaudcolas Is this approach is the right way to go?

Force-pushed rebased onto latest master. I'll hopefully review this on the way back home!

@gasman starting to review this properly, I realise now that we might want to have a deprecation process for this. It's not clear to me what would be a useful deprecation though.
If this gets merged as-is, it means that in the cases where people defined their own features for rich text, line breaks will stop being available in the toolbar, and will stop being converted to <br /> in the content processing. Changing how content is saved / rendered is definitely a breaking change, even if a simple one to fix (add br to the features list where you rely on it).
I could think of at least two ways to do this with a deprecation process over two releases:

Docs-only. Document the need for people to opt-in to br feature in the "Upgrade considerations" section of the release, and in the Wagtail docs. It won't do anything until when this is actually implemented, but might be enough.
Clever content analysis. Merge this PR with extra logic to automagically turn on the br feature if existing content (in a given editor) contains line breaks, and br isn't turned on. Logging some deprecation warnings at the same time.

I think the content analysis would solve this quite well, but it seems rather complicated for something that's only going to be used for one release as a deprecation path. The "docs-only" option is much simpler, but also means there won't be actual deprecation warnings. What do you think?

@thibaudcolas Is it okay to add this breaking change to a major Wagtail release? Without a deprecation process? Since we have majors more often, we could just set the milestone to 7, merge when time comes, and be done.
I'm not a fan of 'content analysis'. It will add overhead and complexity. Removing BR, because the the content doesn't contain BR, seems fuzzy. It seems perfectly possible that BR feature is needed, but just not in the content yet.
Are warnings to notify that "br" is missing from rich text features a good idea? We could keep these warnings for two releases. Additionally, we could add a "silence-no-br-warnings" feature. Integrators who review their features have two options: Add "br" or "silence-no-br-warnings". The "silence-no-br-warnings" is only a flag, the feature itself should be a no-operation.
If a design decision is made, I'm happy to get this PR over the line.

Coming back to this with fresh eyes - I think @thibaudcolas's suggestion of turning on the br feature if a line break already exists in a field makes a lot of sense. Calling it "content analysis" makes it sound like an unreliable fuzzy heuristic, which I think is misleading...
As I see it, this is something we would introduce after developers have been given sufficient notification that they need to add br as a feature if they want to continue using line breaks. This way, if developers miss the memo, there will be a period of time when the "damage" will be limited to them going "hmm, why can't I add line breaks here? Oh, I see, I need to add br to the features now" rather than Wagtail corrupting their existing content on save.
The question then is what counts as "sufficient notification". Personally I think that losing line breaks as a feature is a minor enough change that we could reasonably switch to the "content analysis" approach straight away, even in a minor release, with a release note and no warning. But if we want to be more cautious and have a warning for now (and maybe make the switch to "content analysis" in 7.0) I'd be fine with that too.
I don't think the silence-no-br-warnings pseudo-feature is a good way of handling it - it would mean that people have to add that now, and remove it again at some point in the future, triggering a migration at each step. (It reminds me of the use_json_field flag on StreamField, which was strung out across far too many releases...) A traditional settings flag would work, though - something like:
RemovedInWagtail70Warning: The BlogPage.body RichTextField [or RichTextBlock] does not have the
`br` feature enabled. In Wagtail 7.0 this will prevent inserting line breaks. To silence this
warning, set WAGTAIL_RICH_TEXT_ALLOW_NO_BR = True

All makes sense to me :)


Add an option to not use external scripts

...host everything locally.

Good idea. I considered this but forgot about it. Since Leaflet is over 400 KB, I've included the minimized version (~140 KB) of the script in the repository directly.


Change the elasticsearch analyzer type to stop that can tokenizer the…

… sentence such as “ org.apache.skywalking” to “org” “apache” “skywalking”
INPUT
query SearchService($keyword: String!) {
  searchService(keyword: $keyword, topN: 10) {
    key: id
    label: name
  }
}

{
  "keyword": "org"
}

OUTPUT
{
  "data": {
    "searchService": [
      {
        "key": "-1",
        "label": "org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()"
      },
      {
        "key": "2",
        "label": "org.skywaking.apm.testcase.dubbo.services.GreetService.doBusiness()"
      }
    ]
  }
}

Coverage remained the same at 19.037% when pulling c9aadf289c95f22f61f923fdda600f591ba26ed3 on peng-yongsheng:feature/searchService into f84961d0119a89632ca09b8ae6458daf5f58f45e on apache:master.


Authentication Issue -<EMAIL_ADDRESS>

Scenario & Reproduction Steps
I have a service account token. It works fine with the op cli. I logged the token to the console to make sure it's there and is correct. Additionally I have tried using the vault id and the item id's instead of the names. Any help is appreciated!
I have the following code:
import { createClient } from "@1password/sdk";

async function getSecret() {
    if (!process.env.OP_SERVICE_ACCOUNT_TOKEN) {
        throw new Error("OP_SERVICE_ACCOUNT_TOKEN environment variable is not set")
    };
    // Creates an authenticated client.
    const client = await createClient({
      auth: process.env.OP_SERVICE_ACCOUNT_TOKEN,
      // Set the following to your own integration name and version.
      integrationName: "My 1Password Integration",
      integrationVersion: "v1.0.0",
    });
    // names
    const vault = 'SPTestVault';
    const item = 'TestItem';
    const field = 'username';
    // ids
    const vaultId = 'vaultIdhere';
    const itemId = `itemIdhere`;

    // get secret.
    const secret = await client.secrets.resolve(`op://${vault}/${item}/${field}`);
    console.log(secret);
}

getSecret();

Actual Behavior
the behavior is a rejection with the an authentication error:
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "authentication error: http error: error issuing the request".] {
  code: 'ERR_UNHANDLED_REJECTION'
}

Expected Behavior
I expect the secret to come back the same way op gives me the secret.
op item get TestItem --vault SPTestVault --format json --fields username
{
  "id": "username",
  "type": "STRING",
  "purpose": "USERNAME",
  "label": "username",
  "value": "testItemUser",
  "reference": "op://SPTestVault/TestItem/username"
}

SDK version
<EMAIL_ADDRESS>Additional information
No response

Hello @ryanrmcintyre ,
Thanks for raising this issue, I will be glad to assist you.
Did you create the Service Account Token using the CLI? If so, there is currently a bug with the SDKs not correctly parsing the CLI generated service account tokens. I have flagged this to the team and look out on the release notes to see when it will be addressed.
A workaround for now is creating a Service Account through the 1Password Website if applicable for your use-case. The link below is a step by step guide on how to generate it.
https://developer.1password.com/docs/service-accounts/get-started/
If you have any more questions, don't hesitate to ask!

Hello @ryanrmcintyre ,
Thanks for raising this issue, I will be glad to assist you.
Did you create the Service Account Token using the CLI? If so, there is currently a bug with the SDKs not correctly parsing the CLI generated service account tokens. I have flagged this to the team and look out on the release notes to see when it will be addressed.
A workaround for now is creating a Service Account through the 1Password Website if applicable for your use-case. The link below is a step by step guide on how to generate it.
https://developer.1password.com/docs/service-accounts/get-started/
If you have any more questions, don't hesitate to ask!

Thank you for your quick response! I contacted our admin and they notified me that the service account was created through the web.

Thanks @ryanrmcintyre for the information.
Have you tried running the example code with your service account token? Does it still provide the same error?
Also, could you provide me with your setup information and Node.js version or any important info that can be used for diagnostic purposes.

Thanks @ryanrmcintyre for the information.
Have you tried running the example code with your service account token? Does it still provide the same error?
Also, could you provide me with your setup information and Node.js version or any important info that can be used for diagnostic purposes.

Yes. The test code linked in the summary is using the service token:
op user get --me
ID:                     4AGV7L4IK5DNRNRF35RH7ZPFR4
Name:                   sa-StateProvision
Email<EMAIL_ADDRESS>State:                  ACTIVE
Type:                   SERVICE_ACCOUNT
Created:                1 hour ago
Updated:                1 hour ago
Last Authentication:    1 second ago

Thanks @ryanrmcintyre for the information.
Have you tried running the example code with your service account token? Does it still provide the same error?
Also, could you provide me with your setup information and Node.js version or any important info that can be used for diagnostic purposes.

Yes. The test code linked in the summary is using the service token:
sdk version<EMAIL_ADDRESS>OS: macOS Sonoma v14.5
node --version
v20.14.0

op user get --me
ID:                     <id>
Name:                   sa-StateProvision
Email:                  <email>
State:                  ACTIVE
Type:                   SERVICE_ACCOUNT
Created:                1 hour ago
Updated:                1 hour ago
Last Authentication:    1 second ago

@MOmarMiraj I went ahead and pulled down the project and tested with npm run commonjs-example and npm run esm-example (replacing with our vault id) and both failed with the same.

Hi @ryanrmcintyre
Thanks for providing the information above, everything looks in order... Please provide me with the exact steps you took to create your service account token?

@MOmarMiraj hey there! Asked our 1Password admin and they replied:
I logged into the 1password web console > developer tools > directory > access tokens - service account

we can go ahead and close this issue. it was a security program blocking it 👎 thank you for your help and sorry for the inconvenience!