[Bug] Loading GLM-4V-9B results in an error

Checklist

[X] 1. I have searched related issues but cannot get the expected help.
[X] 2. The bug has not been fixed in the latest version.
[X] 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.

Describe the bug
I was trying to load GLM-4V-9B with tensor parallelism using LMDeploy, and it results in an error.
Reproduction
import torch
from lmdeploy import pipeline, TurbomindEngineConfig
model_path = "THUDM/glm-4v-9b"
pipe = pipeline(
    model_path,
    TurbomindEngineConfig(
        tp=torch.cuda.device_count()
    ),
)

Environment
sys.platform: linux
Python: 3.10.15 (main, Oct  3 2024, 07:27:34) [GCC 11.2.0]
CUDA available: True
MUSA available: False
numpy_random_seed:<PHONE_NUMBER>
GPU 0,1,2,3: NVIDIA GeForce RTX 3090
CUDA_HOME: /usr/local/cuda
NVCC: Cuda compilation tools, release 12.5, V12.5.40
GCC: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
PyTorch: 2.4.0+cu121
PyTorch compiling details: PyTorch built with:
  - GCC 9.3
  - C++ Version: 201703
  - Intel(R) oneAPI Math Kernel Library Version 2022.2-Product Build 20220804 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v3.4.2 (Git Hash 1137e04ec0b5251ca2b4400a4fd3c667ce843d67)
  - OpenMP 201511 (a.k.a. OpenMP 4.5)
  - LAPACK is enabled (usually provided by MKL)
  - NNPACK is enabled
  - CPU capability usage: AVX512
  - CUDA Runtime 12.1
  - NVCC architecture flags: -gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_90,code=sm_90
  - CuDNN 90.1  (built against CUDA 12.4)
  - Magma 2.6.1
  - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=12.1, CUDNN_VERSION=9.1.0, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -D_GLIBCXX_USE_CXX11_ABI=0 -fabi-version=11 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOROCTRACER -DUSE_FBGEMM -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -O2 -fPIC -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Werror=bool-operation -Wnarrowing -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-stringop-overflow -Wsuggest-override -Wno-psabi -Wno-error=pedantic -Wno-error=old-style-cast -Wno-missing-braces -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=2.4.0, USE_CUDA=ON, USE_CUDNN=ON, USE_CUSPARSELT=1, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_GLOO=ON, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=1, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF, USE_ROCM_KERNEL_ASSERT=OFF,

TorchVision: 0.19.0+cu121
LMDeploy: 0.6.3+7cfb2ce
transformers: 4.46.3
gradio: Not Found
fastapi: 0.115.5
pydantic: 2.10.2
triton: 3.0.0
NVIDIA Topology:
        GPU0    GPU1    GPU2    GPU3    CPU Affinity    NUMA Affinity   GPU NUMA ID
GPU0     X      NODE    SYS     SYS     0-15,32-47      0               N/A
GPU1    NODE     X      SYS     SYS     0-15,32-47      0               N/A
GPU2    SYS     SYS      X      NODE    16-31,48-63     1               N/A
GPU3    SYS     SYS     NODE     X      16-31,48-63     1               N/A

Legend:

  X    = Self
  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
  PIX  = Connection traversing at most a single PCIe bridge
  NV#  = Connection traversing a bonded set of # NVLinks

Error traceback
2024-12-01 05:29:58,141 - lmdeploy - WARNING - archs.py:53 - Fallback to pytorch engine because `/data2/Aashish/.cache/huggingface/hub/models--THUDM--glm-4v-9b/snapshots/6a1215eea198982bcfc2a639312471b9ac1ac044` not supported by turbomind engine.
2024-12-01 05:30:09,088 - lmdeploy - WARNING - __init__.py:165 - LMDeploy requires transformers version: [4.33.0 ~ 4.44.1], but found version: 4.46.3
/home/aza6352/miniconda3/envs/lmdeploy/lib/python3.10/site-packages/transformers/utils/hub.py:128: FutureWarning: Using `TRANSFORMERS_CACHE` is deprecated and will be removed in v5 of Transformers. Use `HF_HOME` instead.
  warnings.warn(
/home/aza6352/miniconda3/envs/lmdeploy/lib/python3.10/site-packages/transformers/utils/hub.py:128: FutureWarning: Using `TRANSFORMERS_CACHE` is deprecated and will be removed in v5 of Transformers. Use `HF_HOME` instead.
  warnings.warn(
/home/aza6352/miniconda3/envs/lmdeploy/lib/python3.10/site-packages/transformers/utils/hub.py:128: FutureWarning: Using `TRANSFORMERS_CACHE` is deprecated and will be removed in v5 of Transformers. Use `HF_HOME` instead.
  warnings.warn(
[rank0]:   File "/home/aza6352/miniconda3/envs/lmdeploy/lib/python3.10/site-packages/lmdeploy/api.py", line 81, in pipeline
[rank0]:     return pipeline_class(model_path,
[rank0]:   File "/home/aza6352/miniconda3/envs/lmdeploy/lib/python3.10/site-packages/lmdeploy/serve/vl_async_engine.py", line 27, in __init__
[rank0]:     super().__init__(model_path, **kwargs)
[rank0]:   File "/home/aza6352/miniconda3/envs/lmdeploy/lib/python3.10/site-packages/lmdeploy/serve/async_engine.py", line 162, in __init__
[rank0]:     self._build_pytorch(model_path=model_path,
[rank0]:   File "/home/aza6352/miniconda3/envs/lmdeploy/lib/python3.10/site-packages/lmdeploy/serve/async_engine.py", line 210, in _build_pytorch
[rank0]:     self.engine = Engine(model_path=model_path,
[rank0]:   File "/home/aza6352/miniconda3/envs/lmdeploy/lib/python3.10/site-packages/lmdeploy/pytorch/engine/engine.py", line 149, in __init__
[rank0]:     self.model_agent = build_model_agent(
[rank0]:   File "/home/aza6352/miniconda3/envs/lmdeploy/lib/python3.10/site-packages/lmdeploy/pytorch/engine/model_agent.py", line 790, in build_model_agent
[rank0]:     model_agent = TPModelAgent(model_path,
[rank0]:   File "/home/aza6352/miniconda3/envs/lmdeploy/lib/python3.10/site-packages/lmdeploy/pytorch/engine/model_agent.py", line 586, in __init__
[rank0]:     model, cache_engine, cache_config = self._build_model(
[rank0]:   File "/home/aza6352/miniconda3/envs/lmdeploy/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
[rank0]:     return func(*args, **kwargs)
[rank0]:   File "/home/aza6352/miniconda3/envs/lmdeploy/lib/python3.10/site-packages/lmdeploy/pytorch/engine/model_agent.py", line 681, in _build_model
[rank0]:     model, cache_engine, cache_config = _tp_build_model(
[rank0]:   File "/home/aza6352/miniconda3/envs/lmdeploy/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
[rank0]:     return func(*args, **kwargs)
[rank0]:   File "/home/aza6352/miniconda3/envs/lmdeploy/lib/python3.10/site-packages/lmdeploy/pytorch/engine/model_agent.py", line 394, in _tp_build_model
[rank0]:     raise e
[rank0]:   File "/home/aza6352/miniconda3/envs/lmdeploy/lib/python3.10/site-packages/lmdeploy/pytorch/engine/model_agent.py", line 364, in _tp_build_model
[rank0]:     load_model_weights(patched_model, model_path, device=device_map)
[rank0]:   File "/home/aza6352/miniconda3/envs/lmdeploy/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
[rank0]:     return func(*args, **kwargs)
[rank0]:   File "/home/aza6352/miniconda3/envs/lmdeploy/lib/python3.10/site-packages/lmdeploy/pytorch/weight_loader/model_weight_loader.py", line 158, in load_model_weights
[rank0]:     loader.load_model_weights(model, device=device)
[rank0]:   File "/home/aza6352/miniconda3/envs/lmdeploy/lib/python3.10/site-packages/lmdeploy/pytorch/weight_loader/model_weight_loader.py", line 146, in load_model_weights
[rank0]:     model.load_weights(state_dict.items())
[rank0]:   File "/home/aza6352/miniconda3/envs/lmdeploy/lib/python3.10/site-packages/lmdeploy/pytorch/models/chatglm2.py", line 574, in load_weights
[rank0]:     load_weight(param, k, shard_id='k')
[rank0]:   File "/home/aza6352/miniconda3/envs/lmdeploy/lib/python3.10/site-packages/lmdeploy/pytorch/weight_loader/model_weight_loader.py", line 20, in load_weight
[rank0]:     param.weight_loader(param, loaded_weight, **kwargs)
[rank0]:   File "/home/aza6352/miniconda3/envs/lmdeploy/lib/python3.10/site-packages/lmdeploy/pytorch/nn/linear.py", line 1104, in weight_loader
[rank0]:     loaded_weight = _chunk_align(loaded_weight, world_size, 0,
[rank0]:   File "/home/aza6352/miniconda3/envs/lmdeploy/lib/python3.10/site-packages/lmdeploy/pytorch/nn/linear.py", line 39, in _chunk_align
[rank0]:     return weight.split(sections, dim=dim)
[rank0]:   File "/home/aza6352/miniconda3/envs/lmdeploy/lib/python3.10/site-packages/torch/_tensor.py", line 917, in split
[rank0]:     return torch._VF.split_with_sizes(self, split_size, dim)
[rank0]: RuntimeError: split_with_sizes expects split_sizes have only non-negative entries, but got split_sizes=[128, 128, 128, -128]

hi, we don't support tp_size > num_kv_heads or tp_size > num_heads cases. Please reduce tp and try again.

@RunningLeon Hey, thanks for the reply! Reducing tp solved the error. Please do let me know if this is documented somewhere. If not, I can make a contribution to add an error message if required.
Also, for this model, is there an example on how to give local images, following the OpenAI template?

@aadarsh-ram hi, you can just encode image to base64 and pass it. Here's one example
from openai import OpenAI
from lmdeploy.vl.utils import encode_image_base64
from PIL import Image

img = Image.open('tiger.jpeg')
client = OpenAI(api_key='YOUR_API_KEY', base_url='http://<IP_ADDRESS>:24444/v1')
model_name = client.models.list().data[0].id
response = client.chat.completions.create(
    model=model_name,
    messages=[{
        'role':
        'user',
        'content': [{
            'type': 'text',
            'text': 'Describe the image please',
        }, {
            'type': 'image_url',
            'image_url': {
                'url': f'data:image/jpeg;base64,{encode_image_base64(img)}'
            },
        }],
    }],
    temperature=0.8,
    top_p=0.8)
print(response)


Local registries for managing package sets and dependencies

purescriptFlake, rustFlake and typescriptFlake all use a naive approach to adding packages to build environments from Nix using extraSources or dependencies argument.
https://github.com/mlabs-haskell/lambda-buffers/pull/191/files#diff-feaf943d43c786bde76a0f543430ba2efe06537a1d26a7eb4ef1e24da7edbcadR89 we see how this inevitably breaks the abstraction and the library needs to 'know' in which context it would be used.
In essence, any library that uses extraSources cannot itself be used as a dependency added through extraSources.
TODO

[ ] Creating and managing local Cargo registries with Nix
[ ] Creating and managing local Spago registries with Nix
[ ] Creating and managing local NPM registries with Nix

@jaredponn actually, are you using NPM registries somehow?


Import auto-complete should not suggest non-dependencies

In this particular case I only depend on package:test, which in turn I guess transitively depends on these?
name: example
version: 0.0.0
environment:
  sdk: ">=2.10.0 <3.0.0"

dev_dependencies:
  test: ^1.15.0

It seems wrong to suggest them at all.
If it would be too breaking to change this behavior might I suggest something in analysis_options.yaml?:
analyzer:
  ide:
    strict-import-completion: true

(An added 👍 if this feature hinted if packages were imported that were not dependencies)

That sounds reasonable to me. At the very least completion ought to be ranking suggestions for direct dependencies higher than suggestions for implicit dependencies. But I definitely agree that we don't want to encourage the practice of importing from packages that are only implicitly depended on.

It would be much more pragmatic to have dependencies themselves tell the analyzer which dependencies they want to expose with for example a transitive entry in their pubspec:
name: package_a

# private_dependency is excluded from search results by default in all packages that depend on package_a
private_dependency: some_version
# public_dependency is included in search results in packages that depend on package_a
public_dependency: some_version
  transitive: true

It is difficult to track down which dependencies must be explicitly depended on if a user wants to be able to use any given package without having to unnecessarily make transitive dependencies explicit. The deeper the deepest path in the package dependency graph, the worse this issue becomes.
Example:
Think of the following package dependency graph
(A > B means package B depends on package A)
vector_math > geometry > business_logic > ui_base > macos_application

A user writes tests in macos_application and needs to create an instance of a type X.
User has to track down where type X was declared.
If X is an interface he needs to look for implementations of X (e.g. XImpl)
Once he has found XImpl he needs to add the package where XImpl was declared to the pubspec.

instead, if all packages that the user might need would be marked as transitive and therefore included in autocompletion search results (directives as well as type autocompletion), he'd only need to type XIm... and press enter to get what he needs.
TLDR: Excluding transitive dependencies from search results without the ability to opt-out/in per package is the wrong approach.

@modulovalue Sorry to miss this comment for almost a year. This suggestion has a lot of features and benefits to it, but I think improved auto-completions would be near the smallest of them. If you're interested in doing so, I recommend filing a new issue, likely in this repo, to add this to the pubspec format, which would lead to changes in pub.

Unfortunately, the package_config.json file today does not indicate which packages are direct dependencies, and which are indirect. We could look at pubspec.yaml to tell, but that seems hacky; could lead to more bugs when pubspec.yaml and package_config.json get out of sync. Perhaps not a big ask to change the package_config.json format to indicate if a package is a direct dependency of "this" package.

As @DanTup mentioned on another issue, I would like to add another interesting point to this question:
In dart 2.17 we had the implementation of code completion and quickfix working for extension functions. But, it does not work for transient packages as I mentioned here https://github.com/dart-lang/sdk/issues/38894#issuecomment-1192754194
Maybe, as @modulovalue speced, this implementation could also serve as for the code completion machine to also look for exported-transient packages

@srawlins:

Unfortunately, the package_config.json file today does not indicate which packages are direct dependencies, and which are indirect. We could look at pubspec.yaml to tell, but that seems hacky; could lead to more bugs when pubspec.yaml and package_config.json get out of sync. Perhaps not a big ask to change the package_config.json format to indicate if a package is a direct dependency of "this" package.

Sorry to bump this (October 2020) issue, but so I understand correctly - package_config.json is what is used to tell the analyzer what packages are available, but the problem is there is no such state for direct versus indirect dependencies?
Would it be possible to use pubspec.yaml here? Or is there a hard requirement that auto-complete suggestions of imports must strictly only know about package_config.json?
(If it's the latter, either by decree or effect - i.e. too complicated otherwise, should I file an issue on the language repo to ask for augmenting the package_config.json schema?)

Would it be possible to use pubspec.yaml here? Or is there a hard requirement that auto-complete suggestions of imports must strictly only know about package_config.json?

I think code completion is using pubspec.yaml in some places now - for example NotImportedContributor uses FileStateFilter to only show unimported suggestions only from direct dependencies. Perhaps UriContributor could use some variation of this (it'll probably work as-is to filter the files, but the current contributor also suggests "package:foo" which probably isn't possible from just a file filter).
@bwilkerson how much do you expect contributors to change with the refactors you're planning? Would changes in this area be better left until afterwards?

... package_config.json is what is used to tell the analyzer what packages are available, but the problem is there is no such state for direct versus indirect dependencies?

Correct. The package_config.json file is where the mapping lives that tells the analyzer which version of the package was chosen by pub and where on disk to find that version.
Not only does the package_config.json not tell the analyzer whether a given dependency is direct or indirect, it also doesn't tell it whether the dependency is normal or dev (so we can't easily tell where a use of the dependency is allowed to occur.

Would it be possible to use pubspec.yaml here?

As Danny noted, I believe that we are using the pubspec.yaml file in some places, but not everywhere.
Sam's concern, which I think is valid, is that if the user has edited the pubspec.yaml file but hasn't yet run pub, then the two sources of information might be out of sync, which could lead to some confusing behavior. But we need to weigh the potential confusion of that situation against the potential confusion of not taking the additional information into account when offering completions, fixes, etc. So ...

Or is there a hard requirement that auto-complete suggestions of imports must strictly only know about package_config.json?

No, there's not hard requirement. We just need to consider all of the above when deciding what would make for the best UX.
My suggestion is that we should start with the packages known through the package_config.json file, and classify those packages based on the content of the pubspec.yaml file, with a sensible default for packages in the first that aren't mentioned in the second (and ignoring packages found only in the second).

... how much do you expect contributors to change with the refactors you're planning? Would changes in this area be better left until afterwards?

Most of the code in the existing contributors will be rewritten to some extent, but the NotImportedContributor and UriContributor are likely to remain fairly stable (by comparison to some of the rest) because they're not particularly dependent on the portions of the framework that are changing.
If this is something that someone wanted to address relatively soon I wouldn't be concerned about wasted effort or merge conflicts.


Crash report - runtime error: index out of range

Error (runtime.errorString): runtime error: index out of range
Stack:
goroutine 1 [running]:
panic(0x382280, 0xc420010130)
	/usr/local/Cellar/go/1.7.1/libexec/src/runtime/panic.go:458 +0x243
github.com/github/hub/git.WorkdirName(0xc420112420, 0x28, 0x0, 0x0)
	/tmp/go/src/github.com/github/hub/git/git.go:70 +0xb6
github.com/github/hub/commands.create(0x5a5740, 0xc4200acfa0)
	/tmp/go/src/github.com/github/hub/commands/create.go:66 +0x6a
github.com/github/hub/commands.(*Command).Call(0x5a5740, 0xc4200acfa0, 0x7fff5fbff55c, 0x6)
	/tmp/go/src/github.com/github/hub/commands/commands.go:47 +0x91
github.com/github/hub/commands.(*Runner).Call(0xc42007f770, 0x5a5740, 0xc4200acfa0, 0x6, 0xc42010c090, 0xc420055ed8, 0x2079)
	/tmp/go/src/github.com/github/hub/commands/runner.go:108 +0x39
github.com/github/hub/commands.(*Runner).Execute(0xc42007f770, 0x415c30, 0x7d5ee, 0xc4201080c0, 0x0)
	/tmp/go/src/github.com/github/hub/commands/runner.go:96 +0x1e9
main.main()
	/private/tmp/hub-20160912-40594-1n8dwaa/hub-2.2.8/main.go:14 +0x51

Runtime:
GOOS: darwin
GOARCH: amd64

Version:
git version 2.10.0
hub version 2.2.8

Thanks for reporting! If you go to the same directory where you've experienced this crash, and do git rev-parse --show-toplevel, what do you get?

sorry @mislav I've lost the ability to recreate this error. I wish I could help more. sorry

No worries. I'll keep this open and see if I can reproduce it somehow. Maybe it's caused by hub being run in a directory that doesn't exist anymore.

I tried that and got this
$ git create
'create' must be run from inside a git repository
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
fatal: Unable to read current working directory: No such file or directory

Thanks for trying that. That looks like a different error message, and it didn't crash per se. I guess we're trying to find a condition when git rev-parse --show-toplevel is empty.

@sleexyz reports that this happens when git create is run after git init --bare. I can confirm that I can reproduce this! That's great, because before I didn't know where this comes from.


⚠ Bofrost.fr has degraded performance

In 03da9ce, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 1000 ms

Resolved: Bofrost.fr performance has improved in 5a9a41f.


fix group position after undo

[x] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)

Proposed changes

When adding a node to a group, the group position changes in some case.
However, undoing the node addition do not restore the group position.
This PR try to fix the issue.

Checklist

[x] I have read the contribution guidelines
[ ] For non-bugfix PRs, I have discussed this change on the forum/slack team.
[x] I have run grunt to verify the unit tests pass
[ ] I have added suitable unit tests to cover the new/changed functionality

Coverage: 68.554%. Remained the same when pulling f3d7016ab248c7a9f70a078f1e3cef87753c5bd9 on node-red-hitachi:fix-group-undo-position into 8382665bbbf8827e2c85dc56898fbc88318a24de on node-red:master.


[FLINK-23839][connectors-kafka] Give a more descriptive warnings on I…

https://issues.apache.org/jira/browse/FLINK-23839

Failed with https://issues.apache.org/jira/browse/FLINK-23848

@NicoK @autophagy Thanks for the review! I've addressed your comments, PTAL


Library source does not match the bytecode for class RecyclerSwipeAdapter

May be, Field mItemManger in class RecyclerSwipeAdapter reffers different Classes between decompiled source and Library source.
decompiled source
public SwipeItemRecyclerMangerImpl mItemManger = new SwipeItemRecyclerMangerImpl(this);
Library source
public SwipeItemMangerImpl mItemManger = new SwipeItemMangerImpl(this);

Sorry.
I was wrong.


fix NPE if onScrolled fires with no visible children

RecyclerView.onLayout -> dispatchLayout -> dispatchOnScrolled
Fixes GH-8

Didn't 0.1.3 fix this? In example app I tried setting the number of items to 0 and when the recyclerview is empty it just doesn't get scrolled and onScrolled() is not invoked. I didn't want to explicitly make a null check. Can you show me how you initialize your RecyclerView and Adapter so that it crashes in onScrolled()?
If it's still an issue in 0.1.3 I will merge this pull request. Just please don't use another if clause. It should be sufficient to check getChildCount()>0 in the one which is already there. It will be cleaner.

I was able to reproduce the crash on 0.1.3. Here is a sample: https://gist.github.com/talklittle/9c05375c10fafe1c2388
One key thing is ItemAnimator must be null. I couldn't reproduce the crash when ItemAnimator was set to the DefaultItemAnimator.
I managed to trigger onScrolled by adding more than 1 item to RecyclerView, notifyItemRangeInserted(0, 40) and then removing them, notifyItemRangeRemoved(0, 40). It triggers onScrolled in both situations.
With ItemAnimator, the removal of children is deferred, so onScrolled still sees the old child count at the time onLayout was called. But without ItemAnimator, the children are immediately removed, yet the onScrolled is still called, triggering the NPE in FastScroller.

Updated PR to use recyclerView.getChildCount() > 0, as requested.

@talklittle Thank you very much for checking this! I will release this as 0.1.4 as soon as possible.


feat(unused tables): add migration script to delete unused tables

todo before: https://github.com/serlo/database-layer/pull/624
todo after: apply migration to https://github.com/serlo/serlo-mysql-database/

@kulla that's fine with me but it looks like it is included in the PR #198 🤔 - though maybe not deployed to staging which I assume is what you wanted to say.

it looks like it is included in the PR #198 🤔

it's a typo: I wanted to write that I merged it into this branch to publish it to staging


Use headless driver for next Rails release

In the next release of Rails, the default driver was switched from :chrome to :headless_chrome as see in: https://github.com/rails/rails/pull/50512 This is to ensure the new ci template will "work out of the box".
However, this will not work with applications using rspec-rails, since it still defaults to :selenium. Instead, GitHub actions will fail with the following error:
Selenium::WebDriver::Error::SessionNotCreatedError:
            session not created: Chrome failed to start: exited normally.
              (session not created: DevToolsActivePort file doesn't exist)
              (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

I've created a demo application to highlight the problem, and test the proposed solution. The commit history aims to break everything out change by change, but I will highlight the important parts below.

This commit replicates the bug. Here's the corresponding failure.
Without changing the test, I simply update the Gemfile to use this branch, resulting in a passing test.

Just pointing out that https://github.com/rails/rails/pull/51289 will remove the test job altogether. However, I think it's still important we keep parity with Rails.

:wave: thanks!, can you update the spec to match?

@JonRowe I made a change in f122744 in an attempt to fix CI, but Rails main is currently set to 7.2.0.alpha. However, ci.yml uses 'main' for the RAILS_VERSION.

I think my imlpementation is correct, since CI is passing with my demo application. Does ci.yml need to change instead? Something like:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f54e46d7..92453045 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -39,10 +39,10 @@ jobs:
          # Edge Rails (?) builds >= 2.7
          - ruby: 3.2
            env:
-             RAILS_VERSION: 'main'
+             RAILS_VERSION: '~> 7.2.0'
          - ruby: 3.1
            env:
-             RAILS_VERSION: 'main'
+             RAILS_VERSION: '~> 7.2.0'

          # Rails 7.1 builds >= 2.7
          - ruby: 3.2

The version specified in our ci.yml triggers fetching Rails from git, it doesn't affect the version string of Rails exposed to rspec, your original check was correct but it changed the default and theres a spec that checks it: spec/rspec/rails/example/system_example_group_spec.rb:33 what I meant was to conditionally define that and add the second spec like you have.

@JonRowe thank you for the additional context. I was surprised by the original failure since I figured the default would not change because of the conditional. Do I need to do something like this?
Is there a way for me to test this locally?
diff --git a/spec/rspec/rails/example/system_example_group_spec.rb b/spec/rspec/rails/example/system_example_group_spec.rb
index a9b9ff83..1a19d932 100644
--- a/spec/rspec/rails/example/system_example_group_spec.rb
+++ b/spec/rspec/rails/example/system_example_group_spec.rb
@@ -29,7 +29,7 @@ module RSpec::Rails
       end
     end

-    describe '#driver' do
+    describe '#driver', if: ::Rails::VERSION::STRING.to_f < 7.2 do
       it 'uses :selenium driver by default' do
         group = RSpec::Core::ExampleGroup.describe do
           include SystemExampleGroup

@JonRowe let me know if my latest change is what you expected. My confusion lies in the fact that I would have expected there to be two specs:

The existing #driver spec the ensures itss set to :selenium
A new #driver spec ensuring it's set to :selenium_chrome_headless if ::Rails::VERSION::STRING.to_f >= 7.2

However, using #take_screenshot as an example, it looks like it's only tested once, and with the conditional.

Thanks!

Released in 7.0.0


Logging doesn't work propertly if Robot is running on thread

When I call my test suite/test case via the normal command line or run it in vscode, the Log function behaves as normal. When I call the same test suite/test case using the robot.run(...) api, it does not log the Log function details properly in the report.
Env:
Python: 3.12
Robot framework: 7.0
Windows 11
As an example:
file: test.robot
*** Variables ***
${test_notes}   'default notes text'

*** Test Cases ***
Test-P1
    [Documentation]  Simple log test case
    Log To Console   A message only to the console
    Log   Report and console message ${test_notes}   console=${True}

When I run this test in the cmd or with vscode, I get the correct output (default message from the variable) i.e.

When I run this in my application with the api and override the default message with the variable argument i.e.
ret_code = run('./tests/test.robot', test=f"Test-P1", variable=f"test_notes:Notes from python...", loglevel='INFO', outputdir='./results')
I get the following result:

notice that the INFO message is not displayed anymore. I can only get it to display when I set the loglevel=TRACE. It does server as a workaround for now, but is not desired.

This seems like a bug.
Thanks in advance.

Yes - it does. I spin up a worker thread else my UI will "hang up".

Ok. I confirmed what you were saying; The logging works as expected when running the test case in the main thread. The UI however locks up - as predicted.
I see two work-arounds for now:

Set the loglevel=TRACE in the call Robot.run(..., loglevel=TRACE, ...), and use Log as is - hopefully this does not mess up the output.xml file?
Calling ${log_var}=   Set Variable   ${your_variable}. In this case you use a "dummy" variable to push your data to the report files. You then don't call the Log function. This could however be confusing when looking at the testcase.

I had the same issue and solved it by creating a thread called "Main" and executing robot in that thread. I did it from a systray app that runs its GUI on its own thread.

This same problem was reported again as #5255. I fixed it and it will be part of RF 7.2.


Fix azure-storage-blobs-cpp beta install

Fixes #3884.
@Jinming-Hu, the private registry is already fixed with this very fix, see two of the last commits for details:
https://github.com/Azure/azure-sdk-vcpkg-betas/commits/main
Once we release stable version, it may be added to find_package() again.

/check-enforcer override


on click add image in medium editor insert image

First of all Thx for the great plugin.
And i would like to add an image when user click on a div. How could i achieve this ?? Is it possible to do with medium editor js??
Also i would like to upload an image from editor tool bar too...

This is not possible right now. But you can do it yourself. Just listen for clicks on divs and fire clicking on plugin buttons yourself. Something like this:
$(document).on('click', 'div', function (e) {
  $('a[data-addon="images"]').click();
});

This is super basic example. You will have to make sure that the div that you want to upload images to has .medium-insert-active class, because that's how the plugin knows what is the active element.
For uploading from toolbar you will have to create your own button that would do the same - https://github.com/yabwe/medium-editor/tree/master/src/js/extensions#what-is-a-button


manual sync

How to do manual sync? The buttons doesn't seem to do anything. Thanks

@Nwan692 they are working, i've added in 0.0.16 a Notice before and after the manual sync process has completed so there's at least indication that something is happening.


Fb test precommit

@kvendingoldo Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.


Introduce a new type of grpc client for nodejs

Currently nodejs grpc client uses pbjs to convert the .proto files
into JSON format. However the generated JSON format / loaded data
does not work with grpc (see #35).
The new client instead copies .proto files to the output directory,
and uses protobufjs.loadProtoFile. gRPC actually works well with
this approach.
Fixes #35

[Current coverage][cc-pull] is 89.44%

Merging [#44][cc-pull] into [master][cc-base-branch] will decrease coverage by 3.48%

@@             master        #44   diff @@
==========================================
  Files             3          3
  Lines           594        644    +50
  Methods         119        135    +16
  Messages          0          0
  Branches         90         97     +7
==========================================
+ Hits            552        576    +24
- Misses           42         68    +26
  Partials          0          0

Powered by Codecov. Last updated by [a01d573...9448e62][cc-compare]
[cc-base-branch]: https://codecov.io/gh/googleapis/packman/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/googleapis/packman/compare/a01d57318592e721eb188082e966938054c959d6...9448e620c1a58f7a581bea1c5af635b34544cb7a
[cc-pull]: https://codecov.io/gh/googleapis/packman/pull/44?src=pr

I've changed the code structure a bit -- and I think the latest code is much clearer and more normal as a JS code.

LGTM.
Just few optional comments, mostly due to my unfamiliarity with the codebase/JS.

LGTM


fix: remove exchange

Context

fixes #1496

Changes
remove all exchange section from wallet/backend

Hello @HessamMosleh , thank you for your enthusiasm in picking up stories for test wallet, and solving the issues. The only problem would be that you need to pick up stories that are not assigned to anyone yet, and if there is a story assigned to someone, maybe you can get in touch with them and ask them if you can take over. This story already has a branch on it, so it was already started on. Please continue on contribuiting to all interledger projects, but keep in mind the contribution guidelines.
Thank you.

well when I  created this PR it was not assigned to anyone but it is okay, I'll ask from story commits if possible to get the story or not from now on, thanks.

Hello @HessamMosleh, I am sorry for the confusion, you might have not noticed that it is assigned, but the history of the ticket says, 2 weeks ago it was assigned :

Then your branch created one week ago:

We look forward to your contributions for sure, it is just not possible to disregard someones work who did it aalready.


db.run() with parameter failed

I use  neo4j python driver (1.2.0) within flask , and When I run this code with parameters, I got empty:
`results = db.run(
'''
MATCH (c1:conception)
WHERE c1.conceptID = {node}
RETURN c1.conceptID as conception
''',{"node":node}
)
for res in results:
    print(res['conception'])`

However ,  When I remove the parameter, and rerun query with literal values, everything is OK.
python version 3.5, flask 0.11.1

@zhouhoo in your code snippet what is the type of node?

node here is string type.

@zhouhoo This looks like a subtle mismatch between the parameter value and node property value. Can you run the following before the db.run in Python:
print(repr(node))
print(type(node))

This will show precise type information for the parameter.

Closing due to inactivity. Please reopen if more information surfaces.


Feat: Add Georgian language support

Hello, my workmates at Vobi and me would like to translate React docs to Georgian.
Vobi is a software development agency specializing in JS ecosystem. We don't have much translating experience but we love all things open-source and even run React training courses in Georgian language.

approve \o/

Approve !

Here you go! https://github.com/reactjs/ka.reactjs.org/issues/1
Please use this issue to keep track of your progress, and let me know if you need any help :)

Hello, I want to contribute.


fix: add ability to update the boilerplate content

Description

Adds a button to the runtime settings page that allows a developer to update the "boilerplate" content - the scripts and readme files that come with every new project.

this allows a developer to get the most recent version of the provisioning script and instructions.

Also adds a "loading" indicator during ejection, which can sometimes take a few seconds.

Task Item
Closes #3102
Screenshots

@sangwoohaan can you check out the design for this new feature and let me know if you've got requested changes?

GREAT QUESTION from @sangwoohaan  -- how does the user know they need to update these scripts?  Do we need to link this to a function that will track which version of Composer was used to create a project?  (And then some mechanism that allows composer to update a project from version x to version y?)
ALSO NOTE: when we move provisioning into composer, we will no longer need the current set of scripts. So maybe we don't need this at all?
ALSO NOTE: no changes have happened to the scripts since 1.0.1, and no changes are currently planned... so this would be useful to a small number of users.

We decided to check against the version number in the package.json file inside scripts/ to determine if this option should be displayed.  I will update the PR.

This PR has been updated with a version check using the package.json file present inside the boilerplate content. The UI ONLY appears if expected boilerplate content is out of date or missing.

Coverage decreased (-0.4%) to 53.208% when pulling 217e487956b34d85db00a3bdc64c2763917e2062 on benbrown/3102 into 27a15317845b88925246b9c63a237a1eead02dee on master.


avoid Clang <= 10 bug with -fno-lax-vector-conversions

Issue reported here: https://discord.com/channels/689900678990135345/689932666505920596/1121124198593609728
/home/iree/runtime/src/iree/builtins/ukernel/arch/arm_64/mmt4d_arm_64_dotprod.c:63:12: error: initializing 'int32x4_t' (vector of 4 'int32_t' values) with an expression of incompatible type '__attribute__((__vector_size__(4 * sizeof(uint32_t)))) uint32_t' (vector of 4 'uint32_t' values)
    acc0 = vdotq_lane_s32(acc0, rhs0, vget_low_s8(lhs0), 0);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/llvm-10/lib/clang/10.0.0/include/arm_neon.h:37021:11: note: expanded from macro 'vdotq_lane_s32'
int32x4_t __reint1 = __builtin_shufflevector(*(uint32x2_t *) &__reint, *(uint32x2_t *) &__reint, __p3, __p3, __p3, __p3); \

The problem is that Clang <= 10 incorrectly thinks that the return type of vdotq_lane_s32 is uint32x4_t when it's really int32x4_t.

Done. @freddan80 can you confirm this fixes your issue?

Thx @bjacob ! I'll confirm in the tomorrow morning

@ScottTodd , updated to require Clang >= 12. (for good measure. It's not a problem to restrict this flag more than necessary).  Now touching iree_macros.cmake so rerequesting review.

I looped over clang 9 to 12.


Use 'env bash' in hook shebang rather than 'bash'

We use a custom buildkite runner for which the location of bash is not /bin/bash.
Changing this shebang would make this a bit more portable to custom agents. /usr/bin/env exists on the official buildkite agent, so this should have no impact on users running the standard workflow.

@isaac-ped thanks for the PR!
From what I've read, the arguments in favour of the shebang you are proposing have to do with portability and non-standard installations; on the other hand, the arguments against it revolve around the stability of bash in general and the security implications of a PATH traversal overriding the executable for the scripts.
While I am not strictly against the change, the security implications of tha latter do incline me towards keeping it as is. What's more, every other plugins we maintain also use the same /bin/bash shebang that is not being changed and no one has ever complained before.
With all that out of the way, note that the official Buildkite agent is a standalone executable binary so there is no guarantee that /usr/bin/env does exist wherever it is run (nor /bin/bash for that matter). But given that this is the first  time I've read about this change it does suggest that it would make more sense and less effort to have your custom runner have /bin/bash (as a symlink to the actual location where it is installed at least) instead of changing all plugins for everyone else that have no issues with them in the first place.

This may not be an option for us, as we use nix to vendor and manage all of the dependencies on our local machine - the version of bash that we use is in fact determined by the configuration within our repository.

From what I've investigated, this appears to be a common qualm with NixOS and there appears to be a standardized way to achieve this

We will likely just fork the code to make the modifications that we require within it.

Good luck and don't doubt to open new PRs or issues! :)


Bump prometheus-client and dependencies (Dependabot)

Bump prometheus-client, dfe-analytics, dfe-autocomplete, dfe-reference-data, get_into_teaching_api_client_faraday, rspec-retry and yabeda-prometheus
Bumps prometheus-client, dfe-analytics, dfe-autocomplete, dfe-reference-data, get_into_teaching_api_client_faraday, rspec-retry and yabeda-prometheus. These dependencies needed to be updated together.
Updates prometheus-client from 2.1.0 to 4.2.0

Release notes
Changelog
Commits

Updates dfe-analytics from 11d75a3 to 1.10.1

Commits

Updates dfe-autocomplete from c31601c to 0.1.0

Commits

Updates dfe-reference-data from 4ef58a6 to 2.3.0

Release notes
Commits

Updates get_into_teaching_api_client_faraday from 6619b0f to 3.3.0

Commits

Updates rspec-retry from 306b42b to 0.7.0

Commits

Updates yabeda-prometheus from 0.8.0 to 0.9.0

Release notes
Changelog
Commits

updated-dependencies:

dependency-name: prometheus-client dependency-type: direct:production update-type: version-update:semver-major
dependency-name: dfe-analytics dependency-type: direct:production
dependency-name: dfe-autocomplete dependency-type: direct:production
dependency-name: dfe-reference-data dependency-type: direct:production
dependency-name: get_into_teaching_api_client_faraday dependency-type: direct:production
dependency-name: rspec-retry dependency-type: direct:development
dependency-name: yabeda-prometheus dependency-type: direct:production update-type: version-update:semver-minor ...

Context

Changes proposed in this pull request

Guidance to review

Link to Trello card

Things to check

[ ] If the code removes any existing feature flags, a data migration has also been added to delete the entry from the database
[ ] This code does not rely on migrations in the same Pull Request
[ ] If this code includes a migration adding or changing columns, it also backfills existing records for consistency
[ ] If this code adds a column to the DB, decide whether it needs to be in analytics yml file or analytics blocklist
[ ] API release notes have been updated if necessary
[ ] If it adds a significant user-facing change, is it documented in the CHANGELOG?
[ ] Required environment variables have been updated added to the Azure KeyVault

Unneeded duplicate https://github.com/DFE-Digital/apply-for-teacher-training/pull/8423

Unneeded duplicate https://github.com/DFE-Digital/apply-for-teacher-training/pull/8423


Fix castling being possible when no rooks are on side

Can recreate with this board:
START_BOARD:"4k3/R6R/8/8/8/8/8/R2QK3 w KQkq - 0 1";

No need for this as this bug was caused by the custom board string wrongly saying castling was possible in the direction where there was no rook


inject with custom mapper function is not reactive

I read about 'mobdux' and I wanted to give this pattern a try, using inject to decouple the store values and the component. Unfortunately in some cases, the view does not update with the store changes
Simple example :

When using inject with a custom function like so :
const ListView = inject(({ store }) => ({
  list: store.state.list,
  addItem: store.addItem,
}))(({ list, addItem }) =>

    <button onClick={addItem}>Add Item</button>

      {list.map(elem =>

          {elem}

,
      )}

,
)

with list being a list of strings, the changes on store.state.list do not reflect on the view.
In order to have the view react to the changes on the todo list, I have to use observer on top of inject :
const ListView = inject(({ store }) => ({
  list: store.state.list,
  addItem: store.addItem,
}))(observer(({ list, addItem }) =>

    <button onClick={addItem}>Add Item</button>

      {list.map(elem =>

          {elem}

,
      )}

,
))

I'm not sure what is the expected behaviour, but I think it is better if the view updates automatically with inject
For now I am using a custom function connect :
const connect = mapStoresToProps => WrappedComponent => (
    inject(mapStoresToProps)(observer(WrappedComponent))
)

so that we don't have to manually call observer each time.
I am guessing it might also be related to this comment on the 'mobdux' post that uses inject internally<EMAIL_ADDRESS>Anyway, great work on Mobx ! Amazing DX 👍

The problem is that store.state.list subscribes for a change of the list property, but not for a change of the array itself. It would work if you would do: this.state.list = [...this.state.list, "newItem"];
Always remeber to call array.slice() or mobx.toJS(array) before passing an array to a non-observer:
inject(({ store }) => ({
  list: store.state.list.slice() // or toJS(store.state.list),
  addItem: store.addItem,
}))

This would work as well, but it's a bit "artifical/hacky" solution:
inject(({ store }) => ({
  listLength: store.state.list.length, // now we have subscribed for a change of the array itself
  list: store.state.list,
  addItem: store.addItem,
}))

The difference between the slice and toJS is that toJS recursively accesses all observables and turns them into plain JS structures, loosing the observable properties, but causing the component being subscribed for all these accessed observables. The slice only subscribes for the array itself and maintains the observable properties of the array elements.

Hello @urugator, thanks for the feedback.
Indeed, converting the observableArray to a plain old javascript array would work. BTW I think that is the way 'mobdux' works.
However, even if the inject function was not designed to be used way, I do think that providing a method in the public API that would inject + observe would be great.
If I understand correctly, it is the reason why inject was made reactive to the mapper function in the first place, according to #111 and the SO post linked in the issue.
I am thinking of a Redux-like connect function , as mobdux is doing, or as used in mobx-react tests themselves.
What do you think ?

Imho connect like approach goes against the MobX philosophy.
MobX automatically manages depedency graph based on how the data are actually being used, so you don't have to worry about manual (re)subscription.
If you introduce mapper, even though mapper itself is a reactive function, you're manually stating dependencies without actually knowing if and how they're being used by the component.
I understand that's basically the point, because you want to decouple the component from a store, but at the same time it's also the source of the problem.
For a generic connect like solution, I think that only reasonable assumption about the prop usage is to presume that the whole object subgraph is needed (mobx.toJS(prop)). Which is what mobdux does afaict.
However it kinda kills the component composability or at least the performance benefits that MobX can offer (ability to re-render only the child component).
I really don't think that inject should be used to remove the need for observer.
If it's just about being lazy to write inject and observer, then helper function doing both makes sense. Whether it should be part of the package, I dunno. Speaking for myself, I woudn't mind having it, but I don't need it (at least for now). Should there be a decorator version as well?

Thanks for you answer !
You're probably right.
I'm a big fan of how Mobx automagically handles subscription for us. At the same time, most of the examples I found (and most of the components I wrote) use directly values from the store in the components. In our codebase, this results in parsing and formatting in render functions and our components tend to become less and less readable.
IMHO it seems great in terms of separation of concerns to have a layer of abstraction so that we can better decouple the view and the stores.
I guess there are (at least) two ways to implement a connect like functionality with mobx-react
connect(({mainStore}) => ({
    list: mainStore.state.list
}))({list}) => (

...

))

One way is to provide non-observable values in inject function, and use those plain values in the view. That is what Mobdux does. The previous code would be roughly equivalent to :

inject(({mainStore}) => ({
    list: mainStore.state.list.peek() // or Mobx.toJS
}))({list}) => (

...

))

Another way is to pass observable values to the view and make it an observer

inject(({mainStore}) => ({
    list: mainStore.state.list // Mobx ObservableArray
}))(observer({list}) => (

...

)))

I can see how using the 1st approach would go against mobx's philosophy because we would be declaring the subscriptions manually.
With the second approach, though, I think it's not about declaring subscriptions, but rather to abstract them for the view as readable variable with names that make sense. It seems to provides a very good solution to the challenge of separating the view and the data, while keeping the views reactive.
Do you see disadvantages in using the 2d way, or should I expect to run into problems using this pattern ?
P.S. I guess the @connect decorator would make sense too

If you use it only as an adapter to bridge between store and component API, I wouldn't expect any problems.
However the component API must be still designed with the observables in mind (otherwise the observer wouldn't make sense).
For example remember that once you "unwrap" the observable, you loose the observability, therefore you can't pass it to descendant components as an observable object.
You may actually want to do something like:
inject(store => {
  name: computed(() => store.name) // store.name is string
})
// now you can still pass the "name" alone to descendants while keeping it observable

So you can get rid of the direct dependency on store, but you won't get rid of the depedency on observables.
Whether you need such abstraction is up to you.
My personal advice with abstractions in general is to introduce them only if you actually need them (this need usually emerges during development). Don't use
(seems|would|could) - (cool|great|nice) - (in terms of|for the sake of) - (some generic principle)
as a reason.

this results in parsing and formatting in render functions and our components tend to become less and less readable.

Can you elaborate? Post an example perhaps?

this results in parsing and formatting in render functions and our components tend to become less and less readable.

For clarity; it is not the code literally in the render method that is tracked; it is all the data that is accessed during render. So it is perfectly fine to have all that code in your own, completely UI anaware utility libraries. The only thing that matters is that they are invoked during render

Closing as original question seems answered.


Exception : ['XXX-in-0']] doesn't have subscribers to accept messages

When consuming messages using the Flux approach in Spring Cloud Stream, if an exception is thrown, it will result in an exception the next time a message arrives.
Caused by: java.lang.IllegalStateException: The [bean 'workStatusChannel-in-0'] doesn't have subscribers to accept messages
building-1     |        at org.springframework.util.Assert.state(Assert.java:97) ~[spring-core-6.1.3.jar!/:6.1.3]
building-1     |        at org.springframework.integration.channel.FluxMessageChannel.doSend(FluxMessageChannel.java:67) ~[spring-integration-core-6.2.1.jar!/:6.2.1]
building-1     |        at org.springframework.integration.channel.AbstractMessageChannel.sendInternal(AbstractMessageChannel.java:378) ~[spring-integration-core-6.2.1.jar!/:6.2.1]

Sample code：

  @Bean
  public Function<Flux<Message<StatusChangeMessage>>, Mono<Void>> workStatusChannel(){
        return flux -> flux
        .flatMap(msg -> Mono.error(new IllegalArgumentException("test exception"))).then();
  }

I am using RocketMQ to provide messaging services. Whenever an exception occurs during the processing of a message, subsequent messages result in the error "doesn't have subscribers to accept messages." Even if an exception occurs, RocketMQ still marks the message as "CONSUMED." Subsequent messages that couldn't be consumed due to "doesn't have subscribers to accept messages" are also marked as "CONSUMED." This has caused significant challenges for my project.
I believe that when an exception occurs during message consumption, the appropriate action should be to return the exception to RocketMQ rather than unsubscribing.
Evn:
RocketMQ 5.1.4
Spring boot 3.2.2
spring cloud 2023.0.0
spring cloud alibaba 2<IP_ADDRESS>

My temporary workaround is:
  @Bean
  public Function<Flux<Message<StatusChangeMessage>>, Mono<Void>> workStatusChannel(){
    return flux -> flux
        .doOnNext(message -> log.info("workStatusChannel {}",message))
        .flatMap(msg -> Mono.just(msg)
            .flatMap(workEventHandler::testStreamException)
            .doOnError(error -> log.error("workStatusChannel error",error))
            .retryWhen(Retry.backoff(3, Duration.ofMillis(1000)))
            .onErrorResume(error -> {
              log.error("Message can't consume! --------------------------------------",error);
              return Mono.empty();
            })
            .then()
        )
        .then();
  }

However, this is not ideal.

@cooperlyt For reactive functions, this is expected as part of error handling. See this ref docs section, specifically the reactive functions section. The framework is not involved at runtime whenever reactive functions are involved, and the application is in total control. Framework only does the initial bootstrapping of the stream.  For this reason, it is up to the application to handle runtime errors. What you provided as a workaround is the right solution when it comes to reactive functions. We don't think there is anything that the framework could assist with in this situation. I am closing the issue, but feel free to re-open if there is more context or a need. Thanks!


[Issue] Can't run azd down on RG with OpenAI instance

[X] Make sure you've installed the latest version using instructions in the wiki

Output from azd version
azd version 1.10.0-beta.1-pr.4028794 (commit 1388546c9db82c93a53b8ba8335962b2b68fd408)
Describe the bug
I do not think this is an issue with azd itself, but y'all might know where to reroute or have workarounds.
When running "azd down" on https://github.com/Azure-Samples/openai-chat-vision-quickstart/, I get this error:
--------------------------------------------------------------------------------
RESPONSE 409: 409 Conflict
ERROR CODE: ResourceGroupDeletionBlocked
--------------------------------------------------------------------------------
{
  "error": {
    "code": "ResourceGroupDeletionBlocked",
    "message": "Deletion of resource group 'chatvision-rg' failed as resources with identifiers 'Microsoft.CognitiveServices/accounts/edmqlohrlcibo-cog' could not be deleted. The provisioning state of the resource group will be rolled back. The tracking Id is '50cc42c7afb813d4bff8d3974397e4d9'. Please check audit logs for more details.",
    "details": [
      {
        "target": "/subscriptions/32ea8a26-5b40-4838-b6cb-be5c89a57c16/resourceGroups/chatvision-rg/providers/Microsoft.CognitiveServices/accounts/edmqlohrlcibo-cog",
        "message": "{\"error\":{\"code\":\"CannotDeleteAccountWithDeployments\",\"message\":\"Could not delete account since it contains 1 deployment(s). Please delete deployments first and try again.\"}}"
      }
    ]
  }
}

I see a similar warning in the Portal:

I'm not sure if this is only happening because the deployment uses a Global SKU or if its now happening for all OpenAI accounts. I've only had it reported for this repo so far, but perhaps its a recent change.

@vhvb1989 @hemarina do we handle deleting deployments for other resources as part of azd down?

@vhvb1989 @hemarina do we handle deleting deployments for other resources as part of azd down?

No.  Azd deletes resource groups directly w/o looking what's in them.
I've started a conversation with @achand to follow

@rajeshkamal5050 - this may be handled by deployment stacks when the deployment is created as part of the deployment stack.  I will test on our feature branch and report back.
If the deployments are created outside of azd it isn't a cut & dry and whether or not azd should delete deployments on behalf of user or not.

@pamelafox starting azd 1.10.0 we have added support for deployment stacks(alpha feature azd config set alpha.deployment.stacks on) which should handle it without need for the hooks https://github.com/Azure-Samples/openai-chat-vision-quickstart/pull/10
Can you give it a try and let us know if it works? cc: @wbreza

@rajeshkamal5050 At what point will it not require the alpha flag?


Where are contribution
Funds

@johscttjr61 thanks for your this kindly issue, maybe you can find more information in here:https://www.apache.org/foundation/contributing.html

Qhy ubcamy anwer my naimple question

Help me to dugute this out please


ambient mesh doesn't support docker desktop kubernetes

Is this the right place to submit this?

[X] This is not a security vulnerability or a crashing bug
[X] This is not a question about how to use Istio

Bug Description
Docker desktop uses kubenet as the CNI plugin by default, which supports veth, which is required to run ambient mesh. So theoretically, it should already support ambient mesh. However, some user complained not being able to use it. I have tried this official tutorial but failed at the application deployment step. Error messages from the istio-cni-node:
2023-10-18T17:48:15.521939Z     error   ambient Failed to list ipset entries: failed to list ipset ztunnel-pods-ips: no such file or directory
2023-10-18T17:48:15.522510Z     info    ambient Pod 'notsleep-5ccf57569-g54sh/default' (9411ba7d-70bf-4981-a958-f92bea4cdcaa) is not in ipset
2023-10-18T17:48:15.553004Z     error   ambient Failed to list ipset entries: failed to list ipset ztunnel-pods-ips: no such file or directory```

### Version

```Text
$istioctl version
client version: 1.19.0
control plane version: 1.19.0
data plane version: 1.19.0 (1 proxies)

$kubectl version --short
Client Version: v1.27.1
Kustomize Version: v5.0.1
Server Version: v1.27.2

Additional Information
bug-report.tar.gz

There's an open issue with docker desktop around lack of support for CNI plugins generally (including e.g. Cilium): https://github.com/docker/roadmap/issues/311

The other error mentioned/seen:
│   Warning  FailedCreatePodSandBox  14s               kubelet            Failed to create pod sandbox: rpc error: code = Un ││ known desc = [failed to set up sandbox container "b7493d90e9d5e93f486a74cef208c72fc7b8ba9fb54845c0caa28cb4e460b2db" networ  │ k for pod "httpbin-86869bccff-pq7vj": networkPlugin cni failed to set up pod "httpbin-86869bccff-pq7vj_default" network: p ││ lugin type="loopback" failed (add): missing network name:, failed to clean up sandbox container "b7493d90e9d5e93f486a74cef ││ 208c72fc7b8ba9fb54845c0caa28cb4e460b2db" network for pod "httpbin-86869bccff-pq7vj": networkPlugin cni failed to teardown  ││ pod "httpbin-86869bccff-pq7vj_default" network: plugin type="loopback" failed (delete): missing network name]              ││   Normal   SandboxChanged          0s (x2 over 14s)  kubelet            Pod sandbox changed, it will be killed and re-created │

This seems to be because docker-desktop uses a loopback plugin at lowest priority that runs last, and doesn't actually support the current CNI version spec?

Hi @chingkt - thank you for reporting this!   it is a good time to evaluate this again, I believe with the latest istio-cni change https://github.com/istio/istio/issues/48212, ambient for docker desktop k8s should be supported.  While the PRs are still under review, can you try it following the instructions below?
https://github.com/istio/istio/issues/48212#issuecomment-1864725172

This is resolved, please try latest master or release 1.21 build, or wait for the official 1.21 release.  see https://github.com/istio/istio/issues/48212

Sorry, just got confirmation from Eric that the change is not in beta 0 yet, but should be in -beta.1 since it was merged after beta.0 was released. I expect that the new build will be available in a day or 2.

Thank you team for help & support however facing issue with Ambient Beta-1 release Docker Desktop M1
kubectl -n istio-system get pods
NAME                                    READY   STATUS              RESTARTS   AGE
istio-cni-node-8njst                    1/1     Running             0          116s
istio-ingressgateway-689f9d6fb4-4qssc   1/1     Running             0          20m
istiod-556d7d4cf5-ndg7m                 1/1     Running             0          20m
ztunnel-78ldc                           0/1     Terminating         0          20m
ztunnel-zx8m7                           0/1     ContainerCreating   0          54s

Events:
  Type     Reason                  Age                   From               Message
  ----     ------                  ----                  ----               -------
  Normal   Scheduled               6m28s                 default-scheduler  Successfully assigned istio-system/ztunnel-zx8m7 to docker-desktop
  Warning  FailedCreatePodSandBox  6m27s                 kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = [failed to set up sandbox container "c88ecf6787ad644d31272bff249c3a6320a86cb5734dc975fd08169f25fb6442" network for pod "ztunnel-zx8m7": networkPlugin cni failed to set up pod "ztunnel-zx8m7_istio-system" network: plugin type="loopback" failed (add): missing network name:, failed to clean up sandbox container "c88ecf6787ad644d31272bff249c3a6320a86cb5734dc975fd08169f25fb6442" network for pod "ztunnel-zx8m7": networkPlugin cni failed to teardown pod "ztunnel-zx8m7_istio-system" network: plugin type="loopback" failed (delete): missing network name]

Created issue - https://github.com/istio/istio/issues/49208

Thank you team for help & support however seeing issue with Ambient Beta-1 release Docker Desktop M1
kubectl -n istio-system get pods
NAME                                    READY   STATUS              RESTARTS   AGE
istio-cni-node-8njst                    1/1     Running             0          116s
istio-ingressgateway-689f9d6fb4-4qssc   1/1     Running             0          20m
istiod-556d7d4cf5-ndg7m                 1/1     Running             0          20m
ztunnel-78ldc                           0/1     Terminating         0          20m
ztunnel-zx8m7                           0/1     ContainerCreating   0          54s

Events:
  Type     Reason                  Age                   From               Message
  ----     ------                  ----                  ----               -------
  Normal   Scheduled               6m28s                 default-scheduler  Successfully assigned istio-system/ztunnel-zx8m7 to docker-desktop
  Warning  FailedCreatePodSandBox  6m27s                 kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = [failed to set up sandbox container "c88ecf6787ad644d31272bff249c3a6320a86cb5734dc975fd08169f25fb6442" network for pod "ztunnel-zx8m7": networkPlugin cni failed to set up pod "ztunnel-zx8m7_istio-system" network: plugin type="loopback" failed (add): missing network name:, failed to clean up sandbox container "c88ecf6787ad644d31272bff249c3a6320a86cb5734dc975fd08169f25fb6442" network for pod "ztunnel-zx8m7": networkPlugin cni failed to teardown pod "ztunnel-zx8m7_istio-system" network: plugin type="loopback" failed (delete): missing network name]

same issue on Windows 11, docker-desktop 4.28.0 base wsl2, linux kernel is "<IP_ADDRESS>-microsoft-standard-WSL2+", k8s version is "1.29.1", istio version is "1.21.0-rc.1"

Thank you team for help & support however seeing issue with Ambient Beta-1 release Docker Desktop M1
kubectl -n istio-system get pods
NAME                                    READY   STATUS              RESTARTS   AGE
istio-cni-node-8njst                    1/1     Running             0          116s
istio-ingressgateway-689f9d6fb4-4qssc   1/1     Running             0          20m
istiod-556d7d4cf5-ndg7m                 1/1     Running             0          20m
ztunnel-78ldc                           0/1     Terminating         0          20m
ztunnel-zx8m7                           0/1     ContainerCreating   0          54s

Events:
  Type     Reason                  Age                   From               Message
  ----     ------                  ----                  ----               -------
  Normal   Scheduled               6m28s                 default-scheduler  Successfully assigned istio-system/ztunnel-zx8m7 to docker-desktop
  Warning  FailedCreatePodSandBox  6m27s                 kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = [failed to set up sandbox container "c88ecf6787ad644d31272bff249c3a6320a86cb5734dc975fd08169f25fb6442" network for pod "ztunnel-zx8m7": networkPlugin cni failed to set up pod "ztunnel-zx8m7_istio-system" network: plugin type="loopback" failed (add): missing network name:, failed to clean up sandbox container "c88ecf6787ad644d31272bff249c3a6320a86cb5734dc975fd08169f25fb6442" network for pod "ztunnel-zx8m7": networkPlugin cni failed to teardown pod "ztunnel-zx8m7_istio-system" network: plugin type="loopback" failed (delete): missing network name]

same issue on Windows 11, docker-desktop 4.28.0 base wsl2, linux kernel is "<IP_ADDRESS>-microsoft-standard-WSL2+", k8s version is "1.29.1", istio version is "1.21.0-rc.1"

Yes, as I mentioned above, this is a general issue with docker desktop and CNI plugins: https://github.com/istio/istio/issues/47436#issuecomment-1769526105
docker desktop uses broken CNI plugins that do not correctly support the CNI spec, and as such do not properly support custom CNIs, see also https://github.com/docker/for-mac/issues/4626

docker desktop's support for CNI plugins is broken.
Use minikube or kind or anything else, and you won't have this problem.


Add public access block to S3 buckets

Adds a S3 public access block to the GuardDuty and Terraform state buckets.

Dumb question, but one one I've not been able to answer myself: do these mean that S3 buckets cannot have public read access? I assume not, but all the documentation sounds very much like the answer is yes…

@SteveMarshall No question is a stupid question 👍🏼
These are 4 separate, distinct settings that all do something different, and AWS uses the combination of enabled ones for a restrictive policy:
block_public_acls will stop you being able to set new ACLs that include a public element
block_public_policy will stop you being able to set new bucket policies that include a public element
ignore_public_acls will ignore any public ACLs on the bucket and objects within it even if they're already set
restrict_public_buckets will restrict access to a bucket to only AWS service principals even if it's already configured to be public in some way (e.g cross-account access) 👍🏼

Dumb question, but one one I've not been able to answer myself: do these mean that S3 buckets cannot have public read access? I assume not, but all the documentation sounds very much like the answer is yes…

@SteveMarshall No question is a stupid question 👍🏼
These are 4 separate, distinct settings that all do something different, and AWS uses the combination of enabled ones for a restrictive policy:
block_public_acls will stop you being able to set new ACLs that include a public element
block_public_policy will stop you being able to set new bucket policies that include a public element
ignore_public_acls will ignore any public ACLs on the bucket and objects within it even if they're already set
restrict_public_buckets will restrict access to a bucket to only AWS service principals even if it's already configured to be public in some way (e.g cross-account access) 👍🏼


ci: update sync-headers to close old PRs, better PR text

Update sync-headers CI action:

Use conventional commit feat tag
Close old PRs when a new one comes up

This logic comes from #42 's first commit


allow blank compile time parameters, as sparkle does

Title pretty much covers it.  Blank params are legal in sparkle, so remove the restriction placed on top of them here.

I'm not sure I agree. It's more likely a bug in Sparkle. The existing code, which compile time parameters were based on was very badly written. i would not be surprised if this was a side effect.
The reason I think its odd it that it doesn't allow nil values, but it allows blank values. That seems somewhat inconsistent to me. I'm also trying to understand why any of the following would be desired. How would you get blank input parameters in the first place.
In the parameters file should this be valid? It will be if this change is applied.
compile_time_parameters:
  subnets:
  - <IP_ADDRESS>/26
  -
  - <IP_ADDRESS>/26

I agree it should allow nil, but at present it doesn't.  Big picture, my goal is to allow conditional logic to be written in sparkle templates so I can add optional features to my templates, and write code that drives those features based around non-blank CTP's.  E.g. simple stuff like:
if !my_param.blank?
  ... extra resources
end

nil is of course more natural, but currently prohibited by Sparkle.  For context, native cfndsl has no problem with getting nil via external_parameters.  This seemed like the shortest path til sparkle expands to allow greater control.

Wouldn't it be better to use a boolean flag like such

Parameter file

compile_time_parameters:
  feature_enabled: true

Then in your sparkle template default it to be disabled like such. Then if not supplied it defaults to false.

SparkleFormation.new(
    :reference_vpc,
    compile_time_parameters: {
        feature_enabled: {
            type: :string,
            default: false
        }
    })

As a note when it comes to compile time parameters. The bulk of the logic around validation and passing through stuff to the template is in this repo. It was duplicated from here https://github.com/sparkleformation/sfn, which is not part of the core template parser. It "should" be able to allow both nil and empty if deeded desirable.

That would be one way but booleans are not a supported class for sparkle CTP’s last I checked,  Another oversight, IMO.
All in all the documented sparkle params are fairly narrow (e.g a hash would be nice, ditto booleans), so there’s awkwardness with a bunch of options.
Allowing blanks seemed to me the least awkward and minimally different from the official sparkle docs.  I agree it would be better to have more possible classes and more descriptive validators upstream.
Sent from my phone

On Nov 7, 2017, at 5:27 PM, Grant Tibbey<EMAIL_ADDRESS>wrote:
Wouldn't it be better to use a boolean flag like such
Parameter file
compile_time_parameters:
feature_enabled: true
Then in your sparkle template default it to be disabled like such. Then if not supplied it defaults to false.
SparkleFormation.new(
:reference_vpc,
compile_time_parameters: {
feature_enabled: {
type: :string,
default: false
}
})
As a note when it comes to compile time parameters. The bulk of the logic around validation and passing through stuff to the template is in this repo. It was duplicated from here https://github.com/sparkleformation/sfn, which is not part of the core template parser. It "should" be able to allow both nil and empty if deeded desirable.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

I "think" more types should be possible. The validation for that is in this repo as well. It won't work for normal parameters, but "compile time parameters" it should be possible.
Validation for what is allowed is here https://github.com/envato/stack_master/blob/master/lib/stack_master/sparkle_formation/compile_time/definitions_validator.rb. We could break from their doco and support additional types as an option

Can we just include a allow_nil flag that defaults to false?
SparkleFormation.new(
    :reference_vpc,
    compile_time_parameters: {
        subnets: {
            type: :string,
            default: false
            allow_nil: true
        }
    })

That seems like it would satisfy both situations

I think that would be implied with at nil value

Hi again - I know it's been a while.  :-)  For the next round of revisions, would this be appropriate scope:

Allow nil values, possibly not by default but with a rails-style allow_nil: true flag.
Allow booleans
Maybe hashes, if I can find a way to get sparkle to play along

Earlier there was the question about blanks/nils in array CTPs.  I would suggest as a first pass stripping these ... hopefully the broader community agrees that this is expected.
Thoughts / comments?  I'd still like to get this or a similar PR merged - my team has found it incredibly helpful.

Allow nil values, possibly not by default but with a rails-style allow_nil: true flag.

If this can be implemented in this PR I'm happy to merge it
The others look like reasonable additions.

Fixed in #348


elFinder Themes

Hello everyone
I would like to suggest a feature:
Could you add some friendlier theme to elFinder? The current is not pleasing to the eye.
I suggest Moono Theme: https://github.com/lokothodida/elfinder-theme-moono

Hi @AndresOchoaS ,
Sure, we'll consider this. I believe the current theme was chosen at the time because moono, though simpler, has an inconsistency between the standard view, right-click menu and popups. Don't know if that's still the case.
I'll leave the issue open and let anyone +1 or express comments here, to show support for switching the default theme.
Until then, you can definitely change the theme used in your projects, as instructed in the link you posted.
Cheers!

Let's close this issue, as it's not a priority and not a lot of people have expressed the need. Cheers!


Update Kubernetes available versions in Terraform options doc

Community Note

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment

https://github.com/oracle-terraform-modules/terraform-oci-oke/blob/master/docs/terraformoptions.adoc#oke

Fixed in #107


Custom chargeback report saved under folder called 'true'

@miq-bot add_label ui, reporting, bug, chargeback

We saw the same, right? cc @yrudman @gtanzillo
For us it was a basic report that was customized.  The "my company" folder for custom reports is now "true" in the UI.

@jrafanie Yes, this is exactly what we saw.

Seems to be fixed...

@zeari @h-kataria any idea what fixed this?

@zeari @h-kataria any idea what fixed this?

Not a clue...

@lpichler Fixed this issue with #7058

Great, thanks @lpichler @gtanzillo


Farsi language has been added to the project.

Farsi language has been added to the project.
Please review my pull request!

is it added to the project?


Where are you exploring?

Hi!
Great repo, I am glad that you implemented the code in Pytorch!
If you use exploration=True, are you really exploring? Epsilon=0.0 always, so you would never use a random selected action, or am I incorrect?

step called: https://github.com/shariqiqbal2810/maddpg-pytorch/blob/40388d7c18e4662cf23c826d97e209df9003d86c/algorithms/maddpg.py#L79
action computed with exploration=True: https://github.com/shariqiqbal2810/maddpg-pytorch/blob/40388d7c18e4662cf23c826d97e209df9003d86c/utils/agents.py#L55
action selected, but not with epsilon: https://github.com/shariqiqbal2810/maddpg-pytorch/blob/40388d7c18e4662cf23c826d97e209df9003d86c/utils/agents.py#L67

Hi! The exploration is performed inside the gumbel_softmax function which obtains differentiable samples from the probability distribution specified by the policy via the Gumbel-Softmax reparameterization


build: enforce consistent spacing in curly braces

Adds a rule to enforce that we have consistent spacing inside curly braces and fixes any violations.
Relates to https://github.com/angular/material2/pull/6615#discussion_r134880838.

This needs rebase, but hold off because I'm going to try to merge some other PRs first

Closing for now. We can revisit once the PR queue is smaller.


Add --flags option

This implements @yoshuawuyts's suggestion and fixes #160 by adding a --flags value to tap.

neat!

Work is underway on this in the flags-n-stuff branch. https://github.com/tapjs/node-tap/tree/flags-n-stuff
I need to land some changes in nyc to make it testable, and then bring the coverage back up to where it should be.

Did this in a different way, as --node-arg=--blerg which can be specified multiple times to provide multiple args, like tap --node-arg=--strict --node-arg=--expose_gc --node-arg=-r --node-arg=babel


Badges in readme refer to the locspan crate

[![CI](https://github.com/timothee-haudebourg/langtag/workflows/CI/badge.svg)](https://github.com/timothee-haudebourg/locspan/actions)
[![Crate informations](https://img.shields.io/crates/v/langtag.svg?style=flat-square)](https://crates.io/crates/locspan)
[![License](https://img.shields.io/crates/l/langtag.svg?style=flat-square)](https://github.com/timothee-haudebourg/langtag#license)
[![Documentation](https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square)](https://docs.rs/locspan)

Nice catch thanks!


feat: raw in defence of pull requests

referencing this: https://github.com/facebook/docusaurus/pull/8378


Refactor Feature Engineering

The purpose of this PR can be partitioned into different steps:

Apply Factory Design Pattern for feature_engineering classes, Imputer, Scaler, OutlierRemover etc. The main problem is these classes are God Classes and do not follow the SWE best practices. If the project is intended for extension, then it would be technically more expensive to add new features, unit tests, and current code that don't follow the DRY Principle. As the logic behind the different Scalers or Imuters, etc, is very similar, the common architecture can be designed as an interface whose primary method is either used directly or overridden by subclasses based on that specific subclass's purpose.
Remove redundant files from the repo: virtual environment, pycache, log files, and exclude git track by adding them into .gitignore
Add Python best practices with black and flake8, and add support for easy run of this library for necessary files

Here is one example showing steps for adding new encoder to project, say PRatioEncoder from feature_engine:

Add new class to encoders.py which initializes PRatioEncoder
If PRatioEncoder requires additional steps for fit_transform, override parent class's fit_transform, otherwise only initialization is enough
Add encoder_name:EncoderClass pair to ENCODERS dictionary in endoder_factory.py to support new encoder, where encoder_name is how this encoder will be called in the app, and EncoderClass is the corresponding class.

Note:
All encoders, imputers, outlier removers, feature selector,s and scalers have been tried in manual installation and Docker. All work fine.

Reviewing the PR:
As most of the changes are removing of python package files, it is hard to review directly from Github. It is recommended to review locally by checking out the PR (for example, for VsCode, by using GitHub extension), and ignoring the changes in feature_engineering/__pycache__, utils and venv


Using autosuggestion module, quite slow when paste a long command into the zsh

Hi everyone! I am using prezto with the module autosuggestions. I try to paste a long command into the zsh shell, and I find that it's quite slow for zsh to finish this input. Anybody can try it, just paste the command below into the zsh shell, of course with the module autosuggestions enabled:
echo autosuggestionsautosuggestionsautosuggestionsautosuggestionsautosuggestionsautosuggestionsautosuggestionsautosuggestionsautosuggestionsautosuggestionsautosuggestionsautosuggestionsautosuggestionsautosuggestionsautosuggestionsautosuggestionsautosuggestionsautosuggestionsautosuggestionsautosuggestionsautosuggestionsautosuggestionsautosuggestionsautosuggestionsautosuggestionsautosuggestions
It takes me more than 2 seconds to finish this input!
 Thx!

Report performance issues to zsh-autosuggestions.


Implement QuickStart Docs for TinyMS v0.3.1

What type of PR is this?

/kind documentation

What does this PR do:

In this PR, added some notes which are possible problems and solutions for quick installation and reasoning visualization experience

In install.md, when you are prompted to install the 0.3.1 version of tinyms in the windows environment, confirm whether Microsoft VC++ 14.0 is installed; and add the solution that the mirror source may not be able to find the latest version.
In reasoning_visualization_experience.md, refactored the documentation and added some specific test environments.
Improve the en version and the zh_ch version.

why do we need it

To improve developers experience

Which issue(s) this PR fixes:

Fixes #123

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

LGTM

LGTM


Unit improvements/Theme improvements re https://github.com/geopozo/pozo-py/issues/30

Units:
a) add non-mnomenic defaults for common las unit specifications
b) more verbose and descriptive errors to point people to documentation
Themes:
a) theme to set automatic plotly range
b) better theme documentation

re https://github.com/geopozo/pozo-py/issues/30


Enhancement: Doorbell camera motion detection notifications

I'm trying to sort this out, if you can help me understand I can try to do the coding. At the moment we get the CAMERA_MOTION event so seems like should be possible?
I tried adding a motionsensor service to the camera e.g.
newAccessory.addService(Service.MotionSensor);
and then I have the simplicam subscribe to events with a startListening method to simplicam.js with the relevant code:
case 'CAMERA_MOTION':
     this.accessory.getService(this.Service.MotionSensor).getCharacteristic(Characteristic.MotionDetected).setValue(detected);

But like, no dice. Not sure I really understand the logic of why this doesnt work. Thoughts? Totally on the wrong track?

@nikonratm this is similar to the requests in issue #19 .
I don't recommend implementing this type of support for events such as CAMERA_MOTION because the events are not consistent - you only get these events if the alarm is armed, and you cannot query the camera or the sensor on the state ("is there any motion right now?").
This makes the sensor in the Home app inaccurate and misleading. If you think about it, say you implement the CAMERA_MOTION event so that it shows a motion sensor as "triggered"...
 How do you then reset that? When does Home know that there is no longer motion happening?
This is why I haven't implemented "stateless" sensors.
In any case, if you do want to try and add support for CAMERA_MOTION in your own fork, you need to re-use the startListening method that you find inside alarm.js... That uses subscribeToEvents rather than subscribeToSensor, which is what gives you that event type.
The events are not tied to a specific sensor, they are alarm events.

Sorry I should have been more explicit—Im actually talking about a doorbell camera, and those ones do get notifications even when not armed! I updated the title.
Oct 10 18:54:06 homebridge[13999]: [10/10/2019, 6:54:06 PM] [Home Alarm] Camera received new event from alarm: CAMERA_MOTION
I already implemented the startListening method and thats how Im getting that log above. And as far as setting the state back, I think the doorbell (haven't checked about the indoor cam) seems to have sort of like a "lockout" period where it doesnt push motion alerts for 5 minutes, seems easy enough would be to just settimeout for 5 minutes and then reset the motion sensor, exactly like SS does.
My startListening method has the following but it doesnt work, shouldn't this work as a "service" of the camera accessory?
this.accessory.getService(this.Service.MotionSensor).getCharacteristic(this.Characteristic.MotionDetected).updateValue(true);
And for the record, if we do use the timeout, it might be useful to have it push alerts for the indoor camera when the alarm is armed too...

I got basic support for this working, see my PR above. I think it would be useful to people so perhaps consider merging.
The notifications dont currently have a screenshot from the camera in them, any ideas on why? Perhaps the whole FFMpeg conversion is a limiting factor?

Turns out the SS socket reports motion events much more frequently than every 5 minutes, it just throttles the notifications. So I changed the 'lockout' to 5seconds which is what others seem to do
In terms of snapshots, I just still dont get why the handleSnapshotRequest method isnt even getting triggered (like nothing in the logs to suggest its getting called at all), thats all we need to get "rich" notifications (which I have from another camera and are really awesome and useful).

Thanks for the support @nikonratm , really appreciated.
Not having a doorbell camera myself, I wasn't aware that this triggered even while disarmed, it makes sense.
I'll take a look at your PR now!

Happy to help! Yea I think it’s true for all cameras (regular cameras have a privacy shutter that’s usually closed when alarm is off which disables motion).
I’m really stumped by the snapshot issue, bummer you don’t have a camera to test. I’ll have to take another crack at it some time...

I think the snapshot issue is due to the fact that HomeKit doesn't have the concept of a "video doorbell"... What you are setting up here is an accessory that provides two services: a camera and a doorbell, but HomeKit doesn't know they're connected in any way, hence it doesn't request a video snapshot if the bell rings.

Actually I think it kinda does, it’s a camera that has multiple services eg doorbell service, motion service, microphone service etc.
But also it should do the same for motion alerts. From all of my research online HomeKit is just supposed to show (request) snapshots when motion is triggered in a room with a camera. Making them services on the same accessory should do the same.
That’s how these do it (and other examples I saw):
https://github.com/rxseger/homebridge-camera-motion
https://github.com/KhaosT/homebridge-camera-ffmpeg/blob/12b17c7f3d0256368e190c0ca8d4e7256fa6cc9d/index.js#L71

That's weird then... not really sure why! let me know if you do find what the issue is.

I noticed in another comment you have a camera, any interesting in spending [more of] your valuable time looking into it? If you open the privacy shutter during "home" you can test the motion alerts which should really work the same as doorbell events as far as snapshot requests.
No worries if not, Im still just kinda stumped because I cant find any real documentation and the snapshot request is just supposed to automagically come from HK, except it doesn't 😝
Either way, appreciate all your time on the project.


add LLVM 11.1.0 and 12.0.0

This looks fine to me - the failing format checks are for unrelated code.


Fix local playground setup

Don't create service and don't point publish service to it. Istead use
node IPs as Ingress address
Signed-off-by: Dinar Valeev<EMAIL_ADDRESS>

fixes https://github.com/k8gb-io/k8gb/issues/528

@ytsarev, @k0da  agreed

@k0da sorry if I missed it, was the issue for terratest extension created before the merge?

@ytsarev just opened one

@k0da thank you 👍


Dependency on JWT <6.x means security vulnerabilities cannot be avoided

GHSA-8xf4-w7qw-pjjw is a vulnerability affecting all  firebase/php-jwt versions before 6.0.0. Currently the composer.json allows versions 2.x.x-5.x.x.
"firebase/php-jwt": "~2.0||~3.0||~4.0||~5.0||~6.0"

Clearly you'd like to retain as wide a support as possible, but the above declaration in composer.json means those of us who have to undergo security audits can't use the package.
What is the best approach here?

The current version requires firebase/php-jwt:^6.0, so I'm not sure what the concern is here?
https://github.com/googleapis/google-api-php-client/blob/main/composer.json#L12

(this was done 8 months ago - https://github.com/googleapis/google-api-php-client/pull/2431)


Allow group creation outside of cogs

Currently it seems like a cog must create a group for other cogs to be able to join it. This only works if you have an always loaded (at least in the beginning) cog that spawns the group. This is counterproductive as cogs are meant to by dynamically loaded and unloaded.
Something like this should go around that issue but it does not work.
import discord
from discord.commands import SlashCommandGroup
from pycord.multicog import Bot

bot = Bot()

SlashCommandGroup("owner")
bot.load_extension("cogs.testcog")

bot.run("")

import discord
from discord.ext import commands
from pycord.multicog import add_to_group

class Testcog(commands.Cog):
    def __init__(self, bot):
        self.bot = bot

    @add_to_group("owner")
    @commands.slash_command()
    async def test(self, ctx):
        await ctx.respond("ok")

def setup(bot):
    bot.add_cog(Testcog(bot))

raise RuntimeError(f"no slash command group named {group_name} found.")
RuntimeError: no slash command group named owner found.

I understand the issue but this is intended, you must define the group before adding any commands to it. Otherwise, the library would have to replace all missing and unloaded groups with placeholders, which is unnecessarily complex and would create confusion.

What you're asking for requires an overhaul of the storage and loading systems for cogs and commands. I will try my best to write a clean implementation. Don't expect it too soon though.

Update: I now have a working implementation, waiting on https://github.com/Pycord-Development/pycord/pull/2299. The next release of pycord-multicog will be v2.0 and it will introduce breaking changes.

@Slluxx Hey, I've just released pycord-multicog v2.0.0 with this feature implemented in https://github.com/Dorukyum/pycord-multicog/commit/c733fb6694f5a308e2d7f647432abcb6081910f6!


CONTRIBUTORS WANTED

I no longer have time to maintain or port this plugin forward consistently. If anyone would like to adopt and continue working and patching the project, please feel free to do so or just post here for discussion.

I was trying to edit the KBN Network plugin using your files. But i am getting webpack error webpack_require(...).register is not a function. Please help to resolve the issue.
Kibana version I am using is 6.5.2
network_vis.zip


SYN-3741: Added automatic_retries to all /test api responses

DO NOT MERGE
This feature is set to release on April 23rd. This PR will be merged in after the release date.
Note to self: update the client version once the other MR has been merged

Resolves SYN-3741

Before the change?

automatic_retries defaulted to 0

After the change?

Users can set automatic retries to either 1 or 0

Pull request checklist

[ ] Acceptance Tests have been updated, run (make testacc), and pasted in this PR (for bug fixes / features)
[ ] Docs have been reviewed and added / updated if needed (for bug fixes / features)

Acceptance Test Output

Does this introduce a breaking change?

[ ] Yes
[ ] No

This feature has been released. Can we merge this one?

terraform-provider-synthetics 14:13> make testacc
TF_ACC=1 go test $(go list ./... | grep -v 'vendor')  -timeout 120m   | sed '/X-Sf-Token/d'
?       github.com/splunk/terraform-provider-synthetics [no test files]

ok      github.com/splunk/terraform-provider-synthetics/synthetics      56.600s


Add support for loading .wasm (web assembly) binaries

I would like to build plugins in the language of my choice and ship it as a wasm binary which can then be loaded by vim.
Here is an example of an existing wasm runtime in c that could be included. https://github.com/intel/wasm-micro-runtime

Here is an example of an existing wasm runtime in c that could be included. https://github.com/intel/wasm-micro-runtime

Does that complement/dependent on https://github.com/bobpepin/vim/issues/1 (or duktape) in any way, or are they strictly orthogonal?

They are totally different. Duktape allows support for adding JS plugins similar to existing python/ruby and lua interface that currently exists. wasm runtime is different in the sense one can write a plugin in any language such as rust/go/c/c++/(add your favorite language) which then needs to be compiled and shipped as binary wasm files. It can then be loaded in any where it wasm can be loaded. There is also standard library for wasm that is getting standardized similar to the c standard library. https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webassembly-system-interface/. wasm is more of .NET framework or JVM which can run any .net or java bytecode while ducktape can only run JS and is not a bytecode. For wasm plugin authors would need an extra compilation.
For both cases we do need to add some vim standard library so it can be consumed directly from wasm apps.

Sounds like wasm is analogous to a platform-independent .so  library? If so that's very interesting, unlike https://github.com/bobpepin/vim/ (duktape/JS interface) which is just "more of the same" when it comes to vim extensibility. Maybe wasm could finally replace C as the lowest-common-denominator.

@justinmk sounds exactly like a Java to me. Not much people are happy with the software for JVM nevertheless. Native would rule the world eventually, again.

The biggest difference between WebAssembly and JVM is that is designed for languages such as c/rust and avoids hiding many of the low level stack which allows to be very fast as if running in native speed.
I would suggest to glance over the https://webassembly.org/

I do have vim compiled with WASM working at https://github.com/prabirshrestha/vim/commits/wasm3. You can try building with --enable-wasminterp=yes. I doesn't do anything useful yet but does show the capability of loading and executing WASM in vim.
https://twitter.com/PrabirShrestha/status/1238928939545849856
https://user-images.githubusercontent.com/287744/232157675-040ec1d0-7b4f-4155-8c58-78756c5bdd8a.mp4
There is a WASM proposal for Garbage Collector at https://github.com/WebAssembly/gc. GC spec for WebAssembly has landed in v8 under experimental features. https://bugs.chromium.org/p/v8/issues/detail?id=7748.
My problem with vimscript, vim9script or lua is that there aren't many libraries compared to other languages. For example, if I want to create a plugin for urlencode/urldecode, I most likely need to write it from scratch instead of use languages such as rust/go or my favorite language compile it to wasm and load in vim. There are job apis but this starts a new process, cross compiling is a headache when you need to support multiple platforms.


Code suggestion about shutdownGracefully

Here's the current code, and the following is a code snippet:
boolean inEventLoop = inEventLoop();
boolean wakeup;
int oldState;
for (;;) {
    if (isShuttingDown()) {
        return terminationFuture();
    }
    int newState;
    wakeup = true;
    oldState = STATE_UPDATER.get(this);
    if (inEventLoop) {
        newState = ST_SHUTTING_DOWN;
    } else {
        switch (oldState) {
            case ST_NOT_STARTED:
            case ST_STARTED:
                newState = ST_SHUTTING_DOWN;
                break;
            default:
                newState = oldState;
                wakeup = false;
        }
    }
    if (STATE_UPDATER.compareAndSet(this, oldState, newState)) {
        break;
    }
}
gracefulShutdownQuietPeriod = unit.toNanos(quietPeriod);
gracefulShutdownTimeout = unit.toNanos(timeout);

Would it be better to code like this?
int oldState;
for (;;) {
    oldState = STATE_UPDATER.get(this);
    if (oldState >= ST_SHUTTING_DOWN) {
        return terminationFuture();
    }

    if (STATE_UPDATER.compareAndSet(this, oldState, ST_SHUTTING_DOWN)) {
        break;
    }
}
gracefulShutdownQuietPeriod = unit.toNanos(quietPeriod);
gracefulShutdownTimeout = unit.toNanos(timeout);

please submit a PR if you this this is an improvement. I don't see wakeup taken into account.

@Scottmitch Thank you  for  your advice, here is the PR #6267


PKG: Migrate to pyproject.toml

Codecov Report
Base: 90.47% // Head: 90.51% // Increases project coverage by +0.04% :tada:

Coverage data is based on head (216ec92) compared to base (f96fdc9).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #36      +/-   ##
==========================================
+ Coverage   90.47%   90.51%   +0.04%
==========================================
  Files          18       16       -2
  Lines        1029     1023       -6
==========================================
- Hits          931      926       -5
+ Misses         98       97       -1

Impacted Files
Coverage Δ

redbird/__init__.py

redbird/logging/__init__.py

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.