Installed pip package is not resolved by Pylance

Environment data

Pylance version: v2024.11.2
OS and version: macOS 15.0.1
Python version (& distribution if applicable, e.g. Anaconda): 3.11

Repro Steps

Expected behavior
Pylance should be able to read installed pip packages under a virtual environment
Actual behavior
import pip packages under a virtual environment are not resolved by pylance
Logs

Here is the log link for that

Thanks for the issue.
According to the log, this is the current interpreter you have set:
/Users/anupamghosh/workspace/venv/servers/bin/python

Is that where the package is installed? How did you pick your interpreter? The UI you're showing in the screenshot isn't the normal UI for picking one.
Here's the log output for Pylance failing to find the pytz package:
2024-11-15 13:27:34.253 [info] [Info  - 13:27:34] (10460) Could not resolve source for 'pytz' in file '/Users/anupamghosh/workspace/dialpad/firespotter/fst2/frontend/api/sip_viewer.py'
2024-11-15 13:27:34.254 [info] [Info  - 13:27:34] (10460)   Looking in root directory of execution environment 'file:///%3Cdefault%20workspace%20root%3E'
2024-11-15 13:27:34.254 [info] [Info  - 13:27:34] (10460)   Attempting to resolve using root path 'file:///%3Cdefault%20workspace%20root%3E'
2024-11-15 13:27:34.254 [info] [Info  - 13:27:34] (10460)   Looking in extraPath 'file:///Users/anupamghosh/workspace/dialpad/firespotter/fst2'
2024-11-15 13:27:34.254 [info] [Info  - 13:27:34] (10460)   Attempting to resolve using root path 'file:///Users/anupamghosh/workspace/dialpad/firespotter/fst2'
2024-11-15 13:27:34.254 [info] [Info  - 13:27:34] (10460)   Finding python search paths
2024-11-15 13:27:34.254 [info] [Info  - 13:27:34] (10460)   Executing interpreter: '/Users/anupamghosh/workspace/venv/servers/bin/python'
2024-11-15 13:27:34.254 [info] [Info  - 13:27:34] (10460)   Skipping '/Users/anupamghosh/.pyenv/versions/3.11.4/lib/python311.zip' because it is not a valid directory
2024-11-15 13:27:34.254 [info] [Info  - 13:27:34] (10460)   Received 3 paths from interpreter
2024-11-15 13:27:34.254 [info] [Info  - 13:27:34] (10460)     file:///Users/anupamghosh/.pyenv/versions/3.11.4/lib/python3.11
2024-11-15 13:27:34.254 [info] [Info  - 13:27:34] (10460)     file:///Users/anupamghosh/.pyenv/versions/3.11.4/lib/python3.11/lib-dynload
2024-11-15 13:27:34.254 [info] [Info  - 13:27:34] (10460)     file:///Users/anupamghosh/workspace/venv/servers/lib/python3.11/site-packages
2024-11-15 13:27:34.255 [info] [Info  - 13:27:34] (10460)   Looking in python search path 'file:///Users/anupamghosh/.pyenv/versions/3.11.4/lib/python3.11'
2024-11-15 13:27:34.255 [info] [Info  - 13:27:34] (10460)   Attempting to resolve using root path 'file:///Users/anupamghosh/.pyenv/versions/3.11.4/lib/python3.11'
2024-11-15 13:27:34.255 [info] [Info  - 13:27:34] (10460)   Looking in python search path 'file:///Users/anupamghosh/.pyenv/versions/3.11.4/lib/python3.11/lib-dynload'
2024-11-15 13:27:34.255 [info] [Info  - 13:27:34] (10460)   Attempting to resolve using root path 'file:///Users/anupamghosh/.pyenv/versions/3.11.4/lib/python3.11/lib-dynload'
2024-11-15 13:27:34.255 [info] [Info  - 13:27:34] (10460)   Looking in python search path 'file:///Users/anupamghosh/workspace/venv/servers/lib/python3.11/site-packages'
2024-11-15 13:27:34.255 [info] [Info  - 13:27:34] (10460)   Attempting to resolve using root path 'file:///Users/anupamghosh/workspace/venv/servers/lib/python3.11/site-packages'

How is virtualenv servers getting set? I have set the virtualenv to fst2. The screenshot in the bottom right shows,
that for the current file the virtualenv is fst2.
To set the virtualenv I used this flow ⌘ + shift + p ->  > Python: select interpreter -> Selected the workspace folder fst2 -> gave the fst2 virtualenv path ~/workspace/venv/fst2/bin/python

Following is my workspace configuration
{
    "folders": [
        {
            "path": "servers"
        },
        {
            "path": "firespotter/prober"
        },
        {
            "path": "plivo"
        },
        {
            "path": "firespotter/fst2"
        },
        {
            "path": "kamailio"
        },
        {
            "path": "interactiveconsole"
        }
    ],
    "settings": {
        "python.analysis.extraPaths": ["/Users/anupamghosh/workspace/dialpad/firespotter/fst2"],
    }
}

Below image shows my directory structure of the workspace

It seems you're working in a multi-root workspace scenario. If you open the file where this package is being used and select the environment where the package is installed from the bottom-right corner of VS Code, does the error go away?

https://github.com/user-attachments/assets/7990a183-7954-48d0-95b6-746eb10c7120
It still didn't work


Not working with a large modpack

I know it's a pain to manage compatibility with other mods, but I really wish this mod is able to work with other mods. Here're a log and a crash report files
https://drive.google.com/drive/folders/1jndZ8XC2x5vAJ0ttySgy825eV0FVAKhi?usp=sharing

Set generateUniqueTexturesForAllBlocks to false, and fastAndCheapLatexBlocks to true in your client config.


Add rich text editor to message editor

Slack messages support limited markdown. That's the ticket for now.


Exception scanning compact QR

Current situation:
Now I can emulate seedsigner on desktop,  webcam working too:
https://github.com/enteropositivo/seedsigner-emulator
And I can scan a  standar seed succesfully
But I have a problem scanning compact seeds
Using the sample QR from Seedsigner repo
https://github.com/SeedSigner/seedsigner/blob/dev/docs/seed_qr/img/compact_12word.png
I got the following exception  on line 400 when code does bin(b):
TypeError("'str' object cannot be interpreted as an integer")

Some Notes

That the same seed works OK for me using  SeedSigner hardware on Rpi Zero, but the same code doesn't work on a desktop enviroment
The code is unchanged from seedsigner repo ( I only change display driver under /hardware/ folder )
May be a problem with python ?  (I'm using v3.10)

Will let @kdmukai chime in, but I believe this is because we implement a specialized QR code library to read the compact SeedQRs.

SOLVED
I found a solution.
The libraries that zbar downloads on Windows enviroment are very old, "SeedSigner requires zbar at 0.23.x or higher."
This is the code of build.sh from pyzbar  at line:9  that downloads  v0.1 of libraries
curl --location --remote-name-all "https://github.com/NaturalHistoryMuseum/barcode-reader-dlls/releases/download/0.1/{libzbar-32.dll,libiconv-2.dll,libzbar-64.dll,libiconv.dll}"`

To be able to use compact QRcode  on Windows ...
we need to install the newest zbar libraries this way
Install MSYS2 building platform for windows
https://www.msys2.org/
Install Zbar libraries and dependencies package
https://packages.msys2.org/package/mingw-w64-x86_64-zbar?repo=mingw64
Now pyzbar wrapper needs to load libzbar-0.dll v0.23.94 library
So edit:  src/pyzbar/pyzbar/zbar_library.py
Change line 23 and 24  as
if sys.maxsize > 2**32:
        # 64-bit
        fname = 'libzbar-0.dll'
        dependencies = []

Change line 58 as  (path of MSYS2 Zbar libraries)
  dependencies, libzbar = load_objects(Path('C:\\msys64\\mingw64\\bin'))

And NOW the emulator works with all the functions as on Raspberry Pi Zero

Amazing bit of tech sleuthing, @enteropositivo!
Looking forward to seeing where this work goes! That being said, I would guess that Windows would be a kind of last-resort OS option for an emulator. Something like Tails or some other Linux flavor would be safer.

Agreed, this is great work @enteropositivo! The Windows implementation has a strong use case for tinkerers and development, but agree with Keith that Tails is important too. It looks like you have begun TailsOS instructions in the readme?

The main objective of the emulator is to be able to modify the code or play with it in a simple way without having to use the Raspberry Pi.
But it can also serve as a tool to calculate the last word of the seed or even use it in Tails OS (currently works)
Anyway I still have to do more tests with the camera since in Ubuntu it goes very well but in Tails sometimes it has problems.
The purpose of making it compatible with Windows is basically for curious people who want to try it on testnet before deciding to buy a Raspberry (of course, if they can find one because there is no stock  :) )


C#: Reduce size of getAThrownException()

In the precense of multiple core libraries, getAThrownException() would return
multiple copies of the same exception, say System.OverflowException, one for each
core library. With this change we try to identify which core library a given control
flow element was compiled against, and only return the corresponding version.

Performance unchanged by this change (internal link): https://git.semmle.com/gist/tom/09129553dee65e843c2376651987ce33.

I have 2 other ideas, which may well prove to be worse than this, but I thought I would put them here.

Canonicalise the exception types, so System.NullReferenceException would always refer to a single entity, picking them according to some priority. So you could get a method throwing the wrong type but I don't think that will actually matter in practise.
Instead of looking at all type mentions, only look at attributes. Whilst object is canonical and cannot be used, most assemblies will use attributes, so look at the defining assembly of System.Attribute.

Canonicalise the exception types, so System.NullReferenceException would always refer to a single entity, picking them according to some priority. So you could get a method throwing the wrong type but I don't think that will actually matter in practise.

This would require an extractor change, and it seems to me a bit ad hoc to treat exception types specially.

Instead of looking at all type mentions, only look at attributes. Whilst object is canonical and cannot be used, most assemblies will use attributes, so look at the defining assembly of System.Attribute.

That might work, but would you prefer that for better performance of higher precision?

Canonicalise the exception types, so System.NullReferenceException would always refer to a single entity, picking them according to some priority. So you could get a method throwing the wrong type but I don't think that will actually matter in practise.

This would require an extractor change, and it seems to me a bit ad hoc to treat exception types specially.

Not necessarily. You could use QL to create something like
class CanonicalType extends ValueOrRefType {
  CanonicalType() {
    not exists(ValueOrRefType t | this.getQualifiedName() = t.getQualifiedName() and
      t.getLocation().(Assembly).getName() > this.getLocation().(Assembly).getName()
    )
  }
}

Class getAThrownException() {
  result instanceof CanonicalType and
  ...
}

Instead of looking at all type mentions, only look at attributes. Whilst object is canonical and cannot be used, most assemblies will use attributes, so look at the defining assembly of System.Attribute.

That might work, but would you prefer that for better performance of higher precision?

It might be a little simpler and faster. Don't know.

Not necessarily. You could use QL to create something like

Makes sense. My only concern is that we would then also have to canonicalize explicitly thrown exceptions, throw new Exception(), where we can now just use the type produced directly by the extractor.

Not necessarily. You could use QL to create something like

Makes sense. My only concern is that we would then also have to canonicalize explicitly thrown exceptions, throw new Exception(), where we can now just use the type produced directly by the extractor.

Yes, getAThrownException() for throw expressions would need special treatment.
I wonder if it could be the case that a library throws netstandard::System.Exception, and another module catches corlib::System.Exception. In that case, you'd probably want to match up the two types anyway. I'm not sure how often this occurs in practice.

But possibly, CanonicalType might be a useful concept to use here.


Match changed file name as suffix of source file name

In json capture mode, we found that in some cases, especially when the dll binary files were generated by Visual Studio's built-in compiler, the source file paths in the cfg.json are absolute paths, such as C:/Users/abc/source/repos/ClassLibrary1/ClassLibrary1/Class1.cs. However, the changed file paths exported by git diff are relative paths, such as ClassLibrary1/ClassLibrary1/Class1.cs. To close this gap, we propose a mode to match changed files as the suffix of the full paths in cfg.json.

I think it would be better to fix the underlying problem that you get absolute paths for files within the project root in the first place but we could still merge this if that's not possible. When you get C:/Users/abc/source/repos/ClassLibrary1/ClassLibrary1/Class1.cs in the cfgs.json, if you set the project root to C:/Users/abc/source/repos/ I would expect the captured data to show the file as ClassLibrary1/ClassLibrary1/Class1.cs.
Is the project root set correctly when running capture? If so, does infer debug --source-files show the absolute or relative path after capture? If it's an absolute path at that point I think the issue may be within the json capture, it should try to make the source files relative to the project root when importing them.
The GitHub CI is failing because this needs a run of make fmt. When adding new options it's good to run make manuals too (otherwise I have to do it ;) ).

I got the following error when I run infer debug --source-files after infer capture:
Usage Error: When parsing option --pulse-taint-sources: Unexpected JSON format: Exactly one of "procedure", "procedure_regex" must be provided, or else "class_names" and "method_names" must be provided, or else "overrides_of_class_with_annotation", but got "procedure": [None], "procedure_regex": [None], "class_names": [None], "method_names": [None], "overrides_of_class_with_annotation": [None]

I think it would be better to fix the underlying problem that you get absolute paths for files within the project root in the first place but we could still merge this if that's not possible. When you get C:/Users/abc/source/repos/ClassLibrary1/ClassLibrary1/Class1.cs in the cfgs.json, if you set the project root to C:/Users/abc/source/repos/ I would expect the captured data to show the file as ClassLibrary1/ClassLibrary1/Class1.cs.
Is the project root set correctly when running capture? If so, does infer debug --source-files show the absolute or relative path after capture? If it's an absolute path at that point I think the issue may be within the json capture, it should try to make the source files relative to the project root when importing them.
The GitHub CI is failing because this needs a run of make fmt. When adding new options it's good to run make manuals too (otherwise I have to do it ;) ).

As I mentioned, this happened only when the dlls were compiled by Visual Studio's built-in compiler. And when I print the relative path of source file from cfg by adding the following code:

I still got the full path:

We double checked and found that it is not possible to extract relative path from VS compiled dlls.

Somehow I can't run make fmt_all or make fmt. I got following error message:

I did ran make devsetup OPAM_PIN_OCAMLFORMAT=yes first. But I had to remove --no-depext flag otherwise it gave the following error

Thanks for your advice! I got the following error when I run infer debug --source-files after infer capture:
Usage Error: When parsing option --pulse-taint-sources: Unexpected JSON format: Exactly one of "procedure", "procedure_regex" must be provided, or else "class_names" and "method_names" must be provided, or else "overrides_of_class_with_annotation", but got "procedure": [None], "procedure_regex": [None], "class_names": [None], "method_names": [None], "overrides_of_class_with_annotation": [None]

Do you know if I should define --pulse-taint-sources or simply disable it?

I suspect you have a .inferconfig lying around that defines "pulse-taint-sources" in an unsupported way? I cannot reproduce your error.

As I mentioned, this happened only when the dlls were compiled by Visual Studio's built-in compiler. And when I print the relative path of source file from cfg by adding the following code:  I still got the full path:
We double checked and found that it is not possible to extract relative path from VS compiled dlls.

Once the source file has been recorded with an absolute path we won't try to turn it back into a relative path, even with to_rel_path:
https://github.com/facebook/infer/blob/5e9dde409e64da7584d06ee7664468c3e4ba13f2/infer/src/base/SourceFile.ml#L221-L222
At the time of capture, if the project root is set correctly then creating the SourceFile.t (which you can only do with SourceFile.from_abs_path or SourceFile.create) should make it relative, which is why I was curious how this situation is created in the first place. What commands do you run to capture these dlls compiled by Visual Studio and from where?

Somehow I can't run make fmt_all or make fmt. I got following error message:

That means that git doesn't detect any changed files compared to the origin, are you working from something that's not a git repo perhaps? Does make fmt_all work for you?

I did run make devsetup OPAM_PIN_OCAMLFORMAT=yes first. But I had to remove --no-depext flag otherwise it gave the following error

Oops, the option is called --no-depexts and apparently opam is normally clever enough to accept --no-depext (or even just --no-d!!) instead. We probably have different versions of opam that treat this differently. Will fix, thanks!

As I mentioned, this happened only when the dlls were compiled by Visual Studio's built-in compiler. And when I print the relative path of source file from cfg by adding the following code:  I still got the full path:
We double checked and found that it is not possible to extract relative path from VS compiled dlls.

Once the source file has been recorded with an absolute path we won't try to turn it back into a relative path, even with to_rel_path:
https://github.com/facebook/infer/blob/5e9dde409e64da7584d06ee7664468c3e4ba13f2/infer/src/base/SourceFile.ml#L221-L222
At the time of capture, if the project root is set correctly then creating the SourceFile.t (which you can only do with SourceFile.from_abs_path or SourceFile.create) should make it relative, which is why I was curious how this situation is created in the first place. What commands do you run to capture these dlls compiled by Visual Studio and from where?

infer debug --source-files returns absolute paths, like what is shown below:

The capture command is pretty normal:
infer capture --cfg-json infer-staging/cfg.json --tenv-json infer-staging/tenv.json

As I mentioned, this happened only when the dlls were compiled by Visual Studio's built-in compiler. And when I print the relative path of source file from cfg by adding the following code:  I still got the full path:
We double checked and found that it is not possible to extract relative path from VS compiled dlls.

Once the source file has been recorded with an absolute path we won't try to turn it back into a relative path, even with to_rel_path:
https://github.com/facebook/infer/blob/5e9dde409e64da7584d06ee7664468c3e4ba13f2/infer/src/base/SourceFile.ml#L221-L222
At the time of capture, if the project root is set correctly then creating the SourceFile.t (which you can only do with SourceFile.from_abs_path or SourceFile.create) should make it relative, which is why I was curious how this situation is created in the first place. What commands do you run to capture these dlls compiled by Visual Studio and from where?

infer debug --source-files returns absolute paths, like what is shown below:
The capture command is pretty normal:
infer capture --cfg-json infer-staging/cfg.json --tenv-json infer-staging/tenv.json

A possible reason I can think of is: since those dlls were compiled in my colleague machine, no project root can be correctly retrieved when I run capture in my machine?

We just made a test and find that even if we compile and run infer on the same machine, the problem still persists as long as the dlls were compiled by VS.

I added a few logs here to see what went wrong

And I found that infer actually interprets the absolute path like "C:/Users/matjin/source/repos/ClassLibrary1/ClassLibrary1/Class1.cs" as relative path

I added a few logs here to see what went wrong

And I found that infer actually interprets the absolute path like "C:/Users/matjin/source/repos/ClassLibrary1/ClassLibrary1/Class1.cs" as relative path

I had another test. Seems that this problem applies to all dlls built in Windows platform. Such as built in VS or  by command dotnet build. Not sure if it is a bug?

A possible reason I can think of is: since those dlls were compiled in my colleague machine, no project root can be correctly retrieved when I run capture in my machine?****

Hi @jvillard ,
In summary, here are my findings: Filename.is_relative failed to interpret Windows path, such as "C:/Users/matjin/source/repos/ClassLibrary1/ClassLibrary1/Class1.cs" as absolute path, and Infer can't convert Windows absolute path to relative path. Both seem to be a OCaml issue because OCaml doesn't support Windows path. This PR can serve as a short term mitigation. In long term, we can try to fix it at OCaml side.


Few issue when I add it to my HA

Hi @cheadrian,
First of all, good job, thanks for your time and work.
Unfortunately, it is not really works on my side ... Should I install something else additionally?
TB2Sense side:
I used SDK4.3.2 from simplicity studio and used the base "demo", so just uploaded the binary, no modification. I checked with "Thunderboard" apple app, the apple app can see the device, so I believe the TB2 board work as expected
HA side:
I use raspberry4, I created a custom_components folder, copied the "thunderboard" folder into it. Then I was able to choose Thunderboard sense from the "Components" list. But when I add I cannot see the sensors:

With the "Controls" I can turn on the RGB leds, but it is the only UI that can I use.
If I click to the debug, it generates a txt file. It point to few python code parts that throw errors. Maybe that is this issue?
home-assistant_thunderboard_2023-12-28T15-03-27.527Z.log
](url)
I've added the log. Do you have idea what can be wrong?
Thanks,
TB

Hello @biboy1987, thanks for trying out this integration and reporting back 🙂.
I've tested it again on a fresh Home Assistant instance, latest version, and it works fine.
Did you try with Thunderboard both on battery and USB powered?
Also, alter the configuration to get some more new insights.

Assuming that you flash the "Bluetooth - SoC Thunderboard Sense 2" demo and  sensors works with EFR Connect mobile app - check the Demo tab of the app, Environment demo -, it should also be read by this integration, if nothing changes with sensors UUIDs.
This part of your log look like an permission problem of the BlueZ, or adapter not supporting the notify function:
  File "/usr/local/lib/python3.11/site-packages/bleak/backends/bluezdbus/client.py", line 958, in start_notify
    assert_reply(reply)
  File "/usr/local/lib/python3.11/site-packages/bleak/backends/bluezdbus/utils.py", line 22, in assert_reply
    raise BleakDBusError(reply.error_name, reply.body)
bleak.exc.BleakDBusError: [org.bluez.Error.NotSupported] Operation is not supported

Can you run the parser_test.py script to diagnose?
# Navigate to the component directory
cd ~/.homeassistant/custom_components/thunderboard
# Activate the Home Assistant Python Virtual Environment,
# default for HA Core:
source /srv/homeassistant/bin/activate
# Run the script and press the "reset" button on Thunderboard after that
python parser_test.py

This should give you a message, "Found device" first, then it will read all the GATT chars known by the Thunderboard BLE parser script, e.g.:

BLE parser output
Found device
00:0B:57:64:88:68: Thunderboard #34920
DEBUG:bleak_retry_connector:00:0B:57:64:88:68 - 00:0B:57:64:88:68: Connection attempt: 1
DEBUG:bleak.backends.bluezdbus.client:Connecting to device @ 00:0B:57:64:88:68
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68): ['org.bluez.Device1', {'Connected': <dbus_fast.signature.Variant ('b', True)>}, []]
DEBUG:bleak.backends.bluezdbus.client:skipping calling "Connect" since /org/bluez/hci0/dev_00_0B_57_64_88_68 is already connected
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68): ['org.bluez.Device1', {'Name': <dbus_fast.signature.Variant ('s', Thunderboard #00000)>, 'Alias': <dbus_fast.signature.Variant ('s', Thunderboard #00000)>}, []]
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service000e/char0011): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'BRD4166A'))>}, []]
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service0025/char0026): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'd'))>}, []]
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service0051/char0052): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\x00\x00Pp'))>}, []]
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service001b/char001c): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\x00'))>}, []]
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.ObjectManager.InterfacesAdded (/): ['/org/bluez/hci0/dev_00_0B_57_64_88_68', {'org.bluez.Battery1': {'Percentage': <dbus_fast.signature.Variant ('y', 100)>}}]
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service000e/char0015): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'D03'))>}, []]
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service0029/char002a): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\x01'))>}, []]
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service001b/char0021): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\x00'))>}, []]
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68): ['org.bluez.Device1', {'ServicesResolved': <dbus_fast.signature.Variant ('b', True)>}, []]
DEBUG:bleak_retry_connector:00:0B:57:64:88:68 - 00:0B:57:64:88:68: Connected after 1 attempts
DEBUG:bleak.backends.bluezdbus.client:Read Device Name 00002a00-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_00_0B_57_64_88_68: bytearray(b'Thunderboard #00000')
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service000e/char0017): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'4.3.2'))>}, []]
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service0044/char004b): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\r\x0c'))>}, []]
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service000e/char0011): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'BRD4166A'))>}, []]
DEBUG:bleak.backends.bluezdbus.client:Read Characteristic 00002a24-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_00_0B_57_64_88_68/service000e/char0011: bytearray(b'BRD4166A')
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service0025/char0026): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'd'))>}, []]
DEBUG:bleak.backends.bluezdbus.client:Read Characteristic 00002a19-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_00_0B_57_64_88_68/service0025/char0026: bytearray(b'd')
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service0051/char0052): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\x00\x00Pp'))>}, []]
DEBUG:bleak.backends.bluezdbus.client:Read Characteristic fcb89c40-c603-59f3-7dc3-5ece444a401b | /org/bluez/hci0/dev_00_0B_57_64_88_68/service0051/char0052: bytearray(b'\x00\x00Pp')
DEBUG:__main__:Successfully read lights GATT characteristics, controller
DEBUG:__main__:Successfully read lights GATT characteristics
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service001b/char001c): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\x00'))>}, []]
DEBUG:bleak.backends.bluezdbus.client:Read Characteristic 00002a56-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_00_0B_57_64_88_68/service001b/char001c: bytearray(b'\x00')
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service0044/char004d): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\xc2\x11'))>}, []]
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service000e/char0015): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'D03'))>}, []]
DEBUG:bleak.backends.bluezdbus.client:Read Characteristic 00002a27-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_00_0B_57_64_88_68/service000e/char0015: bytearray(b'D03')
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service0029/char002a): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\x01'))>}, []]
DEBUG:bleak.backends.bluezdbus.client:Read Characteristic ec61a454-ed01-a5e8-b8f9-de9ec026ec51 | /org/bluez/hci0/dev_00_0B_57_64_88_68/service0029/char002a: bytearray(b'\x01')
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service001b/char0021): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\x00'))>}, []]
DEBUG:bleak.backends.bluezdbus.client:Read Characteristic 00002a56-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_00_0B_57_64_88_68/service001b/char0021: bytearray(b'\x00')
DEBUG:__main__:Successfully read digital states GATT characteristics
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service0044/char0049): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'>q\x0f\x00'))>}, []]
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service000e/char0017): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'4.3.2'))>}, []]
DEBUG:bleak.backends.bluezdbus.client:Read Characteristic 00002a26-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_00_0B_57_64_88_68/service000e/char0017: bytearray(b'4.3.2')
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service0044/char004b): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\x05\x0c'))>}, []]
DEBUG:bleak.backends.bluezdbus.client:Read Characteristic 00002a6e-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_00_0B_57_64_88_68/service0044/char004b: bytearray(b'\x05\x0c')
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service0044/char0045): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\x00'))>}, []]
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service0044/char004d): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\xca\x11'))>}, []]
DEBUG:bleak.backends.bluezdbus.client:Read Characteristic 00002a6f-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_00_0B_57_64_88_68/service0044/char004d: bytearray(b'\xca\x11')
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service0044/char004f): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\xa0\x11'))>}, []]
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service0044/char0049): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b',q\x0f\x00'))>}, []]
DEBUG:bleak.backends.bluezdbus.client:Read Characteristic 00002a6d-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_00_0B_57_64_88_68/service0044/char0049: bytearray(b',q\x0f\x00')
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service0044/char0047): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'!\x05\x00\x00'))>}, []]
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service0044/char0045): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\x00'))>}, []]
DEBUG:bleak.backends.bluezdbus.client:Read Characteristic 00002a76-0000-1000-8000-00805f9b34fb | /org/bluez/hci0/dev_00_0B_57_64_88_68/service0044/char0045: bytearray(b'\x00')
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service0031/char0035): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\x9f\xff\xff\xff'))>}, []]
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.ObjectManager.InterfacesRemoved (/): ['/org/bluez/hci0/dev_00_0B_57_64_88_68', ['org.bluez.Battery1']]
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service0044/char004f): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\xbc\x11'))>}, []]
DEBUG:bleak.backends.bluezdbus.client:Read Characteristic c8546913-bf02-45eb-8dde-9f8754f4a32e | /org/bluez/hci0/dev_00_0B_57_64_88_68/service0044/char004f: bytearray(b'\xbc\x11')
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service0044/char0047): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'\x08\x05\x00\x00'))>}, []]
DEBUG:bleak.backends.bluezdbus.client:Read Characteristic c8546913-bfd9-45eb-8dde-9f8754f4a32e | /org/bluez/hci0/dev_00_0B_57_64_88_68/service0044/char0047: bytearray(b'\x08\x05\x00\x00')
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68/service0031/char0035): ['org.bluez.GattCharacteristic1', {'Value': <dbus_fast.signature.Variant ('ay', bytearray(b'o\xff\xff\xff'))>}, []]
DEBUG:bleak.backends.bluezdbus.client:Read Characteristic f598dbc5-2f02-4ec5-9936-b3d1aa4f957f | /org/bluez/hci0/dev_00_0B_57_64_88_68/service0031/char0035: bytearray(b'o\xff\xff\xff')
DEBUG:__main__:Successfully read active GATT characteristics
DEBUG:bleak.backends.bluezdbus.client:Disconnecting ({/org/bluez/hci0/dev_00_0B_57_64_88_68})
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68): ['org.bluez.Device1', {'ServicesResolved': <dbus_fast.signature.Variant ('b', False)>}, []]
DEBUG:bleak.backends.bluezdbus.manager:received D-Bus signal: org.freedesktop.DBus.Properties.PropertiesChanged (/org/bluez/hci0/dev_00_0B_57_64_88_68): ['org.bluez.Device1', {'Connected': <dbus_fast.signature.Variant ('b', False)>}, []]
DEBUG:bleak.backends.bluezdbus.client:Device disconnected (/org/bluez/hci0/dev_00_0B_57_64_88_68)
DEBUG:bleak.backends.bluezdbus.client:_cleanup_all(/org/bluez/hci0/dev_00_0B_57_64_88_68)
---- Thunderboard Device Data ----
ThunderboardDevice(manufacturer='', hw_version='D03', sw_version='4.3.2', model='BRD4166A', name='Thunderboard #00000', identifier='', address='00:0B:57:64:88:68', lights=ThunderboardLightsState(rgb=(0, 80, 112), preset_pattern=0, mode=0, speed=0, brightness=112), sensors={'battery': 100, 'power_source': 'USB', 'temperature': 30.77, 'humidity': 45.54, 'pressure': 101201.2, 'uv_idx': 0, 'sound_level': 45.4, 'ambient_light': 12.88, 'hall_field_strenght': -145}, digitals={'btn_0': False, 'btn_1': False, 'digital_state_0': [], 'digital_state_1': 0}, rssi=-35)


Copy/paste in fixed form does not preserve indentation

Copying and pasting code in fixed form does not preserve indentation. If the first line has a comment marker in the first column, all copied lines are placed in the first column.

You can fix this by doing and Undo after your Past i.e. Ctrl+Z, but you are right this is probably a bug


Use new multi config edit command

Details
Sometimes changing a connections configuration translate in multiple keys being edited. Currently, the existing command UpdatePolicyConnectionConfig only supports updating one key at a time, which eventually produced work arounds that break 1:1:1.
This PR is adding a new UpdateManyPolicyConnectionConfigurations  command that takes a partial connection config object to edit multiple settings in one call. An example of this is:

If you change the Out-of-pocket account type from CHECK to BILL, then you also need to update the selected account.

Needs:

https://github.com/Expensify/Auth/pull/10784
https://github.com/Expensify/Web-Expensify/pull/41934

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/390731
PROPOSAL:
Tests

Have a workspace with QBO connected.
Go to "Export > Export out-of-pocket-expenses as"
Change the "Export as" value between the 3 options
Verify that the selected account updates choosing the first available from the new valid values
Change the setting "Export company cards as" to "Credit Card"
Verify that the account selected changed to a valid account
Change the  setting "Export company cards as" to "Vendor Bill"
Verify that setting "Default vendor" appeared
Verify that when "Default vendor" is toggled, you see the setting "Vendor"
Verify that when "Default vendor" is toggled, "Vendor" gets the first value selected by default

[x] Verify that no errors appear in the JS console

Offline tests

QA Steps

[ ] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native

iOS: mWeb Safari

MacOS: Chrome / Safari
https://github.com/Expensify/App/assets/87341702/d3fa227c-7990-4360-be84-7f9dd56ddbc2

MacOS: Desktop

Just a heads-up, there is a PR to update screens related to the company card export options. If that PR is merged first, there might be quite a lot of merge conflicts on these pages 🙇

@trjExpensify  @hayata-suenaga this is ready for review again. For details about translations, lets address them in a separate follow up. I don't want this running into conflicts and hold on unrelated already existing bugs.

@trjExpensify @hayata-suenaga this is ready for review again. For details about translations, lets address them in a separate follow up. I don't want this running into conflicts and hold on unrelated already existing bugs.

Nice! Time for an adhoc build?

Gave this a test, posted here.

@hayata-suenaga what this PR https://github.com/Expensify/App/pull/42102 fixed was already being fixed here, now we have conflicts. Please prioritize reviewing this doesn't keep running into conflicts 🙏

lol conflicts again

@ishpaul777, once you're done with the checklist, please DM me on Slack 😄 so that I can merge

@ishpaul777, is it working for company card export configuration screens?

Just linked QB account, but i am not able to set Export out-of-pocket-expenses  from the option,

hmm, I wonder if you may have missed onyx updates because of the servers having problems.... Do you have an account that is currently connected to QBO? it shouldn't be necessary to connect a new account

Also, from video, it looks like the requests are going through very slowly.

@ishpaul777, do you have Location import and tax import enabled at the same time?

if that happens (although very unlikely), there won't be any available option on the list of account options

is there any steps to get the "Accounts Payable"/ "Vendors" List @aldo-expensify

I get them without doing any extra action, but maybe it depends on the QBO account used for testing? I used<EMAIL_ADDRESS>

is there any config i need to do in QBO account i just completed the onboarding for QBO

Sorry, I really have no idea of how to setup this account properly... I just use one that was already there.

Code wise looks good to me!, just need to do thorough testing and complete videos, will check back again tomorrow in my morning

I would prefer ideally to not have to wait until tomorrow for testing this. @hayata-suenaga can you test this in web and then we merge?

testing now...

Tested well 🎉
https://github.com/Expensify/App/assets/98560306/b83c3dc0-a782-47b8-acec-7e9b441eea7b

checked off the remaining items on the checklist

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

Thank you @hayata-suenaga for the quick work 🙇

🚀 Deployed to staging by https://github.com/hayata-suenaga in version: 1.4.75-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

QAed on staging. passed 🎉
https://github.com/Expensify/App/assets/98560306/1f4ff694-f010-4ab9-bffd-62f411d823b1

Commented here, wondering if this has introduced a regression: https://expensify.slack.com/archives/C036QM0SLJK/p1716547626337039?thread_ts=1716238564.568549&cid=C036QM0SLJK

🚀 Deployed to production by https://github.com/puneetlath in version: 1.4.75-1 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

@trjExpensify should I create an App issue just to handle the payment? or can we do it skipping that?

Ordinarily, but it's fine. I'll do it here.
Payment summary as follows:

$250 to @ishpaul777 for the C+ review of this PR

Offer sent!

Paid!


[SPARK-44733][PYTHON][DOCS] Add Python to Spark type conversion page to PySpark docs.

@allisonwang-db
What changes were proposed in this pull request?
Add documentation page showing Python to Spark type mappings for PySpark.
Why are the changes needed?
Surface this information to users navigating the PySpark docs per https://issues.apache.org/jira/browse/SPARK-44733.
Does this PR introduce any user-facing change?
Yes, adds new page to PySpark docs.
How was this patch tested?
Build HTML docs file using Sphinx, inspect visually.
Was this patch authored or co-authored using generative AI tooling?
No.

Mind attaching the output HTML image if you don't mind? Otherwise looks fine from a cursory look. cc @itholic, @xinrong-meng  and @zhengruifeng too if you find some time to review.

Test failure looks unrelated, pyspark-mllib Error: The operation was canceled..

Looks nice. Could you rebase the PR to master?

Hi @PhilDakin thanks for doing this! I personally think it's better to have the table here instead of a link to another page.
Also, I think we should explain why this conversion table matters. For example, it is useful when users what to map a Python return type to a Spark return type in a Python UDF.
Another thing we need to mention is type casting. What if I want to cast an int type in Python to a FloatType in Spark? Currently, for regular Python UDF, it will return NULL, I believe, but for arrow-optimized Python UDF, it can cast the value properly. It will be valuable to have a table like this:
https://github.com/apache/spark/blob/b41ea9162f4c8fbc4d04d28d6ab5cc0342b88cb0/python/pyspark/sql/udf.py#L94-L119

^ We don't have to add everything in this PR, but I do think we should have a separate table for type conversion in PySpark docs, and then we can improve it.

@allisonwang-db brought back the table and added a section indicating when these conversions are relevant during UDF definitions.
Will follow up with examples going into more depth on type conversion as a separate PR for https://issues.apache.org/jira/browse/SPARK-44734.

I agree that duplicating the table is not ideal. It would be nice to have a cross-format inclusion mechanism for tables, between the main documentation and PySpark's. Seems a bit out of scope for this PR, though.

@allisonwang-db what do you think here?

Do we need to mention related configs like spark.sql.pyspark.inferNestedDictAsStruct.enabled and spark.sql.timestampType?
In createDataFrame, spark.sql.pyspark.inferNestedDictAsStruct.enabled controls whether a dict be treated as a map or struct.
BTW, I think we may need to mention nested rows and numpy arrays:
In [25]: spark.createDataFrame(np.zeros([3,3], "int8"))
Out[25]: DataFrame[_1: tinyint, _2: tinyint, _3: tinyint]

In [26]: spark.createDataFrame(np.zeros([3,3], "int64"))
Out[26]: DataFrame[_1: bigint, _2: bigint, _3: bigint]

In [27]: spark.createDataFrame([Row(a=1, b=Row(c=2))])
Out[27]: DataFrame[a: bigint, b: struct<c:bigint>]

@allisonwang-db added full-page screenshot to description and rebased onto master.

@allisonwang-db any further updates needed here?


Use aka.ms links in vscode.d.ts?

Problem
vscode.d.ts includes a number of links to the VS Code website. Almost all of these are direct links.

This is problematic because we sometimes change the structure of the website in ways that make these old links invalid. Extension developers will often have the older vscode.d.ts version cached on their system for quite a long time (because they are using an older @types/vscode version), and this means the documentation links will not work for them
Proposal
We should look into making sure that all links in vscode.d.ts use aka.ms links. That way we can automatically redirect the links when the structure of the website changes.

Or we should improve this page and start offering long-lasting links: https://code.visualstudio.com/api/language-extensions/programmatic-language-features, and when those links have to change offer redirects.

Will hashes survive redirects in all browsers?

I believe so. We already use this pretty heavily in our links, for example: https://aka.ms/vscode-remote/containers/getting-started

Will hashes survive redirects in all browsers?

Yes

I can go through them and update them with latest links in /api.

Closing due to lack of interest / potential maintenance overhead of the change


Targetting a representation URL that differs from the resource URL

When a PUT, POST, PATCH or DELETE method request targets a representation URL that is different than the resource URL, the server MUST respond with a 307 or 308 status code and Location header specifying the preferred URI reference.

The only relevant part we have now is that the ExtensionBasedMapper throws a 501 if a URI contains a $. But currently everything is implemented based on the assumption of agents only accessing data through the resource identifier. The ExtensionBasedMapper could be updated to return 307/308 in case the incoming identifier matches with an actual resource. This would only be relevant for the file based backend though.

The only relevant part we have now is that the ExtensionBasedMapper throws a 501 if a URI contains a $. But currently everything is implemented based on the assumption of agents only accessing data through the resource identifier.

I think it's something else.
The orginal spec text seems to be about representation-specific URLs, so if /bla.txt is the location of the text representation of /bla. We currently do not offer representation-specific URLs.

I'll close this for now then since it's probably not relevant.


No alert when WebView2 is not installed

Current behavior
If there's no WebView2 installed, the application will crash on startup.
How to reproduce it (as minimally and precisely as possible)

Remove the WebView2
Start the DevToys

Expected behavior
Show a alert of 'Please install WebView2'.
Screenshots
No response
Workaround
No response
Affected platforms
Windows
Affected DevToys kind
DevToys (app with GUI)
DevToys Version
2.0-preview.3
Relevant Assets/Logs
No response

Hi,
How can we even remove this component? It's a key part of Windows. Removing it isn't expected. I'm confused.

Some tools removes Microsoft Edge also removes WebView2.
and WebView2 will failed when the files of Microsoft Edge is broken.


Probelm with WebcamCompositeDriver

Versions:
webcam-capture = "0.3.12"
koltin = "2.0.0"
Reproduction Code:
@Composable
actual fun rememberCameraManager(onResult: (SharedImage?) -> Unit): CameraManager {
    val window = JFrame()

    Webcam.setDriver(WebcamCompositeDriver())

    val webcam = Webcam.getDefault().apply {
        setCustomViewSizes(Dimension(320, 240))
        setViewSize(Dimension(320, 240))
    }

    val panel = WebcamPanel(webcam).apply {
        isImageSizeDisplayed = true
        isMirrored = true
    }

    with(window){
        add(panel)
        pack()
        setLocationRelativeTo(null)
    }

    return remember {
        CameraManager(
            onLaunch = {
                window.isVisible = true
            }
        )
    }
}

affected Platfroms:
-only desktop since the code is platform-specific haven't tested for Windows and Linux
Notes:
when I set the driver on Dummy like so Webcam.setDriver(WebcamDummyDriver(90)) the app will not crash but it will not show the webcam

Exception:
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "com.github.sarxos.webcam.Webcam.setCustomViewSizes(java.awt.Dimension[])" because "$this$rememberCameraManager_u24lambda_u240" is null
What have I tried:
I tried using Webcam.setDriver(WebcamDefaultDriver()) but it came up with an other exception:
ava.lang.RuntimeException: Failed to initialize BridJ (java.lang.UnsatisfiedLinkError: /private/var/folders/c1/kkf74nkd5_xgqsg55vrry__m0000gn/T/BridJExtractedLibraries673974653850279251/libbridj.dylib: dlopen(/private/var/folders/c1/kkf74nkd5_xgqsg55vrry__m0000gn/T/BridJExtractedLibraries673974653850279251/libbridj.dylib, 0x0001): tried: '/private/var/folders/c1/kkf74nkd5_xgqsg55vrry__m0000gn/T/BridJExtractedLibraries673974653850279251/libbridj.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/c1/kkf74nkd5_xgqsg55vrry__m0000gn/T/BridJExtractedLibraries673974653850279251/libbridj.dylib' (no such file), '/private/var/folders/c1/kkf74nkd5_xgqsg55vrry__m0000gn/T/BridJExtractedLibraries673974653850279251/libbridj.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')))
at org.bridj.Platform.initLibrary(Platform.java:444)
at org.bridj.Platform.(Platform.java:228)
at com.github.sarxos.webcam.ds.buildin.natives.OpenIMAJGrabber.(OpenIMAJGrabber.java:59)
at com.github.sarxos.webcam.ds.buildin.WebcamDefaultDriver$WebcamNewGrabberTask.handle(WebcamDefaultDriver.java:55)
at com.github.sarxos.webcam.WebcamProcessor$AtomicProcessor.run(WebcamProcessor.java:81)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.UnsatisfiedLinkError: /private/var/folders/c1/kkf74nkd5_xgqsg55vrry__m0000gn/T/BridJExtractedLibraries673974653850279251/libbridj.dylib: dlopen(/private/var/folders/c1/kkf74nkd5_xgqsg55vrry__m0000gn/T/BridJExtractedLibraries673974653850279251/libbridj.dylib, 0x0001): tried: '/private/var/folders/c1/kkf74nkd5_xgqsg55vrry__m0000gn/T/BridJExtractedLibraries673974653850279251/libbridj.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/c1/kkf74nkd5_xgqsg55vrry__m0000gn/T/BridJExtractedLibraries673974653850279251/libbridj.dylib' (no such file), '/private/var/folders/c1/kkf74nkd5_xgqsg55vrry__m0000gn/T/BridJExtractedLibraries673974653850279251/libbridj.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))
at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(Unknown Source)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(Unknown Source)
at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(Unknown Source)
Caused by: java.lang.UnsatisfiedLinkError: /private/var/folders/c1/kkf74nkd5_xgqsg55vrry__m0000gn/T/BridJExtractedLibraries673974653850279251/libbridj.dylib: dlopen(/private/var/folders/c1/kkf74nkd5_xgqsg55vrry__m0000gn/T/BridJExtractedLibraries673974653850279251/libbridj.dylib, 0x0001): tried: '/private/var/folders/c1/kkf74nkd5_xgqsg55vrry__m0000gn/T/BridJExtractedLibraries673974653850279251/libbridj.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/c1/kkf74nkd5_xgqsg55vrry__m0000gn/T/BridJExtractedLibraries673974653850279251/libbridj.dylib' (no such file), '/private/var/folders/c1/kkf74nkd5_xgqsg55vrry__m0000gn/T/BridJExtractedLibraries673974653850279251/libbridj.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))
at java.base/java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.base/java.lang.Runtime.load0(Unknown Source)
at java.base/java.lang.System.load(Unknown Source)
at org.bridj.Platform.initLibrary(Platform.java:420)
... 7 more

Exception in thread "main" com.github.sarxos.webcam.WebcamException: java.util.concurrent.ExecutionException: com.github.sarxos.webcam.WebcamException: Cannot execute task
at com.github.sarxos.webcam.WebcamDiscoveryService.getWebcams(WebcamDiscoveryService.java:124)
at com.github.sarxos.webcam.Webcam.getWebcams(Webcam.java:893)
at com.github.sarxos.webcam.Webcam.getDefault(Webcam.java:956)
at com.github.sarxos.webcam.Webcam.getDefault(Webcam.java:933)
at com.github.sarxos.webcam.Webcam.getDefault(Webcam.java:911)
at shared.CameraManager_desktopKt.rememberCameraManager(CameraManager.desktop.kt:25)

this solved my issue :
https://github.com/sarxos/webcam-capture/issues/907


Manual for DataPLAN

Idea: Harmonize Knowledgebase content.
Derived from a response to #20: https://github.com/nfdi4plants/nfdi4plants.knowledgebase/issues/20#issuecomment-1360058411
Create Quickstart, Manual and maybe also developers docs for the tools with high user exposure

Would close this for now as DataPLAN ships with its own tutorial and help (manual).
Feel free to reopen, if you think this should be part incorporated in the knowledge base.
@xiaoranzhou


Add include <string.h>

Fix implicit declaration of function 'strlen'

thanks!

Hello @ryankurte ,
My name is Aravind Machiry, Assistant Professor at Purdue's ECE Department.
Thank you for considering this pull request. This pull request was the result of our on-going research work (along with @szsam) to improve the security of open-source embedded projects.
In addition to scanning codebases with CodeQL, we are also doing a short (~4 minutes) survey to understand the use of static analysis tools like gcc -Wall and CodeQL in embedded software projects.
It would greatly benefit our research if you could fill this anonymous survey: https://purdue.ca1.qualtrics.com/jfe/form/SV_0OnXfr5plPe1QCa
Thank you,
Aravind


Unable to select on CSVs without transforming to a different format

Describe the bug
dasel seems unable to just select and display fields on CSV files. Converting csv files to json seems to work fine, but I was hoping to just do selects without having to convert to another format first
Here. is a sample csv
name,msg
may,yo
june,howdy
july,great

To Reproduce
Steps to reproduce the behavior:
# Version 1
$ dasel -f sample.csv -r csv -s 'name'

Error: cannot use property selector on non map/struct types: slice: property not found: name

# Version 2
$ dasel -f sample.csv -r csv

Error: CSVParser.toBytes cannot handle type []map[string]interface {}

# Version 3
$ dasel -f sample.csv

Error: CSVParser.toBytes cannot handle type []map[string]interface {}

#Version 4 - WORKS
$ dasel -f sample.csv -r csv -w json

[
  {
    "msg": "yo",
    "name": "may"
  },
  {
    "msg": "howdy",
    "name": "june"
  },
  {
    "msg": "great",
    "name": "july"
  }
]

Include (sanitized) input files and commands to help along the way.
Expected behavior
I expected dasel to be able to output the csv when just trying to read a csv file. I also expect to be able to select and filter directly on CSV input without having to convert it to json first. Perhaps this is not the intended way for dasel to be used for csv input but there are so few csv examples that it's difficult to tell what is possible
Essentially something like this:
# This would just display the whole input
$ dasel -f sample.csv -r csv

name, msg
may, yo
june, howdy
july, great

# This would actually filter the csv input for the whole file
$ dasel -f sample.csv -r csv '.name'

name
may
june
july

# This would actually filter the csv input for a first entry
$ dasel -f sample.csv -r csv '.[0].name'

name
may

Desktop (please complete the following information):

OS: macOS Ventura 13.4
Version: dasel version 2.3.4

I just did a little testing and can explain what you're seeing.
CSV content:
name,msg
may,yo
june,howdy
july,great

In JSON form is:
[
  {
    "msg": "yo",
    "name": "may"
  },
  {
    "msg": "howdy",
    "name": "june"
  },
  {
    "msg": "great",
    "name": "july"
  }
]

It makes sense that name doesn't work, because that doesn't exist on an array.
What you can do instead is all().name.
You will also need to include a -w - to write plain output. Dasel will attempt to use the read parser by default and you can't "csv encode" a single string value.
Complete example:
$ echo 'name,msg
may,yo
june,howdy
july,great' | ./dasel -r csv -w - 'all().name'
may
june
july

The error you got from your 3rd command dasel -f sample.csv is unexpected though - I'll have a look at that separate to this issue as the above should solve your problem.
Let me know if this doesn't solve your issue and I can re-open the issue.

Okay this was super helpful! Thanks for walking me through that. It'd definitely be beneficial to include a couple more non-json examples of using dasel with different commands. I don't think I would've ever figured this out without your explanation

I have been meaning to do just that, it's just hard to find the time recently


--enable-wayland-ime is not supported in ~/.vscode/argv.json

--enable-wayland-ime is a command line option that can be used with VSCode, and is sometimes necessary when using a language that requires an IME, such as Japanese, Chinese or Korean, in a VSCode environment running on Wayland.
VSCode also has a feature that treats the contents of ~/.config/argv.json as the default command line arguments. Unfortunately, --enable-wayland-ime is currently not supported in ~.vscode/argv.json.
This issue is to request that --enable-wayland-ime be supported in argv.json.
There are many other known workarounds for adding default command line arguments (e.g. write alias on my .zshrc), but using argv.json is a simple and good approach.

The default flags file of vscode is ~/.config/code-flags.conf


View templates

This is a suggestion on how to show more "just add water" type templates for building views.
I am making this PR to get the discussion started, so if we agree that its not a good time/idea we can just scrap the PR for now

On hold for now


feat(Tactic/Linter): add unicode linter for unicode variant-selectors

Unicode characters can be followed by one of the two "variant-selectors" \FE0E (text) or \FE0F (emoji).
These appear to the user as a single unicode character and they might copy them by accident. For example ✅ (\u2705\uFE0F), ✅ (\u2705) and ✅ (\u2705\uFE0E) are three variants of the "same" unicode character.
Add unicode linter ensuring variant-selector only appear on specified characters and also ensuring these characters always have the variant selector to avoid confusions like Example 1 and 2 above.
Everything flagged by this linter can be fixed fully automatically with lake exe lint-style --fix which is what reviewdog uses.

This is the first PR of a series of PRs about unicode characters in Mathlib. The second PR will be addressing non-breaking spaces.
Zulip discussions:

https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Whitelist.20for.20Unicode.3F
https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/Lean.20specific.20font
private reviewer stream

Generally, the discussions seemed to show clear favour for the first two PRs in this series (handling variant selectors & dealing with invisible chars. such as   (\u00A0)) while there seems to be still room for discussion about what to do with general unicode characters (whitelist, blacklist, ...)
Related PRs:

leanprover/lean4#5015 added some emoji-variant selectors to Emojis used in Lean itself.

bot fix style


renderer.onContextRestored in HEADLESS

This Issue is about

A bug in the API (v3.2.0)

v3.2.0 introduced the HEADLESS rendering mode. There is currently an issue when using this in combination with a static tilemap layer, because the tilemap layer tries to access the renderer, which is null. The issue is caused by the following line, which I believe may not be necessary in headless:
this.renderer.onContextRestored(this.contextRestore, this);

https://github.com/photonstorm/phaser/blob/v3.2.0/src/tilemaps/staticlayer/StaticTilemapLayer.js#L197
The same issue seems to exist in other game object classes as well, for instance Text. A quick search found that BitmapMask and TileSprite contains the same line, so those are likely to be affected as well. DynamicTilemapLayer is not affected.
The issue appears if you change the following example to use the headless mode:
http://labs.phaser.io/edit.html?src=src\game objects\tilemap\collision\csv map arcade physics.js

Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.


[MI-2085]: No projects linked handling on modals and refactor create-…

No projects linked handling on modals and refactor create-task-modal

these changes are synced with master where all the changes are already reviewed (1st and 2nd pass) for this PR the changes are too small for 2nd pass


[3pt]  - Add tests for comments counter - Student B

Make sure that the function for the comments counter is covered with unit tests using Jest.
Make sure that you have tests for all edge cases.

The link to pull request:
https://github.com/MAleemH/JavaScript-Capstone-Project-/pull/34


1.4.2-d.3: JSON.parse error on getting new instance

Expected Behavior
Create new instace of Innertube without any error
Current Behavior
Got error, while parsing json in SessionBuilder
Failure Information (for bugs)
Logs:
2022-05-19T04:08:15.593234+00:00 app[worker.1]: undefined:1
2022-05-19T04:08:15.593235+00:00 app[worker.1]: undefined
2022-05-19T04:08:15.593236+00:00 app[worker.1]: ^
2022-05-19T04:08:15.593236+00:00 app[worker.1]:
2022-05-19T04:08:15.593237+00:00 app[worker.1]: SyntaxError: Unexpected token u in JSON at position 0
2022-05-19T04:08:15.593237+00:00 app[worker.1]: at JSON.parse (<anonymous>)
2022-05-19T04:08:15.593238+00:00 app[worker.1]: at SessionBuilder.#getYtConfig (/app/node_modules/youtubei.js/lib/core/SessionBuilder.js:79:17)
2022-05-19T04:08:15.593241+00:00 app[worker.1]: at processTicksAndRejections (node:internal/process/task_queues:96:5)

2022-05-19T04:08:15.593241+00:00 app[worker.1]: at async Promise.all (index 0)
2022-05-19T04:08:15.593242+00:00 app[worker.1]: at async SessionBuilder.build (/app/node_modules/youtubei.js/lib/core/SessionBuilder.js:25:18)
2022-05-19T04:08:15.593244+00:00 app[worker.1]: at async Innertube.#init (/app/node_modules/youtubei.js/lib/Innertube.js:47:21)
2022-05-19T04:08:15.593244+00:00 app[worker.1]: at async file:///app/build/src/skills/youtube.js:19:28
2022-05-19T04:08:15.618562+00:00 app[worker.1]: error Command failed with exit code 1.

Steps to Reproduce
I trying to do this
  private _client

  constructor() {
    super()
    ;(async () => {
      this._client = await new Innertube()
    })()
  }

Failure Logs
Please include any relevant log snippets or files here.
Checklist

[ ] I am running the latest version
[x] I checked the documentation and found no answer
[x] I checked to make sure that this issue has not already been filed
[x] I have provided sufficient information

🤔 Weird, can you try accessing https://www.youtube.com/sw.js through a browser and see what it looks like? Maybe it is being blocked or returning something completely different.

This is logs from heroku. Locally, all works perfect, from browser too. Moreover, it worked on heroku till this moment.
I checked sw.js on heroku.
Axios got 200 repsonse whith this strange data:
2022-05-19T05:05:10.213426+00:00 app[worker.1]: data: '\n' +
2022-05-19T05:05:10.213427+00:00 app[worker.1]: "  self.addEventListener('install', event => {\n" +
2022-05-19T05:05:10.213427+00:00 app[worker.1]: '    event.waitUntil(self.skipWaiting());\n' +
2022-05-19T05:05:10.213427+00:00 app[worker.1]: '  });\n' +
2022-05-19T05:05:10.213427+00:00 app[worker.1]: "  self.addEventListener('activate', event => {\n" +
2022-05-19T05:05:10.213427+00:00 app[worker.1]: '    event.waitUntil(\n' +
2022-05-19T05:05:10.213428+00:00 app[worker.1]: '      self.clients.claim().then(() => self.registration.unregister()));\n' +
2022-05-19T05:05:10.213428+00:00 app[worker.1]: '  });\n' +
2022-05-19T05:05:10.213428+00:00 app[worker.1]: '  '
2022-05-19T05:05:10.213429+00:00 app[worker.1]: }

I tried to make request with Useragent as well.

It seems like we can obtain api key from https://www.youtube.com/sw.js_data
And then fetch additional info from https://www.youtube.com/youtubei/v1/notification_registration/set_registration?key={key}&prettyPrint=false if needed.
I checked from heroku, this endpoints available

It seems like we can obtain api key from https://www.youtube.com/sw.js_data

I believe the service worker endpoint was acting up due to Heroku's IP/server location. But great findings, that should be a drop-in replacement for /sw.js, the notification registration endpoint won't be necessary though.

It works! Thanks for the rapid fix:)


Extends release workflow to publish extension maven artifacts

Extends the GitHub "Publish new release" workflow to deploy all maven artifacts underneath edc-extensions to github packages. Closes #90
Denis Neuling<EMAIL_ADDRESS>Mercedes-Benz Tech Innovation GmbH, legal info/Impressum

@DominikPinsel, @florianrusch-zf Would you like to have a look please?


Update herblorerecipes to v1.7

Refactored the plugin.
Using item IDs rather than Strings and preloading Tooltip cache on plugin startup. Better organization of the configuration options...

Woops, had wrong language level set in IDE.


PrepareWorld step takes too long on headless

loadProcesses.PrepareWorld currently documents itself as "loops until world is pre-generated or 5 second elapsed," and it's good to its word:
https://github.com/MovingBlocks/Terasology/blob/2d0c434654b797b71e9a0d00004b3b79f3a4c5e7/engine/src/main/java/org/terasology/engine/core/modes/loadProcesses/PrepareWorld.java#L32-L38
The problem is that the HeadlessWorldRenderer looks like this:
https://github.com/MovingBlocks/Terasology/blob/b27c8e274d06f56ed821340008a30b41628dccb9/engine/src/main/java/org/terasology/engine/core/subsystem/headless/renderer/HeadlessWorldRenderer.java#L124-L126
so that loading step always takes five seconds in headless, no matter how much or how little time it takes to generate chunks.
This goes a long way to explaining why even the simplest possible MTE test always takes at least five seconds.

I wouldn't try to tackle this before finishing #4798.
I already tried the simple thing of changing the return false to a return true, and while the first MTE test in the run was fine, the next one had problems.


Can not use  onCreateComplete() from a remote preset

Version
3.4.0
Reproduction link
https://github.com/CrashyBang/vue-cli-remote-example
Environment info
Ubuntu 18.10 x86_64

Steps to reproduce

Clone down repo
Try to generate project using preset with vue create --preset ./vue-cli-remote-example testing-preset
Wait to see error

What is expected?
To be able to call onCreateComplete from /generator/index.js in a remote preset.
What is actually happening?
Running onCreateComplete doesn't seem to fire until after error checking so all of the imports injected via  api.injectImports(api.entryFile, ...); are erroring as unused imports.
onCreateComplete fails to find or insert into the src/main.js. (I am guessing it is looking in the wrong place based on errors)

I am assuming these two errors are related and that the root cause is to do with onCreateComplete failing to resolve src/main.js hence why I have commented out the api.injectImports(api.entryFile, ...); in the minimal example.

After further work I have noticed additional issues relating to the resolving of various files/directories I am starting to think that best practice here may be to write the bulk of the config as a plugin and then get the plugin to be brought in by the preset?
It appears that even though we can use the generator API in the preset a lot of the logic that the generator uses assumes it being executed from within the context of being a plugin as opposed to a preset.

Would it be possible to confirm whether or not onCreateComplete should be able to be called in a remote preset?
If not I will start exploring other ways of trying to set this up.


CI: Removing travis config.

Also turned off Travis CI completely.
Signed-off-by: Bartek Plotka<EMAIL_ADDRESS>

ping @fabxc

👍


I can't delete a file if it ends with a trailing forward slash

Preflight Checklist

[X] I have installed the latest version of Storage Explorer.
[X] I have checked existing resources, including the troubleshooting guide and the release notes.
[X] I have searched for similar issues.

Storage Explorer Version
1.30.0
Regression From
No response
Architecture
x64
Storage Explorer Build Number
20230609.2
Platform
All
OS Version
macOS Ventura 13.4.1
Bug Description
If I try to delete a file with a trailing forward slash, the file is not deleted.
Steps to Reproduce

Use API to create a file in azure blob storage with a "/" appended to the end of the filename
Go to file and try to delete it using the X Delete button in Azure Storage Explorer.
File will not be deleted

Actual Experience

Note if you upload a file using microsoft azure storage explorer with a trailing forward slash, the file is created with a colon ":" appended to the file name.
The signed version I used to upload the file was 2018-03-28

Expected Experience
No response
Additional Context
No response

@bkleinman7 Creating blobs whose name ends with forward slash is not recommended. We've found issues with our underlying library/executable which would treat the blob as directory and accidentally delete user data. As a result, we banned such risky operations entirely and always attempt to don't let people create such kind of blobs within Storage Explorer.  For now you can try deleting it in Azure Portal or write a script using the API to delete those blobs.

@bkleinman7 Creating blobs whose name ends with forward slash is not recommended. We've found issues with our underlying library/executable which would treat the blob as directory and accidentally delete user data. As a result, we banned such risky operations entirely and always attempt to don't let people create such kind of blobs within Storage Explorer. For now you can try deleting it in Azure Portal or write a script using the API to delete those blobs.

Thanks, I will just delete them via the API.


strcpy_s not standard

strcpy_s is not a standard function, I understand that it is a function of Microsoft Visual C / C ++
This is not portable, and in fact does not exist in the ESP-IDF.
Should be replaced by a standard function or provide an implementation

May be from here https://sourceforge.net/projects/safeclib/

I see there is only one use and it is static.
Better to replace by:
memcpy(p, "Infinity", 9);

Ah yeah. I changed it to strncpy but actually memcpy is better. Thanks for the idea!


Whitelist enhancement

Hi P4T12ICK,
Some findings and enhancements:
-lookupfile names with "(" or ")" are invalid in Splunk, thats why i just delete these characters for the naming of the whitelist (e.g. sysmon_logon_scripts_userinitmprlogonscript.yml)
-sometimes the "interesting fields" int the table command are not enough to whitelist, thats why i would place the whitelist in front of the table or transforming command (e.g sysmon_susp_file_characteristics.yml)
The behaviour of the 2nd part would also be nice to control in the config of Sigma2SplunkAlert, like using a "add_whitelist_in_front" in the search transformation configuration. So a user is able to choose what suites him the most.
a2tf

Hi,
thank you very much. I think that are some very good improvements/ideas.
I will review the merge request in the next days.
Best regards,
Patrick


TypeScript tests aren't run on CI.

Tests for definition files exist, but can break unless they're manually run - they should be run alongside other tests on Travis.

Should be fixed by 799c4fe


Failed to locate file jeet.styl using webpack.

Console
1| @import 'jeet'
--------------^
2|
3| edit()
4|
failed to locate @import file jeet.styl
package.json
"dependencies": {
    "jeet": "^6.0.0",
    "material-ui": "^0.15.0",
    "radium": "^0.17.1",
    "react": "^0.14.8",
    "react-dom": "^0.14.7",
    "react-redux": "^4.4.5",
    "react-router": "^2.0.1",
    "react-tap-event-plugin": "^1.0.0"
  }
}

webpack.config.js
 stylus: {
      use: [require('jeet')()],
      import: [
      '~jeet/stylus/jeet/_jeet',
      ],
    },

I tried downgrading the npm package as well as using the master branch, neither solved my problem.
Any help would be greatly appreciated.

Ended up using svn checkout https://github.com/mojotech/jeet/trunk/stylus/jeet(which shows there is no jeet.style)
and doing @import '../jeet/index' instead.

@import '../jeet/index' ? What is path base?

Thank you for the great jeet library but please stop messing up the webpack setup. It is somewhat annoying to go through the same problem again with every new release.
It would be very helpful if you could provide a recommended setting for webpack and stick with it.

@seathony @tikiatua
I just released a new version, 6.1.5 (basically a re-release from 6.1.2 code) which should hopefully work better than the last two releases. Please confirm this!
If it works, we can add your webpack configuration as a recommended setting for other users to help them use Jeet with webpack easier!

Thanks for the update.
It works now with the following configuration:
// in stylus file
@require "jeet";

// webpack configuration
module.exports = {
  // ..
  module: {
    loaders: [
      test: /\.styl$/,
      loader: 'style!css!stylus?paths=node_modules/jeet/stylus'
    ]
  }
}

@seathony @tikiatua Hey, can you confirm https://github.com/mojotech/jeet/pull/505 works with your preferred methods of using Webpack?
var jeet = require('jeet')

module.exports = {
  entry: './style.styl',
  output: {
    path: '.',
    filename: 'style.css.js'
  },
  module: {
    loaders: [
      {
        test: /\.styl$/,
        loader: 'style-loader!css-loader!stylus-loader'
      }
    ]
  },
  stylus: {
    use: [jeet()]
  }
}

...generates a bundle with lots of webpack junk in it, but seems to actually process Jeet as evident by this line.
Please let me know how you're using it exactly. I'm new to Webpack and haven't really delved into using it for styles yet so I'm not sure if that PR I've got going is doing it right.

Hi there,
this will indeed work. The css will be included in the javascript. It can be extracted to a separate css file using the extract-text-webpack-plugin (example below):
// file: package.json
{
  "name": "stylus-test",
  "version": "1.0.0",
  "description": "",
  "main": "webpack.config.js",
  "scripts": {
    "build": "webpack --progress -config webpack.config.js"
  },
  "author": "",
  "license": "MIT",
  "dependencies": {
    "css-loader": "^0.25.0",
    "extract-text-webpack-plugin": "^1.0.1",
    "jeet": "^6.1.5",
    "style-loader": "^0.13.1",
    "stylus": "^0.54.5",
    "stylus-loader": "^2.3.1",
    "webpack": "^1.13.2"
  }
}

// file: webpack.config.js
var path = require('path');
var webpack = require('webpack');

// extract text into separate files
var ExtractTextPlugin = require('extract-text-webpack-plugin');

// include the jeet stylus plugin
var jeet = require('jeet');

// define the app directory to include in compilation
var app_directory = path.resolve(__dirname);

module.exports = {
	entry: path.resolve(__dirname, 'test.styl'),
	output: {
		path: path.resolve(__dirname),
		filename: 'test.css.js'
	},
	module: {
		loaders: [{
				// parse stylus styles
				test: /\.styl$/,
				// use some stylus plugins
				use: [jeet()],
				// extract the style into separate files
				// IMPORTANT: style and css!stylus must be separated, it will not
				// work otherwise
				loader: ExtractTextPlugin.extract('style', 'css!stylus'),
				// specify with directories to include
				include: [app_directory]
			}
		]
	},
	plugins: [
		new ExtractTextPlugin('test.css'),
		new webpack.optimize.UglifyJsPlugin({
			compress: {
				warnings: false
			}
		}),
		new webpack.optimize.OccurenceOrderPlugin()
	]
};

You can then build your styles using npm run build.

https://github.com/mojotech/jeet/releases/tag/7.0.0 fixes this.

Hi everyone:
This is not working with the 7.0.0 release.
Ubuntu 16.04
webpack 1.13.2

@raydf What is not working exactly?

Hi @corysimmons:
1| @import 'jeet'
--------------^
1| @import 'jeet/styl'
--------------^
Neither of this commands works with webpack.

Can you show me your webpack config and a bare bones version of your project structure?
It might be as easy as removing @import ... since the npm package for Jeet should work implicitly (you shouldn't have to @import it).

I'm not trying to hijack the thread, but I don't use webpack and I was having the same issue. Removing the @import rule fixed it for me.

You're helping out, not hijacking.
Hijacking would be if you jumped in the thread and was like: "Hey guys, I see your point on webpack not working, but I really like apple pie. Will you buy my apple pies?!" :)

I do like apple pie though... Good point.

Hi there,
I will try to find a working webpack configuration for jeet 7.0.0 tomorrow. Stay tuned.

Thanks for the help.
removing @import ...  fixed it.

Thanks @tikiatua ! When you've got something, I'll test it out and we can add Webpack to officially supported integrations. I'm going to close this Issue since it seems to work. Feel free to open a PR, or just plop some code in here.
@raydf Glad it worked!

Just checked the example and updated it to clearly state that @import "jeet" should not be included in the files. This should probably be included in the readme.

@import should be there for people who are just grabbing from node_modules


Question - Enable Closed Captions on YouTube video

Hello,
This is a question and not an issue.
I'm using the player to show a YouTube video. I want to enable Closed Captions by default.
I'm trying this but it does not work (based on this https://developers.google.com/youtube/player_parameters?playerVersion=HTML5#cc_load_policy).
this.config = {
      "playerVars": {
        "cc_load_policy" : "1"
      }
    }

<ReactPlayer url='https://www.youtube.com/watch?v=3UJiZARaXWQ' playing youtubeConfig={this.config} />

Am I doing something wrong?
Thanks,

I can't see anything wrong with your config. In fact you can test this out on the demo page if you paste in
{"youtubeConfig":{"playerVars":{"cc_load_policy":1}}}

to the Custom config field. What's weird is that after entering that config, you can load up YouTube Test B and see captions.. but captions do not appear when loading your custom URL, so I'm not sure what's going on, unless there is a setting in Youtube for your specific video?
You can also inspect the youtube embed elements and see cc_load_policy=1 in the embedded URL generated by the API, to make sure the custom config is definitely being sent through.

Thanks for looking into this @CookPete
I don't think this works, YouTube Test B shows CC always (I'm guessing its enabled by default on that video) so its not because of "cc_load_policy":1
Let me keep looking into this.

YouTube Test B shows CC always (I'm guessing its enabled by default on that video) so its not because of "cc_load_policy":1

They do not show for me until I put in the config (same in incognito mode on chrome). I wonder if it also depends on your YouTube account playback settings, if you are signed in?

@CookPete I think you are right.
It looks like its based on what you have selected in YouTube.
We can close this off. It was not an issue.


[stable/sumologic-fluentd] treat secret as normal resource instead of hook

@flah00 @frankreno @darend @bendrucker
What this PR does / why we need it:
This change removes the hooks annotation from the secret:
  annotations:
    "helm.sh/hook": pre-install,pre-upgrade
    "helm.sh/hook-delete-policy": "before-hook-creation"

Removing this makes the chart more deployable outside of Helm/Tiller, since some deploy tools (such as ours) does not handle helm hooks well.
Not sure the rational for making this a resource hook, but I see that it has been like this from the first commit. My guess is that Helm may not have sorted resources by their correct ordering at the time.
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[X] DCO signed
[X] Chart Version bumped
[X] Variables are documented in the README.md

Helm actually creates secrets before daemon sets since (at least) 2.x
https://github.com/helm/helm/blob/release-2.12/pkg/tiller/kind_sorter.go#L29
This pre-install hook seems not needed anymore.

Good find @EppO! I'd be ok with either of the following:

Drop support for Helm 1 by setting tillerVersion: >= 2 in the Chart.yaml. This would be a breaking change.
Preserve compatibility by conditionally specifying the hook based on the tiller version, e.g. https://github.com/helm/charts/blob/e0505bbd09c4f8bf81fe583841c926e02cc82a8e/stable/cert-manager/templates/clusterissuer-crd.yaml#L6-L9

I don't mind adding the a chart restriction to >=2, but I actually feel that even if we didn't have the tillerVersion: >= 2 that this would still work with helm 1.  Because even if the secret is created out of order (i.e. created after the DeaemonSet), it will eventually be created and the DeamonSet which depends on it will eventually start.

Hmm I guess that's true, the secret was never really required, using a hook just saved some possible ContainerCreateConfigError backoffs. Fine with skipping the semver check and continuing to treat this as a patch.

/approve


security: add container_privileges.md

Document the current status of container privileges and users in Metal3.
Rename security-tools dir to security to collect all security docs under a common directory.

/assign kashifest


[kong] Add custom extra configmaps/secrets

Add extraConfigMaps and extraSecrets fields to values file that will be added to volumes/volumeMounts template helpers.

What this PR does / why we need it:
Adds ability to mount arbitrary config maps/secrets
Which issue this PR fixes
closes #196
Special notes for your reviewer:
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[ X ] PR is based off the current tip of the next branch and targets next, not main
[ X ] New or modified sections of values.yaml are documented in the README.md
[ X ] Title of the PR and commit headers start with chart name (e.g. [kong])

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Mike Menaker seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

I updated the fork with the requested changes, I'll merge/rebase the last 'next' branch tomorrow morning.

Bizarre. CI keeps failing because a Postgres-backed instance cannot connect to Postgres, but I cannot replicate this locally with the same test values on a fresh install/namespace.
Possibly something awry with GH actions at the moment; will try tests again on Monday.


Add a reference to the links key in the manifest docs

Fixes #4975

note the link won't work in GitHub's markdown rendering (links to https://github.com/rust-lang/cargo/blob/master/src/doc/src/reference/reference/build-scripts.html#the-links-manifest-key), but it should work when rendered in https://doc.rust-lang.org/cargo/reference/manifest.html 🤞

Excellent, thanks @dwijnand ! Just today I once again faced a problem where people don't know about this key :) Hopefully, this will massively improve the situation!
@bors r+

:pushpin: Commit 3fb15ac has been approved by matklad

:hourglass: Testing commit 3fb15acf6de0c1f65612a28a7beff776bf3afcc0 with merge d349373c9e21b4da98db57fd3abe3b901c82aff6...

:sunny: Test successful - status-appveyor, status-travis
Approved by: matklad
Pushing d349373c9e21b4da98db57fd3abe3b901c82aff6 to master...


[WIP] remove SDS_ENABLED env var

pilot/installer code will be much easier without this env var
WIP, want to see presubmit test result (previous PR test fail somehow so merge with this env var)

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: quanjielin
To complete the pull request process, please assign nmittler
You can assign the PR to them by writing /assign @nmittler in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

pilot/OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@quanjielin: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

integ-security-local-presubmit-tests-master
ba2e7292c100604a829f286d44c4cb61d0aa0aa9
link
/test integ-security-local-presubmit-tests-master

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@quanjielin: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

integ-security-local-presubmit-tests-master
ba2e7292c100604a829f286d44c4cb61d0aa0aa9
link
/test integ-security-local-presubmit-tests-master

integ-istioctl-k8s-presubmit-tests-master
ba2e7292c100604a829f286d44c4cb61d0aa0aa9
link
/test integ-istioctl-k8s-presubmit-tests-master

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@quanjielin: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

integ-security-local-presubmit-tests-master
ba2e7292c100604a829f286d44c4cb61d0aa0aa9
link
/test integ-security-local-presubmit-tests-master

integ-istioctl-k8s-presubmit-tests-master
ba2e7292c100604a829f286d44c4cb61d0aa0aa9
link
/test integ-istioctl-k8s-presubmit-tests-master

integ-pilot-local-presubmit-tests-master
ba2e7292c100604a829f286d44c4cb61d0aa0aa9
link
/test integ-pilot-local-presubmit-tests-master

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@quanjielin: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

integ-security-local-presubmit-tests-master
ba2e7292c100604a829f286d44c4cb61d0aa0aa9
link
/test integ-security-local-presubmit-tests-master

integ-istioctl-k8s-presubmit-tests-master
ba2e7292c100604a829f286d44c4cb61d0aa0aa9
link
/test integ-istioctl-k8s-presubmit-tests-master

integ-pilot-local-presubmit-tests-master
ba2e7292c100604a829f286d44c4cb61d0aa0aa9
link
/test integ-pilot-local-presubmit-tests-master

istio-codecov-master
ba2e7292c100604a829f286d44c4cb61d0aa0aa9
link
/test istio-codecov-master

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@quanjielin: The following tests failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

integ-security-local-presubmit-tests-master
ba2e7292c100604a829f286d44c4cb61d0aa0aa9
link
/test integ-security-local-presubmit-tests-master

integ-istioctl-k8s-presubmit-tests-master
ba2e7292c100604a829f286d44c4cb61d0aa0aa9
link
/test integ-istioctl-k8s-presubmit-tests-master

integ-pilot-local-presubmit-tests-master
ba2e7292c100604a829f286d44c4cb61d0aa0aa9
link
/test integ-pilot-local-presubmit-tests-master

istio-codecov-master
ba2e7292c100604a829f286d44c4cb61d0aa0aa9
link
/test istio-codecov-master

istio-racetest-master
ba2e7292c100604a829f286d44c4cb61d0aa0aa9
link
/test istio-racetest-master

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.


prune codecov exceptions

What does this PR do?
Most of the patterns does not exist anymore in code, so if need add local # pragma: no cover
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃

@luiscape ^^

@PyTorchLightning/core-contributors ^^