MM 20547 user settings security ts

Summary
Migrate 'components/user_settings/security' module and associated tests to TypeScript
Ticket Link
Fixes https://github.com/mattermost/mattermost-server/issues/13694

This PR has been automatically labelled "stale" because it hasn't had recent activity.
A core team member will check in on the status of the PR to help with questions.
Thank you for your contribution!
/cc @jasonblais @jfrerich

Thanks @sridhar02 for the contribution! Let us know if we can with the type check error reported by our CI build. You can find the logs here. We'd be happy to help :)

@jasonblais I am busy with some other work, so I was not able to do this, so I will complete it a week or two.If I need I will mention in this PR

@sridhar02 Heads up that CI is failing with https://app.circleci.com/pipelines/github/mattermost/mattermost-webapp/25391/workflows/0c4d5ec4-c3ec-4aeb-bc13-a3c01d3b2916/jobs/165162

@hanzei can you help me fixing the type errors in the test file, I am new testing struggling with it and due to it, I was unable to complete this PR.

@devinbinnie I'm not sure how to fix the issues with deauthorizeApp. Can you help there?
components/user_settings/security/user_settings_security.test.tsx:141:69 - error TS2345: Argument of type '{ currentTarget: { getAttribute: jest.Mock<any, any>; }; preventDefault: jest.Mock<any, any>; }' is not assignable to parameter of type 'MouseEvent<Element, MouseEvent>'.
  Type '{ currentTarget: { getAttribute: Mock<any, any>; }; preventDefault: Mock<any, any>; }' is missing the following properties from type 'MouseEvent<Element, MouseEvent>': altKey, button, buttons, clientX, and 27 more.

141         (wrapper.instance() as UserSettingsSecurity).deauthorizeApp(event);
                                                                        ~~~~~

@devinbinnie I'm not sure how to fix the issues with deauthorizeApp. Can you help there?
components/user_settings/security/user_settings_security.test.tsx:141:69 - error TS2345: Argument of type '{ currentTarget: { getAttribute: jest.Mock<any, any>; }; preventDefault: jest.Mock<any, any>; }' is not assignable to parameter of type 'MouseEvent<Element, MouseEvent>'.
  Type '{ currentTarget: { getAttribute: Mock<any, any>; }; preventDefault: Mock<any, any>; }' is missing the following properties from type 'MouseEvent<Element, MouseEvent>': altKey, button, buttons, clientX, and 27 more.

141         (wrapper.instance() as UserSettingsSecurity).deauthorizeApp(event);
                                                                        ~~~~~

@hanzei @sridhar02 You'll want to cast event as an any in this situation, as it's expecting you to provide the entire MouseEvent object. But since we don't want to mock that out, casting as any in the tests is alright.

@jgilliam17 A smote test around the security setting should be enough.


update doc/sql-databases.md

fix broken link
linkify referenced files
enable syntax highlighting of scala code
new DB() :arrow_right: DB(), as in the code itself there's no new.

thanks for the help. only one nit


Make walkthrough test after() async/await

Add async/await clauses to the test.js file within the firestore walkthrough.
I took this example and extended it to match my project and use case... it ended up running into timing collisions and flaky tests without this  async/await in the after hooks.  Therefore, it made sense to update the source to help the next person.

@zeroasterisk apologies for the late response here!  For some reason I wasn't "watching" this repository even though I created it 🤦
This is a great improvement, I'll merge it.


Installation with pip?

Hi, great work on this package!
I'm looking to use this package in conjunction with other dependencies in a larger project and have no experience with nix. Since there are multiple top-level packages, it's not clear to me how to correctly install jaxngp. Further, when I try to install from a subdirectory (e.g., trying to install only jax-tcnn), I'm unable to do so. For example, when trying to install only the jax-tcnn subpackage using pip install "git+https://github.com/blurgyy/jaxngp.git#egg=jax-tcnn&subdirectory=deps/jax-tcnn", I get the error
Building wheels for collected packages: jax-tcnn
  Building wheel for jax-tcnn (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for jax-tcnn (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [70 lines of output]
      WARNING setuptools_scm._integration.setuptools pyproject.toml does not contain a tool.setuptools_scm section
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-310
      creating build/lib.linux-x86_64-cpython-310/jaxtcnn
      copying src/jaxtcnn/__init__.py -> build/lib.linux-x86_64-cpython-310/jaxtcnn
      creating build/lib.linux-x86_64-cpython-310/jaxtcnn/hashgrid_tcnn
      copying src/jaxtcnn/hashgrid_tcnn/impl.py -> build/lib.linux-x86_64-cpython-310/jaxtcnn/hashgrid_tcnn
      copying src/jaxtcnn/hashgrid_tcnn/lowering.py -> build/lib.linux-x86_64-cpython-310/jaxtcnn/hashgrid_tcnn
      copying src/jaxtcnn/hashgrid_tcnn/__init__.py -> build/lib.linux-x86_64-cpython-310/jaxtcnn/hashgrid_tcnn
      copying src/jaxtcnn/hashgrid_tcnn/abstract.py -> build/lib.linux-x86_64-cpython-310/jaxtcnn/hashgrid_tcnn
      running egg_info
      writing src/jax_tcnn.egg-info/PKG-INFO
      writing dependency_links to src/jax_tcnn.egg-info/dependency_links.txt
      writing requirements to src/jax_tcnn.egg-info/requires.txt
      writing top-level names to src/jax_tcnn.egg-info/top_level.txt
      writing manifest file 'src/jax_tcnn.egg-info/SOURCES.txt'
      running build_ext
      Traceback (most recent call last):
        File "/home/albert/mambaforge/envs/pong_new/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/albert/mambaforge/envs/pong_new/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/albert/mambaforge/envs/pong_new/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
        File "/tmp/pip-build-env-v74q8f5x/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 434, in build_wheel
          return self._build_with_temp_dir(
        File "/tmp/pip-build-env-v74q8f5x/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 419, in _build_with_temp_dir
          self.run_setup()
        File "/tmp/pip-build-env-v74q8f5x/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 86, in <module>
        File "/tmp/pip-build-env-v74q8f5x/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
        File "/tmp/pip-build-env-v74q8f5x/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/tmp/pip-build-env-v74q8f5x/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-v74q8f5x/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-v74q8f5x/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-v74q8f5x/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-v74q8f5x/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 364, in run
          self.run_command("build")
        File "/tmp/pip-build-env-v74q8f5x/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-v74q8f5x/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-v74q8f5x/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-v74q8f5x/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 131, in run
          self.run_command(cmd_name)
        File "/tmp/pip-build-env-v74q8f5x/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-v74q8f5x/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 989, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-v74q8f5x/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-v74q8f5x/overlay/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 88, in run
          _build_ext.run(self)
        File "/tmp/pip-build-env-v74q8f5x/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
          self.build_extensions()
        File "<string>", line 54, in build_extensions
        File "/home/albert/mambaforge/envs/pong_new/lib/python3.10/os.py", line 680, in __getitem__
          raise KeyError(key) from None
      KeyError: 'cmakeFlags'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for jax-tcnn
Failed to build jax-tcnn
ERROR: Could not build wheels for jax-tcnn, which is required to install pyproject.toml-based projects

Some guidance on installation would be helpful! If it helps, I only really need a jax version of the TCNN hash encoder.

Hi @alberthli, I think there are several steps should be done to install this package:

First of all, obtain a local copy of this repository
The error about the environment variable can be avoided by removing the + os.environ["cmakeFlags"].split() part here
To build the binding, you also have to copy the serde-helper.h file (here) to the directory deps/jax-tcnn/lib, and include it with relative paths in deps/jax-tcnn/lib/ffi.cc and deps/jax-tcnn/lib/impl/hashgrid.cu
You should build tiny-cuda-nn's library first (follow tiny-cuda-nn's instructions), and probably modify deps/jax-tcnn/CMakeLists.txt so that CMake can find tiny-cuda-nn's library
tiny-cuda-nn's include/ directory should be in the search path in your build environment (one way to specify this is to supply the argument -I/path/to/tiny-cuda-nn/include to the compiler)

Here's a modified CMakeLists.txt for pip installation:
cmake_minimum_required(VERSION 3.23)
project(volume_rendering_jax LANGUAGES CXX CUDA)
# use `cmake -DCMAKE_CUDA_ARCHITECTURES=61;62;75` to build for compute capabilities 61, 62, and 75
# set(CMAKE_CUDA_ARCHITECTURES "all")
message(STATUS "Enabled CUDA architectures: ${CMAKE_CUDA_ARCHITECTURES}")

message(STATUS "Using CMake version " ${CMAKE_VERSION})

set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --extended-lambda")

find_package(Python COMPONENTS Interpreter Development REQUIRED)
find_package(pybind11 CONFIG REQUIRED)
find_package(fmt REQUIRED)

include_directories(${CMAKE_CURRENT_LIST_DIR}/lib)

include_directories(${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})
pybind11_add_module(
    tcnnutils
    ${CMAKE_CURRENT_LIST_DIR}/lib/impl/hashgrid.cu
    ${CMAKE_CURRENT_LIST_DIR}/lib/ffi.cc
)

# e.g. `cmake -DTCNN_MIN_GPU_ARCH=61`
message(STATUS "TCNN_MIN_GPU_ARCH=35")
target_compile_definitions(tcnnutils PUBLIC -DTCNN_MIN_GPU_ARCH=35)

target_link_libraries(tcnnutils PRIVATE tiny-cuda-nn fmt::fmt)

install(TARGETS tcnnutils DESTINATION jaxtcnn)

To add all required headers, you can first clone tiny-cuda-nn (with all the submodules) and check out to the v1.6 tag, then go to deps/jax-tcnn/lib and symlink the directories:
$ git clone https://github.com/nvlabs/tiny-cuda-nn.git --recursive
$ cd tiny-cuda-nn
$ git checkout v1.6
$ cd ..
$ git clone https://github.com/blurgyy/jaxngp.git
$ cd jaxngp/deps/jax-tcnn/lib
$ ln -s /path/to/tiny-cuda-nn/include/tiny-cuda-nn /path/to/tiny-cuda-nn/dependencies/* .

You should then build tiny-cuda-nn to obtain the static library libtiny-cuda-nn.a, putting it to a proper location in your system, and run pip install -v /path/to/jaxngp/deps/jax-tcnn.

@blurgyy Thanks for the edits/instructions - I finally got back around to looking at this and successfully built jax-tcnn.
I have a follow-up question: my goal is to train a nerfacto model from nerfstudio using the tcnn fully fused MLP (which calls the torch bindings) and then load those weights into a jax model that just needs to do inference. The reason for this is that I want the NeRF density field to be used in conjunction with a large jax codebase, but I also want to reduce the amount of time it takes to train the NeRF, and nerfstudio is very entrenched in the NeRF side of our experimental pipeline.
However, when I initialize jaxtcnn TCNNHashGridEncoder and CoordinateBasedMLP modules, I find that the total number of parameters is exactly 24 fewer than the tcnn.NetworkWithInputEncoding (12196216 + 3072 parameters vs. 12199312). I have also confirmed that the entire difference is accounted for by the hash grid and not the MLP by forcing nerfstudio to train a NeRF by separating the encoder and MLP and recounting the parameters. I have double checked that the parameters I use to initialize the encoders are the same across the jax and torch versions.
Do you have any idea where this parameter discrepancy comes from in the hash grid implementation? Could this be resolved just by building the most recent version of tiny-cuda-nn instead of v1.6 or would there be modifications needed on the jax-tcnn side? I would be happy to provide more information and relevant files if needed.

Hi @alberthli,
I recently encountered a use case where I need to calibrate the JAX's HashGridEncoder (not TCNNHashGridEncoder)'s parameter layout with that of tiny-cuda-nn's, I just pushed an update to address this (commit 04bcea2ab5bd2e2ecec8fc83c9ce191120f9cd8e).
I used the following parameters to initialize and train a HashGridEncoder from the JAX side, and used tcnn's pytorch bindings to load it, the parameter count and per-layer hashgrid output is checked to match (there are still absolute error not larger than 1e-3).

initialization from jaxngp (this repo):
from models.encoders import HashGridEncoder

jax_hg = HashGridEncoder(L=16, T=2**19, F=2, N_min=32, N_max=2048, tv_scale=0.)

initializing using tcnn's pytorch bindings:
import math

import tinycudann as tcnn
import torch

L = 16
F = 2
N_min = 32
N_max = 2048
encoding_config = {
    "otype": "HashGrid",
    "n_levels": L,
    "n_features_per_level": F,
    "log2_hashmap_size": 19,
    "base_resolution": N_min,
    "per_level_scale": math.exp((math.log(N_max) - math.log(N_min)) / (L - 1)),
    "interpolation": "Linear",
}

tcnn_hg = tcnn.Encoding(n_input_dims=3, encoding_config=encoding_config, dtype=torch.float32)

load parameters from jaxngp's hashgrid into tcnn's:
state_dict = {
    "params": torch.as_tensor(jax_hg_params_dict["latent codes stored on grid vertices"].ravel()).to("cuda"),
}
tcnn_hg.load_state_dict(state_dict)

The jax_hg_params_dict is the hashgrid encoder's parameters, it can be saved to disk using numpy.save and loaded using numpy.load(path_to_the_npy_file).item() to get the dict object.  Note that the parameter key is literally latent codes stored on grid vertices, see here.
I hope this helps.


[Question] Incorrect GPU?

Someone may be familiar with the following behaviour — I have an incorrect GPU device shown in Fusion Graphics Diagnostics for DirectX 9, but it shows a correct GPU for OpenGL and DirectX 11.
Is it normal? Should it be so? Where does it come from?
Expected behavior
Proper GPU for Directx 9.
Screenshots
DirectX 9:

DirectX11:

OpenGL:

Desktop (please complete the following information):

Version number of Autodesk Fusion 360: 2.0.16761 x86_64
Graphics card model + Graphics card driver (Version number): Device: Mesa Intel(R) UHD Graphics 620 (KBL GT2) Version: 23.1.5, Kernel driver in use: i915
Operating system (OpenSUSE Leap 15.3, Fedora 34, ...): Fedora 38
Desktop environment (XFCE 4.16, Gnome 40, ...): Gnome 44.3
DXVK- or OpenGL-Mode: both
Wine 8.13

This is a special issue. Some linux distros can give the correct gpu information to wine and some not.


Adding dnSpy

Tested it on my box.

Please change checkver and autoupdate to the following
    "checkver": {
        "github": "https://github.com/0xd4d/dnSpy"
    },
    "autoupdate": {
        "url": "https://github.com/0xd4d/dnSpy/releases/download/v$version/dnSpy.zip"
    }

@r15ch13 Done. Thanks! Not sure how I missed the second one.

@parthopdas thanks for adding this tool! this thing is amazing! 👍


Why couldn't I register it in react quill?

Using React with react-quilll
Console log of RichVoiceEditor ("quill-rich-voice-editor") is an empty object {}
Code here :
import RichVoiceEditor from "quill-rich-voice-editor";
import ReactQuill, { Quill } from "react-quill";
import "react-quill/dist/quill.snow.css";
Quill.register({ "modules/rich-voice-editor": RichVoiceEditor });

const MODULES_CONFIG = {
  toolbar: {
    container: [
      ["ssml_speak"], // Add this.
      [{ ssml_break: ["weak", "strong", "x-strong"] }],
      ["ssml_emphasis"], // Add this.
      ["ssml_whispering"], // Add this.
      [
        {
          ssml_language: [
            "en-US",
            "en-GB",
            "de-DE",
            "es-ES",
            "fr-FR",
            "it-IT",
            "nl-NL",
            "ru-RU",
            "tr-TR",
          ],
        },
      ], // Add this.
      ["ssml_paragraph"], // Add this.
      [
        {
          ssml_sayas: [
            "spell-out",
            "number",
            "ordinal",
            "digits",
            "fraction",
            "expletive",
          ],
        },
      ], // Add this.
      [
        {
          ssml_date: [
            "mdy",
            "dmy",
            "ymd",
            "md",
            "dm",
            "ym",
            "my",
            "d",
            "m",
            "y",
          ],
        },
      ], // Add this.
      ["ssml_substitute"],
      ["ssml_breaths"],
      ["ssml_phoneme"],
      ["ssml_parse"],
      ["ssml_validate"],
    ],
    handlers: {
      ssml_speak: function () {},
      ssml_break: function () {},
      ssml_emphasis: function () {},
      ssml_language: function () {},
      ssml_paragraph: function () {},
      ssml_sayas: function () {},
      ssml_date: function () {},
      ssml_substitute: function () {},
      ssml_breaths: function () {},
      ssml_phoneme: function () {},
      ssml_whispering: function () {},
      ssml_parse: function () {},
      ssml_validate: function () {},
    },
  },
  "rich-voice-editor": true,
};

Hi @ChungTingChang, this project was not tested with react-quill and I am not deep in React. So, unfortunately, I can't support with this problem. Hopefully, someone else can support here :)

@fabiancelik
Thank you for the respond.
I think the main issue i got is it seems i can't import RichVoiceEditor from "quill-rich-voice-editor";
I console log RichVoiceEditor and it shows as empty {}


Commands: update ArgumentParser to 1.1.4

Motivation:
Plenty of updates were added to ArgumentParser since 1.0.3. For example, @OptionGroup(_hiddenFromHelp: true) is now @OptionGroup(visibility: .hidden). Also, some of the placeholder help output is formatter in a nicer way, for swift package init in our case.
Modifications:
Updated uses of @OptionGroup(_hiddenFromHelp: true), updated a test that checks for swift package init help output.
Result:
We can utilize new features of ArgumentParser in some future PR if needed.

@swift-ci please test with the following PRs
https://github.com/apple/swift/pull/59009
https://github.com/apple/swift-package-manager/pull/5884

@swift-ci please test with the following PRs
https://github.com/apple/swift/pull/59009
https://github.com/apple/swift-driver/pull/1218

@swift-ci please smoke test
https://github.com/apple/swift/pull/59009
https://github.com/apple/swift-driver/pull/1218

https://github.com/apple/swift/pull/59009
https://github.com/apple/swift-driver/pull/1218
@swift-ci smoke test

@MaxDesiatov there may be a few other spots to get this this in. @shahmishal has a list

https://github.com/apple/swift/pull/59009
https://github.com/apple/swift-driver/pull/1218
@swift-ci smoke test

Not quite sure how to make CI pass here without merging the swift-driver change first? We have upToNextMinor version constraint everywhere, but SwiftPM depends on a swift-driver branch, not a specific version, and that branch doesn't have the version update yet.

Not quite sure how to make CI pass here without merging the swift-driver change first? We have upToNextMinor version constraint everywhere, but SwiftPM depends on a swift-driver branch, not a specific version, and that branch doesn't have the version update yet.

It's normal for the self-hosted jobs to fail for this type of change, but cross-repo testing should allow getting the smoke tests jobs to pass. Once they do, we have to merge all the linked PRs at once.

BTW, from the Linux smoke test failure I would gather that the update-checkout changes aren't sufficient, yet.

It's normal for the self-hosted jobs to fail for this type of change, but cross-repo testing should allow getting the smoke tests jobs to pass.

Hm, but self-hosted jobs are required to pass on this repo, and cross-repo testing doesn't allow changing the branch of swift-driver specified in this SwiftPM repo?

BTW, from the Linux smoke test failure I would gather that the update-checkout changes aren't sufficient, yet.

Maybe there's an issue with cross-repo testing? I see in the log it checks out main branch of swift instead of the PR branch for some reason ¯_(ツ)_/¯

@swift-ci Please smoke test with following PR:
https://github.com/apple/swift/pull/59009
https://github.com/apple/swift-driver/pull/1218

@swift-ci smoke test
https://github.com/apple/swift/pull/59009
https://github.com/apple/swift-driver/pull/1218

https://github.com/apple/swift/pull/59009
https://github.com/apple/swift-driver/pull/1218
@swift-ci smoke test

https://github.com/apple/swift/pull/59009
https://github.com/apple/swift-driver/pull/1218
@swift-ci smoke test

https://github.com/apple/swift/pull/59009
https://github.com/apple/swift-driver/pull/1218
@swift-ci smoke test

Hm, but self-hosted jobs are required to pass on this repo, and cross-repo testing doesn't allow changing the branch of swift-driver specified in this SwiftPM repo?

Ah yah, I guess we recently made them required, so @tomerd will need to do a force merge once we have the smoke testing jobs passing.

yes, I can force merge once the only failures are the expected ones. we changed policy to do that since its more explicit and safe, as we had PRs merged with failures in self hosted which were not legitimate to merge with

https://github.com/apple/swift/pull/62033
https://github.com/apple/swift-driver/pull/1218
@swift-ci smoke test

https://github.com/apple/swift/pull/62033
https://github.com/apple/swift-driver/pull/1218
@swift-ci smoke test

https://github.com/apple/swift/pull/62033
https://github.com/apple/swift-driver/pull/1218
@swift-ci smoke test

https://github.com/apple/swift/pull/62033
https://github.com/apple/swift-driver/pull/1218
@swift-ci smoke test

https://github.com/apple/swift/pull/62033
https://github.com/apple/swift-driver/pull/1218
@swift-ci smoke test

Turns out this invocation with Argument Parser 1.1.4 works:
swift-bootstrap --disable-sandbox --force-resolved-versions \
  -Xswiftc -Xfrontend -Xswiftc -disable-implicit-concurrency-module-import \
  -Xswiftc -Xfrontend -Xswiftc -disable-implicit-string-processing-module-import \
  --build-path build/Ninja-ReleaseAssert/swiftpm-macosx-arm64 \
  --configuration release -Xlinker -rpath -Xlinker /usr/lib/swift \
  -Xlinker -rpath -Xlinker @executable_path/../lib/swift-5.5/macosx \
  -Xlinker -rpath -Xlinker @executable_path/../lib/swift/macosx \
  -Xswiftc -module-cache-path \
  -Xswiftc build/Ninja-ReleaseAssert/swiftpm-macosx-arm64/module-cache \
  -Xmanifest -module-cache-path \
  -Xmanifest build/Ninja-ReleaseAssert/swiftpm-macosx-arm64/module-cache

while fails to parse with Argument Parser 1.2.0. Sticking to 1.1.4 for now.
cc @natecook1000 @neonichu

https://github.com/apple/swift/pull/59009
https://github.com/apple/swift-driver/pull/1218
@swift-ci smoke test

@swift-ci please smoke test

https://github.com/apple/swift/pull/59009
https://github.com/apple/swift-driver/pull/1218
@swift-ci smoke test

https://github.com/apple/swift/pull/59009
https://github.com/apple/swift-driver/pull/1218
@swift-ci smoke test

https://github.com/apple/swift/pull/59009
https://github.com/apple/swift-driver/pull/1218
@swift-ci smoke test

Ah, smoke test checks are finally passing. @neonichu @tomerd it's ready for review now.

@swift-ci please smoke test

https://github.com/apple/swift/pull/59009
https://github.com/apple/swift-driver/pull/1218
@swift-ci smoke test

https://github.com/apple/swift/pull/59009
https://github.com/apple/swift-driver/pull/1218
@swift-ci smoke test

https://github.com/apple/swift/pull/59009
https://github.com/apple/swift-driver/pull/1218
@swift-ci smoke test

https://github.com/apple/swift/pull/59009
https://github.com/apple/swift-driver/pull/1218
@swift-ci smoke test

@swift-ci please test Windows

https://github.com/apple/swift/pull/59009
https://github.com/apple/swift-driver/pull/1218
@swift-ci test Windows

https://github.com/apple/swift/pull/59009
https://github.com/apple/swift-driver/pull/1218
@swift-ci smoke test

https://github.com/apple/swift/pull/59009
https://github.com/apple/swift-driver/pull/1218
@swift-ci smoke test

https://github.com/apple/swift/pull/59009
https://github.com/apple/swift-driver/pull/1218
@swift-ci smoke test


Where are the snippets stored?

Are they in a json file? Where is the file or database where they are stored, so i can back them up or migrate between devices?

Same question --- coz all of a sudden all my local added files were gone @marshallino16

Same question, any progress on that? Is there a local DB / file that I can upload onto my new device and restore my snippets?
Rewriting all of them manually is definitely not an option 🫣

@pw-64 @MelodicCrypter @filip-komarzyniec I think this app has been abandoned. But I was able to locate where it was writing all the snippet data. The folder you are looking for is:
~/Library/Containers/com.pictarine.Snip/Data/Library/Application Support/Snip

There is a snippets file in there that is just JSON and has an array of all your snippets. Easy to migrate them out of this app or to back them up.

Thanks for the efforts... but all I saw there is the synched Github gists. But what I'm trying to restore is the older local snips. I couldn't recover them anymore. All of a sudden gone, local snips.

@MelodicCrypter --- building on the answer of @mpaw, in my case the exact location of the local snippets was:
~/Library/Containers/Snip/Data/Library/Application\ Support/Snip/snippets. Hope that helps.
My OSX version is: 13.6


initializeWithDefaultKeyStates overrides data that exists in the Onyx cache

Problem
When Onyx.clear() is called the storage is cleared and then Onyx is initialized with the defaultKeyStates provided by the application. In NewDot transition flows, when a user is signing into a different account, Onyx is cleared to sign out the old user and then the new user is immediately signed in, setting a new authToken on the session. By the time initializeWithDefaultKeyStates is called, the new user has been signed in.
In the method, the defaultKeyStates are merged into the key states existing in storage, which are all null after clearing the storage. Then keyChanged is called for each (key, value) pair from the defaultKeyStates. The default key state for session is {loading: false, shouldShowComposeInput: true}, and therefore the subscribers are notified that the session has been updated to this value, and the user is signed out.
Here you can see how the currentValue from the cache contains the full, merged, session information, but the val from defaultKeyStates only contains limited information for initializing.

Solution
Notify the subscribers with merged cache data when initializing with default key states.

I think this bug needs to be reframed a bit.
I would actually expect a call to Onyx.clear() to be blocking in that if we attempted to set any new data to Onyx while we were clearing it would throw these updates away to prevent cache pollution and cause the conflicts we are describing here.
If you need to set data after storage and cache is cleared then the obvious answer is to just wait for the storage and cache to clear then add the new data.
The problem with the solution and linked PR is that we are making assumptions about the data we are setting when Onyx.clear() is running. Is it something that should be in the store after Onyx.clear() finishes or not? Was it from the previous user session or meant for the next?

After a lot of discussion in Slack we agreed on a solution where we set the default key states while clearing the cache, and remove the call to initializeWithDefaultKeyStates.

Fixed in https://github.com/Expensify/react-native-onyx/pull/129


Schema Error with Regex Pattern

I have the following schema, which I think is valid to match a list of BSON object Ids:
schema = {'type': 'array', 'items': {'type': 'string', 'pattern': '/^[a-f\d]{24}$/i'}}
example = ['1f62cjahr3cdf3de81812gh7']
jsonschema.validate(instance=example, schema=schema)

This results in an error:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/upsteer/.pyenv/versions/3.8.1/lib/python3.8/site-packages/jsonschema/validators.py", line 934, in validate
    raise error
jsonschema.exceptions.ValidationError: '1f62cjahr3cdf3de81812gh7' does not match '/^[a-f\\d]{24}$/i'

Failed validating 'pattern' in schema['items']:
    {'pattern': '/^[a-f\\d]{24}$/i', 'type': 'string'}

On instance[0]:
    '1f62cjahr3cdf3de81812gh7'

I see that my single backslash is escaped by another backslash. I.e. \d is converted to \\d which fails the validation.
I just wanted a reason behind this. I also noticed that in Python3:
import json
json.loads(json.dumps({"abc": "\d"}))

prints the following: {'abc': '\\d'}
Is this what is happening? Or was carried from the json module?
If so, how do you suggest to solve the problem?
Any suggestions are appreciated. :)

Don't think I can look in super detail, but I doubt you're in the right area with the \\d -- that's the Python repr of \d as a regex (or, Python repr of a string containing a literal backslash inside of it).
Your issue more likely has to do with your pattern itself -- /^[a-f\d]{24}$/i isn't Python regex syntax -- you can try that out with e.g. re.search(r"/^[a-f\d]{24}$/i", "1f62cjahr3cdf3de81812gh7"), which won't match the object you're trying to match.
Closing for tidyness (and since I'm not sure there's a bug here, if it's more of a question probably better asked on the Slack). But happy to follow up if indeed you see behavior that looks incorrect.


Thumbnails.maxCount restricting server-side thumbnails

As per the documentation the thumbnails.maxCount UI option restrict the number of client side generated previews, our application will allow the users to add hundreds of images and we don't want to stress the user's browser generating all these previews but at the same time we want to show a thumbnail for all of them once a file has been uploaded. We tried to set the maxCount to -1 so we don't generate any preview on the client but this also restrict the display of server-side thumbnails, see code below from the processUpdateQueuedPreviewRequest function,
if (thumbnail) {
                if (thumbnailUrl) {
                    if (options.limits.maxThumbs && options.limits.maxThumbs <= generatedThumbnails) {
                        maybeSetDisplayNotAvailableImg(id, thumbnail);
                        generateNextQueuedPreview();
                    }
                    else {
                        if (showWaitingImg) {
                            displayWaitingImg(thumbnail);
                        }

                        return options.imageGenerator.generate(thumbnailUrl, thumbnail, spec).then(
                            function() {
                                show(thumbnail);
                                generatedThumbnails++;
                                setTimeout(generateNextQueuedPreview, options.limits.timeBetweenThumbs);
                            },

                            function() {
                                maybeSetDisplayNotAvailableImg(id, thumbnail);
                                setTimeout(generateNextQueuedPreview, options.limits.timeBetweenThumbs);
                            }
                        );
                    }
                }

Can a different option be created to control the number of server-side thumbnails independently of the client-side max count?

Server-returned images are nothing more than a URL which must be rendered and potentially resized in the browser. With this in mind, it's unlikely that we will add such an option.
The current setup should prevent the browser from being continually stressed, since there is a pause between generation of previews. This pause allows other tasks to be completed, such as scrolling.

Agree with your statements, my scenario here is that I don't want to produce any client-side preview (or maybe a small number) to avoid any stress on the browser and I can control this with the current thumbnails.maxCount option. So far so good, now I want to return a thumbnailUrl for every single file that gets uploaded, in this case the thumbnailUrl does not get rendered if the maxCount limit has been reached, so restricting client-side previews via the maxCount option also restricts the rendering of server-side thumbnails.

Yes, that is the intention of the maxCount option.

Ok, then the documentation is a little misleading as it doesn't mention restricting the server-side generated thumbnails,

maxCount
Maximum number of client-side generated previews to render per Fine Uploader instance. A call to the reset method resets this value as well.

Yes, you are correct. We will adjust the docs before releasing 5.2 this week.

Any suggestion for my issue, i.e. restricting client-side previews but not server-side ones?

You have access to the server response via an onComplete event handler. From their, you can get a handle on the thumbnailUrl and render the images however you require.

Sounds good, thanks


Processing all frames in process_all.py

The process_all.py script processes every 64th frame for the subjects 'S9' and 'S11' in lines:
  if subject == 'S9' or subject == 'S11':
        return np.arange(0, len(poses_3d_univ), 64)

How can I change the above code to process all frames, without skipping any?
Tried: Replacing 64 with 1 and all but did not work

It should just be a matter of replacing
https://github.com/anibali/h36m-fetch/blob/b8112ff5525aa4ddddabd4c7f629df6752edad20/process_all.py#L39
with
        return np.arange(0, len(poses_3d_univ))

great, thanks


Would it be at all useful to document the RTLIL text format?

I found myself idly doing this, and then wondered if I was wasting my time? Would this be a useful addition to the manual?

Sure, seems reasonable. The text fromat is already stable to an extent due to nMigen relying on it.


Preserve the workspace to speed up the jenkins job.

Preserve Jenkins workspace. As per #3190

@alexmuller does this fulfil your request?

merge when ready?


It seems that the extends option is not working as documented.

We're using<EMAIL_ADDRESS>We wanted to have the same formatter configuration across all projects using Biome.
extends doesn't extend the formatter configuration from the specified JSON.

Repro:

Create/release a package outside of the project which contains biome configs OR create a local one.
In the root biome.json, use extends<EMAIL_ADDRESS>or ['./my-other-biome-config.json']`.
The extension contains { "formatter": "indentStyle": "space" }, whereas the project in question has no entry for formatter.
Running yarn biome rage reveals that the formatter configuration is now None.

Expected result
Extending another configuration should not set the project one to None. This seems to happen with linter, as well as javascript.
Code of Conduct

[X] I agree to follow Biome's Code of Conduct

Woops, sorry, I mean to say<EMAIL_ADDRESS>

In the root biome.json, use extends<EMAIL_ADDRESS>or ['./my-other-biome-config.json']`.

Did you make sure that those paths are reachable by biome? Package managers tend to different stuff. For example pnpm creates symbolic links. What about your yarn setup?

In my case, extends is completely ignored by the VSCode extension.

Same for me.

Someone please create a reproduction repository. Without it, it's not possible to help you guys

Someone please create a reproduction repository. Without it, it's not possible to help you guys

Repo: https://github.com/jrson83/biome-extends-issue

git clone https://github.com/jrson83/biome-extends-issue.git
Run pnpm install

Expected behaviour
./packages/module-a/biome.json and ./packages/module-b/biome.json extend ["../../biome.json"].
module-a
Running pnpm format in root should format ./src/index.ts with an indentSize of 4.
{
  "$schema": "https://biomejs.dev/schemas/1.2.2/schema.json",
  "extends": ["../../biome.json"],
  "formatter": {
    "indentSize": 4
  }
}

module-b
Opening ./src/index.ts, the linter should not throw any errors on both disabled rules:
{
  "$schema": "https://biomejs.dev/schemas/1.2.2/schema.json",
  "extends": ["../../biome.json"],
  "linter": {
    "enabled": true,
    "rules": {
      "suspicious": {
        "noConsoleLog": "off",
        "noExplicitAny": "off"
      }
    }
  }
}

Actual behaviour
module-a
Running pnpm format in root formats ./src/index.ts with an indentSize of 2.
module-b
Opening ./src/index.ts, the linter throws errors on both disabled rules.

this is a deal breaker, we are experiencing the same issue, forcing same rules between frontend and backend folder

Thank you @jrson83
I see now what you mean. I believe I made some wrong assumptions on how extends works. It should be an easy fix, that will be shipped in the next minor.

Thanks @ematipico for this fix, as well as @jrson83 for the better example than mine :)
Now we can format/lint all our projects consistently once its released 🎉

Tomorrow/Sunday I'll make a nightly release so you can try it

Just came back to report that this now seems to work the way that I expect extends to be as well. Thanks :)


Shiny refactor

Refactor the shiny application. Split monolithic app.R file into separate parts for easier code management. Switch UI to use shiny modules to contain related functionality. Use separate files for related functions to be called by module code. Uses configuration.yml to set load order and import required packages.
Submitter:

[x] Administrative tasks are complete.

This pull request describes why these changes were made.
The JIRA ticket links to this PR.
The JIRA ticket for this PR is: https://oncprojectracking.healthit.gov/support/browse/LANTERN-206

[x] Tests are complete.

Tests are included and test edge cases.
Tests have been run locally and pass.

[x] Code review has been performed.

Code diff has been done and checked to ensure only expected code is being committed.

Primary Reviewer:

[ ] Code works.

Code has been run locally and the basic functionality affected by the PR has been checked.
Edge cases have been checked to ensure behavior is as expected.

[ ] Code review has been performed.

Code is maintainable, reusable, efficient, and correct.
Code accomplishes the tasks purpose.
Code follows style guidance appropriate for the language, including passing linter checks.
Code is well commented (which does not mean verbosely commented).

[ ] Tests are complete.

Tests are included and test edge cases.
Tests have been run locally and pass.

Secondary Reviewer:

[ ] Code works.

Code has been run locally and the basic functionality affected by the PR has been checked.
Edge cases have been checked to ensure behavior is as expected.

[ ] Code review has been performed.

Code accomplishes the tasks purpose.

[ ] Tests are complete.

Tests have been run locally and pass.

(this does not need to be addressed in this PR)
are you using the endpoint_export and endpoint_organization views? these may reduce the number of joins that you need to do.
we can easily do some joins for you in db views if you find yourself consistently doing the same joins. let us know!


rewrite tutorial docs and example

This is a complete rewrite of the tutorial, both the docs and the example code. The goal is to provide a better foundation for new developers to work with. There's  a bit more code, and it's a bit more complex, but I'm hoping it sets up patterns and concepts better so that developers start with better habits.

Use the application factory and blueprints from the start.
Use the instance folder for config and the database.
Multiple users, stored in the database with hashed passwords.
Delete posts.
Build a Wheel file, install it in another virtualenv.
Override SECRET_KEY using config in the instance folder.
Use other WSGI server in production (Waitress, since it works on Windows).
100% test coverage using pytest and coverage.
All described code links to the API docs.
General reorganization.

I've removed all the other examples. I'm going to add a JavaScript example back in but wanted to rewrite it as well. That will be the next PR. The other examples are all covered by the tutorial now.
Added a gh Sphinx role that adds links to GitHub files. It will select the correct tag on GitHub based on the docs version being built. I'll expand this to work with issues and extract it to pallets-sphinx-themes at some point.
You can find the rendered docs here: http://flask-dev.davidism.com/tutorial/. The only change is in the installation instructions, Flask needs to be installed from GitHub since 1.0 isn't released yet. You can find the example project on my branch: https://github.com/davidism/flask/tree/tutorial/examples/tutorial.
closes #2513

One potential enhancement would be some diagrams, for people who are a little more visual in nature.

Looks very good in general, but I don't like the idea of having anything "valuable" - even if it's just a config file - inside the virtualenv. Talking about this in particular:

venv/var/flaskr-instance/config.py

A rm -rf on the virtualenv should always be salvagable by simply recreating the venv and reinstalling the package(s).

That's how Flask instance folders have always worked.

The link https://github.com/davidism/flask/tree/tutorial/examples/tutorial from "The example code is in my branch, not the Flask repo linked in the tutorial." on the intro page http://flask-dev.davidism.com/hello-beta-reader.html looks like a broken link?

I think I've got everything precisely as you have in the example code, up to where you create an install, and I copy/pasted to make sure, and looked identical aside from comments, but I get an error:
File "C:\Users\david\OneDrive\Programming\PycharmProjects\Flask_tutorial_test\flaskr\blog.py", line 17, in index
'SELECT p.id, title, body, created, author_id, username'
sqlite3.OperationalError: no such column: created
I'm not familiar with SQL, but I tried putting a space before select: ' SELECT and this didn't resolve.
So when you log on it doesn't seem to work.

I'm following all the steps on this page, but it just gives me the following error:
(venv) amos@amos:~/Documents/flask-tutorial$ export FLASK_APP=flaskr
(venv) amos@amos:~/Documents/flask-tutorial$ export FLASK_ENV=development
(venv) amos@amos:~/Documents/flask-tutorial$ flask run
Usage: flask run [OPTIONS]

Error: The file/path provided (flaskr) does not appear to exist.  Please verify the path is correct.  If app is not on PYTHONPATH, ensure the extension is .py

My folder structure looks like this
.
├── flaskr
│   └── __init__.py
└── tests

where __init__.py is copied from here. I'm using Python 3.6.5 :: Anaconda custom (64-bit) and created the virtual environment with the command python3 -m venv venv. Following this works completely fine, so I'm not sure what I'm doing wrong regarding your tutorial... also wondering why you don't use a setup.py straight away?

@amosbastian you need to install flask from GitHub, not from pypi, until 1.0 is released.

Typo http://flask-dev.davidism.com/tutorial/tests.html
"Pytest uses fixutres by matching their function names with the names of arguments in the test functions."
=> should be 'fixtures'?

In http://flask-dev.davidism.com/tutorial/tests.html in fake_init_db the last line is assert ns.called which throws an error when I run the tests. On github the last line of that function is     assert Recorder.called which works.

I think I don't have any major objections to this. Read through the entire thing now and I like it :)

Thank you to everyone who commented here and elsewhere. I've taken as much as I can into account.


Text encoding issue on impressum.html

See screenshot

Looks like missing meta tag or charset=utf-8 in Content-Type header?

We are aware of that problem. I totally underestimated how many people visit that page. Will fix it in the next couple of days. Thanks for the bug report!


Create stretch goal list

Below is the planned stretch goal features list that can be implemented after all initial features are met.

Feature open source Ethernet modules
Feature DMAC - Direct Memory Access Controller
Feature FPGA access to ethernet hardware


Trying to create a page with an icon, but I get a page...without an icon

Hi!
Just as the title says, I'm trying to create a page with an icon, but I fail to see where I'm going wrong about it. Here's my code:
notion.pages.create(parent={"database_id": projects_db},
                           icon={"emoji": "⚜", "type":"emoji"},
                           properties={"Nom": {"title": [{"text": {"content": "Blabla"}}]}})

What I get is a page, in the right database, with the right name, but no icon. Am I missing something?
Thanks!

I think it is because the symbol is not in notion library, try with one supported by them such us 🧪.
notion.pages.create(parent={"database_id": projects_db},
                           icon={"emoji": "🧪", "type":"emoji"},
                           properties={"Nom": {"title": [{"text": {"content": "Blabla"}}]}})


Bump fluent-bit image to fix CVE

Description
Changes proposed in this pull request:

Bump to latest fluentbit to resolve security vulnerabilities
Related issue(s)

/retest

@rakesh-garimella can this be closed?

closing in favour of https://github.com/kyma-project/control-plane/pull/2892


Added AutomorphismGroupTable to systemDetails

Fixes #144
What was changed?
The SystemDetails.js page was modified to include a new section displaying the Automorphism Group. This component was integrated into SystemDetails.js to fetch and display details about the automorphismgroup, for things like cardinality and structure.
Here, describe what part of the application you changed (e.g. login page, database, etc.). If possible, mention what specific components were added, removed, or modified.
The System Details page has a new table added to it titled "Automorphism Group"
Why was it changed?
Previously the automorphism group section was missing from the details page. This information is important for users who want to understand the automorphisms associated with a given system.
Here, describe the issue that you are fixing with this code, and why your code fixes it.
This code adds the section for the automorphism table by utilizing already calculated information by simply displaying it.
How was it changed?
This code was changed by having the AutomorphismGroupTable component imported and added to the structure of SystemDetails.
Here, get into detail about what files you modified, and talk about the most important lines in regards to fixing the issue.
The file I modified was SystemDetails.js. In line 18 I imported AutomorpismGroupTable, and then structured it in line 66. I placed this modified code before citations and after the models to maintain organization in the UI.
Screenshots that show the changes (if applicable):

The implementation looks great, and the feature is aligned perfectly with the product’s priorities. I can see that all the required information from the database regarding the automorphism group is correctly displayed on the function detail page, which is exactly what we needed. The code quality is solid overall, but the PR is currently failing due to some minor Pylint warnings and a lint workflow error. These issues should be easily resolvable by adjusting the Node.js version in your workflow and addressing the Pylint feedback. Once these are fixed, the PR should be good to go. Keep up the great work, and with a few adjustments, this will be ready for final approval!


Add GN beautifier

What does this implement/fix? Explain your changes.
Add GN language and beautifier
Does this close any currently open issues?
No
Checklist
Check all those that are applicable and complete.

[x] Merged with latest master branch
[x] Regenerate documentation with npm run docs
[x] Add change details to CHANGELOG.md under "Next" section
[x] Added examples for testing to examples/ directory
[ ] Travis CI passes (Mac support)
[ ] AppVeyor passes (Windows support)

Published to v0.32.0

@samogot is the only way to install depot_tools through cloning the repo and adding to your path?

@szeck87 It is the most documented way. If someone use GN he will have GN binary somehow, most of GN users are chromium contributors, so they will gen GN this way.
In our project (not related to chromium) we just have gn binary in our git repo, but it can't be suggested as install instructions, because you will anyway need depot_tools and chromium repo to get gn binary for the firs time

@samogot ok thanks.  I'm trying to fix the CI build, when updating the path what does it need to be exactly?


Random hanging behavior in parallel_for

Hi,
I develop some software that relies on TBB.  One of my users is seeing intermittent hanging behavior that seems to be coming from the scheduler during a parallel_for loop (https://github.com/COMBINE-lab/salmon/issues/111).  The linked issue has a lot of data, including gdb traces that show the offending stacks.  I've tried both the default and simple partitioner, but both exhibit this behavior.  The code executing inside the parallel for has no locks or mutexes, though it does use an enumerable_thread_specific.  Any idea what might be triggering this behavior or how to resolve it?

It turns out that this was the result of an infinite loop in std::gamma_distribution --- an even more surprising bug, but not the fault of TBB.  Sorry for the noise!


wrong configuration of umask parameter

Describe the Issue
wrong umask parameter set in /etc/login.defs, the console is showing error:
configuration error - unknown item 'umask' (notify administrator)
Expected Behavior
set UMASK parameter in /etc/login.defs
Actual Behavior
umask param set instead of UMASK (case sensitive),
Possible Solution
remove umask line and apply proper UMASK parameter

hi @bnicolae86
Thank you for raising this issue, Just following up on this please can you confirm the branch you are using and if you have downloaded the latest version?
I am not able to reproduce this issue in either the devel or main branches.
Many thanks
uk-bolly

I'm using release 1.0.0 because appears to be the latest. But there is a new tag 1.1.0 and using this is working fine. Thanks.


Unable to process PDF files - Form Processor error - 400 Bad Request

Bug Description:
{
"status": "FileFormRecSubmissionPDF - Error on PDF submission to FR - 400 - Bad Request",
"status_timestamp": "2024-05-08 21:45:56",
"status_classification": "Error",
"stack_trace": "Traceback (most recent call last):\n  File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap\n    self._bootstrap_inner()\n  File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner\n    self.run()\n  File "/usr/local/lib/python3.11/threading.py", line 982, in run\n    self._target(*self._args, **self._kwargs)\n  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker\n    work_item.run()\n  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run\n    result = self.fn(*self.args, **self.kwargs)\n  File "/azure-functions-host/workers/python/3.11/LINUX/X64/azure_functions_worker/dispatcher.py", line 826, in _run_sync_func\n    return ExtensionManager.get_sync_invocation_wrapper(context,\n  File "/azure-functions-host/workers/python/3.11/LINUX/X64/azure_functions_worker/extension.py", line 215, in _raw_invocation_wrapper\n    result = function(**args)\n  File "/home/site/wwwroot/FileFormRecSubmissionPDF/init.py", line 165, in main\n    statusLog.upsert_document(\n  File "/home/site/wwwroot/shared_code/status_log.py", line 168, in upsert_document\n    new_item["stack_trace"] = self.get_stack_trace()\n"
}
Steps:

Dropped PDF file
It is failing in the second function: FileFormRecSubmissionPDF

CosmosDB Log:
{
"id": "dXBsb2FkL2VkYXYtcHVibGljLWRvY3MvMjEtMDQ1Ni5wZGY=",
"file_path": "upload/edav-public-docs/21-0456.pdf",
"file_name": "21-0456.pdf",
"state": "Error",
"start_timestamp": "2024-05-09 13:34:33",
"state_description": "",
"state_timestamp": "2024-05-09 13:38:28",
"status_updates": [
{
"status": "File uploaded from browser to Azure Blob Storage",
"status_timestamp": "2024-05-09 13:34:33",
"status_classification": "Info"
},
{
"status": "Pipeline triggered by Blob Upload",
"status_timestamp": "2024-05-09 13:34:42",
"status_classification": "Info"
},
{
"status": "FileUploadedFunc - FileUploadedFunc function started",
"status_timestamp": "2024-05-09 13:34:42",
"status_classification": "Debug"
},
{
"status": "FileUploadedFunc - pdf file sent to submit queue. Visible in 216 seconds",
"status_timestamp": "2024-05-09 13:34:42",
"status_classification": "Debug"
},
{
"status": "FileFormRecSubmissionPDF - Received message from pdf-submit-queue ",
"status_timestamp": "2024-05-09 13:38:27",
"status_classification": "Debug"
},
{
"status": "FileFormRecSubmissionPDF - Submitting to Form Recognizer",
"status_timestamp": "2024-05-09 13:38:27",
"status_classification": "Info"
},
{
"status": "FileFormRecSubmissionPDF - SAS token generated",
"status_timestamp": "2024-05-09 13:38:27",
"status_classification": "Debug"
},
{
"status": "FileFormRecSubmissionPDF - Error on PDF submission to FR - 400 - Bad Request",
"status_timestamp": "2024-05-09 13:38:28",
"status_classification": "Error",
"stack_trace": "Traceback (most recent call last):\n  File "/usr/local/lib/python3.11/threading.py", line 1002, in _bootstrap\n    self._bootstrap_inner()\n  File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner\n    self.run()\n  File "/usr/local/lib/python3.11/threading.py", line 982, in run\n    self._target(*self._args, **self._kwargs)\n  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker\n    work_item.run()\n  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run\n    result = self.fn(*self.args, **self.kwargs)\n  File "/azure-functions-host/workers/python/3.11/LINUX/X64/azure_functions_worker/dispatcher.py", line 933, in _run_sync_func\n    return ExtensionManager.get_sync_invocation_wrapper(context,\n  File "/azure-functions-host/workers/python/3.11/LINUX/X64/azure_functions_worker/extension.py", line 215, in _raw_invocation_wrapper\n    result = function(**args)\n  File "/home/site/wwwroot/FileFormRecSubmissionPDF/init.py", line 165, in main\n    statusLog.upsert_document(\n  File "/home/site/wwwroot/shared_code/status_log.py", line 168, in upsert_document\n    new_item["stack_trace"] = self.get_stack_trace()\n"
}
],
"_rid": "IpRqAOcupRGoAAAAAAAAAA==",
"_self": "dbs/IpRqAA==/colls/IpRqAOcupRE=/docs/IpRqAOcupRGoAAAAAAAAAA==/",
"_etag": ""9102409a-0000-0100-0000-663cd1d40000"",
"_attachments": "attachments/",
"_ts":<PHONE_NUMBER>
}

//This is the code block where it is failing. FileFormRecSubmissionPDF - Error on PDF submission to FR - 400 - Bad Request
Construct and submmit the message to FR
    headers = {
        "Content-Type": "application/json",
        "Ocp-Apim-Subscription-Key": FR_key,
    }

    params = {"api-version": api_version}

    body = {"urlSource": blob_path_plus_sas}
    url = f"{endpoint}formrecognizer/documentModels/{FR_MODEL}:analyze"

    logging.info(f"Submitting to FR with url: {url}")

    # Send the HTTP POST request with headers, query parameters, and request body
    response = requests.post(url, headers=headers, params=params, json=body)

It is blocking our test with PDF files. If anyone can help to resolve this issue will be greatly appreciated.

Does it work on other PDF's?
Are you able to share the pdf with us?
can you go to the Azure portal and then the functions app and select the function from the list on the overview page. From there you can select the run that failed and see the log from that run. Can you share that with us.
Perhaps try to debug and step through the function to understand the error using this method... https://github.com/microsoft/PubSec-Info-Assistant/blob/main/docs/function_debug.md
perhaps do a fresh make deploy in case there was an issue in deployment.
Have you tried to submit the pdf through the Document Intelligence Studio to see if it errors? This is possible via the Azure portal if you access the Azure AI services multi-service account and then hit Document Intelligence Studio.

This issue is marked for closure due to inactivity for 2 weeks. It will be closed in 5 days.

closing due to inactivity


React components cannot include JSX namespace names ts(2639)

Does this issue occur when all extensions are disabled?: Yes/No

VS Code Version: 1.79
OS Version: Windows Version 10.0.19044 Build 19044
TypeScript version 5.0.2

Steps to Reproduce:

Add (XML) namespace to a JSX tag <myns:Component/>
Tag is now getting reported as an error

We are using this feature with custom transformers, can it be disabled by configuration?

What typescript version are you using?

Sorry, I have updated the versions now

Did that fix the issue? What version are you using now?

Sorry, didn't get a notification on this one.
I updated the versions in the issue header - not the software.
So the issue should be correctly filled out now with the version information, sorry for the confusion.

Thanks. JSX namespaces are only supported TS 5.1+ https://devblogs.microsoft.com/typescript/announcing-typescript-5-1/#namespaced-jsx-attributes
Please try upgrading to that TS version


Provide embedded http server

live from https://www.pagedmedia.org/pagedmedia-prepostprint-workshop/

port is selected randomly
it removes the manual task of starting the server
it prevents the "fetch() cannot run local files" error

Thanks @oncletom
For reference, here's the reply from the Paged Media about replacing fetch with XMLHttpRequest: https://gitlab.pagedmedia.org/tools/pagedjs/issues/86#note_480

Thats interesting that it works different then fetch, I'll try it out and make sure everything works ok with the switch.
However I'd recommend just running an express server for the files rather then allowing access to the whole filesystem like we do in pagedjs-cli: https://gitlab.pagedmedia.org/tools/pagedjs-cli/blob/master/index.js#L48

So in the meantime using an embedded server is the way to go.
Any objection @matklad  @lordofthejars  @mojavelinux ?
Having said that we could revisit this issue when/if Paged.js switch to XMLHttpRequest where we could choose to lower the security of the Chrome headless instance (instead of using an embedded server).

Ah sure!

Perhaps there should be a flag to disable/enable this behavior?

Yes. I'd eventually couple it with a --base-url so as localhost:5000 is not hardcoded, and can be changed to whatever is the user local setup.

Would it be possible to make it work with the --watch option as expected?

What do you mean? To start the server only with --watch?
Let me know for both cases, I'm happy to make the changes.

Oh, sorry, looks like I completely misunderstood what this is doing =/
I though this was not for generating PDF which refer to local resources, but for a more streamlined dev workflow. That is, I thought that this opens a browser windows with HTML for the purposes of displaying a rendered document.
So, my comment about --watch was for a completely orthogonal issue. Currently, to get live-reload I run /asciidoctorjs-pdf in one terminal and reload -b in another (where reload is some npm module for live reloading). I with that this workflow was built-in. Though, this is not a big deal, b/c I can create it locally.

Understood.
This PR is solely to make the generation of the PDF possible without launching an HTTP server aside. This HTTP server is not meant to be user facing, but accessible to the headless browser to create a safe environment for the paged.js library.
At the moment, if you don't launch an HTTP server on localhost:5000, the PDF generation will fail.

At the moment, if you don't launch an HTTP server on localhost:5000, the PDF generation will fail.

on the feat/pagejs branch :wink:

I opted for a lightweight set of modules. The server is closed once the PDF generation is done.

:+1:

Would it be possible to make it work with the --watch option as expected?

I think we should start the HTTP server only once if we use --watch. If I'm not mistaken, currently the HTTP server will be opened and closed for each generation ? What do you think ?

Yeah right, it's only on the Paged.js branch 😅
Server is pretty fast to start and close. I'm happy to do the change but not sure if that's necessary to do it now.
I added a new thing in afa1590, the ability to proxy 3 files (asciidoctor.css, document.css and pagedjs.polyfill.js to the package files). This way the assets are always loaded relatively to the original source document.
I did that because I had an issue while generating a PDF document from an Asciidoc files located outside of the project file structure.

I'm still not sure about the embedded HTTP server. It has a few advantages but now that Paged.js is using XMLHttpRequest it's not mandatory.

Agreed, it's not mandatory.
I see one use case it can be useful: when --watch (or an hypothetic --preview option) is enabled. You get a URL to check the document output as a prepring proofreading, with a chance to see what's wrong in the browser devtools.
Another one is if a document has a need for CORS resources. An HTTP server will be required.
At the moment this is achieved by peaking at the temporary HTML file. If that's more handy, then we can drop the internal HTTP server and favour the file for now.

I see one use case it can be useful: when --watch (or an hypothetic --preview option) is enabled. You get a URL to check the document output as a prepring proofreading, with a chance to see what's wrong in the browser devtools.
Another one is if a document has a need for CORS resources. An HTTP server will be required.
At the moment this is achieved by peaking at the temporary HTML file. If that's more handy, then we can drop the internal HTTP server and favour the file for now.

Using an internal HTTP server definitely makes sense and in the end we might introduce one but I don't want to commit to it just yet.
The reason is that I want to make sure that the converter design is good enough. I'm still not sure about the separation of concerns when it comes to editing/designing a PDF. I'm also still wondering about how we should bundle things together to make sure that the ressources are properly resolved.

Agreed 👍


{CI} Add Debian package test

Description

The Debian package test will be triggered when a PR is merged.
Refactored the pipeline to use matrix for building debian packages and testing.
Testing Guide

Tested in build_test branch: https://dev.azure.com/azure-sdk/public/_build/results?buildId=501829&view=logs&j=31abe476-207c-5f4d-62dc-0fdeb92d6546
Currently, Trusty, Jessie, Stretch tests failed, needs further investigation.
History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR title and description has followed the guideline in Submitting Pull Requests.

[ ] I adhere to the Command Guidelines.

CI


feat: align with v5.4.3 & v6.0.0

chore: remove stale TODOs (#17866) (e012f29), closes https://github.com/vitejs/vite/issues/17866
fix(legacy): generate sourcemap for polyfill chunks (#18250) (f311ff3), closes https://github.com/vitejs/vite/issues/18250
perf: use crypto.hash when available (#18317) (2a14884), closes https://github.com/vitejs/vite/issues/18317

Awesome, that's exactly what I'm about to do!


XML namespace needs to be declared in XML file?

Hello!
I'm having trouble writing maps for our prefixed XML, specifically when it comes to attributes with the prefix xml:.
Here is a sample of our XML data:
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
   xmlns:rdaw="http://rdaregistry.info/Elements/w/"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>
   <rdf:Description rdf:about="http://example.org/example">
      <rdaw:P10223 xml:lang="ru">Zapiski iz mertvogo doma</rdaw:P10223>
   </rdf:Description>
</rdf:RDF>

Here is the RML map I have written:
@prefix bf: <http://id.loc.gov/ontologies/bibframe/>.
@prefix ex: <http://example.org/rules/>.
@prefix rml: <http://semweb.mmlab.be/ns/rml#>.
@prefix ql: <http://semweb.mmlab.be/ns/ql#>.

ex:ExampleMap a rr:TriplesMap;
   rml:logicalSource [
      rml:source "RML_demo_data.xml";
      rml:referenceFormulation ql:XPath;
      rml:iterator "/rdf:RDF/rdf:Description"
   ];

   rr:subjectMap [
      rml:reference "@rdf:about";
      rr:class bf:Work
   ];

   rr:predicateObjectMap [
      rr:predicate bf:title;
      rr:objectMap [
         rml:reference "rdaw:P10223";
         rr:termType rr:Literal;
         rml:languageMap [
            rml:reference "rdaw:P10223/@xml:lang"
         ]
      ]
   ].

When I run this through the mapper, this is the output:
javax.xml.transform.TransformerException: Prefix must resolve to a namespace: xml
	at java.xml/com.sun.org.apache.xpath.internal.compiler.XPathParser.error(XPathParser.java:621)
	at java.xml/com.sun.org.apache.xpath.internal.compiler.Lexer.mapNSTokens(Lexer.java:637)
	at java.xml/com.sun.org.apache.xpath.internal.compiler.Lexer.tokenize(Lexer.java:360)
	at java.xml/com.sun.org.apache.xpath.internal.compiler.Lexer.tokenize(Lexer.java:99)
	at java.xml/com.sun.org.apache.xpath.internal.compiler.XPathParser.initXPath(XPathParser.java:115)
	at java.xml/com.sun.org.apache.xpath.internal.XPath.<init>(XPath.java:178)
	at java.xml/com.sun.org.apache.xpath.internal.XPath.<init>(XPath.java:268)
	at java.xml/com.sun.org.apache.xpath.internal.jaxp.XPathImpl.compile(XPathImpl.java:162)
	at be.ugent.rml.records.XMLRecord.get(XMLRecord.java:49)
	at be.ugent.rml.extractor.ReferenceExtractor.extract(ReferenceExtractor.java:31)
	at be.ugent.rml.extractor.ReferenceExtractor.execute(ReferenceExtractor.java:41)
	at be.ugent.rml.termgenerator.LiteralGenerator.lambda$generate$0(LiteralGenerator.java:67)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at be.ugent.rml.termgenerator.LiteralGenerator.generate(LiteralGenerator.java:63)
	at be.ugent.rml.Executor.generatePredicateObjectGraphs(Executor.java:277)
	at be.ugent.rml.Executor.executeWithFunctionV5(Executor.java:233)
	at be.ugent.rml.Executor.executeV5(Executor.java:152)
	at be.ugent.rml.cli.Main.main(Main.java:369)
	at be.ugent.rml.cli.Main.main(Main.java:44)
--------------- linked to ------------------
javax.xml.xpath.XPathExpressionException: javax.xml.transform.TransformerException: Prefix must resolve to a namespace: xml
	at java.xml/com.sun.org.apache.xpath.internal.jaxp.XPathImpl.compile(XPathImpl.java:170)
	at be.ugent.rml.records.XMLRecord.get(XMLRecord.java:49)
	at be.ugent.rml.extractor.ReferenceExtractor.extract(ReferenceExtractor.java:31)
	at be.ugent.rml.extractor.ReferenceExtractor.execute(ReferenceExtractor.java:41)
	at be.ugent.rml.termgenerator.LiteralGenerator.lambda$generate$0(LiteralGenerator.java:67)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at be.ugent.rml.termgenerator.LiteralGenerator.generate(LiteralGenerator.java:63)
	at be.ugent.rml.Executor.generatePredicateObjectGraphs(Executor.java:277)
	at be.ugent.rml.Executor.executeWithFunctionV5(Executor.java:233)
	at be.ugent.rml.Executor.executeV5(Executor.java:152)
	at be.ugent.rml.cli.Main.main(Main.java:369)
	at be.ugent.rml.cli.Main.main(Main.java:44)
Caused by: javax.xml.transform.TransformerException: Prefix must resolve to a namespace: xml
	at java.xml/com.sun.org.apache.xpath.internal.compiler.XPathParser.error(XPathParser.java:621)
	at java.xml/com.sun.org.apache.xpath.internal.compiler.Lexer.mapNSTokens(Lexer.java:637)
	at java.xml/com.sun.org.apache.xpath.internal.compiler.Lexer.tokenize(Lexer.java:360)
	at java.xml/com.sun.org.apache.xpath.internal.compiler.Lexer.tokenize(Lexer.java:99)
	at java.xml/com.sun.org.apache.xpath.internal.compiler.XPathParser.initXPath(XPathParser.java:115)
	at java.xml/com.sun.org.apache.xpath.internal.XPath.<init>(XPath.java:178)
	at java.xml/com.sun.org.apache.xpath.internal.XPath.<init>(XPath.java:268)
	at java.xml/com.sun.org.apache.xpath.internal.jaxp.XPathImpl.compile(XPathImpl.java:162)
	... 11 more
@prefix bf: <http://id.loc.gov/ontologies/bibframe/> .

<http://example.org/example> a bf:Work .

I thought this was strange, because the XML namespace according to W3C doesn't need to be declared, but the XPath parser used here is giving me an error. Sure enough, if I do declare the namespace:
Modified XML data:
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
   xmlns:rdaw="http://rdaregistry.info/Elements/w/"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:xml="http://www.w3.org/XML/1998/namespace"
>
   <rdf:Description rdf:about="http://example.org/example">
      <rdaw:P10223 xml:lang="ru">Zapiski iz mertvogo doma</rdaw:P10223>
   </rdf:Description>
</rdf:RDF>

And I keep the RML the same, I get my desired output:
@prefix bf: <http://id.loc.gov/ontologies/bibframe/> .

<http://example.org/example> a bf:Work;
   bf:title "Zapiski iz mertvogo doma"@ru .

I guess I'm wondering if this is an RML Mapper issue, an issue with this particular XPath parser, or if we're just going to have to go through all of our data and declare that XML namespace even though we shouldn't have to... Any thoughts or suggestions?
Thanks in advance!

Hi @mcm104 !
XML namespaces cannot be defined yet using RMLmapping rules.
Therefore, the XPath engine does not know about any namespaces.

I'm not sure what further information you wanted, but to clarify: we have been using RML with our prefixed XML for a while now. It is only with the current version of the RML Mapper that we have run into this issue.
With earlier versions of the mapper, we did not need to include prefixes in our XPaths at all. The above RML I included in my original issue would have been written as follows:
@prefix bf: <http://id.loc.gov/ontologies/bibframe/>.
@prefix ex: <http://example.org/rules/>.
@prefix rml: <http://semweb.mmlab.be/ns/rml#>.
@prefix ql: <http://semweb.mmlab.be/ns/ql#>.

ex:ExampleMap a rr:TriplesMap;
   rml:logicalSource [
      rml:source "RML_demo_data.xml";
      rml:referenceFormulation ql:XPath;
      rml:iterator "/RDF/Description"
   ];

   rr:subjectMap [
      rml:reference "@about";
      rr:class bf:Work
   ];

   rr:predicateObjectMap [
      rr:predicate bf:title;
      rr:objectMap [
         rml:reference "P10223";
         rr:termType rr:Literal;
         rml:languageMap [
            rml:reference "P10223/@lang"
         ]
      ]
   ].

We were writing RML successfully this way for a long time. When someone on our team newly downloaded the mapper a couple weeks ago (version 4.13.0), these maps were no longer working for them. The solution we arrived at was to write the prefixes into the XPaths after all, which worked for the vast majority of XML elements and attributes we need to reference, all prefixed. However, this is where we ran into the above issue with the XML namespace -- not XML namespaces in general -- THE specific namespace for the xml: prefix.
Other namespaces are declared in our XML data as needed (those are all working just fine), but the xml: namespace isn't declared in our data, because it is a reserved namespace in XML and declaring it is not required in well-formed XML. Despite this, the RML Mapper throws the error I copy/pasted in above, because I have not explicitly declared the xml: namespace in our data. I'm surprised that an XPath parser that has the ability to parse namespaces in XML wouldn't be coded to anticipate this.
For now, we will go forward implementing the following workaround:
@prefix bf: <http://id.loc.gov/ontologies/bibframe/>.
@prefix ex: <http://example.org/rules/>.
@prefix rml: <http://semweb.mmlab.be/ns/rml#>.
@prefix ql: <http://semweb.mmlab.be/ns/ql#>.

ex:ExampleMap a rr:TriplesMap;
   rml:logicalSource [
      rml:source "RML_demo_data.xml";
      rml:referenceFormulation ql:XPath;
      rml:iterator "/rdf:RDF/rdf:Description"
   ];

   rr:subjectMap [
      rml:reference "@rdf:about";
      rr:class bf:Work
   ];

   rr:predicateObjectMap [
      rr:predicate bf:title;
      rr:objectMap [
         rml:reference "rdaw:P10223";
         rr:termType rr:Literal;
         rml:languageMap [
            rml:reference "rdaw:P10223/@*[namespace-uri()='http://www.w3.org/XML/1998/namespace' and local-name()='lang']"
         ]
      ]
   ].

If this really is just an issue with the XML parser, we will continue writing our XPaths this way whenever we need to reference an element/attribute with an xml: prefix. However, I do see this as an issue with the functionality of the RML Mapper. There are only a few namespaces that are reserved in XML, and I think the mapper should be able to handle these without them being declared.

Hi @mcm104 !
I think I know what happened because it worked in the previous versions...
Recently (4.13.0+) support was added to read the XML namespaces of a file and register them upfront so that it would work.
However, it assumes that the file has all the prefixes in there. Since the xml: prefix is assumed to be known, maybe we need to add it manually in the RMLMapper so it is properly registered in the XPath engine.
This is the entry from the changelog:

XML parsing: allow parsing of fully namespaced xml by injecting xml source's namespaces in the XPath compiler (see issue 134)

As soon as there's a fix, we get back to you ASAP :)

@mcm104 Hotfix is available on the development branch: https://github.com/RMLio/rmlmapper-java/tree/development
I tested it with your files and it works now correctly again, the regression was introduced with that feature I mentioned above.

Thank you so much! Finally got a chance to test this for myself, and it's working perfectly!

Fixed in 4.15.0, closing.


Add the global var location into BIR

Purpose
Fixes #35479

Added a test

@KavinduZoysa, there seem to be test failures.


storing more than one key-value in cookieStore results in multiple cookies with the same name

Actual behavior (the bug)
I set 2 different key-values into cookieStore on a request. My client code reads the cookie and extracts the first cookie matching 'javalin-cookie-store'. It only contains the first key-value pair. On further investigation I find the 'javalin-cookie-store' cookie has been added twice with different values.
Expected behavior
'javalin-cookie-store' cookie should only appear once in the Set-Cookie header.
To Reproduce
Test case:
`package io.javalin;
import com.mashape.unirest.http.Headers;
import io.javalin.testing.TestUtil;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
public class TestCookieStore2 {
@Test
public void testMultipleCookieStorePairs() {
TestUtil.test((app, http) -> {
app.get("/test", ctx -> {
ctx.cookieStore("first", "hello");
ctx.cookieStore("second", "world");
});
Headers headers = http.get("/test").getHeaders();
assertThat(headers.get("Set-Cookie")).hasSize(1);
});
}
}`

Thanks @edward3h, would you like to submit a PR to fix this ?

Yes, can do. It might be a few days.

Great, let me know if you run into any trouble :)


vegman: diagnostics: Add intrusion reset request

Added functionality to support intrusion sensor status reset request on VEGMAN-R GEN1 hardware.
End-user-impact: Added functionality to support
intrusion sensor status reset request
on VEGMAN-R GEN1 hardware.
Signed-off-by: Kirill Pakhomov<EMAIL_ADDRESS>

forgot to say: i'm yet update the dbus interface in this PR


[bug]: Expected conjunction 2.0

Is there an existing issue for this?

[X] I have searched the existing issues

OS
Windows
GPU
cuda
VRAM
No response
What happened?
greetings,
prompt: (cube:0.15), (sphere:1.3)
script error:
Server error: Expected {conjunction | implicit_conjunction}, found end of text (at char 5), (line:1, col:6)
Screenshots
No response
Additional context
No response
Contact Details
No response

hi, are you trying to do weighting or a blend? in either case the syntax isn’t correct. please check https://invoke-ai.github.io/InvokeAI/features/PROMPTS/#masking-using-text

thank you @damian0815, in the spirit of having some kind of standard, importing automatic1111 preset parameters, prompt in this case, fails because of this. While this is a bit of a stretch you'd say, there is no legitimate reason why this would crash Invoke AI. Point in case: (red cube:0.15), (green sphere:1.3) seems intuitive and should be valid imo.

(red cube:0.15), (green sphere:1.3) seems intuitive and should be valid imo.

if you're trying to blend, the correct syntax is red cube:0.15 green sphere:1.3 or ("red cube", "green sphere").blend(0.15, 1.3). if you're trying to weight, the correct syntax is (red cube)0.13 (green sphere)1.3. it's not at all clear which of those your prompt is intending!

Thank you damian0815, I'm not entirely sure how Automatic1111 handles blending but here is a common examples of parameters minus the negative prompt:
(illustration style:1.3), ((Vogue, Magasine Cover:0.25)), ((best quality)), ((masterpiece)), ((ultra-detailed)),((official art)),(an extremely delicate and beautiful), (beautiful detailed eyes),1girl, wearing sarashi on chest:1.3), (chest bandages:1.3, bandages covering breasts, a little blood splatter, wall covered in graffiti art, dynamic colours, vibrant colours, depth of field, natural scenery, spring leaves, god rays, dynamic lighting (illustration style:1.3)
My point is, when using Automatic1111 prompt as an Invoke AI prompt as is, not having the same result is one thing, having a crash is not acceptable.
I believe Invoke AI should handle the blending as Automatic1111 to have some kind of standard with the current most popular API but that's just me.

auto1111 doesn't support blending at all.

Again, let me clarify.
This report is not about "blending" it's about fixing a crashing issue. Even thought the "blending" might not work as intended, (sphere:1.3) should not crash Invoke.py.


Add characters 暱 to 昵 暱

Ref: 通用规范汉字表 Page.78 No.4201
http://www.gov.cn/gzdt/att/att/site1/20130819/tygfhzb.pdf

Already include in https://github.com/BYVoid/OpenCC/pull/492


Make None.type decoder consistent with the Option decoder

Fixes #1725

Looks good to me, thanks!


Unit Test src/Wfirma/Invoice/WfirmaInvoiceItem

From https://github.com/landingi/bookkeeping-bundle/pull/7

Added here: https://github.com/landingi/bookkeeping-bundle/pull/11/files


Incorrect naming

Fixes https://github.com/hmcts/jabstraction-role/issues/1

Closed based on external discussion.


inferconfig set relative or absolute path not work

Hi all:
My InferTest.xcworkspace include two project, InferTest.xcodeproj and PatchProject.xcodeproj.
I try to skip analysis PatchProject in different folder, the folder hierarchy like this:
other
├── InferTest
│   ├── InferTest
│   ├── InferTest.xcodeproj
│   ├── InferTest.xcworkspace
│   ├── Podfile
│   ├── Podfile.lock
│   ├── Pods
│   ├── build
│   ├── index.txt
│   ├── infer-out
│   └── .inferconfig
└── PatchProject
    ├── PatchProject
    └── tttt

And my .inferconfig like this (both used relation path and absolute path not working):
{
    "skip-analysis-in-path": [
         "Pods",
         "../PatchProject",
         "/User/xxxxx/other/PatchProject"
    ]
}

And run infer command in path other/InferTest with args:
infer —keep-going --no-xcpretty -- xcodebuild -workspace InferTest.xcworkspace -scheme InferTest -configuration Debug -sdk iphonesimulator

Only Pods folder be skipped.
How can I fixed it?

The option skip-analysis-in-path is used to specify a list of regular expressions to match files but it is not a list of filesystem path. Therefore, /User/xxxxx/other/PatchProject will only match paths of the for <project root>/User/xxxxx/other/PatchProject*.
I agree that the name of the option is confusing. At the same time, the name of the option should made consistent with the whitelist, blacklist regexp filtering which currently only cover the path filtering for reporting purposes only.

@jeremydubreil Thank you very much for this, Very useful!

What do I do if I want to ignore everything in the pods folder？
like this ? "Pods/*"


Update OpenIdConnectHandler.GetUserInformationAsync to preserve the claim value types

https://github.com/aspnet/Security/pull/996#issuecomment-250236617

No work planned for this, but a good idea to consider.

Open to contributions? :smile:

Let us know what you come up with.


IPython fails to start

Steps:

Open Beaker landing page
Click New Default Notebook
Wait for IPython to start
Observe the error alert

Also in the browser console we get the following error:
http://<IP_ADDRESS>:8801/93017c3/ipython.732108985775/api/sessions/ Failed to load resource: the server responded with a status of 403 (Forbidden)

Seems to first happen in this commit: ed5a0ec37aa42452c21fab5a230b006a302627c9

I found little problem with windows quotes and fixed it.  Problem still exists for MacOS. I   have not  MacOS at the current moment

see my PR with fixes for windows os
https://github.com/twosigma/beaker-notebook/pull/2975

https://github.com/twosigma/beaker-notebook/pull/2975


prototype from Image or P3

hi, @dbolya ,what's the mask mAP performance when you generate prototype from Image instead of P3.

The method basically doesn't work if you go straight from the image. Well, at least it doesn't work with the current depth of protonet. It's possible that it may work with a much deeper protonet but we haven't tried it.


Update wgpu to 0.17

Possibly could help with #53, but we should do this either way.

Done in 1da93aaa0c9696c2bef371d578cfa9727894e35c


Proposal: Add 'term_api' option to term_start()

(The comments of https://github.com/vim/vim/commit/2a77d21f7893ba14e682a3c5891d606f117a3f36)
I think we should provide the way to disable terminal-api for who does not really want to use it and in terms of security.
In addition, personally, I'd like to enable to specify API names in order to gain API modulability.
Therefore I propose the following ways:
1. Add term_api bool option to term_start() and ++api/++noapi to :terminal
To simply enable/disable terminal-api.
To disable API:

term_start(..., {'term_api': 0})
:term ++noapi

To enable explicitly:

term_start(..., {'term_api': 1})
:term ++api

2. Add term_api bool/string option and ++api=XXX/++noapi
This pull-req. as sample
To disable API:

term_start(..., {'term_api': 0})
term_start(..., {'term_api': ''}) (means no API name is permitted)
:term ++noapi

To enable explicitly: (permit functions starting with Tapi_, default)

term_start(..., {'term_api': 1})

To specify API name: (permit functions starting with Tfun_)

term_start(..., {'term_api': 'Tfun_*'}) (trailing wildcard)
term_start(..., {'term_api': '/^Tfun_'}) (regexp)
:term ++api=Tfun_*

NOTE: no document yet

Codecov Report

Merging #2907 into master will increase coverage by 0.29%.
The diff coverage is 88.88%.

@@            Coverage Diff             @@
##           master    #2907      +/-   ##
==========================================
+ Coverage   75.34%   75.63%   +0.29%
==========================================
  Files          92       92
  Lines      132540   135051    +2511
==========================================
+ Hits        99861   102146    +2285
- Misses      32679    32905     +226

Impacted Files
Coverage Δ

src/evalfunc.c
83.99% <ø> (+0.13%)
:arrow_up:

src/channel.c
82.97% <87.5%> (+0.33%)
:arrow_up:

src/terminal.c
72.07% <89.13%> (+0.83%)
:arrow_up:

src/if_python3.c
74.8% <0%> (-1.38%)
:arrow_down:

src/if_python.c
76.55% <0%> (-1.31%)
:arrow_down:

src/spellfile.c
73.94% <0%> (-1.05%)
:arrow_down:

src/if_perl.xs
85.86% <0%> (-0.36%)
:arrow_down:

src/netbeans.c
27.03% <0%> (-0.28%)
:arrow_down:

src/libvterm/src/screen.c
58.97% <0%> (-0.25%)
:arrow_down:

src/if_xcmdsrv.c
83.63% <0%> (-0.17%)
:arrow_down:

... and 70 more

Continue to review full report at Codecov.

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


how to fill-in ENVIRONMENT for Windows version

Hi,
Is this project compatible with AI workbench for Windows ?
If YES, for host mount, what is the Windows "Source Directory" for Docker with WSL setup ?
Description What is "Host's runtime files for Docker in Docker support."
Same question for .cache/nvidia-nims
Thx !
Best,
Jerome

Hi Jerome, thank you for the question! Unfortunately, only Ubuntu is supported for remote machines right now.

You should post this question here https://forums.developer.nvidia.com/c/ai-data-science/nvidia-ai-workbench/671  There is an AI Workbench forum there and a thread for Nim-Anywhere.
AI Workbench is compatible with Windows in the sense you can run it on Windows.

They install a Linux WSL instance to host AI Workbench.
AI Workbench runs out of that with a user workbench
AI Workbench projects themselves run out of a container with the name of the project.  In the case of this project it is something like nim-anywhere
The NIM Anywhere recommended mount in the Environment is to /home/workbench/.cache/nvidia-nims which is on that WSL instance and not your windows drive. This means you can probably share the cache directory across AI Workbench projects because they are all homed off of that WSL instance

You can see the topology here https://joe.blog.freemansoft.com/2024/06/nvidia-ai-studio-workbench-is.html

Hi! Yes, workbench and this project are compatible with Windows, but NIMs are not. Would that work for you?

What I need would be a helm chart, as a matter of fact...

We don't have a Helm chart for this particular project because our intention is to make a really accessible place for developers to start learning. However, NVIDIA does have a lot of great work showing more enterprise complete examples.
If you are looking for Helm charts for deploying NVIDIA NIMs, this is a great resource:
https://github.com/NVIDIA/nim-deploy
Also our new NIM Agent Blueprints include more enterprise-complete examples including Helm charts:
https://blogs.nvidia.com/blog/nim-agent-blueprints/


adapters: check for valid adapters in the build stage

Add a check to the flowgraph build stage that makes sure an adapter with the
specified name is either registered or configured to be dynamically loaded.
As part of this change, modify the ast for read and write in order to preserve
the location information for the adapter name.
Relates to #83

@dmajda

@dmajda This is the commit that I extracted from #133 and reworked to apply to the graph building stage and not the semantic pass. It still feels a bit more like a semantic time check to me than a graph building step but I can live with it either way.

The change looks OK technically.
My objection wasn’t against the check being in the semantic pass, but against it being in the compiler as a whole (as opposed to the runtime, i.e. generated program). While this is technically fine, it unnecessary conflates the runtime and compile-time and spreads knowledge about adapters into parts of the code which don’t need to know about them. One thing this will likely hurt in the future is “generification” of AST node processing.
On my scale of architectural “sins” this is far from the top, so I’ll stop advocating now and leave the decision to you. If compile-time check stays, semantic pass seems like a better place, but I can live with a build-time check too.

@dmajda Since the only user benefit to the change was to include location information in the error, I reworked it so that the locations are propagated into the generated code so they're available in the runtime.
To my taste, it seems like the original solution that did this all in the semantic pass felt like the right architectural choice but I am ok with it this way.

+1
(I imagined a tiny helper above Juttle.adapters.get so that this function doesn’t have to take the location, but whatever.)


Relax FileCheck directives for skip_clean_llbuild.test

This is needed short term to allow the test to pass when running on Python 3.11 and later and avoid errors like
<stdin>:44:1: note: non-matching line after previous match is here
<string>:1: DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13
^

Long term we want to replace uses of the obsolete pipes.quotes function with shlex.quotes.
Addresses rdar://109664710

@swift please test

@swift-ci please test Apple Silicon

@swift-ci please build toolchain

Apple Silicon test is failing for unrelated failures, but this test is now passing
PASS: Swift-validation(macosx-arm64) :: BuildSystem/skip_clean_llbuild.test (9209 of 16340)
...
Failed Tests (2):
  Swift(macosx-arm64) :: Concurrency/Runtime/async_taskgroup_discarding.swift
  Swift(macosx-arm64) :: Python/python_lint.swift

https://github.com/swift please test

@swift-ci please test

@swift-ci please build toolchain

The macOS toolchain job is failing with an unrelated failure when configuring LLDB
-- LLDB.framework: resources subdirectory is 'Versions/A/Resources'
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
CMake Error at test/CMakeLists.txt:153 (message):
  Couldn't find libcxx build in
  '/Users/ec2-user/jenkins/workspace/swift-PR-toolchain-macos/branch-main/buildbot_osx/libcxx-macosx-x86_64'.
  To run the test-suite for a standalone LLDB build please build libcxx and
  point LLDB_TEST_LIBCXX_ROOT_DIR to it.

The Apple Silicon bot is now hitting a failure when testing llbuild
...
PASS: Swift-validation(macosx-arm64) :: BuildSystem/skip_clean_llbuild.test (9208 of 16339)
...
ailed Tests (1):
  llbuild :: SwiftBuildTool/swift-compiler-whole-module-optimization.swift-build

Also verified the test still passes for the regular macOS PR testing
PASS: Swift-validation(macosx-x86_64) :: BuildSystem/skip_clean_llbuild.test (9275 of 16397)
PASS: Swift-validation(iphonesimulator-x86_64) :: BuildSystem/skip_clean_llbuil.test (9274 of 16397)
PASS: Swift-validation(watchsimulator-x86_64) :: BuildSystem/skip_clean_llbuild.test (9274 of 16397)


Add idle-inhibit implementation

This adds an implementation of the idle-inhibit-v1 protocol and an example client.
The client is very simple and skips a little bit of error checking (whether the seat actually has a pointer), but works to trigger the code paths in the server.
The implementation in rootston does nothing but create the manager.
Since rootston doesn't have any kind of idling action, I'm not sure what else we could do here, ideas?

Maybe turning off all displays after n minutes when no idle inhibitor is present?

It will be nice to have integration with wlr_idle to inhibit idle events while there exist at least an inhibitor for that seat, but this will gonna be tricky.
And I get a SIGABRT for the client when closing it.

@raazvvann inhibitors are bound to surfaces.
The idle protocol is bound to seats. Interaction between those is a bit wonky.
It's a bit of a scope/style decision on wlroots for me.
In a "real" compositor I would break spec slightly and block idle when at least one idle-inhibitor inhibits, maybe filtered to there being a single seat.
On a compositor that's intended to be a reference, I'd prefer to stick closer to actual specs

The last commit fixed the crash.
About the interaction between idle and idle-inhibit, I disagree that might be out of wlroots scope, because in a "real" compositor, based on wlroots, this will be imposible without some modification in wlr_idle and wlr_idle_inhibit to support this. So it's better to be done in wlroots, rather that to be done in compositors.
Anyway this can be consider out of this PR scope, and be done later.

I'd say that should be fixed purely in the idle implementation.
If the event is routed through the compositor, it should be easy enough to intercept it, if an idle inhibitor exists.
I don't think the logic of when and how the inhibitor interacts with the idle protocol should be in wlroots.

Integration with wlr_idle, if there is one, should be purely optional. Since wlroots doesn't know where a surface is displayed (ie. on which output), an integration would be tricky. Unless you can come up with a good design, we should probably leave that to the compositor.
@SirCmpwn Do we want a rootston implementation of this?

Do we want a rootston implementation of this?

Probably, yeah

Apart from minor comments I just posted, code LGTM.
So the next step is to implement it in rootston. We'll probably want a config option for the idle timeout + integration with wlr_idle. We'll see if we can bring part of this integration into wlroots, but I don't think it'll be possible.
One tricky thing is that the inhibitor is bound to a surface and we have no way of getting directly a surface position in rootston.

LGTM overall

So the next step is to implement it in rootston. We'll probably want a config option for the idle timeout + integration with wlr_idle. We'll see if we can bring part of this integration into wlroots, but I don't think it'll be possible.

Let's do this on a separate PR

I don't get that last question.
We don't have any idle handling in rootston yet, and the last word on that was to do it in another PR.
But even for that, I don't see how i3lock would interact with this. (Outside being opaque over the entire output, thus hiding all inhibitors).

What if the idle action is a user action like running i3lock?

This doesn't change anything, the compositor should prevent i3lock from being spawned.


deps: migrate faker to @faker-js/faker

Based on the suggestion from #216.
I tried my best to update all faker references with the new, official @faker.js/faker package. This change is highly suggested since faker is no longer maintained.
Sadly most of the dependencies in this repo are out of date which leads to compile time errors since @faker.js/faker requires at least typescript v4 for typing. So an update of the typescript package is required for this PR to be able to merge successfully (which requires ts-jest and jest version updates as a result).

Please, check the issue list before sending anything to the repo
https://github.com/w3tecch/typeorm-seeding/issues?q=is%3Aissue+sort%3Aupdated-desc+label%3Afaker+is%3Aclosed


Allow suppressing license was not encountered warning

Is your feature request related to a problem? Please describe.
We are using cargo-deny from CI in a number of internal repositories and have a list of licenses which we consider acceptable that should be applied to all repositories.
Since not all repositories have dependencies covering the entire list of allowed licenses we consistently get the below warning in some repositories:
warning[L006]: license was not encountered
   ┌─ /github/workspace/deny.toml:14:5
   │
14 │     "BSD-3-Clause",
   │     ^^^^^^^^^^^^^^ unmatched license allowance

Describe the solution you'd like
Ideally we'd like to be able to add a config setting to our deny.toml which says that we do not care about unmatched licenses from the whitelist, which would then suppress that warning.
Describe alternatives you've considered
We've considered two alternatives:

Keep a separate list of licenses per repository and remove unused ones
Live with the warning

We went with 2 for now, as option 1 creates unneeded overhead and the warning doesn't fail the CI job.

Thank you @thomcc! This is useful.

I indeed, thanks a lot!


ERROR: An error occurred while sending get-request to http://cert.int-x3.letsencrypt.org/ (Status 301)

I'm getting this error and all the certificates are now invalid.
Hope it's a simple fix.
Thanks

+ Challenge is valid!
 + Requesting certificate...
 + Checking certificate...
 + Done!
 + Creating fullchain.pem...
  + ERROR: An error occurred while sending get-request to http://cert.int-x3.letsencrypt.org/ (Status 301)

Details:

<title>301 Moved Permanently</title>

301 Moved Permanently

nginx

Seems like:
https://community.letsencrypt.org/t/dehydrated-caused-rate-limits-to-be-reached/52477
and
https://github.com/lukas2511/dehydrated/commit/7a0e71c6c2ccc6e98abca5ea1c7de28053e90c02
May be related.

Yes, sorry. I flushed to image and it fixed the issue.
Thanks for the quick reply