S2i injection feature is broken on stock Ubuntu 20.04 LTS systems

Is this a feature request or bug?
/kind bug
What went wrong?
On Ubuntu 20.04 system, I cannot build a docker image which uses the injection feature.
It used to work on Ubuntu < 20.04 and still works on CentOS 7.x systems.
This bug has already been reported as #1006 but was closed for lifecycle/rotten.
This bug report should have all the information to reproduce, workaround and fix the issue.
Steps to reproduce:
Run this on fresh Ubuntu 20.04 system with docker installed (sudo apt-get install docker.io).
Attention: do not tweak the default value of the fs.protected_regular sysctl, which should be 1.

docker pull quay.io/centos7/ruby-27-centos7
echo hello > file.txt
s2i build https://github.com/openshift/ruby-hello-world.git quay.io/centos7/ruby-27-centos7 my-hello-world:xxx --inject $PWD/file.txt:/bug.txt (fails)
echo $? (displays 1)

Expected results:
I expect the image to build successfully.
Actual results:
The image fails to build, with the following error message at the end:
---> Cleaning up unused ruby gems ...
Running `bundle clean --verbose` with bundler 2.1.4
Frozen, using resolution from the lockfile
truncate: cannot open '/tmp/rm-injections' for writing: Permission denied
Build failed
ERROR: An error occurred: non-zero (13) exit code from quay.io/centos7/ruby-27-centos7

Version:
s2i: s2i v1.3.1
docker:
Client:
 Version:           20.10.2
 API version:       1.41
 Go version:        go1.13.8
 Git commit:        20.10.2-0ubuntu1~20.04.2
 Built:             Tue Mar 30 21:24:57 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.2
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.8
  Git commit:       20.10.2-0ubuntu1~20.04.2
  Built:            Mon Mar 29 19:10:09 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.3.3-0ubuntu2.3
  GitCommit:
 runc:
  Version:          spec: 1.0.2-dev
  GitCommit:
 docker-init:
  Version:          0.19.0
  GitCommit:

Additional info:
The bug happens on stock Ubuntu 20.04 LTS system.
It does not happen on Centos 7.x or on Ubuntu 14.04 systems that I have access to.
The reason is that on Ubuntu 20.04 LTS sudo sysctl fs.protected_regular=1 is the default,
which (according to https://unix.stackexchange.com/questions/503111/group-permissions-for-root-not-working-in-tmp ) restricts the permissions under /tmp and in particular prevents s2i from truncating the /tmp/rm-injections file inside the container despite that file being writable by everyone (chmod 0666).
At the end of the s2i assemble phase, s2i will try to truncate the /tmp/rm-injections file, which has mode 0666 (writable by everyone). This file is owned by user 1000:1000 while the s2i assemble user has uid 1001:1001. The assemble user is then denied the right to truncate the /tmp/rm-injections file, despite that file being world-writable.
Here is to reproduce the problem with a simple busybox container:
sudo sysctl fs.protected_regular=1
docker run -d --name=permbug -u 1001:1001 --entrypoint=/bin/sh busybox:latest -c 'sleep 10000'
docker exec -u 0 permbug /bin/sh -c 'echo blah > /tmp/xxx ; chown 1000:1000 /tmp/xxx ; chmod 666 /tmp/xxx'
docker exec -u 1001:1001 permbug /bin/sh -c 'truncate -s0 /tmp/xxx && echo "WORKS" || echo "BUG"'
docker rm -f permbug

We see that if the run the same command creating the xxx file in /var instead of /tmp it works:
sudo sysctl fs.protected_regular=1
docker run -d --name=permbug -u 1001:1001 --entrypoint=/bin/sh busybox:latest -c 'sleep 10000'
docker exec -u 0 permbug /bin/sh -c 'echo blah > /var/xxx ; chown 1000:1000 /var/xxx ; chmod 666 /var/xxx'
docker exec -u 1001:1001 permbug /bin/sh -c 'truncate -s0 /var/xxx && echo "WORKS" || echo "BUG"'
docker rm -f permbug

If we force sudo sysctl fs.protected_regular=0 in the first example it works again:
sudo sysctl fs.protected_regular=0
docker run -d --name=permbug -u 1001:1001 --entrypoint=/bin/sh busybox:latest -c 'sleep 10000'
docker exec -u 0 permbug /bin/sh -c 'echo blah > /tmp/xxx ; chown 1000:1000 /tmp/xxx ; chmod 666 /tmp/xxx'
docker exec -u 1001:1001 permbug /bin/sh -c 'truncate -s0 /tmp/xxx && echo "WORKS" || echo "BUG"'
docker rm -f permbug

To workaround this issue I had to:

sudo sysctl fs.protected_regular=0 (in a /etc/sysctl.d file) (best workaround)
hack the s2i binary with sed -i -e s:tmp/rm-injections/var/rm-injections:g (giant hack)

To fix the issue properly, I suggest either:

add a command-line option to allow creating the /tmp/rm-injections file outside of /tmp
hardcode the value of rmInjectionsScript in https://github.com/openshift/source-to-image/blob/30d81a9440f30b472bb32e592b12c1a83a396edd/pkg/build/strategies/sti/sti.go#L35 to a path that is not tmp-like, for example to /var/rm-injections.
add a FAQ entry in the project README.md advising to create a /etc/sysctl.d entry with fs.protected_regular=0 on Ubuntu 20.04 and more recent systems.

/remove-lifecycle stale

/lifecycle frozen

A successful workaround for me was to include the following line by the end of my s2i assemble script:
sed -i '/rm-injections/d' /tmp/rm-injections

This removes inplace the line truncate -s0 "/tmp/rm-injections" from the /tmp/rm-injections.


consumer read callback

Hi, I saw the following:
producer.on('ready', function () {
    producer.send(payloads, function (err, data) {
        console.log(data);
    });
});

I wonder if there is a same callback for consumer... I didn't find it in API documentation..
Thanks

You can listen to the client's ready event if you need this. The producer gets it from the client as well.


Do not hardcode Release as the build type and expose Boost_INCLUDE_DIR

This branch gives developers a little bit of flexibility for the build type.

Allow the developer to set by himself CMAKE_BUILD_TYPE instead of a hardcoded Release
Expose Boost_INCLUDE_DIR as a public include directory of the target mstch since some public headers include Boost's headers.

@no1msd, any change this could be merged ? There are a some PR that are waiting and that could improve the lib a little bit.


SAK-47466 GradebookNG - Message Students - Not all groups should appear

https://sakaiproject.atlassian.net/browse/SAK-47466

Sections filter is fixed too (up and right in the view).
Admin should see any group, and instructors and TAs should see every group which they belong.
Currently, all groups in the site are displayed to those roles.

I think we need checking the permission gradebook.gradeAll instead of securityService.isSuperUser(). Am I right?


trust_remote_code argument ignored in load_calib_dataset()

System Info

CPU: Any
GPU: Any
TensorRT-LLM main branch (including <= v0.15.0)
NVIDIA driver: Any
OS: Any

Who can help?
The argument of trust_remote_code is never used in tensorrt_llm.models.convert_utils.load_calib_dataset(). @Tracin
https://github.com/NVIDIA/TensorRT-LLM/blob/v0.15.0/tensorrt_llm/models/convert_utils.py#L284
Some of the qunatization models require loading the Hugging Face Datasets including customizing codes, and the HF datasets library performs time-limited interactive verification process to trust remote codes by using command-line in default.
This behavior is not suitable for non-interactive automated quantization processes.
Information

[x] The official example scripts
[ ] My own modified scripts

Tasks

[x] An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
[ ] My own task or dataset (give details below)

Reproduction
MODEL_DIR=Llama-3.3-70B-Instruct
DTYPE=bfloat16 # or float16
TP=2
PP=1
MAX_SEQ_LEN=2048
SETTINGS=sq-0.5_tp${TP}_pp${PP}_$((MAX_SEQ_LEN / 1024))k
CKPT_DIR=./${MODEL_DIR}.${SETTINGS}.ckpt
ENGINE_DIR=./${MODEL_DIR}.${SETTINGS}
python3 TensorRT-LLM/examples/llama/convert_checkpoint.py \
  --model_dir ${MODEL_DIR} --dtype ${DTYPE} \
  --tp_size ${TP} --pp_size ${PP} \
  --smoothquant 0.5 --per_token --per_channel \
  --output_dir ${CKPT_DIR}

Expected behavior
The quantization process should scceed without trust_remote_code related errors.
actual behavior
The quantization process freezes at load_calib_dataset() in tensorrt_llm/models/convert_utils.py to wait user's input whether enable trust_remote_code or not.
additional notes
We should modify load_calib_dataset() in one of the followings.

Remove trust_remote_code from the args of load_calib_dataset()
Change the default value of trust_remote_code as False and pass it for datasets.load_dataset()

In either case, trust_remote_code should be set as an arg when calling load_calib_dataset() if the dataset specified  by dataset_name_or_dir includes the custom code.
My suggetion is adding calib_trust_remote_code arg to the command-line options of quantization.py and the other similar situations.
https://github.com/NVIDIA/TensorRT-LLM/blob/340a1b62fc7a4124d6efef10df695b263734ab2f/examples/quantization/quantize.py#L30-L50

@Tracin I just described more detailed reproduction steps.


chore(deps): update common-dev-assets digest to 95f6c1e

This PR contains the following updates:

Package
Update
Change

common-dev-assets
digest
c87742a -> 95f6c1e

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

/run pipeline


Revert "Ford Fusion 2017 dbc can file. refs #1."

Reverts commaai/openpilot#2
As indicated on https://github.com/commaai/openpilot/pull/2 the dbc file I claimed was for the Ford Fusion (given that Dataspeed was using it on the Lincoln MKZ) contains instead private dataspeed codes.
Therefore the best course forward is to revert the commit. I'll keep  investigating and try to submit a new one after sniffing them from the car myself.

A better solution might be to just rename the file to lincoln_mkz_dataspeed.dbc


WASM incompatibilities

Since this project is intended to be WASM-compilable I'm opening this issue to track down and clarify why currently it's not.
By design, the environment of WASM is completely isolated (or sandboxed) from the native functionality of the underlying host system.
This means that by default, WASM is designed to perform nothing more than pure computation.
Consequently, access to "OS"-level resources such as file descriptors, network sockets, the system clock, and random numbers is not normally possible from it.
Due to this:

The wallet package of the project which is using  rust-bitcoin
is not WASM compilable due to the fact that the secp256k1 dependency is not WASM compilable ATM.
I'm searching for some patch to fix this.
The rpc is not compilable either, but I found a patch that let me compile it for WASM. It needs some more work because I need to update the adapt the patch to the latest version of the library where it's applied.

I'm not sure if this patch approach is the best one in the long term.
Probably it will make difficult to maintain the library unless those patches are merged to the libraries that I linked above.
Another approach could be wasmer which is the same library that cosmWASM use.
I'll study it and how it works and see if it's a better option than patches' Tetris.

Referring to point 2:
I've forked both of the provided patches, updated them to the latest versions of their upstreams libraries but it still didn't compile.
I've made some more research and found out it could be a problem of the tokio library.
There's an open issue which contains an answer that explains how to compile Tokio successfully to WASM but it did not solve the problem either.
Running cargo tree I had seen that the problem is inside hyper library. A tonic dependency.

Always on point 2:
This could be helpful
https://github.com/informalsystems/tendermint-rs/issues/463

After more research I found out that the library that's giving me the problems will have a grpc-web implementation.
https://github.com/hyperium/tonic/pull/455

In the meantime that the PR mentioned above is merged, I will try with this in a separate branch: https://github.com/gregdhill/rust-grpc-web/tree/main/grpc-web

[UPDATE 2]:
I thought that this PR would have solved our problems in the near future but it won't. As you can see from the comment to my question from the PR's creator.
So after this I've made some other researches and found out that this should be the things that should be done in order to let the client (and the wallet consequently) build to WASM.

Write a client that can implement GrpcService
Done here: https://github.com/bragaz/webtonic/tree/expose-client
Use http-body to abstract what an http body must do.
Wrap this and map a "HTTP/2" request into a "HTTP/1.1" by consuming the body and updating the headers.

All references here: https://bleepcoder.com/tonic/501988014/abstract-transport-from-client-logic-for-grpc-web-in-process

In this there's a guy who made a grpc-web client generator from proto files.
I'm trying with it now.

https://github.com/elliptic-email/rust-grpc-web

This worked. I was able to generate buildable WASM code for crw-client.
Now I'll open a PR and perform some tests to be sure this is working fine.

The tonic team has implemented the support for grpc-web, now they're able to introduce a fully compatible WASM-client that will give us the chance to send GRPC-web requests.
https://github.com/hyperium/tonic/issues/645

Tendermint has an api - https://docs.tendermint.com/master/rpc/#/Tx/broadcast_tx_commit. Which takes signed proto transaction encoded in hex as an arguement and broadcasts it. Using this instead of grpc will make it completely cross platform.
Since grpc is an optional feature in cosmos-sdk-proto, we can disable it and directly send it to the tendermint endpoint. This should allow us to build for wasm.

Hi @shravanshetty1! Thanks for pointing this out but the doccumentation says also that the broadcast_tx_commit  API should not be used in production. That said, I prefer that are used only stable API in production to prevent strange behavoirs and future refactoring if the API is removed.

Hi @shravanshetty1! Thanks for pointing this out but the doccumentation says also that the broadcast_tx_commit  API should not be used in production. That said, I prefer that are used only stable API in production to prevent strange behavoirs and future refactoring if the API is removed.

Of course will implement all 3 api's, its upto the user on which api he would like to use

I have talked with one of my collegues and we prefer to use the gRPC instead of the tendermint REST API.
This because the gRPC server in the cosmos sdk is right now the prefered method of comunication and the one that is more manteined.
btw it's seam that there is already an implementation of a gRPC client that works on the browser take a look at hyperium/tonic#645.
I think can be intresing tring to use that and see if actualy works.

I've experimented with proto and grpc for a cosmos project here https://github.com/noandrea/cosmos-cash-credentials/tree/feat/grpc
so far I didn't manage to make it work also with the @titanous prototype here https://github.com/titanous/grpc-web-client

I am also looking into using gRPC client for a cosmos node https://github.com/noandrea/cosmos-cash-credentials/tree/feat/grpc
but so far I haven't manage also using the https://github.com/titanous/grpc-web-client prototype.

I have talked with one of my collegues and we prefer to use the gRPC instead of the tendermint REST API.
This because the gRPC server in the cosmos sdk is right now the prefered method of comunication and the one that is more manteined.
btw it's seam that there is already an implementation of a gRPC client that works on the browser take a look at hyperium/tonic#645.
I think can be intresing tring to use that and see if actualy works.

I agree grpc would definitely be better
I tried to use https://github.com/titanous/grpc-web-client but it wont work because according to cargo tree command says cosmos-sdk-proto crate is importing socket2 and mio crates which are not wasm compatible. Using cargo tree in the grpc-web-client repo shows that the generated code does not have socket2 or mio dependencies.
Not sure why the dependencies of generated files from tonic are different in these crates.
I am very new to rust, so i think someone else should be able to figure it out who has more exp.

Here a working implementation for grpc client for a cosmos-sdk based project.
https://github.com/noandrea/cosmos-cash-credentials/tree/feat/grpc


Mixin incompatibility crash (Fabric 1.17)

Game will crash when starting up game with NEC 1.17 Fabric installed. Seems to be a generic mod conflict, but I cannot tell which mod is causing it from the logs. For some reason, the launcher would not save the full log with a crash info or generate a crash report, so I had to obtain the log "guerrilla-style". I have attached the log with the list of mods installed and the crash info, and let me know if you need any other info or have any other questions.
latest2.log

Updated log with some missing in
latest2.log
fo

Hm. In 1.16, NEC+'s mixin always applies after Reach Entity Attributes' mixin.
I guess I need to do something slightly more advanced...

Update released and approved on Curse.


Cannot use numpy.typing.NDArray type hints

Numpy v1.21.0 introduced runtime subscriptable aliases for ndarrays. The feature is really cool and I really like the direction that it seems to be headed in.
However, these new annotations do not seem compatible with the @beartype decorator.
System info
OS: Windows 10, 20H2
Python: 3.8.10
Beartype: 0.71.0
Numpy: 1.21.0
Sample Code
Running this sample code:
from beartype import beartype
import numpy as np
import numpy.typing as npt

@beartype
def foo(arr: npt.NDArray[np.float64]) -> npt.NDArray[np.float64]:
    return arr

foo(np.zeros(3))

Yields this error:
Traceback (most recent call last):
  File "C:\Users\Antyos\Code\Project\.venv\lib\site-packages\beartype\_util\cls\utilclstest.py", line 174, in die_unless_type_isinstanceable
    isinstance(None, cls)  # type: ignore[arg-type]
  File "C:\Users\Antyos\Code\Project\.venv\lib\site-packages\numpy\typing\_generic_alias.py", line 137, in __instancecheck__
    raise TypeError("isinstance() argument 2 cannot be a "
TypeError: isinstance() argument 2 cannot be a parameterized generic

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

Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "C:\Users\Antyos\Code\Project\.venv\lib\site-packages\beartype\_decor\main.py", line 268, in beartype
    func_wrapper_code = generate_code(func_data)
  File "C:\Users\Antyos\Code\Project\.venv\lib\site-packages\beartype\_decor\_code\codemain.py", line 162, in generate_code
    code_params = _code_check_params(data)
  File "C:\Users\Antyos\Code\Project\.venv\lib\site-packages\beartype\_decor\_code\codemain.py", line 324, in _code_check_params
    hint = coerce_hint_pep(
  File "C:\Users\Antyos\Code\Project\.venv\lib\site-packages\beartype\_decor\_cache\cachehint.py", line 254, in coerce_hint_pep
    die_unless_hint(hint=hint, hint_label=hint_label)
  File "C:\Users\Antyos\Code\Project\.venv\lib\site-packages\beartype\_util\hint\utilhinttest.py", line 104, in die_unless_hint
    die_unless_hint_nonpep(hint=hint, hint_label=hint_label)
  File "C:\Users\Antyos\Code\Project\.venv\lib\site-packages\beartype\_util\hint\nonpep\utilhintnonpeptest.py", line 111, in die_unless_hint_nonpep
    die_unless_hint_nonpep_type(
  File "C:\Users\Antyos\Code\Project\.venv\lib\site-packages\beartype\_util\hint\nonpep\utilhintnonpeptest.py", line 200, in die_unless_hint_nonpep_type
    die_unless_type_isinstanceable(
  File "C:\Users\Antyos\Code\Project\.venv\lib\site-packages\beartype\_util\cls\utilclstest.py", line 208, in die_unless_type_isinstanceable
    raise exception_cls(exception_message) from exception
beartype.roar.BeartypeDecorHintNonPepException: @beartyped foo() parameter "arr" type hint numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] uncheckable at runtime (i.e., not passable as
second parameter to isinstance() due to raising "isinstance() argument 2 cannot be a parameterized generic" from metaclass __instancecheck__() method).

Knowing that Beartype leverages the Python built-in Annotated type, it roughly makes sense why this error would be occurring. While creating a Beartype numpy array using Annotated and lambda still has its uses, static type checkers such as Pylance/Pyright are now equipped to recognize this new Numpy typing syntax (that's how I initially found out about this change; my code had a ton of new errors I didn't understand), but I don't know if they can recognize the Beartype version in the same way.

Fantastic find. Thanks so much for the heads up on this, Antyos. Tensor typing is in our critical section, which makes this a high-priority feature request for us.
Fortunately, NumPy developers sensibly implemented their high-level numpy.typing.NDArray type hint in terms of the standard types.GenericAlias type hint factory first introduced by Python 3.9.0. That's great, because it means @beartype can trivially detect numpy.typing.NDArray type hints with well-established standards we already support:
$ ipython3.9
>>> import numpy as np
>>> import numpy.typing as npt
>>> hint = npt.NDArray[np.float64]
>>> print(f'NDArray[n.float64] type: {type(hint)}')
NDArray[n.float64] class: <class 'types.GenericAlias'>

Unfortunately, NumPy developers kinda non-sensibly reimplemented the same numpy.typing.NDArray type hint in terms of their own private non-standard numpy.typing._generic_alias._GenericAlias type hint factory under Python < 3.9.0:
$ ipython3.8
>>> import numpy as np
>>> import numpy.typing as npt
>>> hint = npt.NDArray[np.float64]
>>> print(f'NDArray[n.float64] type: {type(hint)}')
NDArray[n.float64] class: <class 'numpy.typing._generic_alias._GenericAlias'>

If they'd just made numpy.typing._generic_alias._GenericAlias public rather than private, it would've been trivial for @beartype to detect that too. Instead, they privatized it. @beartype never violates privacy encapsulation in third-party packages, because @beartype doesn't want to become a flying pile of burning wreckage out on the tarmac of PyPI. So, that's a no-fly zone.
But... that's mostly okay. Under:

Python ≥ 3.9.0, I'd be delighted to add conditional support for numpy.typing.NDArray to the next stable beartype release!
Python < 3.9.0, we'll probably continue raising an unpleasant exception with all of the apologetic tears I can shed. We can't even reliably detect numpy.typing.NDArray type hints under Python < 3.9.0, because their type is private, obfuscated, and really not intended to be externally accessed.

Curious Bear hopes that sounds like a reasonable compromise.

This sounds great! Glad to see this will be supported!
It's unfortunate that this won't work with Python < 3.9, but I understand why and agree with your decision. Is there a __futures__ import that would make it work in 3.8?
Unfortunately, the project I'm working on is stuck on 3.8 due to certain dependencies but being compatible with later versions. However, I'm looking forward to implementing beartype in future projects or when my current project can be updated.

It's unfortunate that this won't work with Python < 3.9...

...I share this disappointment. Gatekeeping numpy.typing behind bleeding-edge Python versions isn't a good look.
Come to think, there might actually be a circuitous way for us to slyly detect numpy.typing.NDArray type hints under Python < 3.9:
$ ipython3.8
>>> import numpy as np
>>> import numpy.typing as npt
>>> hint = npt.NDArray[np.float64]
>>> getattr(hint, '__origin__', None) is np.ndarray
True

My eyes... they bleed.
So, getattr(hint, '__origin__', None) is np.ndarray may be a hacky, cumbersome, and inefficient kludge – but it has the benefit of actually reliably detecting numpy.typing.NDArray type hints under Python < 3.9 without violating privacy encapsulation. That means we're going to do it. :exploding_head:

Is there a __futures__ import that would make it work in 3.8?

Sadly, no! But at least I get to blame someone else again. In this case, PEP 585 authors are to blame; they failed to backport support for the __class_getitem__() dunder method underlying magical syntax like npt.NDArray[np.float64] to the __futures__ mechanism under Python < 3.9, despite fraudulently claiming in PEP 585 they had done just that. Mostly everything in the "Backwards Compatibility" "Implementation" sections of PEP 585 is a deceptive masquerade that doesn't work at runtime.
But this must be your lucky GitHub day. @beartype can just stealthily hack around the lack of __futures__ support with the above stupidity cleverness under Python < 3.9, which means you won't even have to import anything additional (from __futures__ or otherwise) to get this to work on your side. It'll just work.

Unfortunately, the project I'm working on is stuck on 3.8 due to certain dependencies but being compatible with later versions.

I definitely get that and feel your radiating dev pain. Would @beartype transparently supporting numpy.typing.NDArray type hints across all Python versions via the above stealth hack change your mind about adopting @beartype?
We aim to please data scientists here. If we ever stop doing that, we have failed in our primary mission... and the bear doesn't tolerate failure. Let me know what you need and we'll make it so.

You weren't kidding about this being my lucky GitHub day, wow! All of this sounds amazing and will absolutely be adding beartype to this project and probably all my future projects too. I'm looking forward to the update!
P.S. Why are you so amazing??? 🤩

awwww :hugs:
Why are you so incredibly nice, that's what I want to know! Relatedly, I actually thought of an even awfuller cleverer one-liner for portably detecting numpy.typing.NDArray type hints across Python versions: repr(hint).startswith('numpy.ndarray['). Despite being hideously obfuscatory and basically ineffable, it actually works:
$ ipython3.8
>>> import numpy as np
>>> import numpy.typing as npt
>>> hint = npt.NDArray[np.float64]
>>> repr(hint).startswith('numpy.ndarray[')
True

$ ipython3.9
>>> import numpy as np
>>> import numpy.typing as npt
>>> hint = npt.NDArray[np.float64]
>>> repr(hint).startswith('numpy.ndarray[')
True

I horrify even myself. :scream_cat:

That has to be one of the most elegant hideous line of code I have ever laid eyes on. 😂

So – it begins. fcb24d3 now detects numpy.typing.NDArray type hints, but how do we handle them?
...we don't. Yes, it's both brilliant and stupid! We just internally map numpy.typing.NDArray type hints that we don't want to explicitly handle into equivalent typing.Annotated type hints powered by beartype.vale.IsAttr and beartype.vale.IsEqual that we already recursively handle across the entire codebase with extensive unit testing, which means we're mostly already done here:
# Beartype 0.8.0 will internally map this "hard"
# annotated callable we don't want to handle...
@beartype
def rock_the_data_science(the_array_dont_like_it:
    npt.NDArray[np.float64]) -> None: ...

# ...to look this this "easy" annotated callable we
# already handle! (Yes, easy. No, really. What's
# not easy about a triply-nested type hint requiring
# imports from at least three wildly different APIs?)
@beartype
def rock_the_data_science(the_array_dont_like_it:
    Annotated[np.ndarray, IsAttr['dtype', IsAttr['type', IsEqual[np.float64]]]]
) -> None: ...

The last trick up my hipster flannel will be differentiating between:

numpy.dtype.type objects like np.float64, which actually isn't a dtype even though NumPy externally pretends it is. Thanks, NumPy.
numpy.dtype objects like np.dtype('>i4'), which actually is a dtype even though nobody has ever seen one of those in real life.

Let's see how much caffeine I can inject straight into my veins this Friday evening. :coffee:

Great success. I accidentally closed this with a commit message yesterday, but that's possibly okay because I'm fairly certain that @beartype now fully supports all possible numpy.typing.NDArray type hints! We rejoice!
...at least, we would rejoice if I hadn't used weasel words like "accidentally," "possibly okay", and "fairly certain" above. I should really exhaustively test this a bit more and then write readable documentation. Why is that always a challenge? ...the struggle is real
I'm aiming to release both this and #34 – yup, it's full typing_extensions support – as beartype 0.8.0 this Friday. But that might get pushed to early next week if I decide to play trashy Japanese video games instead. Let's see what happens! The excitement is palpable.

It is so nice to see the impressive pace at which beartype is developing! Now that NDArray is supported by the latest release, one could add the support of ArrayLike to the roadmap. Just in case you are running out of todos ;)
Here an example code executed with py3.8 and beartype 0.8.0:
import numpy as np
from beartype import beartype
from numpy.typing import ArrayLike

@beartype
def foo(arr: ArrayLike[np.float64]) -> None:
    return

foo(np.zeros(3).astype(np.float64))

Raises following error:
Traceback (most recent call last):
  File "asarray.py", line 6, in <module>
    def foo(arr: ArrayLike[np.float64]) -> None:
  File "/home/***/anaconda3/envs/py3.8/lib/python3.8/typing.py", line 261, in inner
    return func(*args, **kwds)
  File "/home/***/anaconda3/envs/py3.8/lib/python3.8/typing.py", line 686, in __getitem__
    _check_generic(self, params)
  File "/home/***/anaconda3/envs/py3.8/lib/python3.8/typing.py", line 211, in _check_generic
    raise TypeError(f"{cls} is not a generic class")
TypeError: typing.Union[typing.Sequence[typing.Sequence[typing.Sequence[typing.Sequence[typing.Sequence[typing.Any]]]]], numpy.typing._array_like._SupportsArray[ForwardRef('dtype[Any]')], typing.Sequence[numpy.typing._array_like._SupportsArray[ForwardRef('dtype[Any]')]], typing.Sequence[typing.Sequence[numpy.typing._array_like._SupportsArray[ForwardRef('dtype[Any]')]]], typing.Sequence[typing.Sequence[typing.Sequence[numpy.typing._array_like._SupportsArray[ForwardRef('dtype[Any]')]]]], typing.Sequence[typing.Sequence[typing.Sequence[typing.Sequence[numpy.typing._array_like._SupportsArray[ForwardRef('dtype[Any]')]]]]], bool, int, float, complex, str, bytes, typing.Sequence[typing.Union[bool, int, float, complex, str, bytes]], typing.Sequence[typing.Sequence[typing.Union[bool, int, float, complex, str, bytes]]], typing.Sequence[typing.Sequence[typing.Sequence[typing.Union[bool, int, float, complex, str, bytes]]]], typing.Sequence[typing.Sequence[typing.Sequence[typing.Sequence[typing.Union[bool, int, float, complex, str, bytes]]]]]] is not a generic class

It is so nice to see the impressive pace at which beartype is developing!

aww, u so nice! :blush:

Now that NDArray is supported by the latest release, one could add the support of ArrayLike to the roadmap.

Yes. Let's add ever more back-breaking features onto my drooping shoulders. Actually, I think that's just my bursitis acting up. Curse this geriatric body. :older_man:
In all seriousness, this is a great idea. So, it shall be. I was kinda hoping the remainder of the numpy.typing subpackage would just work out-of-the-box. Clearly, I am still a utopian dreamer.
The traceback is suggestive of an upstream issue. Specifically, numpy.typing.ArrayLike appears to be inducing infinite recursion from within the typing module at runtime under at least Python < 3.9.0. This is reaaal sus af:
TypeError: typing.Union[typing.Sequence[typing.Sequence[typing.Sequence[
typing.Sequence[typing.Sequence[typing.Any]]]]],
numpy.typing._array_like._SupportsArray[ForwardRef('dtype[Any]')],
typing.Sequence[numpy.typing._array_like._SupportsArray[ForwardRef('dtype[Any]')]],
typing.Sequence[typing.Sequence[numpy.typing._array_like._SupportsArray[
ForwardRef('dtype[Any]')]]],
typing.Sequence[typing.Sequence[typing.Sequence[
numpy.typing._array_like._SupportsArray[ForwardRef('dtype[Any]')]]]],
typing.Sequence[typing.Sequence[typing.Sequence[
typing.Sequence[numpy.typing._array_like._SupportsArray[
ForwardRef('dtype[Any]')]]]]], bool, int, float, complex, str, bytes, typing.Sequence[
typing.Union[bool, int, float, complex, str, bytes]],
typing.Sequence[typing.Sequence[typing.Union[
bool, int, float, complex, str, bytes]]], typing.Sequence[typing.Sequence[typing.Sequence[
typing.Union[bool, int, float, complex, str, bytes]]]],
typing.Sequence[typing.Sequence[typing.Sequence[
typing.Sequence[typing.Union[bool, int, float, complex, str, bytes]]]]]]
is not a generic class

Yikes. Let's grep around the NumPy issue tracker and see if we can't find anyone shouting vociferously about similar issues. That exception scares me like only grizzly bears snuffling through our compost pile in October can. :open_mouth:

👋
Has this support been added to the awesome DOOR api?
>>> from beartype import beartype
>>> @beartype
... def foo(t: npt.NDArray[np.float64]):
...     print(t)
...
>>> n = np.array([1, 2, 3], dtype=np.float64)
>>> foo(n)
[1. 2. 3.]

works great! but...
>>> from beartype.door import TypeHint
>>> TypeHint(npt.NDArray[np.float64])
Traceback (most recent call last):
  Cell In[40], line 1
    TypeHint(npt.NDArray[np.float64])
...
BeartypeDoorNonpepException: Type hint numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]] invalid
(i.e., either PEP-noncompliant or PEP-compliant but currently unsupported by "beartype.door.TypeHint").

Thanks for the great library!

Agh! Your astute observation is correct; the beartype.door API currently lacks support for NumPy type hints. I didn't actually realize that anyone except @wesselb and his wonderful multiple-dispatch Plum crowd was even aware of our secretive DOOR API. The more I know, the more powerful @beartype becomes.
Fortunately, we already have an issue tracking this feature request! That's the good news. Unfortunately, I'm inclined to play Japanese role-playing games rather than do actual work... That's the bad news. Tune in to issue #212 to see which wins. :bear:


chore: Add Flow#flattenMerge operator.

Motivation:
Add this Scala dsl for make it more friendly and easy to use in scaldsl.
also we can see this in Kotlin's flow and ZIO.
https://kotlinlang.org/api/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.flow/flatten-merge.html

no docs?

I thought this operator was too natively for Scala developers, but I can add one.

it's worth some basic mention in our paradox docs

I will update with a doc after lunch, thanks for the review.

@pjfanning I have added the document.


Jsonable is dead, long live Jsonable!

@ChumpChief, @tylerbutler - I'll probably be churning this for a day or two more, but you're welcome to follow along.
Check out this legit bug caught by AsSerializable().  Only repros on remote data > 2 days old (seriously):
https://github.com/microsoft/FluidFramework/pull/5681/files#r604462798


[KOGITO-4529] - Throwing nil pointer dereference for Knative broker K…

…ogitoInfra
Jira issue : https://issues.redhat.com/browse/KOGITO-4529
Many thanks for submitting your Pull Request :heart:!
Please make sure your PR meets the following requirements:

[x] You have read the contributors' guide
[x] Pull Request title is properly formatted: [KOGITO-XYZ] Subject
[x] Pull Request contains a link to the JIRA issue
[x] Pull Request contains a description of the issue
[x] Pull Request does not include fixes for issues other than the main ticket
[x] Your feature/bug fix has a unit test that verifies it
[x] You've tested the new feature/bug fix in an actual OpenShift cluster
[x] You've added a RELEASE_NOTES.md entry regarding this change

@vaibhavjainwiz can you please rebase the Release Notes?

@vaibhavjainwiz, can you please rebase the Release Notes?
EDIT: nvm, I saw that you had connectivity problems today. It's so simple that I did it myself via the web UI.

Thanks @ricardozanini


'Replace File' not working in SilverStripe v4

Affected Version
4.x
Description
Cannot replace files in CMS. When trying to replace a file in CMS the file does not get updated.
Steps to Reproduce

Replace file:

Select replacement file:

Notification in CMS says upload successful:

Clicked 'Save'. Note that it now says file is 'modified' but the Filename didn't update including the actual file as Filename should now be 'pdf-test-1.pdf' pictured in step 2:

Does the contents of the file change to the new one? I'm having a little trouble reproducing the problem but I'm testing with images - it's a lot clearer when the file actually changes or not.
Also, would you mind providing the specific version of SilverStripe you have installed? At the moment I assume you've installed 4.x-dev which would be the unstable development version for the next minor release (4.4) - although I expect this functionality to work in that branch right now.

Hi,
No, the contents of the file don't change to the newly selected one. The prompt that shows up in step 3 is misleading as no changes actually happen, not the actual file or filename changes. I've even tried Publishing after saving but still no changes to the file.
Also I'm running 4.x-dev.

Ok thanks. I was testing with 4.3.x-dev - perhaps this is a regression in 4.x-dev.

@maxime-rainville Since you're working on related stuff, could you sanity check 4.x-dev please?

@maent45 Do you havelegacy_filenames enabled? I've ran some tests recently with legacy_filenames enabled and the "replace filename" features doesn't work very well. https://youtu.be/qxmjePtJy9k
About the filename change, my assumption is that keeping the existing name in the CMS is the expected behaviour. "Replace File" implies changing only the content of the file, but keeping the existing meta data. Interestingly, if you replace a file with one that has a different extension the name does update. @silverstripeux, do you have feelings on this topic?

@maxime-rainville yup you are right, it only aims to replace the contents not the file name as the default. We did consider having a dialogue to provide the option of using the original file name or the new but that got put to the side (ultimately we would still be able to add that functionality).

+1 experiencing this issue
When I replace a file, I get the error message "File cannot be found"
CWP 2.2.2
SilverStripe\Assets\Flysystem\FlysystemAssetStore:
legacy_filenames: true

This won't be an issue in SilverStripe 4.4 because of the permalink fix. However that change is to complex to backport to prior version of SilverStripe.
This means that the "replace file" feature is effectively broken when using a pre-4.4 version of SilverStripe with legacy_filenames enabled.
To be honest, I think fixing this would be really difficult and would be quite risky to put in a patch release.
@chillu You'll have to decide if this is worth fixing for 4.3 and below.

No, we're definitely not backporting this. The solution is to upgrade to 4.4.x once it's out (in a few weeks)

+1
I've noticed different behaviours when replacing files.

File not found same as @emteknetnz
Sometimes no changes after save and publish
File name changed to a different document's file name. Changing the file name back to what it is supposed to be and published. Now these 2 documents have all been replaced by the new PDF file. Replacing one file somehow changed the other file.

CWP 2.2.3
SilverStripe\Assets\Flysystem\FlysystemAssetStore:
  legacy_filenames: true

We've upgraded to CWP 2.3 / 4.4.0-rc1, removed legacy flag, and ran the migration task. Looks to be working. Button states were unstable/buggy though, but I believe that's another issue.

Went through the steps provided in the original ticket description, and can no longer reproduce with the 4.4.x-dev recipe, which will become the 4.4.0 and 4.4.1 release shortly. As Max said, a backport of this fix is too complex. In 4.4+, legacy_filenames no longer has an effect.
@lhalaa If you still have the issues you've described once 4.4.0 is out, could you file separate tickets? As you sayd, they're somewhat unrelated to "replace file" not working at all (and potentially lower impact/priority).


Fixes #380 and Removes Unused Variables in SandboxApp

Describe the issue (if no issue has been made)
Since there hasn't been a major change to the Sandbox Application, I cleaned up temporary variables to orchestrate a concise and clean working environment. I also added the font files so that the Sanbox Application will run out of the box.
PR impact
List of related issues/PRs this will solve:

Impact
Issue/PR

Fixes Sandbox App Crashes on Boot
#380

Removes unused Sandbox App variables
None

Proposed fix

Copy the font file from the Hazelnut project into the Sandbox App.
Remove the unused variables: m_SquareVA and m_FlatColorShader

Additional context
Tested In:

[x] Debug - x64
[x] Release - x64
[x] Dist - x64

This patch fixes the problem by duplicating Hazelnut's font files. I don't believe this is a proper fix because Git isn't a file repository.

This patch fixes the problem by duplicating Hazelnut's font files. I don't believe this is a proper fix because Git isn't a file repository.

As long as we do not have a file manager, this is the only option, as the different applications do not 'share' a directory with the engine... the file mananger could work around this...

This will be fixed in the future by setting the working directory programatically.


May fail to close stream

May fail to close stream, especially if exceptions occur.
Changed to use try-with-resources for more concise code that will
ensure that streams are closed.

this PR was merged into develop in d5bccba


drop duplicate sources

It happens if you have 2 chunks from a same URL (this happens in the case where you don't have a link to a specific markdown page for example) , so to a user, a same url / title gets displayed twice


EC keys error when dialing

steps to reproduce:

enroll an identity with the C sdk - verify an EC PRIVATE KEY is generated
attempt to use this enrolled .json with the golang sdk by calling DialWithOptions

observe:

no connection is made
error is returned which is not particularly helpful

failed to initialize context: (open -----BEGIN EC PRIVATE KEY-----\n ... snip ... YK/s9cIJYnYg==\n-----END EC PRIVATE KEY-----\n: The filename, directory name, or volume label syntax is incorrect.)"

Yes, this is what happens. Thank you!


copr: migrate rpn_fn interface to be compatible with proposed ChunkedVec

Signed-off-by: Alex Chi<EMAIL_ADDRESS>What problem does this PR solve?
Problem Summary
This PR changes all vectorized functions to have signature like do_something(a: Option<&Int>, b: Option<&Json>.
Overview
In RFC: Using chunk format in coprocessor framework, we proposed a ChunkedVec struct to support Chunk-based computing. We plan to:

Migrate current co-processor framework to use interface compatible with ChunkedVec.

This is done by adding new functionalities on current Vec<Option<T>>. The detailed plan can be found at Full Chunk-based Computing PR Roadmap.

Introduce ChunkedVec.

After migrating co-processor to have interface compatible with proposed ChunkedVec, we can introduce ChunkedVec into TiKV. Then, we may further optimize performance by merging null parameters, etc.
What is changed and how it works?
Proposal: RFC: Using chunk format in coprocessor framework
What's Changed:
tidb_query_codegen

introduce RpnFnRefEvaluableType in rpn_functions, so as to accept type like Option<&T>.
rpn_fn and rpn_fn(vargs) now accepts function signature like Option<&T> and &[Option<&T>].
NormalRpnFn calls as_ref on &Option<T>, and pass Option<&T> to built-in functions.
VargsRpnFn calls as_ref on borrowed ScalarValueRef, and pass &[Option<&T>] to built-in functions.
VargsRpnFn now use a stack local vargs_buf instead of previous thread local one. That's because Option<&T> and usize have different memory layout, and cannot be directly transmuted. This may be solved in upcoming PRs.
use Option<&usize> as type of global vector cache. Option<&T> has same size as &T as long as it is a Sized type.
docs and compile error messages are updated.

tidb_query_vec_expr

all built-in functions and corresponding tests are modified to have new signature.

tidb_query_vec_executors

fix tests in selection_executor to be compatible with new interface.

Tests

Unit test

/run-all-tests

/bench +sysbench +tpcc +tpch

Thanks for reviewing! I've updated rpn_fn(vargs) to use thread-local cache.
Benchmark is still running at https://internal.pingcap.net/idc-jenkins/blue/organizations/jenkins/comment_trigger_tikv/detail/comment_trigger_tikv/754/pipeline/

/bench +sysbench +tpcc +tpch

@skyzh The benchmark may take 8 hours at most, and we can check it out later.

06.sql duration: 8916.04 ms ± 5.19% (std=234.82) delta: 10.48% (p=0.000)
18.sql duration: 49341.79 ms ± 6.86% (std=1867.67) delta: 11.24% (p=0.021)

Seems that there are notable regression in this two cases. However our benchmark platform is not very stable. Could you verify manually?
You can benchmark manually by using the test suite in https://github.com/pingcap/tidb-bench/tree/master/tpch . You can use the binary of make dist_release to do the benchmark.

@breeswish Just benchmarked on my MacBook. Compared with 4.0.0 release, slowdown in 06.sql is observed. Still investigating.

@breeswish I've benchmarked this branch against current master. Seems that this PR is not the root cause of the slowdown. Maybe we can investigate this later.

/run-all-tests

/bench +tpch
workload:
  queries: 06.sql
  repeat_time: 10

Someone has added a new vectorized function quote. I've migrated it to latest interface and updated this branch.

/run-all-tests

/run-all-tests


Contact entry not recognised if @ is in the telegram field

Just discovered that if I added @ to telegram: thinkerer like telegram: @thinkerer the contact plugin will not add the contact in... looks like a bug
Below is the minimum test file I used to replicate the issue
---
name:
  first: Test
  last: Tester
phone:
telegram: @Test
linkedin:
birthday:
last_chat:
friends:
type: contact
---

Unfortunately, this is Obsidian API limitation, as a workaround you can use quotes:
---
name:
  first: Test
  last: Tester
phone:
telegram: "@Test"
linkedin:
birthday:
last_chat:
friends:
type: contact
---

But I will see if it makes sense to use custom yaml parser instead of Obsidian API.

https://yaml.org/spec/1.2-old/spec.html#id2772075
commercial-at: @text
grave-accent: `text

Above would give ERROR:  Reserved indicators can't start a plain scalar. as  the “@” (#x40, at) and “`” (#x60, grave accent) are reserved for future use.

So yeah it will need to be a non standard YAML parser. (Or at least provide a visible indicator that this is invalid)


only provision image storage for azure function

@xscript @yaweiw

@ZhijunZhao,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot


Restore + to KUBE_GIT_MINOR

Historically, a '+' was added to the kube minor version. Some version parsing broke when this was removed in the move away from custom tito tagging.

doozer updated on buildvm


Puddles.

They have weird placement when in a hand (yea so important)

No config for disabling it but I'm okay with this

I think they don't generate - I waited in a rain for two minutes and not a single one

they have a collision?

Puddle items can't be accessed in survival mode. their purpose is just to show right in waila and as a debug item for testing puddles.
Puddle generation can be disabled by setting the game rule "puddleSpawnRate" to 0
Try setting puddleSpawnRate to 10 and see if that helps. I wanted to make puddles generate only rarely, because they can be quite annoying for some people.
How did you even get a puddle floating in the air? I made it so if you break the block underneath they just disappear, so that also shouldn't be a problem as long as you aren't using any commands.

How did you even get a puddle floating in the air?

Yes, I used the /setblock just to test collision.

Try setting puddleSpawnRate to 10

Oh, so they do generate. 10 is fine considering that puddles can't spawn under trees so in forests they are rare even with 10.

can be disabled by setting the game rule

You might want to give some information in the config about this.
Can you make them slowly disappear after some time after rain?
Also this

They already slowly disappear after rain

Also, the connecting water thing is known, I'm currently looking into how to fix that. I hope it won't be too noticeable during normal gameplay

The weird shapes should be fixed in the latest commit.


⚠ dev-deces.matchid.io search API has degraded performance

In 313d340, dev-deces.matchid.io search API (https://dev-deces.matchid.io/deces/api/v1/search?q=pompidou) experienced degraded performance:

HTTP code: 200
Response time: 5072 ms

Resolved: dev-deces.matchid.io search API performance has improved in 5369423 after 12 minutes.


Why .ck format?

Sorry if I missed smth in docs.
But why a .ck file format?)

Good question, the actual format for the file for storage isn't standardized yet. It will be for the 1.0.0 release. At the moment it is actually just messagepack. The current bleeding edge has actually been reverted to json. I am currently thinking about choosing bson over messagepack to remove the limitation we currently have for number of document.
TLDR; .ck is a placeholder file-type for what will eventually be a custom binary encoding of JSON-like objects.


docs: Add a complete example to the README

Hello,
As a beginner, I was struggling to find a complete example of how to use clj-simple-router with Ring/Jetty, so I thought I would add one to the README.
Please feel free to redact it, or to consider this PR as a feature request instead and write up your own, if you prefer :)
Thank you for this project!

Thanks! Tuned a little and merged


Error: spawn UNKNOWN

When I try to run a basics npx create-react-app i received this error
D:\>npx create-react-app abc
npx: installed 67 in 4.255s

Creating a new React app in D:\abc.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...

Aborting installation.
Unexpected error. Please report it as a bug:
Error: spawn UNKNOWN
    at ChildProcess.spawn (internal/child_process.js:403:11)
    at Object.spawn (child_process.js:553:9)
    at spawn (C:\Users\Gilang\AppData\Roaming\npm-cache\_npx\17768\node_modules\create-react-app\node_modules\cross-spawn\index.js:12:24)
    at C:\Users\Gilang\AppData\Roaming\npm-cache\_npx\17768\node_modules\create-react-app\createReactApp.js:407:19
    at new Promise (<anonymous>)
    at install (C:\Users\Gilang\AppData\Roaming\npm-cache\_npx\17768\node_modules\create-react-app\createReactApp.js:359:10)
    at C:\Users\Gilang\AppData\Roaming\npm-cache\_npx\17768\node_modules\create-react-app\createReactApp.js:485:16
    at processTicksAndRejections (internal/process/task_queues.js:93:5) {
  errno: -4094,
  code: 'UNKNOWN',
  syscall: 'spawn'
}

Deleting generated file... package.json
Deleting abc/ from D:\
Done.

I'm using windows 10 version 20H2 and node v14.15.4.

When I try to run a basics npx create-react-app i received this error

That happens when I try to make a React Project by: "npx create-react-app" command!

When I try to run a basics npx create-react-app i received this error

D:\>npx create-react-app abc

npx: installed 67 in 4.255s

Creating a new React app in D:\abc.

Installing packages. This might take a couple of minutes.

Installing react, react-dom, and react-scripts with cra-template...

Aborting installation.

Unexpected error. Please report it as a bug:

Error: spawn UNKNOWN

    at ChildProcess.spawn (internal/child_process.js:403:11)

    at Object.spawn (child_process.js:553:9)

    at spawn (C:\Users\Gilang\AppData\Roaming\npm-cache\_npx\17768\node_modules\create-react-app\node_modules\cross-spawn\index.js:12:24)

    at C:\Users\Gilang\AppData\Roaming\npm-cache\_npx\17768\node_modules\create-react-app\createReactApp.js:407:19

    at new Promise (<anonymous>)

    at install (C:\Users\Gilang\AppData\Roaming\npm-cache\_npx\17768\node_modules\create-react-app\createReactApp.js:359:10)

    at C:\Users\Gilang\AppData\Roaming\npm-cache\_npx\17768\node_modules\create-react-app\createReactApp.js:485:16

    at processTicksAndRejections (internal/process/task_queues.js:93:5) {

  errno: -4094,

  code: 'UNKNOWN',

  syscall: 'spawn'

}

Deleting generated file... package.json

Deleting abc/ from D:\

Done.

I'm using windows 10 version 20H2 and node v14.15.4.

any solution ?

anyone know solution ? how can i create react app? i am newbie???

我也是和这一样的错误，网上找了很久也没有找到方法解决，node重装也没用，望大佬伸出援手

am also with this same mistake, online for a long time also did not find a way to solve, node reinstallation is useless, hope big guy extend a helping hand

i have same problem... i tried all answers from stackoverflow ( delete npm, npx cache), reinstall node.js, but i still have that problem
`PS C:\Users\Admin\Desktop\study\portfoliosite> npx create-react-app my-app
Need to install the following packages:
create-react-app
Ok to proceed? (y) y
npm WARN deprecated<EMAIL_ADDRESS>This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
Creating a new React app in C:\Users\Admin\Desktop\study\portfoliosite\my-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
Aborting installation.
Unexpected error. Please report it as a bug:
Error: spawn UNKNOWN
at ChildProcess.spawn (node:internal/child_process:412:11)
at Object.spawn (node:child_process:698:9)
at spawn (C:\Users\Admin\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\cross-spawn\index.js:12:24)
at C:\Users\Admin\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\create-react-app\createReactApp.js:390:19
at new Promise ()
at install (C:\Users\Admin\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\create-react-app\createReactApp.js:341:10)
at C:\Users\Admin\AppData\Local\npm-cache_npx\c67e74de0542c87c\node_modules\create-react-app\createReactApp.js:468:16
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
errno: -4094,
code: 'UNKNOWN',
syscall: 'spawn'
}
Deleting generated file... package.json
Deleting my-app/ from C:\Users\Admin\Desktop\study\portfoliosite
Done.
PS C:\Users\Admin\Desktop\study\portfoliosite>
`

I've had this problem, the solution is that I uninstalled the antivirus from my computer

I've had this problem, the solution is that I uninstalled the antivirus from my computer

Same here

I've had this problem, the solution is that I uninstalled the antivirus from my computer

I removed the antivirus but still it does not work

I've had this problem, the solution is that I uninstalled the antivirus from my computer

I removed the antivirus but still it does not work

if there are other antivirus on your computer, try deleting them all.

I've had this problem, the solution is that I uninstalled the antivirus from my computer

I removed the antivirus but still it does not work

if there are other antivirus on your computer, try deleting them all.

No I don't have any other antivirus and also I tried almost everything. Nothing seems to work. I have been banging my head on this error for more than 2 days and I don't feel like learning react anymore 😢

first you need to run this script
npm install -g create-react-app
after that run
npx create-react-app my-app

first you need to run this scrpt
npm install -g create-react-app
after that run
npx create-react-app my-app

I've had this problem, the solution is that I uninstalled the antivirus from my computer

i had a same issue for sevel days, i try to use npx to install svelte, it's works, so i think, the reason is about npm & npx, so i update npm & npx, the problem was solved:
i just update npm & npx, just use these below:
npm install npm@latest

npm install npx@latest

I have the same problem when i tried to run create-react-app. I'm still trying to solve it, but i can't find a solution.

I have the same problem when i tried to run create-react-app. I'm still trying to solve it, but i can't find a solution.

Hi, so I solved it by deleting Node modules from my local disk C and also the user folder. Removed everything related to npm. After that I restarted my computer and installed everything from scratch. Surprisingly it worked for me. Let me know how it goes

I have the same problem when i tried to run create-react-app. I'm still trying to solve it, but i can't find a solution.

Hi, so I solved it by deleting Node modules from my local disk C and also the user folder. Removed everything related to npm. After that I restarted my computer and installed everything from scratch. Surprisingly it worked for me. Let me know how it goes

Let me try it. I'm deleting my user folder. I'll back here in some minutes.

If this still does not work clone a copy of the boilerplate code which is after you use npx create-react-app. Before I solved this I did this and worked for me. I'll send a GitHub boiler plate code Download you can use. Clone it and make sure to run npm install after u get the file on your computer to install all the modules, then run npm start and you will be good to go :)

Have a look at this, it worked for me
https://stackoverflow.com/a/72879257/15512430

try to delete your antivirus

I already did everything mentioned above. I only have MS Defender antivirus. Do I have to delete it to?

I already did everything mentioned above. I only have MS Defender antivirus. Do I have to delete it to?

No you don't have delete ms defender antivirus you need to disable it

just disabled it. I still experience the same error.

just disabled it. I still experience the same error.

can we connect?

just disabled it. I still experience the same error.

can we connect?

when u disabled it try to run npx create-react-app

connect?
still does not work.

just disabled it. I still experience the same error.

can we connect?

when u disabled it try to run npx create-react-app

connect?
still does not work.

just disabled it. I still experience the same error.

can we connect?

when u disabled it try to run npx create-react-app

is there an other antivires? can we have a meeting on google meet or something?

real-time protection says i'm using other anitivirus provider but i've already uninstalled all besides ms defender. can you send the link for google meeting?

connect?
still does not work.

just disabled it. I still experience the same error.

can we connect?

when u disabled it try to run npx create-react-app

is there an other antivires? can we have a meeting on google meet or something?

real-time protection says i'm using other anitivirus provider but i've already uninstalled all besides ms defender. can you send the code for google meet?

connect?
still does not work.

just disabled it. I still experience the same error.

can we connect?

when u disabled it try to run npx create-react-app

is there an other antivires? can we have a meeting on google meet or something?

real-time protection says i'm using other anitivirus provider but i've already uninstalled all besides ms defender. can you send the code for google meet?

meet.google.com/krp-drfp-xhe

I had the same issue, I tried uninstalling and updating node and vscode but it didn't work.
and then I uninstalled the antivirus and restarted my PC, the problem solved

Solved by uninstalling antivirus and VPN.
you should try doing this.

:\Users\CE MO01\Downloads\react>npx create-react-app my-app
'CALL "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" prefix -g' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ENOENT
npm ERR! syscall spawn C:\Users\CE MO01\Downloads\jdk-20.0.1\bin
npm ERR! path C:\Users\CE MO01\Downloads\react
npm ERR! errno -4058
npm ERR! enoent spawn C:\Users\CE MO01\Downloads\jdk-20.0.1\bin ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in: C:\Users\CE MO01\AppData\Local\npm-cache_logs\2024-01-15T20_21_46_432Z-debug-0.log
please help me for resolved this error


{new-relic} HTML tags aren't allowed in published reference content

Describe the bug
Problem to solve:
HTML tags in source code are causing build warnings in MicrosoftDocs/azure-docs-cli. More importantly, customer-facing reference docs are not instantiating properly -- parameter values formatted with `<>` are missing. Here's an example:

Requested solution:
These values should be escaped with a backtick. Here's an example from az webpubsub.

Related GitHub issues:
This is the same issue as these GitHub issues.
List of HTML tag instances that need update:

File name
Build error

latest/docs-ref-autogen/new-relic/monitor.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor/monitored-subscription.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor/monitored-subscription.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor/monitored-subscription.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor/monitored-subscription.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor/monitored-subscription.yml
HTML tag 'indexToRemove' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor/monitored-subscription.yml
HTML tag 'value' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor/monitored-subscription.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor/tag-rule.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor/tag-rule.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor/tag-rule.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor/tag-rule.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

latest/docs-ref-autogen/new-relic/monitor/tag-rule.yml
HTML tag 'name' isn't allowed.  Replace it with approved Markdown or escape the brackets if the content is a placeholder.

Related command
az new-relic
Errors
n/a
Issue script & Debug output
n/a
Expected behavior
n/a
Environment Summary
This GitHub issue was created at the time of Azure CLI 2.62.0
Additional context
No response

Thank you for opening this issue, we will look into it.


[TECH DEBT] Need to go through Salt Project issues and PRs

Each issue should validated. If still valid, port the issue over to this repo (copy/paste of main content is fine). Once the issue is recorded in this repo, close the original issue in Salt Project with a link to the new issue for folks who are tracking it. If the issue is not valid, close the issue in Salt Project with a note as to why.

[ ] https://github.com/saltstack/salt/issues/56527
[ ] https://github.com/saltstack/salt/issues/56633
[ ] https://github.com/saltstack/salt/issues/59057
[ ] https://github.com/saltstack/salt/issues/59528
[x] https://github.com/saltstack/salt/issues/60947
[x] https://github.com/saltstack/salt/issues/61136
[ ] https://github.com/saltstack/salt/issues/61215
[ ] https://github.com/saltstack/salt/issues/62945
[ ] https://github.com/saltstack/salt/issues/62947

The following PRs should be checked for validity. If valid, the changes can either be ported over to a PR in this repo or a comment can be left with the original contributor to move the PR over to this repo. If the latter is chosen, follow-up will be required to ensure the change is recorded here. Once moved to this repo, the PR in the Salt Project repo should be closed without merge.

[ ] https://github.com/saltstack/salt/pull/55246
[ ] https://github.com/saltstack/salt/pull/58843
[ ] https://github.com/saltstack/salt/pull/59343

Please add https://github.com/saltstack/salt/issues/61136 to the list as documentation tech debt.

Added issue https://github.com/salt-extensions/saltext-proxmox/issues/8 replacing https://github.com/saltstack/salt/issues/56633

Tech debt replacement list:

https://github.com/saltstack/salt/issues/62945 with https://github.com/salt-extensions/saltext-proxmox/pull/6
https://github.com/saltstack/salt/issues/61136 with https://github.com/salt-extensions/saltext-proxmox/issues/9


Top-level program exits while there are live fibers, doesn't complain, no good way to wait.

The top-level program exits while there are live fibers, killing them. It doesn't complain. There isn't really a good means to wait for them.
fiber = spawn do
  sleep 2
  STDOUT.puts "The fiber completed."
end
p fiber.dead?

The only thing I can think of to wait for live fibers to complete is to keep a container of all spawned fibers, and to scan through it every second or so checking for Fiber#dead?.

The usual pattern for doing this is:
chan = Channel(Nil).new
fiber = spawn do
  sleep 2
  chan.send(nil)
end
chan.receive
STDOUT.puts "The fiber completed."

More specifically I think a WaitGroup like the one they have in Go would suit your needs. But that doesn't exist yet. Maybe there's a shard for that.
In any case this is by design. I also suggested that, if in doubt of if something is a bug or not, to open a discussion in the forums.

For completeness: Fibers are very low level. After launching a new fiber, the runtime doesn't keep track. It doesn't care wether a fiber is supposed to keep running or should finish when the program exits.
You can do so explicitly with channels or higher level concurrency constructs like wait groups or nurseries (see #6468).


Fixes logging in with empty or null values

Fixes #40

Ah, thanks for the hint! The bypassing is caused by adding the login method call to the button's OnClick as well as on the OnValidSubmit.
The only downside to this solution is that the button is enabled despite the empty field, and only on attempted submit the field will show that the password cannot be empty.

Nice find, all good for me then. If the enabled button annoys you, you can look into the example. At least one of them has a disable button until the form is valid, though we may need to change the form type then. Also not something that bothers me

I just tried to see if it was possible, but I am not able to change that behaviour without introducing other unwanted behaviour.
What we can do, but gives other behaviour, is: Change the EditForm to use Context instead of Model. OnInitialized should then initialize the EditContext with an initialized LoginForm (instead of applying the LoginForm to the EditForm initially). This allows us to bind the Disabled property of the submit button to the EditContext.Validate().
The issue with this is: On load, the button will call the EditContext.Validate() and add a validation message to all invalid fields, so the page loads with:

The Email field is required.
The Password field is required.

The current version only validates each field individually on field changes and I couldn't figure out a way to combine this with the button disabled/enabled without adding much more code complexity. It might, as you say, require us to change away from the EditForm but I don't think that is worth it. I'll merge this but if our PO wants it in the future we have some idea of how to fix it / what our options are.


Log an warning message when the rule queue is used.

Coverage decreased (-0.1%) to 97.917% when pulling e4a8cfb16cf276da3211bdf5728bf73abeef8555 on log_warning_message into 4adb292d206f80a074a150705c72029be5a32ca4 on master.


Estimator Tensor not from same graph for predict()

I run Tensorflow 1.0.
I use Mac OSX Sierra.
I use the Estimator and Layers api.
This is the first part of my model_fn which I pass to .Estimator(model_fn=...).
class Model(object):

  def __init__(self):
    ...
    self._estimator = learn.Estimator(
        model_fn=self.model_fn,
        model_dir=modeldir,
        params={
            'width': width,
            'height': height,
            'classes': classes
        },
        config=RunConfig(save_checkpoints_secs=30, gpu_memory_fraction=0.75)
    )

  def model_fn(self, features, labels, mode, params):
    input_layer = tf.reshape(features, [-1, width, height, 1], name='fitinput')

    conv1 = tf.layers.conv2d(
        inputs=input_layer,
        filters=32,
        kernel_size=[5, 5],
        padding="same",
        activation=tf.nn.relu,
        name="conv1"
    )
...

I only use input_fn to pass data to the individual steps (images, labels).
I train with estimator.fit(...) and evaluate with estimator.evaluate(...). Both work fine and create summaries and checkpoints in my model directory.
After that I run estimator.predict(...) with the same data that I trained on (just to troubleshoot this problem). For predict I only pass images.
Calling predict results in the following error:
...
    estimator.predict(input_fn=predict_data_fn)
  File "/users/anaconda/envs/ocnncr/lib/python3.5/site-packages/tensorflow/python/util/deprecation.py", line 280, in new_func
    return func(*args, **kwargs)
  File "/users/anaconda/envs/ocnncr/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 561, in predict
    as_iterable=as_iterable)
  File "/users/anaconda/envs/ocnncr/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 865, in _infer_model
    infer_ops = self._call_legacy_get_predict_ops(features)
  File "/users/anaconda/envs/ocnncr/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 996, in _call_legacy_get_predict_ops
    infer_ops = self._get_predict_ops(features)
  File "/users/anaconda/envs/ocnncr/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 1217, in _get_predict_ops
    return self._call_model_fn(features, labels, model_fn_lib.ModeKeys.INFER)
  File "/users/anaconda/envs/ocnncr/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 1133, in _call_model_fn
    model_fn_results = self._model_fn(features, labels, **kwargs)
  File "ocrcnn.py", line 197, in cnn_model_fn
    name="conv1"
  File "/users/anaconda/envs/ocnncr/lib/python3.5/site-packages/tensorflow/python/layers/convolutional.py", line 509, in conv2d
    return layer.apply(inputs)
  File "/users/anaconda/envs/ocnncr/lib/python3.5/site-packages/tensorflow/python/layers/base.py", line 303, in apply
    return self.__call__(inputs, **kwargs)
  File "/users/anaconda/envs/ocnncr/lib/python3.5/site-packages/tensorflow/python/layers/base.py", line 273, in __call__
    outputs = self.call(inputs, **kwargs)
  File "/users/anaconda/envs/ocnncr/lib/python3.5/site-packages/tensorflow/python/layers/convolutional.py", line 156, in call
    data_format=utils.convert_data_format(self.data_format, self.rank + 2))
  File "/users/anaconda/envs/ocnncr/lib/python3.5/site-packages/tensorflow/python/ops/nn_ops.py", line 586, in convolution
    with ops.name_scope(name, "convolution", [input, filter]) as name:
  File "/users/anaconda/envs/ocnncr/lib/python3.5/contextlib.py", line 59, in __enter__
    return next(self.gen)
  File "/users/anaconda/envs/ocnncr/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 4219, in name_scope
    g = _get_graph_from_inputs(values)
  File "/users/anaconda/envs/ocnncr/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 3968, in _get_graph_from_inputs
    _assert_same_graph(original_graph_element, graph_element)
  File "/users/anaconda/envs/ocnncr/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 3907, in _assert_same_graph
    "%s must be from the same graph as %s." % (item, original_item))
ValueError: Tensor("conv1/kernel:0", shape=(5, 5, 1, 32), dtype=float32_ref) must be from the same graph as Tensor("fitinput:0", shape=(50, 28, 28, 1), dtype=float32).

I have no idea if this is a bug or I did something wrong. So I am sorry if this should have been a Stackoverflow issue instead.

I did some more testing now. When I move the code out of the class then I can call predict without any problem. But when calling the estimator from outside the class like so:
model = Model()
model._estimator.predict(input_fn=input_fn)

Then I get the above mentioned error.

I found this issue https://github.com/tensorflow/tensorflow/issues/4026 which solved my problem ... Maybe it is just me being stupid, but it would be great if you mention that somewhere in the documentation.

@sleighsoft Could you please post the edited the code that works. I'm facing the same issue when trying to export a model using estimator. The method estimator.export_savedmodel(export_dir_base, serving_input_receiver_fn) requires an input receiver function. Where should the placeholder for feeding inputs during inference be placed.  How is that placeholder connected to the input pipeline. I'm using tf.data.Dataset for input pipeline.

@deepaksuresh  I'm facing the same problem.
I've written an input_fn to export a saved from a Estimator-based model that for training receives data from tf.data.Dataset. It seams that another graph is created when doing this.

@rodrigofp-cit Could you please tell me what exactly you're trying to do?
Are you trying to load the saved model and feed it data?

@deepaksuresh Now I realized what I was doing wrong.
First: I was not passing export_outputs argument to tf.estimator.EstimatorSpec. Now I'm doing this on my model_fn
return tf.estimator.EstimatorSpec(
                mode=mode,
                predictions=prediction_dict,
                loss=total_loss,
                train_op=train_op,
                eval_metric_ops=eval_metric_ops,
                export_outputs={'predict':tf.estimator.export.PredictOutput(outputs=prediction)})

Second: I was trying to create a serving function that not only map what is received to a FixedLenFeature, but also decoded it to an image (in my case). This was causing trouble for me, so I decided to just make the mapping. This is my code;
def get_serving_fn():
        feature_spec = {'raw_bytes':tf.FixedLenFeature(dtype=tf.string,default_value="",shape=())}
        return  tf.estimator.export.build_parsing_serving_input_receiver_fn(feature_spec=feature_spec)

And on my model_fn I check whether what is received as features is a dict(export mode) or just a Tensor(eval or train)
 def model_fn(features, labels, mode, params):
            if mode != tf.estimator.ModeKeys.PREDICT:
                # unfortunately, when exporting a saved model, features is a dict of Tensors, instead of a Tensor itself
                image_batch = tf.map_fn(self.preproc_fn,features,dtype=tf.float32)
                tf.logging.info('model_fn called for training, evaluation or prediction, not export')
                tf.logging.info('Input shape not export: {}'.format(features.get_shape()))
            else:
                image_batch = tf.map_fn(self.preproc_fn,features['raw_bytes'],dtype=tf.float32)
                tf.logging.info('model_fn called to export saved_model')
                tf.logging.info('Input shape export: {}'.format(image_batch.get_shape()))

And export the saved model with
estimator.export_savedmodel(export_dir_base=output_dir,
                                serving_input_receiver_fn=get_serving_fn())

Well, to conclude. I've fixed the bug.

@deepaksuresh Now I realized what I was doing wrong.
First: I was not passing export_outputs argument to tf.estimator.EstimatorSpec. Now I'm doing this on my model_fn
return tf.estimator.EstimatorSpec(
                mode=mode,
                predictions=prediction_dict,
                loss=total_loss,
                train_op=train_op,
                eval_metric_ops=eval_metric_ops,
                export_outputs={'predict':tf.estimator.export.PredictOutput(outputs=prediction)})

Second: I was trying to create a serving function that not only map what is received to a FixedLenFeature, but also decoded it to an image (in my case). This was causing trouble for me, so I decided to just make the mapping. This is my code;
def get_serving_fn():
        feature_spec = {'raw_bytes':tf.FixedLenFeature(dtype=tf.string,default_value="",shape=())}
        return  tf.estimator.export.build_parsing_serving_input_receiver_fn(feature_spec=feature_spec)

And on my model_fn I check whether what is received as features is a dict(export mode) or just a Tensor(eval or train)
 def model_fn(features, labels, mode, params):
            if mode != tf.estimator.ModeKeys.PREDICT:
                # unfortunately, when exporting a saved model, features is a dict of Tensors, instead of a Tensor itself
                image_batch = tf.map_fn(self.preproc_fn,features,dtype=tf.float32)
                tf.logging.info('model_fn called for training, evaluation or prediction, not export')
                tf.logging.info('Input shape not export: {}'.format(features.get_shape()))
            else:
                image_batch = tf.map_fn(self.preproc_fn,features['raw_bytes'],dtype=tf.float32)
                tf.logging.info('model_fn called to export saved_model')
                tf.logging.info('Input shape export: {}'.format(image_batch.get_shape()))

And export the saved model with
estimator.export_savedmodel(export_dir_base=output_dir,
                                serving_input_receiver_fn=get_serving_fn())

Well, to conclude. I've fixed the bug.


Feature request: Add ipfs-search.com functionality into ipfs-webui

Is your feature request related to a problem? Please describe.
Currently, IPFS Webui and Desktop to not allow for content discovery. The only way I know to discover content on ipfs is via ipfs-search.com. I would love be able to discover new ipfs content, or old interesting content, or any content on IPFS so I can better appreciate the value of all the data that exists.
Describe the solution you'd like
I want to be able to search for content on IPFS via ipfs-search's API and then see the results within the ipfs-webui on a results screen.
Rough plan we've discussed
V0

[ ] Get API calls to ipfs-search working
[ ] get input inside of webui calling ipfs-search
[ ] render results from ipfs-search

[ ] Clicking on a result item will link you to that page (outside of webui) on ipfs-search, i.e. https://ipfs-search.com/#/search/detail/text/QmYByXDHpPJs6Q3V83YdDA9MiXHnHb1VCLCqSgGZ3FnqnU?q=user+design&page=1

V1

[ ] Add cross-functionality between ipfs-search.com results and ipld-explore page functionality.

ideally, a user could "explore" an ipfs-search.com result within webui, or "ipfs-search" for similar content from the explore CID page. i.e. backlinks on both sides.

[ ] Enhanced and simplified UX that handles EITHER explore(select & explore) CID submission, or search(discover) functionality within the SINGLE input at the top of webui screens.
[ ] Results list

[ ] Items in the list allow you to access the content on ipfs-search (small target=blank icon) OR explore (explore CID) them easily, or VIEW them (videos/images/etc) within webui

Describe alternatives you've considered

I've considered not adding this functionality and just redirecting users to ipfs-search.com, but I believe our large userbase could benefit from being exposed to ipfs-search.com through our familiar ipld-explore-cid functionality that already exists.

Additional context

I've discussed this with the ipfs-search team face to face at #IPFSCamp22 and they're excited to collaborate on this and agree it would be a big win for both of us and our customers.
One implementation we've talked about doing is overloading the CID Explorer input field, however, this may cause UX issues with users familiar with that input. We want to make sure that we do not break their current expectations, while also exposing them gently and encouragingly to the new functionality.

@djmcquillan @SgtPooki Please don't hesitate to reach out to us (ipfs-search team) for any feedback, e.g. how to query or how we implemented something. You can also check all of our code and documentation on http://github.com/ipfs-search

s/customers/users/  :)
I'll echo the usual concerns around using DNS-bound services in software that aims to be more robust than Web2.
What happens when DNS is down or ipfs-search.com gets censored on the default DNS resolver our desktop user have?
Or when DNS  + PKI cert are spoofed (MITM)  to return malicious results?
If we hardcode https://ipfs-search.com these will be some problems introduced to places that use webui, e.g., IPFS Desktop, Brave.
@femans are you considering exposing service over libp2p? It would allow for securely querying search without reliance on DNS and PKI.
fwiw, Kubo has support for exposing HTTP over libp2p, which should get us 80% there without changing anything on your end (/search could be used as-is)

@lidel libp2p sockets (as well as .onion) is something on the horizon and I do follow your arguments. I have hereby added it explicitly to our roadmap-in-progress.
However, I do have my reservations about the stability of these alternative sockets. Even if we do get a prototype working, I am uncertain whether making it the default for the 100k+ or so active daily users of the IPFS UI would provide an acceptable experience. (A challenge here would be how to scale the libp2p proxy service, apart from it generally not having received a lot of testing AFAIK.)
Here, I would also like to point out that IPFS implementations actively relay on DNS being available.
That having been said, I think using libp2p as a fallback could be a great idea. Is JS-IPFS available everywhere the UI is available?

I am uncertain whether making it the default for the 100k+ or so active daily users of the IPFS UI would provide an acceptable experience.

I was thinking about p2p-as-a-fallback (when DNS/HTTP is down) or if user explicitly opt-in to search over libp2p tunel via settings. This way, default traffic/load (from majority of users) would go over HTTPS.

I follow your point and libp2p tuneling is indeed on our roadmap, albeit not on the very top right now (in part because it is experimental and I see no sane solution to distribute a libp2p endpoint over multiple hosts).

block all HTTP and HTTPS traffic, install ipfs-desktop from pendrive, set up DNS over Tor, and even DNSLinks work again.

If users can use DNS over Tor they can use Tor so they can use HTTPS.

If we add hardcoded HTTP endpoint, this functionality will be broken in context where connectivity is limited or not existant (remote villages without WAN etc). So either we have a fallback, or need to hide such feature unless we confirm the HTTP endpoint is reachable.

I see how you are worried about degraded UX and unmet user  expectations where internet connections are degraded. My perspective is that where people have degraded internet to this point, they are used to stuff not always loading. Although I can imagine building a simple 'ping' check to see whether our API is available.
Would that address your concerns?

I think using libp2p as a fallback could be a great idea. Is JS-IPFS available everywhere the UI is available?

No JS-IPFS. ipfs-webui works only with Kubo RPC: p2p http proxy can be controlled via /api/v0/p2p/* RPC commands.

That's a pity, it would be great if we can provide non-WebUI users with a fallback as well. :/


Add support for functional components in slides with SSG

craft-visual instances won't render during SSG.  Direct visual instances, like in our looping demo, do.  I figure the issue is that they're functional.

The prob wasn't functional components but @nuxt/components registered components that get resolved by a string name.  Like this:
https://github.com/BKWLD/cloak-visual/blob/0c4456ff1aecf69e8d6f07398cbc4b6dea0d228f/adapters/globals/craft-visual.coffee#L27


hold-the-node bump telemetry-operator

hold-the-node

/retest

/test openstack-operator-build-deploy-kuttl

/test openstack-operator-build-deploy-kuttl

/test openstack-operator-build-deploy-kuttl

@fao89 I am debugging the failure right now. please do not retrigger jobs

we'll bump the operator in https://github.com/openstack-k8s-operators/openstack-operator/pull/1126


Update WeDeploy SDK JS to v4.1.0

Will this update require a change on the documentation? https://wedeploy.com/docs/auth/manage-users/#5

Yes, @NolanChan already sent a PR about that.


[Request] Allow modpack end-user to denylist certain files from being downloaded

I'd like to be able to deny certain files (like extra resource packs that aren't essential) from being downloaded every time I start the modpack.
This could be implemented by either an argument in the command line or a file in modpack directory

Note that the pack creator can mark files as optional (so the non-essential resource packs can be opt-in), see https://packwiz.infra.link/reference/pack-format/mod-toml/#option. In https://github.com/packwiz/packwiz-installer/issues/6 I want to allow any file to be opted out of in the GUI, similarly to optional files. I think https://github.com/packwiz/packwiz-installer/issues/13 would also apply to resource packs.


下拉菜单跟随页面滚动问题

What problem does this feature solve?
下拉菜单跟随页面滚动问题
What does the proposed API look like?
getPopupContainer={triggerNode => triggerNode.parentNode}

这个的确也是个问题


WASM - fast array implementation

This removes the bounds check in jited code on x64 Windows for heap access.
I targeted this change against release/1.4 to get the review going.
We should discuss if we want to push this change to the release branch or if we should keep it in master
Fixes #1888
Since we have more control on how the buffer is created in WebAssembly then asm.js, I decided to create the class WebAssemblyArrayBuffer which would

allocate 8G instead of 4G of virtual memory.
always create a buffer even if the initial size is 0.
always use virtual memory when transfering the buffer.

@MikeHolman Are there other places other than TransferInternal that can detach the buffer ?
@liminzhu @LouisLaf @EdMaurer Do we want to integrate this change to release/1.4 since it has a massive perf benefit or is it too late ?

This change is

Closing for now.


feat: add scatter plot option

[x] add scatter plot
[ ] add group colors

there are conflicts

there are conflicts

Could we have the same color for the scatter plot and the regression lines ?

Could we have the same color for the scatter plot and the regression lines ?

I was planning to create that option in another PR, is the color group option

I was planning to create that option in another PR, is the color group option


Make np_datatype property of ShapeProvider rather than final axis

This caught me out while updating dodal to opyhd-async: while the numpy datatype may be useful for deciding how much space to allocate for a given stack of frames, it is decidedly not part of the shape of the frame.
For a currently not ADBaseIO detector (the TetrAMM monitor) this tripped me up as the datatype was not being passed as part of the shape and hence it was looking for a datatype with key 1000.
Closes #554

Seems like a cleaner approach, I like it.


Update virtual-network-service-endpoint-policies-overview.md

Updated region and subscription limitation

@asudbring
Can you review the proposed changes?
IMPORTANT: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

#sign-off


Package request: no-more-secrets

Project description
A command line tool that recreates the famous data decryption effect seen in the 1992 movie Sneakers.
Metadata

homepage URL: https://github.com/bartobri/no-more-secrets
source URL: https://github.com/bartobri/no-more-secrets
license: GPL 3.0
platforms: unix

Add a :+1: reaction to issues you find important.

@bonds it's already in Nixpkgs:
https://github.com/NixOS/nixpkgs/blob/nixos-24.05/pkgs/tools/misc/nms/default.nix#L19
https://search.nixos.org/packages?type=packages&query=nms

Awesome, thanks for letting me know! Sorry for the SPAM then. I searched the packages using 'no-more-secrets' and 'nomoresecrets' and 'libnms' but someone didn't think to try nms. :|
On Tuesday, July 16th, 2024 at 1:22 PM, Matteo Pacini @.***> wrote:

@.***(https://github.com/bonds) it's already in Nixpkgs:
https://github.com/NixOS/nixpkgs/blob/nixos-24.05/pkgs/tools/misc/nms/default.nix#L19
https://search.nixos.org/packages?type=packages&query=nms
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.***>

@bonds Did the same actually, and could not find it  😅 - glad to help!


SQLExecutor: with in clause accepting list of values

Hi @landawn
I need your urgent help with below issue.
I am using SQLExecutor, my query looks like this:
"SELECT ID FROM EMPLOYEES WHERE DEP_ID IN (replacMe)"
Now suppose, i want to fetch ids of all employees whose dep_id is 1, 2 or 3.
so i replace string replaceMe with the 3 (?, ?, ?) in the query and query becomes like.
"SELECT ID FROM EMPLOYEES WHERE DEP_ID IN (?, ?, ?)"
When i execute this query it throws error:
SQLException|17041|Missing IN or OUT parameter at index:: 1
can you please help me in this.

Did you pass the parameters and how if yes?

Thank you for the early response.
considering above example, now my query has 3 (?) instead of 1.
and i take func ( Object... parameters) as an input , which contains the value of these bind variables.

pseudo code of my function looks like this:
public void insertInDatabase(String sql, Object... paramValues){
// 1.  replace - replaceMe phrase from the sql String with the ? ( N times,  n is the size of paramValues )
// 2. execute the query using SQLExecutor: executor.query(sql, paramValues);
}

parameters can be Object[]/List or Map/Entity for named parameter query. for example:
insertInDatabase(sql, 1, 2, 3);
// OR
insertInDatabase(sql, N.asList(1, 2, 3));

if what you pass is int[], it won't work. for example:
int[] ids = {1, 2, 3};
insertInDatabase(sql, ids); // won't work

one more thing apart from above mentioned,
how can i see, what sql is passed to database from SQLExecutor finally.
so i can easily check whats going wrong.

but i am passing input as Setids and caching it in Object in the insertInDatabase function so that this can work with any datatype.
What do you suggest, how can i make above one running.

Using JdbcSetting.setLogSQLWithParameters(true),  log4j2/logback/slf are supported. you can log the sql to your log file or print it out to console.

I turned on this parameter and my sql is getting printed:
SELECT ID FROM EMPLOYEES WHERE DEP_ID IN (?, ?, ?) {[1, 2, 3]}

probably what you passed is an  int[]. Here is my sample:
    @Test
    public void issue_24() {
        String sql = "SELECT * FROM user WHERE ID IN (replacMe)";
        insertInDatabase(sql, 1, 2, 3);
        insertInDatabase(sql, N.asList(1, 2, 3));
        insertInDatabase(sql, N.asSet(1, 2, 3));
    }

    public void insertInDatabase(String sql, Object... paramValues) {
        String newSql = sql.replace("replacMe", SQLBuilder.repeatQM(paramValues.length));
        sqlExecutor.execute(newSql, paramValues);
    }

    public void insertInDatabase(String sql, Collection<?> paramValues) {
        List<Object> params = paramValues instanceof List ? (List) paramValues : N.newArrayList(paramValues);
        String newSql = sql.replace("replacMe", SQLBuilder.repeatQM(paramValues.size()));
        sqlExecutor.execute(newSql, params);
    }

Let me show my sample code:
public long insert(final String queryDataName, final Object... parameters) {
       log.info("Inserting data for {} with parameters {}", queryDataName, Arrays.toString(parameters));
       final Query q = fetchQuery(queryDataName);
       if (q.getSourceName().startsWith(DatabaseType.XYZ.name()))
           return xyzSQLExecutor.insert(q.getSql(), parameters);
       else
           return abcSQLExecutor.insert(q.getSql(), parameters);
   }

calling method:
placeHolderValues --> this is a list
dsRepository.query(QueryName.SQL_DUMMY, preparePlaceHolders(curIds.size()), placeHolderValues);
private static String preparePlaceHolders(int length) {
return String.join(", ", Collections.nCopies(length, QUESTION_MARK));
}

are you doing insert or query? please help to print out below log before:  xxxorabcSQLExecutor.insert(q.getSql(), parameters)
log.info("sql: " + sql + ", parameters: " + parameters.getClass() + ", parameters[0]: " + parameters[0].getClass() + ", values: " + N.toString(parameters));

mybad, i am querying, as i can't disclose confidential code, so i typed manualy here.

@landawn
Thanks a lot, it worked finally,
Thanx a ton mahn for your help.
you are champ :)


 Added comments for parts of code that need more benchmark coverage.

@swift-ci please test

@swift-ci please test


Bug - Error: Failed to persist state to backend on modernisation-platform

Expected Behavior
The state should save without issues.
Actual Behavior
We get the above error as seen in https://github.com/ministryofjustice/modernisation-platform/actions/runs/7285740796/job/19855252914#step:7:113 as an example
Steps to Reproduce the Problem
Run a full release that amends everything, e.g. adding a role access change. The number that happen is not consistent but it has been happening more recently.
Version
Example is the run for PR #5840
Modules
modernisation-platform
Account
No response

The error to be fixed:
Error: Failed to save state

Error saving state: failed to upload state: operation error S3: PutObject,
failed to rewind transport stream for retry, request stream is not seekable

Error: Failed to persist state to backend

The error shown above has prevented Terraform from writing the updated state
to the configured backend. To allow for recovery, the state has been written
to the file "errored.tfstate" in the current working directory.

To retry writing this state, use the following command:
    terraform state push errored.tfstate

https://mojdt.slack.com/archives/C015UBQ78MR/p1702984257007459 << You can see a short Slack conversation with our AWS TAM here where we were given some guidance / linked to the S3 performance design considerations whitepaper.
https://docs.aws.amazon.com/AmazonS3/latest/userguide/optimizing-performance.html

Thanks David, but according to the doc, we are not hitting the limit in a single workflow run. FYI, the implemented solution is not looking into the limits, but is to push the errored state.

The state push fix for the state persistence failure is now rolled out to the scheduled baseline workflow with temporarily suppression of slack alerts for when the state push is successful.
There will be separate issues to track the fix rollout to other workflows.
Also, once https://github.com/hashicorp/terraform/issues/34528 is fixed, the alerting should be re-enabled.

To roll out the fix to other repos/workflows see this issue: https://github.com/ministryofjustice/modernisation-platform/issues/6038


The System Cannot find Dockerfile while creating a Microservice

Problem encountered on https://dotnet.microsoft.com/learn/aspnet/microservice-tutorial/docker-file
Operating System: windows
Provide details about the problem you're experiencing. Include your operating system version, exact error message, code sample, and anything else that is relevant.

Can you help here @shirhatti @nishanil?
It would be great if you could include screenshots @kumarsril