Feat/rimage

R, Rstudio & jupyter json image
R environment files for proxies & which package mirror to use

lgtm, r? @kyleaschmitt

LGTM.  I think that's how all the cool devs say it now.


新增和resty的对比文档

#58
主要对比

http header
query
json
string

Codecov Report

Merging #68 into master will increase coverage by 1.99%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master      #68      +/-   ##
==========================================
+ Coverage   65.55%   67.55%   +1.99%
==========================================
  Files          20       20
  Lines         749      789      +40
==========================================
+ Hits          491      533      +42
+ Misses        220      217       -3
- Partials       38       39       +1

Impacted Files
Coverage Δ

gout.go
100% <0%> (ø)
:arrow_up:

group.go
90.9% <0%> (+3.08%)
:arrow_up:

req.go
80% <0%> (+3.33%)
:arrow_up:

utils.go
69.76% <0%> (+7.69%)
:arrow_up:

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 f10355b...c223ead. Read the comment docs.


Support non-"dotnet" Jenkins hosts

https://developer.chrome.com/extensions/permissions

Need to find one to test with

I'd volunteer https://jenkins.mono-project.com :)

@akoeplinger Perfect - thanks!

The current Jenkins support shows this error: "Unknown Failure - If this is a private Jenkins job, click the 'Details' button to reauthenticate and then reload this failure data." so we should distinguish between these two failure modes.

Yes, we have a Xamarin-internal Jenkins, that's why it shows this for you. It works if you authenticate as the message says.

@akoeplinger I'm confused. When I look at https://github.com/mono/mono/pull/2342 I see:

But when I click details on the "ARM hard float Linux" queue, I'm logged in and can see info:

But I still can't see anything on the PR page. Are you running a custom StashPop with permissions to https://jenkins.mono-project.com in the manifest.json?

As an aside, I'd like to add well-known and trusted Jenkins servers (like mono's) to the shipping manifest.json so that they work by default. All other unknown Jenkins servers would require permission be granted on first access.

@dpoeschl yeah, I'm running a custom version. It seems to work fine for me:

Not sure why it doesn't work for Mono's public Jenkins for you?

@akoeplinger Awesome. It's because the shipping manifest.json only allows access to the dotnet team's Jenkins server right now. I'm trying to fix that behavior for non-customized manifest.json files by 1) including more well-known jenkins servers by default and 2) allowing any jenkins server to be accessed with user-granted permissions.

Background: Chrome extensions make you declare what domains you have access to. See https://github.com/dpoeschl/StashPop/blob/master/manifest.json#L38

So once that work is done, you shouldn't need a customized version of StashPop anymore (unless you want to do dev)

What about not including any Jenkins url permission by default and just requesting it on-demand on first use?

Yep, that's another option, and I tend to like that better. As a note-to-self, I'll want to verify that the permissions roam between versions and whatnot.

@dpoeschl I took a stab at implementing this in https://github.com/dpoeschl/StashPop/pull/70. Would love to hear your feedback :smile:


Improving styles

Hey @akshitagupta15june I want to add hover effect on buttons and improve styling of the page. Can you please assign me this issue?
After adding hovering effect buttons will animate.
Thank you!

ok @sumitkr2000

@akshitagupta15june  Can I add animations to the website or you want to keep it simple?

@Susmita-Dey do u want some animations for website?

Can you assign this to me? I can make the buttons better

@sumitkr2000 Go ahead

If u allow me to add animations on cards of pets I can do that.

If u add that feature then only i will do it. Because it takes a lot of time . After wasting so much time if its not merged it hurts :)

@akshitagupta15june What to do?

Better is to leave it now @Susmita-Dey because we are already working on other issues if needed we will assign him in future

It doesn't take time at all, I can do the animations, I don't care if you merge it or not

@akshitagupta15june okk just ping me when you require it. Thank you!

Why did u closed this?

will create a new issue when needed


Add booking model

Add Booking Model
Added booking model, could not migrate item as relations because it does not exist.
Differentiated between user and admin to some extent
Users:

Can edit only own pending bookings
Can only view own bookings

Admin:

Can edit all bookings
Can approve/reject booking

Resolves #7 and there are few overlaps with #8

You should use 'Resolves' or 'Fixes' instead of 'Solves' in the description. These 2 keywords allow the corresponding issue to be closed upon the closure of this pull request

Oops, will take note of that


Runtime error in kmeans.py benchmark

Short description
An error occurs when I run kmeans.py benchmark:
RuntimeError: Could not find any provider for the sklearn_engines entry point with name(s): 'sklearn_numba_dpex'
Steps to reproduce
create dppy-dev-v2 env and install dppy-dev
conda create -n dppy-dev-v2 dpctl=0.14* dpnp numba numba-dpex -c dppy/label/dev -c intel
conda activate dppy-dev-v2
. /opt/intel/oneapi/compiler/latest/env/vars.sh
. /opt/intel/oneapi/tbb/latest/env/vars.sh intel64
export PATH=/opt/intel/oneapi/compiler/latest/linux/bin-llvm:$PATH
git clone https://github.com/IntelPython/numba-dpex/
cd numba-dpex
pip install -e . --no-build-isolation
cd ..

install wip-engines
git clone https://github.com/ogrisel/scikit-learn -b wip-engines
conda install -c intel scipy pandas
pip install --no-cache-dir cython
pip install -e . --no-build-isolation --no-cache-dir
cd ..

install sklearn-numba-dpex
git clone https://github.com/soda-inria/sklearn-numba-dpex
cd sklearn-numba-dpex
pip install -e . --no-build-isolation

run K-means
cd benchmark
python kmeans.py

The behaviour is reproduced on Windows Subsystem for Linux (WSL), Ubuntu 20.04

Hi @Vika-F thank you for the report. I've just checked that on main branch the script works when ran within the provided docker image so the issue is somewhere among the differences in the install process. On the go I don't see anything wrong but we don't test with those commands on our side and we know installation is a main pain point at the moment. (and i'm less familiar with conda myself)
The error message seems to indicate that the entry point defined in the setup instructions of sklearn_numba_dpex (pyproject.toml file) is not properly registered during setup.
Can you check that the sklearn_numba_dpex package is importable in your environment ? (try running python -c "import sklearn_numba_dpex") ? and if not, same but after deactivating / reactivating the conda environment ?
I can try to reproduce, I assume that you use latest commits from sklearn_numba_dpex / the wip-engines branch, not sure about python version: is it system python or some other python install in the conda env ? we test with python 3.9.13.
Would you like trying to debug it live with voicechat ?

Hi @fcharras , thank you for the prompt responce.
It seems that sklearn_numba_dpex is not available in my conda environment. python -c "import sklearn_numba_dpex" produces the same error when I activate dppy-dev-v2 environment and also after conda deactivate + conda activate dppy-dev-v2.
But pip install of the package had completed successfully as far as I can see:
(dppy-dev-v2) username@username-mobl2:~/code/inria/v2/sklearn-numba-dpex$ pip install -e . --no-build-isolation
Obtaining file:///home/username/code/inria/v2/sklearn-numba-dpex
  Checking if build backend supports build_editable ... done
  Preparing metadata (pyproject.toml) ... done
Installing collected packages: UNKNOWN
  Attempting uninstall: UNKNOWN
    Found existing installation: UNKNOWN 0.0.0
    Uninstalling UNKNOWN-0.0.0:
      Successfully uninstalled UNKNOWN-0.0.0
  Running setup.py develop for UNKNOWN
**Successfully installed UNKNOWN-0.0.0**

Is it Ok by the way that the package name is "unknown"?

I assume that you use latest commits from sklearn_numba_dpex / the wip-engines branch,

Actually no, as I faced this issue about a week ago. But I will repeat the steps with the latest versions and report about the status.
Python version is also a bit outdated: Python 3.9.12 :: Intel Corporation

Would you like trying to debug it live with voicechat ?
Sure, that will be great.

UNKNOWN doesn't sound OK, it sounds like a part of the issue, here's what I get:
Successfully built sklearn-numba-dpex
Installing collected packages: sklearn-numba-dpex
Successfully installed sklearn-numba-dpex-0.1.0.dev0

A few ideas:

try upgrading setuptools with pip install -U setuptools before installing
Python 3.9.12 should be fine but are there changes coming from the :: Intel Corporation regarding packaging and installing ? maybe try another python distribution in the conda env ?
try other installation commands:

either no editable mode (without -e in `pip install commands)
or try python setup.py develop / python setup.py install

Do you have the same issue with the scikit-learn install ?

I have removed old versions of dppy-dev environments, updated my conda (just in case, and now I have Python 3.9.13) and tried to do a clean build.
First, there was a problem with llvmlite package.
I did the following (without -e in pip install):
conda create -n dppy-dev dpctl=0.14* dpnp numba numba-dpex -c dppy/label/dev -c intel
conda activate dppy-dev
pip install cython
. /opt/intel/oneapi/compiler/latest/env/vars.sh
. /opt/intel/oneapi/tbb/latest/env/vars.sh intel64
export PATH=/opt/intel/oneapi/compiler/latest/linux/bin-llvm:$PATH
git clone https://github.com/IntelPython/numba-dpex/
cd numba-dpex
pip install . --no-build-isolation

And got this error:
(dppy-dev) username@username-mobl2:~/code/inria/v5/numba-dpex$ pip install . --no-build-isolation
Processing /home/username/code/inria/v5/numba-dpex
Preparing metadata (pyproject.toml) ... done
Collecting numba>=0.56
Using cached numba-0.56.4-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.5 MB)
Requirement already satisfied: dpctl in /home/username/miniconda3_wsl/envs/dppy-dev/lib/python3.9/site-packages (from numba-dpex==0.19.0.dev0) (0.14.0rc2+16.g05c358ee0)
Requirement already satisfied: packaging in /home/username/miniconda3_wsl/envs/dppy-dev/lib/python3.9/site-packages (from numba-dpex==0.19.0.dev0) (21.3)
Collecting llvmlite<0.40,>=0.39.0dev0
Using cached llvmlite-0.39.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.6 MB)
Requirement already satisfied: numpy<1.24,>=1.18 in /home/username/miniconda3_wsl/envs/dppy-dev/lib/python3.9/site-packages (from numba>=0.56->numba-dpex==0.19.0.dev0) (1.21.4)
Requirement already satisfied: setuptools in /home/username/miniconda3_wsl/envs/dppy-dev/lib/python3.9/site-packages (from numba>=0.56->numba-dpex==0.19.0.dev0) (58.0.4)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /home/username/miniconda3_wsl/envs/dppy-dev/lib/python3.9/site-packages (from packaging->numba-dpex==0.19.0.dev0) (3.0.9)
Building wheels for collected packages: numba-dpex
Building wheel for numba-dpex (pyproject.toml) ... done
Created wheel for numba-dpex: filename=numba_dpex-0.19.0.dev0-cp39-cp39-linux_x86_64.whl size=300630 sha256=9ac011b2d28daa59fbaac61fe83456208fb398516c567c7b62b2ca8ea0f460c9
Stored in directory: /home/username/.cache/pip/wheels/f5/40/31/6f619908edc9d65f907f914bd86598344781b67c727917d3bf
Successfully built numba-dpex
Installing collected packages: llvmlite, numba, numba-dpex
Attempting uninstall: llvmlite
Found existing installation: llvmlite 0.38.1+0.g650c36d.dirty
ERROR: Cannot uninstall 'llvmlite'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
So, I've tried pip install . --no-build-isolation --ignore-installed llvmlite. That was successful.
Installation of wip-engines and sklearn_numba_dpex also was successful, both without -e flags.
But I saw that numpy was re-installed during the installation of wip-engines:
username@username-mobl2:~/code/inria/v5/scikit-learn$ pip install . --no-build-isolation --no-cache-dir
Processing /home/username/code/inria/v5/scikit-learn
Preparing metadata (pyproject.toml) ... done
Collecting threadpoolctl>=2.0.0
Downloading threadpoolctl-3.1.0-py3-none-any.whl (14 kB)
Collecting joblib>=1.1.1
Downloading joblib-1.2.0-py3-none-any.whl (297 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 298.0/298.0 kB 4.7 MB/s eta 0:00:00
Requirement already satisfied: numpy>=1.17.3 in /home/vsfedoto/miniconda3_wsl/envs/dppy-dev/lib/python3.9/site-packages (from scikit-learn==1.2.dev0) (1.23.4)
Requirement already satisfied: scipy>=1.3.2 in /home/vsfedoto/miniconda3_wsl/envs/dppy-dev/lib/python3.9/site-packages (from scikit-learn==1.2.dev0) (1.7.3)
Collecting numpy>=1.17.3
Downloading numpy-1.22.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.8/16.8 MB 7.3 MB/s eta 0:00:00
Building wheels for collected packages: scikit-learn
Building wheel for scikit-learn (pyproject.toml) ... done
Created wheel for scikit-learn: filename=scikit_learn-1.2.dev0-cp39-cp39-linux_x86_64.whl size=18714329 sha256=113ec8ef17381699ba5d3a4be22accfe33e40bd86aebbb4b487a6ed678b307eb
Stored in directory: /tmp/pip-ephem-wheel-cache-w_go2w6g/wheels/69/7c/2d/0f55f9f04d850e4b7f1932a002d4500d1462a6b8506d3ad914
Successfully built scikit-learn
Installing collected packages: threadpoolctl, numpy, joblib, scikit-learn
Attempting uninstall: numpy
Found existing installation: numpy 1.23.4
Uninstalling numpy-1.23.4:
Successfully uninstalled numpy-1.23.4
Successfully installed joblib-1.2.0 numpy-1.22.4 scikit-learn-1.2.dev0 threadpoolctl-3.1.0
As the result, now I can successfully import sklearn_numba_dpex, but I see the error related to numpy versions inconsistency when running kmeans.py benchmark.

Here is the numpy error:
(dppy-dev) username@username-mobl2:~/code/inria/v5/sklearn-numba-dpex/benchmark$ python kmeans.py
Traceback (most recent call last):
File "init.pxd", line 942, in numpy.import_array
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/username/code/inria/v5/sklearn-numba-dpex/benchmark/kmeans.py", line 5, in
import sklearn
File "/home/username/miniconda3_wsl/envs/dppy-dev/lib/python3.9/site-packages/sklearn/init.py", line 82, in
from .base import clone
File "/home/username/miniconda3_wsl/envs/dppy-dev/lib/python3.9/site-packages/sklearn/base.py", line 17, in
from .utils import _IS_32BIT
File "/home/username/miniconda3_wsl/envs/dppy-dev/lib/python3.9/site-packages/sklearn/utils/init.py", line 19, in
from .murmurhash import murmurhash3_32
File "sklearn/utils/murmurhash.pyx", line 26, in init sklearn.utils.murmurhash
File "init.pxd", line 944, in numpy.import_array
ImportError: numpy.core.multiarray failed to import

I will try to create the initial dppy-dev environment with numpy=1.22.4. I think it might help.
I will report about the results.

I tried several more times to build sklearn-numba-dpex. Still no success.
I have consulted with @oleksandr-pavlyk and he said that there is no need now in building numba-dpex as I can use numba-dpex installed from conda.
So, my latest steps to build sklearn-numba-dpex look like this.
Step 1. Prepare dppy-dev package
conda create -n dppy-dev dpctl=0.14* dpnp numba numba-dpex cython spirv-tools scipy pandas -c dppy/label/dev -c intel --override-channels

** Step 2. Activate dppy-dev environment**
conda activate dppy-dev

** Step 3. Setup compiler environment**
source /opt/intel/oneapi/compiler/latest/env/vars.sh
source /opt/intel/oneapi/tbb/latest/env/vars.sh intel64
export PATH=/opt/intel/oneapi/compiler/latest/linux/bin-llvm:$PATH

Step 4. Install wip-engines
git clone https://github.com/ogrisel/scikit-learn -b wip-engines
cd scikit-learn
pip install . --no-build-isolation
cd ..

This package was built successfully. Here is the log:
Processing /home/username/code/inria/scikit-learn
  Preparing metadata (pyproject.toml) ... done
Collecting threadpoolctl>=2.0.0
  Using cached threadpoolctl-3.1.0-py3-none-any.whl (14 kB)
Collecting joblib>=1.1.1
  Using cached joblib-1.2.0-py3-none-any.whl (297 kB)
Requirement already satisfied: numpy>=1.17.3 in /home/username/miniconda3_wsl/envs/dppy-dev/lib/python3.9/site-packages (from scikit-learn==1.2.dev0) (1.21.4)
Requirement already satisfied: scipy>=1.3.2 in /home/username/miniconda3_wsl/envs/dppy-dev/lib/python3.9/site-packages (from scikit-learn==1.2.dev0) (1.7.3)
Building wheels for collected packages: scikit-learn
  Building wheel for scikit-learn (pyproject.toml) ... done
  Created wheel for scikit-learn: filename=scikit_learn-1.2.dev0-cp39-cp39-linux_x86_64.whl size=18626435 sha256=8c87ae039d17c7055b131809e20d1aea5b0257f6381395b07d43789fad5587b8
  Stored in directory: /home/username/.cache/pip/wheels/d7/e0/78/c9f73679413ce804a592d2de32d0af04c2878d67f1ebd4defc
Successfully built scikit-learn
Installing collected packages: threadpoolctl, joblib, scikit-learn
Successfully installed joblib-1.2.0 scikit-learn-1.2.dev0 threadpoolctl-3.1.0

Step 5. Install sklearn-numba-dpex
git clone https://github.com/soda-inria/sklearn-numba-dpex
cd sklearn-numba-dpex
pip install . --no-build-isolation

And here the strange thing happens:
Processing /home/username/code/inria/sklearn-numba-dpex
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: UNKNOWN
  Building wheel for UNKNOWN (pyproject.toml) ... done
  Created wheel for UNKNOWN: filename=UNKNOWN-0.0.0-py3-none-any.whl size=2200 sha256=824953ff59293cae0436bcb64b6fb22f5b97a410f03715a242792540e415d8d9
  Stored in directory: /home/username/.cache/pip/wheels/9c/49/69/06110ec83c2803d5cdeaadd5318c80946a8c6574a3e6737dcb
Successfully built UNKNOWN
Installing collected packages: UNKNOWN
Successfully installed UNKNOWN-0.0.0

I also tried to use pip install -U setuptools, but this didn't help. The result is the same.
conda deactivate + conda activate dppy-dev also didn't help.
Have you any ideas how to debug this?

I've just got some progress with sklearn-numba-dpex. But still getting errors with kmeans.py.
pip install setuptools --upgrade helped to build the package.
Here is the log. Can you please take a look? Is it Ok?
Processing /home/username/code/inria/sklearn-numba-dpex
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: scikit-learn in /home/username/miniconda3_wsl/envs/dppy-dev/lib/python3.9/site-packages (from sklearn-numba-dpex==0.1.0.dev0) (1.2.dev0)
Requirement already satisfied: numba-dpex in /home/username/miniconda3_wsl/envs/dppy-dev/lib/python3.9/site-packages (from sklearn-numba-dpex==0.1.0.dev0) (0.18.1+50.g219ec1cd)
Requirement already satisfied: dpctl in /home/username/miniconda3_wsl/envs/dppy-dev/lib/python3.9/site-packages (from sklearn-numba-dpex==0.1.0.dev0) (0.14.0+6.g769095261)
Requirement already satisfied: numpy in /home/username/miniconda3_wsl/envs/dppy-dev/lib/python3.9/site-packages (from dpctl->sklearn-numba-dpex==0.1.0.dev0) (1.21.4)
Requirement already satisfied: numba<0.56,>=0.54.0 in /home/username/miniconda3_wsl/envs/dppy-dev/lib/python3.9/site-packages (from numba-dpex->sklearn-numba-dpex==0.1.0.dev0) (0.55.1)
Requirement already satisfied: packaging in /home/username/miniconda3_wsl/envs/dppy-dev/lib/python3.9/site-packages (from numba-dpex->sklearn-numba-dpex==0.1.0.dev0) (21.3)
Requirement already satisfied: joblib>=1.1.1 in /home/username/miniconda3_wsl/envs/dppy-dev/lib/python3.9/site-packages (from scikit-learn->sklearn-numba-dpex==0.1.0.dev0) (1.2.0)
Requirement already satisfied: threadpoolctl>=2.0.0 in /home/username/miniconda3_wsl/envs/dppy-dev/lib/python3.9/site-packages (from scikit-learn->sklearn-numba-dpex==0.1.0.dev0) (3.1.0)
Requirement already satisfied: scipy>=1.3.2 in /home/username/miniconda3_wsl/envs/dppy-dev/lib/python3.9/site-packages (from scikit-learn->sklearn-numba-dpex==0.1.0.dev0) (1.7.3)
Requirement already satisfied: llvmlite<0.39,>=0.38.0rc1 in /home/username/miniconda3_wsl/envs/dppy-dev/lib/python3.9/site-packages (from numba<0.56,>=0.54.0->numba-dpex->sklearn-numba-dpex==0.1.0.dev0) (0.38.1+0.g650c36d.dirty)
Requirement already satisfied: setuptools in /home/username/miniconda3_wsl/envs/dppy-dev/lib/python3.9/site-packages (from numba<0.56,>=0.54.0->numba-dpex->sklearn-numba-dpex==0.1.0.dev0) (65.6.0)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /home/username/miniconda3_wsl/envs/dppy-dev/lib/python3.9/site-packages (from packaging->numba-dpex->sklearn-numba-dpex==0.1.0.dev0) (3.0.9)
Building wheels for collected packages: sklearn-numba-dpex
  Building wheel for sklearn-numba-dpex (pyproject.toml) ... done
  Created wheel for sklearn-numba-dpex: filename=sklearn_numba_dpex-0.1.0.dev0-py3-none-any.whl size=7284 sha256=c1ce1c9e31872545e0b990b8a2ce520e9ff5f343be21bc293d468a526bdb68cc
  Stored in directory: /home/username/.cache/pip/wheels/9c/49/69/06110ec83c2803d5cdeaadd5318c80946a8c6574a3e6737dcb
Successfully built sklearn-numba-dpex
Installing collected packages: sklearn-numba-dpex
Successfully installed sklearn-numba-dpex-0.1.0.dev0

Now I am getting ModuleNotFoundError at line #167 of kmeans.py:
$ python kmeans.py
Traceback (most recent call last):
  File "/home/username/code/inria/sklearn-numba-dpex/benchmark/kmeans.py", line 167, in <module>
    from sklearn_numba_dpex.testing.config import override_attr_context
ModuleNotFoundError: No module named 'sklearn_numba_dpex.testing

But python -c "import sklearn_numba_dpex" works Ok now.

Hi @Vika-F,
Thank you for reporting the problems.
Can you provide the results using verbose mode?
pip install --verbose .

It's actually an issue I've noticed too, let me open a quick PR to fix that.
By mistake we've code that enforces pytest requirement.
Currently the workaround is installing pytest
pip install pytest

Re-installing sklearn_numba_dpex in editable mode helped. Now I have no exceptions when running the benchmark.
Thank you very much @fcharras and @jjerphan for helping to resolve this!
I am going to close this issue.
The problem that remains is that the code hangs when it tries to run K-means numba_dpex lloyd on GPU, after this print
Running Kmeans numba_dpex lloyd GPU with parameters sample_weight=unary n_clusters=127 data_shape=(263256, 14) max_iter=100 tol=0 ...
Tomorrow I will try to find out at which point of the execution does it hang and maybe open a new issue regarding this.


Add TAP component

Still need to add tests, but I squashed the commits from #1089.

@Golmote Not great at regex, so I'm struggling with getting yamlish working. Got an idea?

I would say you need something like
	yamlish: {
		pattern: /(^[^\S\r\n]*)---(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?[^\S\r\n]*\.\.\.$/m,
		lookbehind: true,
		inside: Prism.languages.yaml,
		alias: 'language-yaml'
	}

The lookbehind (the first capturing group) matches the optional spaces before ---. Then we match multiple lines (?:.*(?:\r\n?|\n))*?, then we end up with the optional spaces and the final ....
This should match:
  ---
  but: this one
  has:
    - lots
    - of
    - stuff
  ...

@Golmote I think we're looking good here. Let me know if you have suggestions.

@Golmote Updated.

Looks quite good to me. There are still a few nitpicks, but I won't mind if this is merged as is.
You did not give me feedback regarding this comment. Did you give it a try? Are those needed?

Since you removed the (^|\n) parts that were checking for the beginning of the string in several regexps, I'm wondering if the (    )* parts are still needed. You might want to try removing them and see how the tests go.

Also I can still see some unneeded parentheses:

around (.*) in bailout
around (\d+) in version
around (\d+) in plan.

Finally, all the remaining groups, expect in the yamlish pattern that uses lookbehind, could be made non-capturing using ?:.

I missed that comment the first time around. Made the changes suggested; tests still pass. Also added the minified file.


[nri-bundle] Bumping Chart.yaml and requirements.yaml after logging update

Is this a new chart
No
What this PR does / why we need it:
Updates newrelic-logging version in requirements.yaml and bumps Chart.yaml version.
Which issue this PR fixes
N/A
Special notes for your reviewer:
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[X] Chart Version bumped
[X] Variables are documented in the README.md
[X] Title of the PR starts with chart name (e.g. [mychartname])

Related to https://github.com/newrelic/helm-charts/pull/593

Closing.  Will resubmit after the newrelic-logging update is merged.


Issue with MaterialLocalization?

Hi again,
I am getting an error thrown when trying to view my application on iOS. It works fine on android.
The layout/structure is:
PlatformApp
PlatformScaffold
PlatformAppBar
PlatformNavBar
body: PlatformScaffold
Form
Padding
SingleChildScrollView
Column
Material
Padding
Row
Expanded
DropdownButton
The error is as below:
No MaterialLocalizations found.
The ancestors of this widget were:
  : Row
    direction: horizontal
    mainAxisAlignment: start
    crossAxisAlignment: center
    dependencies: [Directionality]
    renderObject: RenderFlex#2426d relayoutBoundary=up17 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE OVERFLOWING
  : Padding
    padding: EdgeInsets(0.0, 0.0, 0.0, 20.0)
    dependencies: [Directionality]
    renderObject: RenderPadding#a59c2 relayoutBoundary=up16 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
  : Material
    type: canvas
    color: Color(0xfffafafa)
    dependencies: [_EffectiveTickerMode, _LocalizationsScope-[GlobalKey#f63ef], _InheritedTheme]
    state: _MaterialState#69aac
  : Column
    direction: vertical
    mainAxisAlignment: start
    crossAxisAlignment: center
    renderObject: RenderFlex#7d8e5 relayoutBoundary=up13 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
  : SingleChildScrollView
    dependencies: [PrimaryScrollController]
  : Padding
    padding: EdgeInsets.all(20.0)
    dependencies: [Directionality]
    renderObject: RenderPadding#8afcc relayoutBoundary=up5 NEEDS-LAYOUT NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
  : Form-[LabeledGlobalKey<FormState>#dea36]
    state: FormState#34568
  : PlatformScaffold
    dependencies: [MediaQuery, _LocalizationsScope-[GlobalKey#f63ef], _InheritedTheme]
  : FleischnerForm
    dependencies: [_LocalizationsScope-[GlobalKey#f63ef], _InheritedTheme]
    state: FleischnerState#2604c
  : PlatformScaffold
    dependencies: [MediaQuery, _LocalizationsScope-[GlobalKey#f63ef], _InheritedTheme]
  : Fleischner
    dependencies: [_LocalizationsScope-[GlobalKey#f63ef], _InheritedTheme]
  : PlatformApp
    dependencies: [_LocalizationsScope-[GlobalKey#a0bfb], _InheritedTheme]
  : MyApp
  : MaterialApp
    state: _MaterialAppState#779b8
  ...
The relevant error-causing widget was:
  DropdownButton<String>

I have tried changing to simple Scaffold (not PlatformScaffold) and you can see that I've added a Material widget above DropdownButton but it still throws the error.
Is this a flutter issue or to do with the Platform widgets?

Since you are using a PlatformApp any use of a Material widget becomes a bit harder when viewed in iOS. PlatformApp under to hood will use CupertinoApp so you will need to manually set the localizations yourself.
Have a look at the example which resolves this:  https://github.com/aqwert/flutter_platform_widgets/blob/5f9f9b659fad7689c8ce8f200fa84de6689a7eb3/example/lib/main.dart#L80
Also there is an answer on Stackoverflow: https://stackoverflow.com/a/55919047/373706

@aqwert
It's in the docs! I'm so sorry, I didn't mean to waste your time.
Thanks for pointing me to the answer, and sorry again! :-)


Convert to .NET 6, made style consistent in System.Activities

Made the following changes:

Updated to .NET 6
Converted to file-scoped namespaces
Added global usings for common namespaces
Non-static fields prefixed with underscore, removed this.
Used expression body for properties, accessors, and methods where applicable
Followed suggested fixes from IDE
Renamed #if regions specific to dynamic update feature to #if DYNAMICUPDATE. There's no intent to support dynamic update so this makes it easier to remove.
Removed dead code
Split out the inner classes of some of the larger (>1000 line) files

No public surface area was changed. All tests pass.
Also added a Performance test using Benchmark .NET. It only contains one test so far to validate a XAML with 400 expressions. Results before and after moving to .NET 6 are below. Validate calls CacheMetadata on each activity in the workflow. For VB each expression is compiled individually. For C#, a CompiledExpressionInvoker is created but the expression compilation is not performed. In the .NET Framework, all the C# expressions were compiled at the end using MSBuild. This is why SkipExpressionCompilation, which uses VB, and CSharp test cases below have the same speed.
Targeting .NET 5
No changes to dependencies. Using .NET 6 SDK.
BenchmarkDotNet=v0.13.1, OS=Windows 10.0.19043.1348 (21H1/May2021Update)
Intel Core i7-8700 CPU 3.20GHz (Coffee Lake), 1 CPU, 12 logical and 6 physical cores
.NET SDK=6.0.100
  [Host]     : .NET 5.0.12 (5.0.1221.52207), X64 RyuJIT
  DefaultJob : .NET 5.0.12 (5.0.1221.52207), X64 RyuJIT

Method
Mean
Error
StdDev
Ratio
RatioSD

SkipExpressionCompilation
3.423 ms
0.0073 ms
0.0065 ms
1.00
0.00

VB
8,251.088 ms
142.3681 ms
133.1712 ms
2,404.58
33.59

CSharp
3.385 ms
0.0117 ms
0.0110 ms
0.99
0.00

Targeting .NET 6
No changes to dependencies. Using .NET 6 SDK.
BenchmarkDotNet=v0.13.1, OS=Windows 10.0.19043.1348 (21H1/May2021Update)
Intel Core i7-8700 CPU 3.20GHz (Coffee Lake), 1 CPU, 12 logical and 6 physical cores
.NET SDK=6.0.100
  [Host]     : .NET 6.0.0 (<IP_ADDRESS>210), X64 RyuJIT
  DefaultJob : .NET 6.0.0 (<IP_ADDRESS>210), X64 RyuJIT

Method
Mean
Error
StdDev
Ratio
RatioSD

SkipExpressionCompilation
5.117 ms
0.0164 ms
0.0137 ms
1.00
0.00

VB
6,808.368 ms
48.6314 ms
43.1104 ms
1,330.04
8.30

CSharp
5.098 ms
0.0205 ms
0.0171 ms
1.00
0.00

We don't need anything in .Net 6 at this time, so no actual benefit, and the downside is that I'm forced to use VS 2022.

Maybe I'm missing smth, but the first test runs on .Net 5 and the second on .Net 6. But you can always run the version targeting .Net 5 on .Net 6. And I wouldn't expect much of a difference then.


BuddyBuildSDK Integration

@christopherstott, here's the BuddyBuildSDK. You'll get an email that lets you install and try out the build

Feedback from<EMAIL_ADDRESS>: Dbdbfb


Ensure /usr/bin is in PATH for macOS

This is an alternative fix to what was included in #105.
Thanks for @rrbutani for discovering the underlying issue.

@dozzman Would you prefer this solution instead of the symlink?

@siddharthab it'll be interesting to see what CI says but I don't think this actually works; rustc isn't actually removing anything from $PATH afaik (the snippet I linked to is where it searches for tools when the linker isn't explicitly specified)

CI passed on the version before the comment change/force push 😃.

As mentioned on the other issue, I think it's actually this bit in rules_rust that's responsible for dropping /usr/bin from $PATH.
rules_rust actually uses cc_common.get_environment_variables to get the env vars to use in its invocation; I wonder if there's a way to get that function to keep /usr/bin in the $PATH.
Regardless, I think this is a better fix in #105 so that, as you mentioned, users can provide their own LLVM repos without needing patches or accidentally breaking macOS host support.

rules_rust actually uses cc_common.get_environment_variables to get the env vars to use in its invocation; I wonder if there's a way to get that function to keep /usr/bin in the $PATH.

It's really cc_common.create_link_variables which calls this.

It's really cc_common.create_link_variables which calls this.

Ultimately these come from the env_sets on features (i.e. grep for env_entries in this file) which (predictably, understandably, etc.) don't influence $PATH.
Still trying to figure out how/where $PATH actually gets set in rules_rust.

Still trying to figure out how/where $PATH actually gets set in rules_rust; it's not coming from link_env.

$PATH really is unset when rules_rust calls its process wrapper and it's still unset when the process wrapper calls rustc.
Not sure where along the way from Bazel -> process_wrapper -> rustc -> cc_wrapper.sh -> clang $PATH is getting set again but it doesn't really matter. It makes sense that $PATH is essentially getting set to $PWD.
Adding /usr/bin back into the $PATH feels a little hacky but it doesn't actually pose any problems and I can't think of a better solution.

Specifying -B /usr/bin works but I don't know if that's really any better.

If rules_rust does not provide PATH in the env it is using for rustc (evident when you run bazel build -s and see that PATH is missing from the env in the invocation of process-wrapper, and confirm that their process-wrapper also does not set PATH in the env it is using for rustc), then this block in rustc will set the path to "/bin".

One more thing. To confirm that the expected behavior would happen if PATH was not set to /bin:
% env -i /bin/bash -c 'echo ${PATH}'
/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:.
% env -i PATH=/bin /bin/bash -c 'echo ${PATH}'
/bin

@siddharthab When you add echo $PATH > /tmp/whatever to cc_wrapper.sh do you actually get PATH=/bin? I just get the Rust toolchain bin dir (i.e. /private/var/tmp/_bazel_rahulbutani/729ef14ca5fc8012394a84396ed546ff/external/rust_darwin_x86_64/lib/rustlib/x86_64-apple-darwin/bin on my machine).

@siddharthab When you add echo $PATH > /tmp/whatever to cc_wrapper.sh do you actually get PATH=/bin? I just get the Rust toolchain bin dir (i.e. /private/var/tmp/_bazel_rahulbutani/729ef14ca5fc8012394a84396ed546ff/external/rust_darwin_x86_64/lib/rustlib/x86_64-apple-darwin/bin on my machine).

^ is actually consistent with what this code snippet is doing: sysroot + rustlib + bin

This snippet is a good find but it only extends $PATH. Together with ^ it explains the behavior we're seeing; $PATH is unset until we reach cc_wrapper.sh where it's set (by rustc as you correctly surmised).

One more thing. To confirm that the expected behavior would happen if PATH was not set to /bin:
% env -i /bin/bash -c 'echo ${PATH}'
/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:.
% env -i PATH=/bin /bin/bash -c 'echo ${PATH}'
/bin

Sorry I'm not sure if I'm understanding correctly; are you saying the $PATH would still contain /usr/bin if not for rustc?
As mentioned, rustc is extending $PATH and $PATH is unset to begin with. If you replace the process wrapper in rules_rust with a script that dumps env somewhere you can observe this.
In your example, env -i /bin/bash -c 'echo ${PATH}' still prints out the default ${PATH} despite -i because of bash's defaults (if $PATH is unset it populates it, I think – if you run env -i /bin/bash --norc --noprofile -c 'echo ${PATH}' it's empty as expected).

bash also doesn't seem to do that when running scripts; if you do env -i bash /tmp/record where /tmp/record is:
#/usr/bin/env bash

env > /tmp/dump

/tmp/dump just has $_, $PWD, and $SHLVL (on my machine at least)

None of this ultimately changes the fix but I do think it's not accurate to blame rustc for the $PATH not having /usr/bin (that's because of rules_rust and it seems like an entirely sensible choice). You're absolutely correct that rustc is adding {sysroot}/{rust_lib}/bin to $PATH though.

My apologies if it felt like I was blaming rustc. I don't think either rules_rust or rustc are doing the wrong thing. That is why I did not advise filing an issue. Ideally, users should be setting --action_env=PATH=.... and then rules should be honoring that (I did not confirm this behavior with rules_rust).
I also don't think that symlinking is a worse solution. It is actually a more precise solution and is guaranteed to work no matter what the value of PATH is. I was merely trying to explain why only the linker in rules_rust was not working, whereas it was working for rules_cc and rules_go, and my main thought in pursuing this solution was that it makes life easier for people who are using the toolchain_roots attribute with http_archive or local_repository based LLVM distributions.
I don't have a lot of time to give this, so happy to just abandon and leave things at the current state.
I don't know how to read Rust, so on reading that code fragment, I initially thought that the PATH would be set to /bin, but I was wrong. I have changed my comment to reflect the new understanding.

@siddharthab When you add echo $PATH > /tmp/whatever to cc_wrapper.sh do you actually get PATH=/bin? I just get the Rust toolchain bin dir (i.e. /private/var/tmp/_bazel_rahulbutani/729ef14ca5fc8012394a84396ed546ff/external/rust_darwin_x86_64/lib/rustlib/x86_64-apple-darwin/bin on my machine).

That's also what I get (I had a misunderstanding before). Across all build actions for @git2:all:
   4 PATH=_my_env_path_
  15 PATH=..../external/rust_darwin_x86_64/lib/rustlib/x86_64-apple-darwin/bin
 219 PATH=/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:.

bash also doesn't seem to do .... where /tmp/record is:
#/usr/bin/env bash

env > /tmp/dump

I am not claiming that env contains PATH (it is still unset). I am saying that bash will use a default value when finding programs. Instead of env > /tmp/dump, try echo "$PATH" or even better, just run ld itself: ld -v.

My apologies if it felt like I was blaming rustc.

oh not at all!
Using the word "blame" was a poor choice on my part. I was just trying to say that I didn't think rustc was resetting the $PATH and wasn't trying to make any kind of judgement about the "source" of the problem.

I also don't think that symlinking is a worse solution. It is actually a more precise solution and is guaranteed to work no matter what the value of PATH is. I was merely trying to explain why only the linker in rules_rust was not working, whereas it was working for rules_cc and rules_go, and my main thought in pursuing this solution was that it makes life easier for people who are using the toolchain_roots attribute with http_archive or local_repository based LLVM distributions.

I absolutely agree! I think that reason alone is a compelling reason to make this change.

bash also doesn't seem to do .... where /tmp/record is:
#/usr/bin/env bash

env > /tmp/dump

I am not claiming that env contains PATH (it is still unset). I am saying that bash will use a default value when finding programs. Instead of env > /tmp/dump, try echo "$PATH" or even better, just run ld itself: ld -v.

oh good catch! That's very interesting behavior; I didn't realize bash would use a default $PATH when $PATH without it actually being visible to subprocesses (like env).
I think in our specific case this bit of behavior actually doesn't save us. Running ld -v in /tmp/record totally works, as you mentioned, but running clang -v -xc++ - <<<"int main() { }" does not – because the default $PATH value isn't passed down to clang, when clang goes to run ld it still fails.

I don't have a lot of time to give this, so happy to just abandon and leave things at the current state.

Sorry, I didn't mean to make this more difficult; I just really wanted to get to the bottom of what was causing the issue.
Regardless, I think we have a pretty good understanding now and I'm definitely happy with this PR as is.

I think in our specific case this bit of behavior actually doesn't save us. Running ld -v in /tmp/record totally works, as you mentioned, but running clang -v -xc++ - <<<"int main() { }" does not – because the default $PATH value isn't passed down to clang, when clang goes to run ld it still fails.

Thanks. I have now removed that comment. I think then things were working elsewhere because in all other rules, PATH is retained from the user environment or set to a reasonable default.

If I run bazel with --experimental_strict_action_env, all actions are run with an empty environment. In this case,

rules_rust fails because of what we know.
rules_cc works because it sets the default path to /bin:/usr/bin:/usr/local/bin
rules_go works because it ensures /usr/bin is in PATH.

I think this PR is now OK to be merged if @dozzman is OK with this approach. Will wait for them to comment.


GUI for sort type

Currently Sort Command is not sort for once, instead, it's like a switch for different sorting type. To make it more clear to users, we decided to add 'Sort By: ' section to GUI.

I hope it can be 1.4.


Improvement ActiveHash::Base#find_by

Use find_by_id to search by id and omitted unnecessary loop. (find is using find_by_id)
Has become possible to search by id of string.
# Country.data = [{:id => 1, :name => "US"}]
Country.find("1") #=> return record
Country.find_by(id: "1") #=> before returns nil, after returns record

This looks great

Thanks for your reply. I removed test of private method.
(and fixed id value to string from int)

@i2bskn oh noes. Those tests were great - just send them through the public.
Can you reflog those tests and put them in, just going through the public interface?
If not, then it is all good.

@kbrock Sorry for misunderstanding. Is this alright? (put the test to .find_by block)
Or match_options? execute through ActiveHash::Base.find_by? (e.g. Country.find_by(:name => "US").should_not be_nil)

You will still have the tests, but it will be testing against a public interface.
This is looking great

I was fixed it :bow:

@zilkey any thoughts before I merge?

@zilkey Not sure the right course of action here. If you look at how rails defines find_by, all.first makes sense.
def find_by(*args)
  where(*args).take
rescue RangeError
  nil
end

Seems that when in doubt, defer to rails. But it is tricky when this changes the current way an api works.

closing this - prefer #117 (which has some of this PR in it)


Directive not setting country class

Generated template is:

Should be:

But not setting the fr for some reasons.

Hi, I found the solution about that. The problem is trivial: directive doesn't set the attributes in the scope, so they won't be visible in the template.
See also http://stackoverflow.com/a/17346130/471213

Good call, thanks for the PR.

Can we get this change merged in please?


Apply Android Studio Code Styles Ktlint

What I have done and why
Set Ktlint style android_studio to follow Google’s Android coding standards for source code
Remove editorConfigOverride and set ktlint_code_style android_studio in editorconfig.

Move editorConfigOverride android (deprecated) to editorconfig.

-a or --android: Turn on Android Kotlin Style Guide compatibility. This flag is most likely to be removed in a future version. Use .editorconfig ktlint_code_style.

Set ktlint_code_style android_studio link
Add root=true in .editorconfig. link

root: special property that should be specified at the top of the file outside of any sections. Set to true to stop .editorconfig files search on current file.

Need to discussion about:

rule: standard:max-line-length link
import alphabetic ordering link

Android Studio style ktlint was set max-line-length(100) and alphabetic ordering imports as default value.
If you don't agree with these two rules.

If it is fine, merge it!
Fix #1362
How I'm testing it
Choose at least one:

Unit tests
UI tests
Screenshot tests
[x]  N/A (provide justification)

It makes sense to use the android_studio code style so I'm happy for us to merge this once the conflicts have been resolved.
@Jaehwa-Noh are you happy to do that?

@dturner Yes, I'm very welcome to do that.


Roll Flutter Engine from b020893cba29 to cc6cf5fc0db3 (4 revisions)

https://github.com/flutter/engine/compare/b020893cba29...cc6cf5fc0db3
2023-11-10<EMAIL_ADDRESS>Temporarily disable test UnobstructedPlatformViewTests testMultiplePlatformViewsWithOverlays (flutter/engine#47883)
2023-11-10<EMAIL_ADDRESS>Roll Skia from 5075f1572bfe to e23e328584a1 (3 revisions) (flutter/engine#47900)
2023-11-10<EMAIL_ADDRESS>Roll Dart SDK from 33307e78db2b to 5075ac874117 (3 revisions) (flutter/engine#47899)
2023-11-10<EMAIL_ADDRESS>Roll Fuchsia Linux SDK from 0pD5ceqf-e9y9NTNn... to 8sk2n2-NXJ-ceyc7T... (flutter/engine#47898)
Also rolling transitive DEPS:
fuchsia/sdk/core/linux-amd64 from 0pD5ceqf-e9y to 8sk2n2-NXJ-c
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC bdero@google.com,rmistry<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Commit queue failed; closing this roll.


Automate doc generation and pushing

following #314
There are three stages of doc generation, each currently done manually.

autogenerate-bloqs-notebooks.py takes a list of Bloq objects and writes stub notebooks and refreshes the docstrings in existing notebooks. The output is unexecuted notebooks that are committed to the repository
(a) execute-ntoebooks.py will execute all of the un-executed source-controlled notebooks and put executed versions in docs/. This is used by the CI to check that the notebooks run successfully. (b) build-reference-docs.py will extract docstrings and stuff and put markdown files in docs/. These autogenerated files are manually pushed to a separate docs git branch.
Sphinx takes the executed notebooks, the reference markdown files, and some additional hand-written files in docs/ and turns it to html. This is run via the readthedocs runner.

The task is to move to an automated pipeline

[ ] I think stage 1 will be manual for now, since the autogenerated output is just a stub for a complete doc and we want developers to write additional hand-authored documentation. We could add a CI check that the autogenerated parts are up-to-date and if they are not the PR author would re-run this script and commit the result
[ ] Stage 2 should likely be automated but it's not clear exactly how. For runners, we could use github CI or readthedocs. For cadence: we could do every PR, regularly scheduled (nightly?), or try to do it on PRs that would change the output. A concern is that the autogeneration output is not byte-for-byte reproducible. Output contains timestamps and stochastic ordering of outputs. This could create churn or break html cacheing or throw off the "is anything changed" checker.
[ ] Stage 2 outputs render nicely on GitHub.  With what cadence? How do we handle churn? How would this be automated? A requirement is that this would not disrupt or clutter normal PR review
[ ] Stage 3 is currently nice and fast and straightforward on readthedocs (c.f. #280 ). We should turn sphinx warnings into errors and maybe have this as a PR CI check
[ ] Checks for clean notebooks like #190

I documented these stages in a readme file as part of #467

I'll just add here that I'd love it if the executed notebooks were committed to GitHub if possible. It's nice to be able to see them alongside the source.


Hi! friend! How to programmatically bind shortcut keys for custom extension icons in vscode sidebar? 🙏

Please help! Thank you very much 🙏
Hi! friend!
How to programmatically bind shortcut keys for custom extension icons in vscode sidebar?
I've tried various ways but can't achieve this, so I'm asking for your help! Thank you very much 🙏!

    "contributes": {
        "viewsContainers": {
            "activitybar": [
                {
                    "id": "DocSidebar",
                    "title": "Doc Sidebar",
                    "icon": "images/doc.png"
                }
            ]
        },
        "views": {
            "DocSidebar": [
                {
                    "id": "MyDoc",
                    "name": "Doc Sidebar",
                    "when": "editorTextFocus
                }
            ]
        },
......

Use the keybindings contribution point to do this
"keybindings": [
      {
        "command": "containerId",
        "key": "key",
        "when": "isInDiffEditor"
      },
]

After many attempts, this way doesn't work. . .


LiteNetLib.NetManager.BindSocket(Socket socket, IPEndPoint ep), errorCode: AddressNotAvailable

Information about bug or feature
Server started on port 1234
[B]Bind exception: System.Net.Sockets.SocketException (10049): The requested address is not valid in its context.
at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at LiteNetLib.NetManager.BindSocket(Socket socket, IPEndPoint ep), errorCode: AddressNotAvailable
//Some c# code if needed
                Console.WriteLine("Server started on port 1234");

                EventBasedNetListener listener = new EventBasedNetListener();
                NetManager server = new NetManager(listener);
                server.DisconnectTimeout = 999999999;
                IPAddress ipa = IPAddress.Parse("<IP_ADDRESS>"); // works if localip is used socket not in use and port forwarded
                server.Start(ipa, IPAddress.IPv6Any, 1234);

Library version: [commit id (9f2a1d1a8244510d9ec502cc002bfdddba666d09) or release version (<IP_ADDRESS>)]
Framework: [dotnetcore]
OS: [Windows]

@neonzz1 you cannot bind socket to an external address if you not connected directly without router. This is how sockets works, this is not bug. Just use IPAddress.Any or just simple Start method with port.

This doesn't expose traffic to the web therefore only people on local network can connect


[Docs] Add material-auto-rotating-carousel to related projects

Yet another composed component from us. :smiley:

That looks great! I couldn't help myself tweeting about it.
Two things you could improve:

Low width screen display:

Add a keyboard navigation?

@oliviertassinari Thanks for tweeting! :heart_eyes:

On low width landscape displays, the mobile and landscape options should be set, but I see that this isn't an option on desktop devices. We'll fix that.
:+1:


Added recursive search of functions rather than linear search

I think recursive function is good and also the *args is in sorted order so i changed it into **kwargs

@rohanailoni , correct me if am wrong but does this PR add a recursive implementation and performs a deep search on the specified function?

@rohanailoni , correct me if am wrong but does this PR add a recursive implementation and performs a deep search on the specified function?

yeah it recursively(dfs) search until it get the fun_name==inner_name so it return only function but I havent though about if there are multiple function it will just return the first found
Is return a function(if not found None) preferable or a list is preferable?

@rohanailoni , apologies for the late review. I am having some busy days. :(
Initially, I only meant this to be a top level search. But now if we want to consider a recursive search, how do you plan to handle an instance where there is a top level and a nested function of the same name?
Also, let's change the name from nestd to get_nested_function as nestd/nested don't really do enough justice to explain the purpose of the function.

I have seen this message long age :sweat_smile: but couldn't answer there are lot of interviews are going on
I also though about return instance I have written code for both but only commited one
This return only top nested function
def nestd(fx,inner_name,**free_vars):
    """Find the code object of an inner function recursively and  return it as a callable object.

    Arguments:
        fx (function or method): A function object with an inner function.
        inner_name (str): The name of the inner function we want access to
        **free_vars (dict(str: any)): A dictionary with values for the free
            variables in the context of the inner function.
    Returns:
        A function object for the inner function, with context variables set or None if none of the function matches with inner_name.
    """
    if not isinstance(fx,(types.FunctionType,types.MethodType)):
        raise Exception("Supplied param is not a function or a method type")
    fx=fx.__code__
    for const in fx.co_consts:
        if isinstance(const,types.CodeType):
            if const.co_name==inner_name:
                return types.FunctionType(const,globals(),None,None,tuple(free_var(free_vars[name]) for name in const.co_freevars))
            else:
                fun=nestd(types.FunctionType(const,globals(),None,None,tuple(free_var(free_vars[name]) for name in const.co_freevars)),inner_name,**free_vars)
                """"This recusrive function may return None that means There is no funciton with matching name in the given depth so insted of stoping it goes for another depth."""
                """But if it returns some function then the match is found"""
                if(fun!=None):
                    return fun
    return None

This one return a list of all the functions in top down(recusive depth search is used) so first function to be mached with inner_name will be on top of list(lower index)
def nestd(fx,inner_name,**free_vars):
    """Find the code object of an inner function recursively and  return it as a callable object.

    Arguments:
        fx (function or method): A function object with an inner function.
        inner_name (str): The name of the inner function we want access to
        **free_vars (dict(str: any)): A dictionary with values for the free
            variables in the context of the inner function.
    Returns:
        A function object for the inner function, with context variables set or None if none of the function matches with inner_name.
    """
    if not isinstance(fx,(types.FunctionType,types.MethodType)):
        raise Exception("Supplied param is not a function or a method type")
    fx=fx.__code__
    cache=[]
    for const in fx.co_consts:
        if isinstance(const,types.CodeType):
            temp=types.FunctionType(const,globals(),None,None,tuple(free_var(free_vars[name]) for name in const.co_freevars))
            if const.co_name==inner_name:
                cache.append(temp)
            fun=nestd(temp,inner_name,**free_vars)
            cache+=fun
    return cache

And I am not sure which one of the both method is much benificial as i haven't worked much on nested function
Also though of any datastrcture to be return in place of list(in the second code) but couldnt get any better idea
In the present library there are 3 functions

nested
get_all_nested
get_all_deep_nested

Ig get_all_nested is of no use as get_all_deep_nested can also work like the preceding function

Also, let's change the name from nestd to get_nested_function as nestd/nested don't really do enough justice to explain the purpose of the function.

I agree with that

@rohanailoni , no worries :D

This one return a list of all the functions in top down(recusive depth search is used) so first function to be mached with inner_name will be on top of list(lower index)

If we are just returning the top function, then I don't see a reason to implement a recursive search. As we have get get_all_deep_nested.

Ig get_all_nested is of no use as get_all_deep_nested can also work like the preceding function

get_all_nested is the function that returns top level functions and get_all_deep_nested returns the entire tree. No?

get_all_nested is the function that returns top level functions and get_all_deep_nested returns the entire tree. No?

Yeah It returns a dict And i got your point from days i was in a dilemma on why to get only top level now i got it .It is like a use-case for a user to only toplevel functions

@rohanailoni , perfect then :D


Restrict user input length

Maximum user input length is set to be 60. This partially resolves #112

Todo:
Limit max tag number.

Looks good :) just a suggestion though, would it be possible for a user to input long names/tags but have d excess be converted to "..." instead? e.g. "Gift from gdadda....."


feat: identify LOC with UUID.

logion-network/logion-internal#174

Nevermind, for some reason (lack of sleep I guess... -_-') I was taking the false hypothesis that a UUID was holding on 32 bytes, but that's only for the string representation (without the dashes). The internal representation of a UUID is only 16 bytes wide and thus holds on a u128, which is already handled by current implementation. I am therefore closing the PR as the job will be done frontend-side.


conflict with android-apt plugin

hello  @JakeWharton
I used butterknife version 7.0.1 before and it work well, but when I update to the verion of 8.4.1, it cant work.

you said: Note: If you are using the new Jack compiler with version 2.2.0 or newer you do not need the 'android-apt' plugin and can instead replace apt with annotationProcessor when declaring the compiler dependency.

I remove the "android-apt" plugin and replace apt with annotationProcessor, everything is good.But actually I need the "android-apt" plugin, because my project used dagger2(It need apt). So the trouble is that if I add the apt plugin then butterknife can't work, or if I remove the apt plugin then dagger2 can't work.
I don't know how to fix this issue.Count you give me some advice? I am crazy now./(ㄒoㄒ)/~~

You can use annotationProcessor with Dagger. This is a build system configuration and has nothing to do with BK or Dagger. You either use android-apt or the built-in support for any annotatoin processor dependency.


[pyspark-dependencies] - DockerFile does not automatically move the tar.gz file to the local folder

Hi,
Trying to execute the first two command lines listed in the readme file
docker build --output . .; aws s3 cp pyspark_ge.tar.gz s3://${S3_BUCKET}/artifacts/pyspark/
I noticed that the file pyspark_ge.tar.gz was not loaded locally. I had to run the container related to the image built with the previous command and next the Docker cp command.
I was wondering if it was just my problem. If not I volunteer to update the documentation with the two additional commands I had to run.
Thank you very much.

Hi @anselboero - a couple questions.

What's the output of your docker version command? The --output flag is only available as of API version 1.40+
Are you running your Docker host locally?

Thank you for your prompt reply.

this is the output of the docker version command (I think the API version is 1.41)

Client: Docker Engine - Community
 Version:           20.10.18
 API version:       1.41
 Go version:        go1.18.6
 Git commit:        b40c2f6
 Built:             Thu Sep  8 23:11:43 2022
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.18
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.18.6
  Git commit:       e42327a
  Built:            Thu Sep  8 23:09:30 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.8
  GitCommit:        9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
 runc:
  Version:          1.1.4
  GitCommit:        v1.1.4-0-g5fd4c4d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Yes, I'm running Docker host locally on Ubuntu 22.04. I could try to replicate the steps using an EC2 Instance with Amazon Linux 2 as AMI (even though I thought we are using Docker in order to isolate the environment. I'm not a virtualization expert, sorry :) )
Thank you

Hm, ok, let me give it a try on Linux real quick. It should run fine.

Ah, think I figured it out. The custom build outputs feature requires the BuildKit backend.
You should be able to use either of the following commands. I'll add a note about this to the README.
docker buildx build --output . .

DOCKER_BUILDKIT=1 docker build --output . .

great, it worked!
Thank you very much for your help


Add support for defining namespace index in nodesfile

Please provide us with the following information:

This issue is for a: (mark with an x)
- [ ] bug report -> please search issues before submitting
- [x] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Any log messages given by the failure

Expected/desired behavior
In some cases it would be very useful to be able to define the OPC UA namespace index to be able to simulate PLCs having the user defined tags in a different namespace index than the currently hardcoded ns=3 where all the tags defined in nodesfile are.
OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

Versions

Mention any other details that might be useful

@techmantel thanks for suggesting this. We are evaluating how we can help here best.


Start working with tests

First set of basis tests:

[ ] Server loads and display pages
[ ] Fixture data pre-process
[ ] Results are expected

I don't know yet how to start the server before mocha makes the server tests.

The osrm build process takes most of the time. We might be able to get away pulling a precompiled "travis environment" version .... Thoughts? @stvno


Update Boost installation process in Docker images

Verify PGP signature (because our failure rate for not being able to download key is not high enough) and do not require to find out the SHA256 of a release.

Retest this please


Contributing guidelines?

Some PR's get a comment with /verify in them. Is that part of a guideline? I can't find any..

No, just GitHub Actions


[l10n] Add it-IT translation for labelDisplayedRows

The translation for labelDisplayedRows was missing so when using a component that required it (e.g, the the DataGrid component from the mui-x library), the default one (english) was used.

[x] I have followed (at least) the PR section of the contributing guide.

@frab90 It's a great first pull request on MUI 👌🏻. Thank you for working on it!

Glad to provide my very first contribution to an open source project to such an awesome project! Thanks @oliviertassinari for all the work you do on this library 🚀


Handling on-submit validation correctly

I've got a fairly simple payment form in my app, with the usual fields (card number, CVV, expiration date, and zip code). The form has frontend validation for the simple things (Luhn10, ensuring MM/YY expiration is valid, ensuring zip and CVV are numbers), but, of course, most of the errors encountered in payment are things that can only be checked on submission (e.g. incorrect CVV, declined card).
I was hoping to use React-Redux-Form's built-in errors and validity to handle these on-submit errors, but had a lot of trouble doing so.
Async Field Errors on Submit
First, I was hoping that, in the case of an error being tied directly to a field (e.g. a failed CVV check is tied to the CVV field), I could highlight the field in question. I figured the easiest way to do this would be to simply use setValidity from the submission error handler:
if (error.type === 'card_error') {
  if (error.param === 'cvv') {
    dispatch(rrfActions.setValidity('forms.addPayment.cvv', {stripe: false}, {async: true});
  }
}

The obvious problem here is that, now, my fields are permanently invalid! To try to solve this, I attempted to have my form reset errors on change:
resetStripeErrors() {
    this.props.dispatch(actions.resetValidity(MODEL_NAME, ['stripe']));
}

render() {
    return (
        <Form
            model={MODEL_NAME}
            className="form"
            onSubmit={(values) => this.handleSubmit(values)}
            onChange={() => this.resetStripeErrors()}>
            {/* ... */}
        </Form>
    )
}

However, when I add this onChange handler to the form, the entire form and all of its fields are made valid on initial render for reasons I do not understand.
#596 appears to sort of track this issue. I'm extremely confused about how "async" validations are supposed to work, but if the answer here is to consider these validations "async" and have a way to clear them specifically, that could help.
"Validity" of a Form With Submission Errors
The other major question I had was around using the errors of a model to track generic errors returned on submission. Not all errors correspond one to one with a field (for example, a login form might have a throttle). To model this use case, a form should be able to have "errors" without being "invalid."
I'm really unclear whether this is actually possible or not. #567 makes me think it should be, but this seems to be specific to the use case of ensuring the onSubmit() handler works. My particular problem is that if I set an error as recommended:
dispatch(rrfActions.setErrors('forms.addBillingProfile', 'Unknown error', {async: true}));

The model is marked as "invalid" until a blur event happens. This is a problem because my submit button is tied to the valid state of the form model:
    renderSubmit() {
        const getClassName = ({fieldValue}) => classNames('form--submit', 'button', '-large', '-primary', {
            '_disabled': !fieldValue.valid,
        });

        return (
            <Control.button model="." type="submit"
                mapProps={{className: getClassName}} disabled={{valid: false}}>
                Save Card
            </Control.button>
        );
    }

I would like for errors from submissions to not cause the form to be marked as "invalid" (unless they are tied to a specific field), so that a user can resubmit.
My current workaround for both of these problems has been to store submission errors in another reducer, ensuring that the validity of the form is never changed by submission. This, unfortunately, means:

I'm not able to highlight specific fields when a submission error is tied to a specific field
I have to duplicate my error state in another reducer, and carefully manage ensuring that it is properly reset on form submission and when the form is mounted/unmounted

I'm not actually sure whether the problems I've described are bugs, missing features, or if there's better way to handle my use cases. If either of the problems I've described are not intended behavior, I'd be happy to come up with code samples reproducing them :)

I think both issues can be solved by adding a new form property: .syncValid (and maybe .asyncValid). The current behavior is that you should be able to submit a form if only the sync validation is valid - that is, RRF ignores async validation when determining if a form could be submitted. The "is sync valid" state is just not exposed (yet). What do you think?

Bump: @thomasboyt do you think your use case will be solved with .syncValid and .asyncValid?

@davidkpiano I believe so. I'm not 100% convinced that "sync" and "async" are the right concepts for this - I guess in my head it's more "submission state" rather than "async state," but maybe I'm just overthinking things. Whatever the terminology, exposing "sync validity" seems like the right move.

Every time I revisit react-redux-form, I struggle with this very issue of mixing client side and server side validation errors.
I find myself regularly wanting to do something like:
class MyForm extends React.Component {
  constructor(props) {
    super(props)
    this.state = {
      isValid: true,
      error: null
    }
  }

  handleFormUpdate(form) {
    this.setState({ isValid: form.$form.valid })
  }

  handleSubmit(model) {
    this.setState({ error: null })
    const response = saveModelToServer(model)

    /* response shape
    {
      model: { ... },
      errors: [
        { key: 'email', messages: ['has already been take'] },
        ...
      ]
    }
    */

    if (!response.errors.length) return

    response.errors.map( error => {
      if (error.key) {
        this.formDispatch(actions.setErrors(`local.${error.key}`, { serverError: error.messages.join(', ') }))
      } else {
        this.setState({ error: error.messages.join(', ') })
      }
    })
  }

  attachDispatch(dispatch) {
    this.formDispatch = dispatch
  }

  render() {
    const { isValid, error } = this.state
    const { model, children } = this.props
    let renderedError

    if (error) {
      renderedError = <Alert>{ error }</Alert>
    }

    return (
      <LocalForm
        initialState={ model }
        onUpdate={ this.handleFormUpdate.bind(this) }
        onSubmit={ this.handleSubmit.bind(this) }
        getDispatch={ this.attachDispatch.bind(this) }
      >
        { renderedError }
        { children }
        <button type='submit' disabled={ !isValid }>Save</button>
      </LocalForm>
    )
  }
}

It feels clunky to have to import actions from the library, and attach dispatch to my component via a callback just for the purposes of setting errors. To me it'd feel more intuitive to pass errors to <LocalForm /> via a prop. Where the value passed would conform to same shape as the value passed to initialState, just with the error messages as the values.
Failing something along those lines, then a official example/pattern of how to get something like this working.
As it is, the above doesn't work since isValid stays false after the server responds. The only work around I can think of is:
handleFormChange(model) {
  if (!this.formDispatch) return
  Object.keys(model).map( k => {
     this.formDispatch(actions.setErrors(`local.${k}`, { serverError: false }))
  })
}

...

<LocalForm onChange={ this.handleFormChange.bind(this)  }>
  ...
</LocalForm>

But this is terribly hacky, especially as it loops through the model on every key press :( And it resets all "server errors" when any one field is touched.
If exposing .syncValid, and modifying the above to code to be setError( ... , { async: true }) does the trick, then great. But like @thomasboyt said, "async" doesn't feel quite like the right concept here. And would nice to a have a cleaner more straightforward API, especially when dealing with <LocalForm />.

Is there any news with this issue? I'm stacked with handling server error with RRF, as I also need to enable/disable "Next" button according to form state.
syncValid & asyncValid does make sense to me


[scalability] Changed binary directory of scalability runner and minimalkueue.

What type of PR is this?
/kind bug

What this PR does / why we need it:

Changed binary directory of scalability runner and minimalkueue to bin.

Which issue(s) this PR fixes:

Fixes #2075
Special notes for your reviewer:
Does this PR introduce a user-facing change?

None

/ok-to-test

/cc @alculquicondor

/remove-kind bug
/kind cleanup


add auth and http/auth types for SRA auth

Adds runtime types for SRA auth.

moved to https://github.com/aws/smithy-go/pull/456


Epic: local dev setup for serverless proxy

Motivation
With more adoption of serverless driver we got more requests for local and CI setups for proxy.
DoD
We have local setup that is:

fast to spin up and has small footprint
works without internet access (except for the setup)
provides working local connection string in one command

Implementation ideas
So far we had two ideas:

provide docker image that runs proxy+postgres
built proxy in our CLI, so that it can start listening for connections on neon dev command

Second approach is intriguing but it is way more work (e.g. we should distribute binaries in npm, like esbuild does) so it seems better to proceed with docker image approach for now.
For the local experience to be end-to-end we need the following things:

[ ] serverless driver supports unencrypted localhost conections both for WS and http
[ ] proxy can serve WS and http without TLS
[ ] build and publish docker image from the CI
[ ] add docs
[ ] mention loca
[ ] (potentially) write a blog post

So we can target for the following flow:
> docker run -p 4432:4432 neondatabase/proxy_local
Listening on 4432. You can use `postgres://test:test@localhost/testdb` for local development.

To make things easier to use I suggest to embed postgres into the image. At the same time it would be nice to support env var that can supply external postgres URL for cases when postgres is already configured.

Indeed, this would be awsome! 🚀
I tried to play with the wsproxy alone for a couple hours (https://github.com/neondatabase/wsproxy) but I suppose this is a bit outdated as it only serves websockets (and prometheus metrics) but the neon serverless client now seem to do fetch requests rather than websocket connections...
Something very simple for a start would be great (for instance, Docker images are great, but if you target development, this should be flexible enough as to permit all dev setups).

I already commend on the closed thread (https://github.com/neondatabase/serverless/issues/33#issuecomment-1710331914) but I think it makes sense to share it here too.
I've taken the steps from https://github.com/neondatabase/serverless/issues/33#issuecomment-1634853042 and created a Docker compose project to simplify the setup process for a local neon proxy + PostgreSQL DB when using the neon() http proxy setup.
You can find the repo here: https://github.com/TimoWilhelm/local-neon-http-proxy.

@kelvich I would consider this a high impact.
We almost didn't consider neon because our developers prefer to have a fully offline localhost development option. Installing docker and running docker is a huge burden for those of us who have simple infrastructure (node+postgres only in our case).
For a lot of folks considering neon, having neon appear like a drop-in replacement for postgres would remove a lot of hesitation. It's almost there except for the localhost experience :)
Perhaps this could be designed to work outside of the box? For example, the library could auto-detect whether a connection string is a neon string or a regular postgres string and use a built-in proxy to reduce the number of moving parts. Maybe wsproxy could be ported to javascript to reduce the number of moving parts and steps to installation.

A bit more context: https://github.com/neondatabase/serverless/issues/33

I tried to get pretty far on this using a bunch of different ws:// -> tcp:// proxy implementations but ended up getting FATAL:  invalid frontend message type 112 errors back on the postgres side... I haven't figured out yet where things got tripped up, but wanted to leave this here in case its useful for anyone else

For those arriving here, I did get this working... Here is my setup (big thanks for @kincaidoneil who cracked the code with disabling pipelineConnect):
import {
    Pool as NeonPool,
    neonConfig,
} from "@neondatabase/serverless";
import {
    PrismaNeon,
} from "@prisma/adapter-neon";
import { PrismaClient } from "@prisma/client";
import ws from "ws";

neonConfig.webSocketConstructor = typeof WebSocket !== "undefined" ? WebSocket : ws;

function buildNeonClient(databaseUrl: string, isLocalDevelopment: boolean): PrismaClient {
    // https://gist.github.com/kincaidoneil/bc2516111f0ec8850cd6020b8191b27b
    if (isLocalDevelopment) {
        neonConfig.pipelineConnect = false;
        neonConfig.useSecureWebSocket = false;
        neonConfig.wsProxy = () => "localhost:5433";
    }
    const neon = new NeonPool({ connectionString: databaseUrl });
    const adapter = new PrismaNeon(neon);
    const prisma = new PrismaClient({ adapter });
    return prisma;
}

Then, to make this work, run a websocket -> TCP proxy like this:
# Your database URL would point to this proxy, assuming postgres is at localhost:5432
# example: DATABASE_URL=postgresql://postgres:password@localhost:5433/postgres
wstcp --log-level debug --bind-addr <IP_ADDRESS>:5433 <IP_ADDRESS>:5432

For those arriving here, I did get this working... Here is my setup (big thanks for @kincaidoneil who cracked the code with disabling pipelineConnect):
import {
    Pool as NeonPool,
    neonConfig,
} from "@neondatabase/serverless";
import {
    PrismaNeon,
} from "@prisma/adapter-neon";
import { PrismaClient } from "@prisma/client";
import ws from "ws";

neonConfig.webSocketConstructor = typeof WebSocket !== "undefined" ? WebSocket : ws;

function buildNeonClient(databaseUrl: string, isLocalDevelopment: boolean): PrismaClient {
    // https://gist.github.com/kincaidoneil/bc2516111f0ec8850cd6020b8191b27b
    if (isLocalDevelopment) {
        neonConfig.pipelineConnect = false;
        neonConfig.useSecureWebSocket = false;
        neonConfig.wsProxy = () => "localhost:5433";
    }
    const neon = new NeonPool({ connectionString: databaseUrl });
    const adapter = new PrismaNeon(neon);
    const prisma = new PrismaClient({ adapter });
    return prisma;
}

Then, to make this work, run a websocket -> TCP proxy like this:
# Your database URL would point to this proxy, assuming postgres is at localhost:5432
# example: DATABASE_URL=postgresql://postgres:password@localhost:5433/postgres
wstcp --log-level debug --bind-addr <IP_ADDRESS>:5433 <IP_ADDRESS>:5432

I've noticed this works well when accessing the db from the front end (for example taking some action on the front end that calls an API route) but for some reason when I use Postman to hit the api endpoints directly it doesn't proxy the request correctly--the db call fails in the middleware.ts file. This is what the error looks like:
 ⨯ Error: All attempts to open a WebSocket to connect to the database failed. Please refer to https://github.com/neondatabase/serverless/blob/main/CONFIG.md#websocketconstructor-typeof-websocket--undefined. Details: fetch failed
    at eval (webpack-internal:///(middleware)/./node_modules/@neondatabase/serverless/index.mjs:1359:74)
    at async PrismaNeon.performIO (webpack-internal:///(middleware)/./node_modules/@prisma/adapter-neon/dist/index.mjs:385:79)
    at async PrismaNeon.queryRaw (webpack-internal:///(middleware)/./node_modules/@prisma/adapter-neon/dist/index.mjs:347:17)
    at async eval (webpack-internal:///(middleware)/./node_modules/@prisma/client/runtime/wasm.js:2:7537)

I don't have a solution yet but I'll update this if I figure something out

For those arriving here, I did get this working... Here is my setup (big thanks for @kincaidoneil who cracked the code with disabling pipelineConnect):
import {
Pool as NeonPool,
neonConfig,
} from "@neondatabase/serverless";
import {
PrismaNeon,
} from "@prisma/adapter-neon";
import { PrismaClient } from "@prisma/client";
import ws from "ws";
neonConfig.webSocketConstructor = typeof WebSocket !== "undefined" ? WebSocket : ws;
function buildNeonClient(databaseUrl: string, isLocalDevelopment: boolean): PrismaClient {
// https://gist.github.com/kincaidoneil/bc2516111f0ec8850cd6020b8191b27b
if (isLocalDevelopment) {
neonConfig.pipelineConnect = false;
neonConfig.useSecureWebSocket = false;
neonConfig.wsProxy = () => "localhost:5433";
}
const neon = new NeonPool({ connectionString: databaseUrl });
const adapter = new PrismaNeon(neon);
const prisma = new PrismaClient({ adapter });
return prisma;
}
Then, to make this work, run a websocket -> TCP proxy like this:
Your database URL would point to this proxy, assuming postgres is at localhost:5432
example: DATABASE_URL=postgresql://postgres:password@localhost:5433/postgres
wstcp --log-level debug --bind-addr <IP_ADDRESS>:5433 <IP_ADDRESS>:5432

followed all your steps and still get "Error: PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in unknown)." any tips


Use Liquibase and H2 for easier DB Management

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

Do you have a schema and database engine you are targeting for the Liquibase scripts?

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when multiple people try to modify database schema simultaneously.
Describe the solution you'd like
Start from this new release, we would try using the liquibase + h2 methodology.
I will create the liquibase yaml file for current and future DB changes. I will also create a detailed steps to follow in a confluence/wiki/readme file.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

Hey @surahman !  Long time no talk for sure!  I left this issue rather bare, @zhajikun has been working on it for me, I just didn't get around to assigning him the ticket. Sorry for the confusion.  I saw you made a comment on another ticket, I'll follow up there.
@zhajikun , please continue on, I'll update the issue here soon!


Temporarily reverting USB_STORAGE as a module since it breaks installer

This is a partial revert of the previous change of @eriknordmark
This revert takes care of making EVE installer barely functional (and opens up a possibility of making it fully functional while keeping @eriknordmark original intent).
Unfortunately, I don't think I can see a low hanging fruit here in any other way -- so at least for now this stopgap is the best we can do.
Longer term -- we need to either design a new boot protocol (we can potentially use multiple initrd tricks or build really custom initramfs modules) but all of that actually requires quite a bit of work on our build system.

Since I'm trying to make sure 5.9 gets to be much smoother than 5.8 -- I'm pulling this in now. @eriknordmark @deitch -- holler if you disagree -- but at least we'll have 5.8.2 to test tonight (we can always unrevert the revert if we feel like it ;-))

Hey @eriknordmark -- sadly a simple fix is not available in this case. The initrd file doesn't contain kernel modules, and I really would like to avoid making it contain those modules for now.
I have some thoughts of how we can fix it with turning the entire squashfs image into an initrd,  but that'll take some time to prototype.


root user should not be able to modify his role

Currently the root user can modify his role from admin to user. This should not be possible

e2f58b6 prevents any kind of modification on "root" user (including role, but also description).
Can you please check this solves your issue?


[Setup Help]:  Can't add bridge (no response) - docker setup

First of all, thanks again for this great piece of software!! :-)
Maybe somebody has an idea..
Since 1-2 weeks I can't connect to the homekit objects. Maybe there have been some changes... Does anybody have an idea for me or has the same issues?
Problem description:

Bridge is found while scanning.
After adding the bridge it tries to add.
"No response from device" comes up after 1-2 minutes.

Setup Help
Physical hardware device:

RPi4
docker
node-red:latest
homekit bridge library latest release (1.2.0)

Apple Setup:

Apple TV 4. Gen as Home
iPhone 8Plus / iPad Pro 2020 with latest iOS 14

HomeKit setup:

Switch Service
Bridge with default settings (PIN 111-11-111), allow message passthrough

Node-red container setup:

host mode
ports: 80:80 (TCP), 443:443 (TCP), 5353:5353 (UDP+TCP), 51827:51827 (TCP)
priviledged mode

Thanks for the indications! Have it working now!
I followed the link you posted and added the DNS info to the docker container and by creating a etc/docker/daemon.json as mentioned in the link:

primary <IP_ADDRESS>
second <IP_ADDRESS>

Different error came up "getaddrinfo ENOTFOUND localhost undefined"

Found an indication here.
added localhost definition to my etc/hosts file like indicated.

Everything works now. Even when I remove the DNS entries from the container...

So here is the update.
Reinstalled blankly

RPi4 4GB, arch linux latest
/etc/hosts file is empty
installed docker (+ portainer)
installed your docker image
add switch, add bridge
Result: Can't add! Error remains.

Added DNS to container

primary <IP_ADDRESS>
second <IP_ADDRESS>
Result: Can't add! Error remains.

With localhost definition

Added localhost definition to /etc/hosts
"<IP_ADDRESS>  localhost"
reboot
retry node-red container
Result: Worked !

@P1Rebo I am happy we solved it!
Everyone learned something.
If you want to chat with us about HomeKit or other home automations projects then join us on our Discord server.


creation of rates contract

Description
Concise description of proposed changes, We recommend using screenshots and videos for better description
Additional Information

[ ] I have read the contributing docs (if this is your first contribution)
[ ] This is not a duplicate of any existing pull request

Related Issues
Closes #{issue number}
Note: If your changes are small and straightforward, you may skip the creation of an issue beforehand and remove this section. However, for medium-to-large changes, it is recommended to have an open issue for discussion and approval prior to submitting a pull request.
Your ENS/address:

bro please write desciption

creation of rates (ETHAPR, Bitcoin interest rate) subscription contract, with proper documentation of code, It utilizes the data feed oracle contract.


Unable to add Microsoft.EntityFrameworkCore.InMemory v1.0.0 to UWP project

When I add Microsoft.EntityFrameworkCore.InMemory v1.0.0 NuGet package to UWP app project I get the below error. I am using VS2015 update 3. The error occurs even when adding the NuGet package to a new blank app.
System.Reflection.Emit.ILGeneration 4.0.1 provides a compile-time reference assembly for System.Reflection.Emit.ILGeneration on UAP,Version=v10.0, but there is no run-time assembly compatible with win10-x86-aot.
The full output of package manager is attached.
PackageManagerOutput.txt

Your log output shows downgrade warnings, which are the tip of the iceberg. This is caused by using an old version of Microsoft.NETCore.UniversalWindowsPlatform. Upgrade this to 5.2.0. (Be warned: the .NET team decided to unlist it so this version won't appear in NuGet UI #5902).
{
  "dependencies": {
    "Microsoft.NETCore.UniversalWindowsPlatform": "5.2.0",
    "Microsoft.EntityFrameworkCore.InMemory": "1.0.0"
  },
  "frameworks": {
    "uap10.0": {}
  },
  "runtimes": {
    "win10-arm": {},
    "win10-arm-aot": {},
    "win10-x86": {},
    "win10-x86-aot": {},
    "win10-x64": {},
    "win10-x64-aot": {}
  }
}

Just to update this thread, the new published version is 5.2.2.  This should be used in UWP whenever working with packages that use netstandard.


Add check for window in polyfills

When importing ngl for a Gatsby project, the build fails during server-side rendering:
12:29:17 PM: failed Building static HTML for pages - 4.560s
12:29:17 PM: error "window" is not available during server side rendering.
12:29:17 PM:   32 | }
12:29:17 PM:   33 |
12:29:17 PM: > 34 | if (typeof window.HTMLCanvasElement !== 'undefined' && !window.HTMLCanvasElement.prototype.toBlob) {
12:29:17 PM:      | ^
12:29:17 PM:   35 |   // http://code.google.com/p/chromium/issues/detail?id=67587#57
12:29:17 PM:   36 |   Object.defineProperty(window.HTMLCanvasElement.prototype, 'toBlob', {
12:29:17 PM:   37 |
12:29:17 PM:
12:29:17 PM:   WebpackError: ReferenceError: window is not defined
12:29:17 PM:
12:29:17 PM:   - ngl.esm.js:34 Module../node_modules/ngl/dist/ngl.esm.js
12:29:17 PM:     node_modules/ngl/dist/ngl.esm.js:34:1
12:29:17 PM:
12:29:17 PM:   - 404.js:1 Module../src/pages/404.js
12:29:17 PM:     src/pages/404.js:1:1
12:29:17 PM:
12:29:17 PM:   - memoize.esm.js:7 Object.Module._extensions..js
12:29:17 PM:     node_modules/@emotion/memoize/dist/memoize.esm.js:7:1

This occurs even if the ngl functions are called in a React componentDidMount() method.
Without fixing this, the following workaround can be used:
https://www.gatsbyjs.org/docs/debugging-html-builds/#fixing-third-party-modules

Thank you @itswil, looks good to me.


[Q] How to use W&B prompts with Langchain chains?

Hello,
How do we use W&BTracer with Langchain chains (not agents)?
When I try to use it like
from langchain import PromptTemplate, OpenAI, LLMChain

prompt_template = "What is a good name for a company that makes {product}?"

llm = OpenAI(temperature=0)
tracer = WandbTracer(wandb_config)

llm_chain = LLMChain(
    llm=llm,
    prompt=PromptTemplate.from_template(prompt_template),
    callbacks=[tracer]
)
llm_chain("colorful socks")

I get a warning that says
wandb: WARNING Skipping trace saving - unable to safely convert LangChain Run into W&B Trace due to: 'NoneType' object has no attribute 'lower'
and nothing gets logged to the wandb run. Could you please share an example of how to use W&BTracer with a Langchain chain?
langchain-0.0.209
wandb version - 0.15.4
code was run in the Quickstart Colab notebook. (https://colab.research.google.com/github/wandb/examples/blob/master/colabs/prompts/WandB_Prompts_Quickstart.ipynb)

Hi @makeshn! What are you running your script on? Is it A notebook, or a regular IDE? As well as are you running this on your local, self-hosted instance, or on wandb public cloud?

I am running it on Colab using the Quickstart Colab notebook. (https://colab.research.google.com/github/wandb/examples/blob/master/colabs/prompts/WandB_Prompts_Quickstart.ipynb)

Hi @makeshn! Morgan from W&B here. We recently upgraded the Prompts integration.
For langchain, this is now the preferred way to log to W&B
os.environ["LANGCHAIN_WANDB_TRACING"] = "true"

https://python.langchain.com/docs/ecosystem/integrations/agent_with_wandb_tracing
Please let me know if this isn't working for you :)

This worked for me. Is there away to do this with code/context managers without messing with the environment?

Sure! The docs above also show a context manager:
from langchain.callbacks import wandb_tracing_enabled
enable tracing using a context manager
with wandb_tracing_enabled():
agent.run("What is 5 raised to .123243 power?")  # this should be traced

@morganmcg1 The docs still show an example of an Agent use case. Does it work with a simple LLMChain? (NOT Agents)

Awesome! Would you like us to close this ticket for you?

How can I log custom metrics when a chain runs using the wandb tracer?

@cvillafraz you can pass additional metrics like so:
# start a wandb run (this is usually triggered by langchain, but we need to do it here first)
import wandb
wandb.init(project="my-project-name")

wandb.log({"my-custom-metric": 0.88}, commit=False)
agent.run("do a thing")

This will give you an additional column in the Traces tables with your custom metric.
Whats happening is that with commit=False, wandb takes note of what you want to log, but doesn't actually send it to the server until the call to your agent is made and it's inputs and outputs are logged

@cvillafraz you can pass additional metrics like so:
# start a wandb run (this is usually triggered by langchain, but we need to do it here first)
import wandb
wandb.init(project="my-project-name")

wandb.log({"my-custom-metric": 0.88}, commit=False)
agent.run("do a thing")

This will give you an additional column in the Traces tables with your custom metric.
Whats happening is that with commit=False, wandb takes note of what you want to log, but doesn't actually send it to the server until the call to your agent is made and it's inputs and outputs are logged

Thank you! Now, how can I log a metric calculated with the agent output in the same row? Let's say my agent outputs a list of values, and I want to log the mean of the values in the same row as the agent output.

Hey @makeshn, W&B Trace is an old product offering which is not maintained anymore. We were focused on shipping a better tooling called W&B Weave. Team is working on the Langchain integration.
Weave announcement
Weave Documentation
Closing this issue for now. Do let me know if you need anything more.


Reduce batches?

Hey there, I run stable diffusion locally without any issue usually, however this plugin will automatically create images in batches of 4, which increases memory cost and causes me to get CUDA out of memory issues much more often.
Would it be possible to get a slider for batch count added in, along with one for image resolution?
This plugin has the most potential I've seen to become perfect - thank you so much!

About image resolution - for txt2img, you can use the rectangular marquee tool and specify a size you want.
About batch size - I do not want to add UI elements that will be used only once, so will try to fix it without sliders. How much VRAM do you have? I can get VRAM with API and then automatically decrease the batch size.

Ahh, I didn't realise that - that's a great way to do it.
I'm using a 12gb Geforce RTX 2060. I understand why you'd want to keep minimal usage UI off the page, but batch size is one I often change a lot. I just have to turn it down it down when generating large images or using inpainting.
Perhaps a better option would be to create a second 'settings/options' page where settings like this, and 'Endpoint' could be adjusted once for the majority of people, but still tweaked by people like me who use them more?

I second the request for an option to customize the number of images generated. 4 images often isn't enough to cherrypick the good results from. Other times you might be doing a step with very low denoising to slightly clean up an image and only want to generate one at a time. I do not think that adding this to the UI would be unnecessary clutter. If that is a serious concern, it could be hidden under a collapsed section such as an "Advanced settings" section.

Same here, a lower batch count would allow us to generate larger images / areas.
 If I then cancel it, it doesn't "clears" the VRAM.
It gets stuck at 24264MiB / 24576MiB and I need to restart anacaonda / the automatic111 GUI which slows down the workflow quite a bit.

Done 👍

It would be nice to have a number of images and a batch size configurable separately, to be able to generate multiple images on devices that do not have a lot of vRAM


Setting for the holiday with automatic insertion by querying the Holiday integration.

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

Please add the description and text describing what you want.

in my installation I developed it by creating a binary sensor that is activated via the Holiday integration taken from HACS here https://github.com/bruxy70/Holidays, I set Italy in the calendar and the holidays automatically come out . Already tested with 01/11 a national holiday for us.
I saw that Homeassistant has its own integration called Workday https://www.home-assistant.io/integrations/workday/ which is ultimately the same thing, but I discovered it late.
In the scheduler proposed in the versatile_thermostat documentation I created 3 schedules, weekdays, weekends, holidays.
In the programming it allows you to insert a condition, so I inserted the test to the binary sensor created above for the selection of the setting.

This is fine and the best to do what you achieve.
So what do you expect for VTherm ? How VTherm should integrate the holidays information ?

Hi @jmcollin78,
I was thinking of getting an option to consider a binary sensor like workday , https://www.home-assistant.io/integrations/workday/ or the HACS Holidays integration that everyone chooses and integrates into their installation to allow switching between holidays which can occur on days other than the weekend automatically in comfort, or better if there was an appropriate temperature setting, because on the holiday some might also be interested in a temperature other than comfort.
In the beautiful and brand new UI also insert a specific indication.
Workday configuration

Holidays configuration

So, in your opinion, VTherm should do something where you are on Holidays. Fine, but what ?
Switch to a preset ? Turn-off the VTherm ? Other actions ? What is Holidays is detected but there is someone at home ? Should we stop heating ?
The way you integrate it, is the good way and I don't see any added value to have something automated on VTherm.
Every person will want to take its own action.
So, I guess there is nothing sufficiently generical, usable by every one that I can do in VTherm.
In my case, I do nothing when I'm on Holidays. It just let the presence feature do its job: switch to Eco.

Ok, maybe I wasn't able to explain my idea well.
I'll give you an example. If you are at home and not traveling somewhere, and like this year Christmas falls on a Monday, I think it's nice, at least for me it is to automatically find a comfortable programming mode like when you stay at home on weekends and not like when one goes to work and therefore generally sets eco because there is no one at home via the presence sensor.
However it doesn't matter, as far as I'm concerned I created it independently with a bit of code, because I really love smart activities and having all the options at my disposal without always having to fiddle around, especially when you're not alone at home and the others are not as smart as elderly people or those who are used to turning the old-fashioned thermostat knob and not using a smartphone or computer.
Thanks

I understand you case very well, but I continue to consider it is too specific to have an direct implementation on VTherm.
Holidays information should be combined with presence or activity sensors to have something usable and its creates too much combinaison.
Thank anyway for this proposal. I will close the issue. If you think you want to continue the discussion, open a discussion and not an issue.
Thanks !