[BUG] Running inference on llama2 with meta tensor

Describe the bug
I am using meta tensor and skip init and loading from checkpoints
This doesn't seem to work with Llama2
This works with OPT models
To Reproduce
Steps to reproduce the behavior:
pip install transformers accelerate bitsandbytes

Install mpi4py . Can this work without mpi4py?

import torch
from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer
import deepspeed
from pathlib import Path
import json

model_name = "meta-llama/Llama-2-7b-hf"
model_path = < path to model snapshot>
tokenizer = AutoTokenizer.from_pretrained(model_name)
tokenizer.pad_token = tokenizer.eos_token
config = AutoConfig.from_pretrained(model_name)
with torch.device("meta"):
    model = AutoModelForCausalLM.from_config(
        config, torch_dtype=torch.float16
    )
model = model.eval()

ds_config = {
  "dtype": "torch.float16",
  "replace_with_kernel_inject": True,
  "tensor_parallel": {
    "tp_size": 1
  }
}
checkpoints_json = "checkpoints.json"

checkpoint_files = file_list = [
        str(entry)
        for entry in Path(model_path).rglob("*.[bp][it][n]")
        if entry.is_file()
    ]
data = {"type": "ds_model", "checkpoints": checkpoint_files, "version": 1.0}
print(f"Creating deepspeed checkpoint file {checkpoints_json}")
json.dump(data, open(checkpoints_json, "w"))

ds_engine = deepspeed.init_inference(
            model,
            config=ds_config,
            base_dir=model_path,
            checkpoint=checkpoints_json,
        )

Expected behavior
Model should load
ds_report output
Please run ds_report to give us details about your setup.
--------------------------------------------------
DeepSpeed C++/CUDA extension op report
--------------------------------------------------
NOTE: Ops not installed will be just-in-time (JIT) compiled at
      runtime if needed. Op compatibility means that your system
      meet the required dependencies to JIT install the op.
--------------------------------------------------
JIT compiled ops requires ninja
ninja .................. [OKAY]
--------------------------------------------------
op name ................ installed .. compatible
--------------------------------------------------
 [WARNING]  async_io requires the dev libaio .so object and headers but these were not found.
 [WARNING]  async_io: please install the libaio-dev package with apt
 [WARNING]  If libaio is already installed (perhaps from source), try setting the CFLAGS and LDFLAGS environment variables to where it can be found.
async_io ............... [NO] ....... [NO]
fused_adam ............. [NO] ....... [OKAY]
cpu_adam ............... [NO] ....... [OKAY]
cpu_adagrad ............ [NO] ....... [OKAY]
fused_lamb ............. [NO] ....... [OKAY]
quantizer .............. [NO] ....... [OKAY]
random_ltd ............. [NO] ....... [OKAY]
 [WARNING]  sparse_attn requires a torch version >= 1.5 and < 2.0 but detected 2.1
 [WARNING]  using untested triton version (2.1.0), only 1.0.0 is known to be compatible
sparse_attn ............ [NO] ....... [NO]
spatial_inference ...... [NO] ....... [OKAY]
transformer ............ [NO] ....... [OKAY]
stochastic_transformer . [NO] ....... [OKAY]
transformer_inference .. [NO] ....... [OKAY]
--------------------------------------------------
DeepSpeed general environment info:
torch install path ............... ['/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/torch']
torch version .................... 2.1.0+cu121
deepspeed install path ........... ['/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/deepspeed']
deepspeed info ................... 0.10.3, unknown, unknown
torch cuda version ............... 12.1
torch hip version ................ None
nvcc version ..................... 12.1
deepspeed wheel compiled w. ...... torch 2.1, cuda 12.1
shared memory (/dev/shm) size .... 93.35 GB

Screenshots
[2023-10-03 19:30:44,350] [INFO] [real_accelerator.py:158:get_accelerator] Setting ds_accelerator to cuda (auto detect)
Creating deepspeed checkpoint file checkpoints.json
[2023-10-03 19:30:47,800] [INFO] [logging.py:96:log_dist] [Rank -1] DeepSpeed info: version=0.10.3, git-hash=unknown, git-branch=unknown
[2023-10-03 19:30:47,800] [INFO] [logging.py:96:log_dist] [Rank -1] quantize_bits = 8 mlp_extra_grouping = False, quantize_groups = 1
Traceback (most recent call last):
  File "/home/ubuntu/serve/test1.py", line 36, in <module>
    ds_engine = deepspeed.init_inference(
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/deepspeed/__init__.py", line 342, in init_inference
    engine = InferenceEngine(model, config=ds_inference_config)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/deepspeed/inference/engine.py", line 151, in __init__
    self._apply_injection_policy(config)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/deepspeed/inference/engine.py", line 391, in _apply_injection_policy
    replace_transformer_layer(client_module, self.module, checkpoint, config, self.config)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/deepspeed/module_inject/replace_module.py", line 312, in replace_transformer_layer
    replaced_module = replace_module(model=model,
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/deepspeed/module_inject/replace_module.py", line 555, in replace_module
    replaced_module, _ = _replace_module(model, policy, state_dict=sd)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/deepspeed/module_inject/replace_module.py", line 623, in _replace_module
    _, layer_id = _replace_module(child,
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/deepspeed/module_inject/replace_module.py", line 623, in _replace_module
    _, layer_id = _replace_module(child,
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/deepspeed/module_inject/replace_module.py", line 599, in _replace_module
    replaced_module = policies[child.__class__][0](child,
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/deepspeed/module_inject/replace_module.py", line 289, in replace_fn
    new_module = replace_with_policy(child,
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/deepspeed/module_inject/replace_module.py", line 232, in replace_with_policy
    _container.initialize_tensors()
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/deepspeed/module_inject/containers/features/hybrid_engine.py", line 30, in initialize_tensors
    super().initialize_tensors(enable_training=enable_training)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/deepspeed/module_inject/containers/base.py", line 141, in initialize_tensors
    self.check_meta_tensor_support()
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/deepspeed/module_inject/containers/base.py", line 132, in check_meta_tensor_support
    assert self.ckpt_load_enabled, "Meta tensors are not supported for this model currently."
AssertionError: Meta tensors are not supported for this model currently.

System info (please complete the following information):

OS: Ubuntu 20.04
GPU count and types [e.g. two machines with x8 A100s each] 4 A10
(if applicable) what DeepSpeed-MII version are you using
(if applicable) Hugging Face Transformers/Accelerate/etc. versions
Python version 3.10
Any other relevant info about your setup

Docker context
Are you using a specific docker image that you can share?
Additional context
Add any other context about the problem here.

Hi @agunapal as the error message indicates, we do not support loading the llama2 models with your current setup (i.e., with kernel injection and using meta tensors):
AssertionError: Meta tensors are not supported for this model currently.

Additionally, you are loading with "tp_size": 1, so the meta tensor loading would offer no benefit. Loading with meta tensor is really only useful for loading on multiple GPUs in order to avoid loading the model checkpoints more than once.
I will also note that we DO support loading llama2 models with meta tensor in the case where you are using multiple GPUs (i.e., tp_size > 1) and kernel injection is turned off (i.e., replace_with_kernel_inject=False).

Hi @mrwyattii
Can you please tell me what is missing from my code to get it working with tp_size > 1
I got the following error with tp_size = 4. Hence I changed it to 1.
It thinks the world_size is 1 where as my instance has 4 GPUs. I am not sure where I should be specifying this.?
[2023-10-03 19:27:04,909] [INFO] [real_accelerator.py:158:get_accelerator] Setting ds_accelerator to cuda (auto detect)
Creating deepspeed checkpoint file checkpoints.json
[2023-10-03 19:27:09,604] [INFO] [logging.py:96:log_dist] [Rank -1] DeepSpeed info: version=0.10.3, git-hash=unknown, git-branch=unknown
[2023-10-03 19:27:09,604] [WARNING] [config_utils.py:69:_process_deprecated_field] Config parameter mp_size is deprecated use tensor_parallel.tp_size instead
[2023-10-03 19:27:09,605] [INFO] [logging.py:96:log_dist] [Rank -1] quantize_bits = 8 mlp_extra_grouping = False, quantize_groups = 1
[2023-10-03 19:27:09,607] [INFO] [comm.py:637:init_distributed] cdb=None
[2023-10-03 19:27:09,607] [INFO] [comm.py:652:init_distributed] Not using the DeepSpeed or dist launchers, attempting to detect MPI environment...
[2023-10-03 19:27:10,117] [INFO] [comm.py:702:mpi_discovery] Discovered MPI settings of world_rank=0, local_rank=0, world_size=1, master_addr=<IP_ADDRESS>, master_port=29500
[2023-10-03 19:27:10,118] [INFO] [comm.py:668:init_distributed] Initializing TorchBackend in DeepSpeed with backend nccl
Traceback (most recent call last):
  File "/home/ubuntu/serve/test1.py", line 48, in <module>
    ds_engine = deepspeed.init_inference(
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/deepspeed/__init__.py", line 342, in init_inference
    engine = InferenceEngine(model, config=ds_inference_config)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/deepspeed/inference/engine.py", line 116, in __init__
    self._create_model_parallel_group(config)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/deepspeed/inference/engine.py", line 235, in _create_model_parallel_group
    self.mp_group = dist.new_group(ranks)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/deepspeed/comm/comm.py", line 185, in new_group
    return cdb.new_group(ranks)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/deepspeed/comm/torch.py", line 328, in new_group
    return torch.distributed.new_group(ranks)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/torch/distributed/c10d_logger.py", line 74, in wrapper
    func_return = func(*args, **kwargs)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/torch/distributed/distributed_c10d.py", line 3881, in new_group
    return _new_group_with_tag(ranks, timeout, backend, pg_options, None, use_local_synchronization=use_local_synchronization)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/torch/distributed/distributed_c10d.py", line 3921, in _new_group_with_tag
    raise RuntimeError(
RuntimeError: the new group's world size should be less or equal to the world size set by init_process_group

+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 530.30.02              Driver Version: 530.30.02    CUDA Version: 12.1     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                  Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf            Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA A10G                     On | 00000000:00:1B.0 Off |                    0 |
|  0%   30C    P0               43W / 300W|      0MiB / 23028MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
|   1  NVIDIA A10G                     On | 00000000:00:1C.0 Off |                    0 |
|  0%   30C    P0               57W / 300W|      0MiB / 23028MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
|   2  NVIDIA A10G                     On | 00000000:00:1D.0 Off |                    0 |
|  0%   30C    P0               44W / 300W|      0MiB / 23028MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
|   3  NVIDIA A10G                     On | 00000000:00:1E.0 Off |                    0 |
|  0%   30C    P0               57W / 300W|      0MiB / 23028MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

Also, when i turned off kernel_injection, I got this error
[2023-10-03 19:29:53,924] [INFO] [logging.py:96:log_dist] [Rank -1] quantize_bits = 8 mlp_extra_grouping = False, quantize_groups = 1
Traceback (most recent call last):
  File "/home/ubuntu/serve/test1.py", line 48, in <module>
    ds_engine = deepspeed.init_inference(
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/deepspeed/__init__.py", line 342, in init_inference
    engine = InferenceEngine(model, config=ds_inference_config)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/deepspeed/inference/engine.py", line 164, in __init__
    self.module.to(device)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/transformers/modeling_utils.py", line 2058, in to
    return super().to(*args, **kwargs)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1160, in to
    return self._apply(convert)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/torch/nn/modules/module.py", line 810, in _apply
    module._apply(fn)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/torch/nn/modules/module.py", line 810, in _apply
    module._apply(fn)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/torch/nn/modules/module.py", line 833, in _apply
    param_applied = fn(param)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1158, in convert
    return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)
NotImplementedError: Cannot copy out of meta tensor; no data!

@mrwyattii Also, if you could give me pointers on what change is needed to get this example working with meta tensor and kernel_injection, that would be great. I can try to send a PR

Hi @mrwyattii
Thanks, I tried your code. It gives me this error
[2023-10-04 20:44:43,717] [INFO] [real_accelerator.py:158:get_accelerator] Setting ds_accelerator to cuda (auto detect)
Fetching 15 files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 15/15 [00:00<00:00, 59861.62it/s]
[2023-10-04 20:44:47,259] [INFO] [logging.py:96:log_dist] [Rank -1] DeepSpeed info: version=0.10.3, git-hash=unknown, git-branch=unknown
[2023-10-04 20:44:47,260] [INFO] [logging.py:96:log_dist] [Rank -1] quantize_bits = 8 mlp_extra_grouping = False, quantize_groups = 1
Traceback (most recent call last):
  File "/home/ubuntu/deepspeed_inference/test2.py", line 31, in <module>
    ds_engine = deepspeed.init_inference(
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/deepspeed/__init__.py", line 342, in init_inference
    engine = InferenceEngine(model, config=ds_inference_config)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/deepspeed/inference/engine.py", line 164, in __init__
    self.module.to(device)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/transformers/modeling_utils.py", line 2058, in to
    return super().to(*args, **kwargs)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1160, in to
    return self._apply(convert)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/torch/nn/modules/module.py", line 810, in _apply
    module._apply(fn)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/torch/nn/modules/module.py", line 810, in _apply
    module._apply(fn)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/torch/nn/modules/module.py", line 833, in _apply
    param_applied = fn(param)
  File "/home/ubuntu/anaconda3/envs/ds_py210/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1158, in convert
    return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)
NotImplementedError: Cannot copy out of meta tensor; no data!

I remember seeing this error when I tried this with facebook/opt-6.7b and when I set "replace_with_kernel_inject": False, that worked.
However with llama2, I get errors whether I set "replace_with_kernel_inject": False or "replace_with_kernel_inject": True

Example:
The following code works
import torch
import os
from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer
from huggingface_hub import snapshot_download
import deepspeed
from pathlib import Path
import json

local_rank = int(os.getenv("LOCAL_RANK", "0"))
world_size = int(os.getenv("WORLD_SIZE", "1"))

model_name = "facebook/opt-6.7b"
model_path = snapshot_download(model_name, ignore_patterns=["*.safetensors"])
tokenizer = AutoTokenizer.from_pretrained(model_name)
tokenizer.pad_token = tokenizer.eos_token
config = AutoConfig.from_pretrained(model_name)
with deepspeed.OnDevice(dtype=torch.float16, device="meta", enabled=True):
    model = AutoModelForCausalLM.from_config(config, torch_dtype=torch.float16)

ds_config = {
    "dtype": "torch.float16",
    "replace_with_kernel_inject": True,
    "tensor_parallel": {"tp_size": world_size},
}

checkpoint_files = file_list = [
    str(entry) for entry in Path(model_path).rglob("*.[bp][it][n]") if entry.is_file()
]
checkpoint_dict = {"type": "ds_model", "checkpoints": checkpoint_files, "version": 1.0}

ds_engine = deepspeed.init_inference(
    model,
    config=ds_config,
    base_dir=model_path,
    checkpoint=checkpoint_dict,
)

The following code errors
import torch
import os
from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer
from huggingface_hub import snapshot_download
import deepspeed
from pathlib import Path
import json

local_rank = int(os.getenv("LOCAL_RANK", "0"))
world_size = int(os.getenv("WORLD_SIZE", "1"))

model_name = "facebook/opt-6.7b"
model_path = snapshot_download(model_name, ignore_patterns=["*.safetensors"])
tokenizer = AutoTokenizer.from_pretrained(model_name)
tokenizer.pad_token = tokenizer.eos_token
config = AutoConfig.from_pretrained(model_name)
with deepspeed.OnDevice(dtype=torch.float16, device="meta", enabled=True):
    model = AutoModelForCausalLM.from_config(config, torch_dtype=torch.float16)

ds_config = {
    "dtype": "torch.float16",
    "replace_with_kernel_inject": False,
    "tensor_parallel": {"tp_size": world_size},
}

checkpoint_files = file_list = [
    str(entry) for entry in Path(model_path).rglob("*.[bp][it][n]") if entry.is_file()
]
checkpoint_dict = {"type": "ds_model", "checkpoints": checkpoint_files, "version": 1.0}

ds_engine = deepspeed.init_inference(
    model,
    config=ds_config,
    base_dir=model_path,
    checkpoint=checkpoint_dict,
)

@agunapal are you running the llama example I provided with multiple GPUs (i.e., with deepspeed --num_gpus 2)?

@mrwyattii That worked! But how do I do it if i cant use deepspeed --num_gpus 2, i.e use deepspeed as a library
I am a maintainer of TorchServe. Sometime ago we added this example with DeepSpeed + opt model
https://github.com/pytorch/serve/blob/master/ts/handler_utils/distributed/deepspeed.py#L22

I figured it out. This is being achieved using torchrun in our case and for some reason there is an issue with the world size. I'll look more. Thanks!

@mrwyattii Thank you for your help. I figured out the problem! Will close the issue once i merge the example in our repo and share the link here


Week 4 GF is in front of the limo

Describe your bug here.
Mind you, if you are modding, please try testing your bug in a clean version of the engine instead, this ensures the bug is actually caused by the engine itself.
In Week 4, GF and her speakers are in front of the limo. This has not happened back on 0.7.1h and other versions of FNF.
If this is part of the changes, please put it on the changelog in 0.7.2 or the readme.

(0.7.2 Release)

(Modified base Funkin' build)
Command Prompt/Terminal logs (if existing)
No response
Are you modding a build from source or with Lua?
I am not modding
Which branch of the engine are you using?
Latest (main)
What is your build target?
Windows
Did you edit anything in this build? If so, mention or summarize your changes.
No

This is a repost of a previous bug where I mislabeled it as Week 5 (#13480)

Also, it would help prevent other issues similar to this such as #12794 and #13266.

For starters this change was made back in 0.7. Shadow Mario has already said it is NOT a bug.

Yeah i just prefer it like that lol
Also this is a duplicate

For starters this change was made back in 0.7. Shadow Mario has already said it is NOT a bug.

Yeah i just prefer it like that lol Also this is a duplicate

It's not documented on the readme though.


completion_queue.c:303 assertion failed: !cc->shutdown triggered when calling CompletionQueue::Next

Sometimes my Async client crashes with completion_queue.c:303 assertion failed: !cc->shutdown when calling CompletionQueue::Next. I have a dedicated thread that runs the follwing code:
void Client::run() {
	void* tag;
	bool ok;
	bool running;
	while (true) {
		running = completionQueue_.Next(&tag, &ok);
		if (ok && running) {
			static_cast<CallData*>(tag)->Finish();
		} else {
			break;
		}
	}
}

I stop this thread by calling
void Client::Shutdown()
{
	completionQueue_.Shutdown();
}

from another thread.
Is there something wrong with this approach? Why could this assertion be triggered? Is it a problem to add requests to a shutted down queue or does it just silently discards them?

It's not allowed to add a request or perform an operation on a queue that has been shutdown. If you your shutdown and operations are in different threads, you need to have some synchronization variable to make sure that you don't add anything to a queue that has been shutdown.


Ember Ui is misaligned

Upgrade from 2.5.9 to master-head f33188df3 or on a rancher backup restore, Ember UI is misaligned

Pages have been updated to improve how they visually fit in when embedded in the dashboard. As per comment in https://github.com/rancher/dashboard/issues/3497#issuecomment-882354388 we don't officially support a way to access them outside this process

On an upgrade usecase, if the user is already int he Ember UI, user will be redirected to Ember UI only, right after upgrade. And i feel is really a bug that could have some fixes.

On an upgrade usecase, if the user is already in the Ember UI, user will be redirected to Ember UI only, right after upgrade. And i feel is really a bug that could have some fixes.

@sowmyav27  I'm unfamiliar with the upgrade flow but from my understanding it's executed outside of the UI? If so then I think the issue here is that anyone already logged in to the Ember UI is still there post upgrade. We should instead redirect them to the dashboard in such cases.

Yes the update is out-of-band.
I'm not sure how you'd do that other than unconditionally redirecting when not iframed ..which removes the escape hatch to get back to Ember / seems heavy-handed.

This page is not about iframe. In fact the two I see the problems are in the cluster list page and API tokens page, both not iFramed. For upgrade this UI would be important. I still think we need to fix this.

We're aware that you're looking at them directly, but the point is we mainly care about ember pages that are visible via iframes in Vue, which these aren't.
Going straight to Ember is not a normal supported path anymore.

@sowmyav27 we'll mark this as "won't fix" based on our focus on iFrames of Ember for 2.6 and going forward. If the upgrade scenario needs to be considered, we can discuss with Jono.

Closing this based on https://github.com/rancher/dashboard/issues/3499#issuecomment-885348039 and https://github.com/rancher/dashboard/issues/3499#issuecomment-888482949


Switch busybox image to cgr.dev/chainguard/busybox:latest-glibc

The federation test failing seem to be unrelated to this change if my test covering wget feature parity can be used as proof. 🤔
docker run --rm cgr.dev/chainguard/busybox:latest-glibc wget --no-check-certificate -O /dev/null https://google.com && echo $?
Connecting to google.com (<IP_ADDRESS>:443)
Connecting to www.google.com (<IP_ADDRESS>:443)
saving to '/dev/null'
null                 100% |********************************| 14700  0:00:00 ETA
'/dev/null' saved
0

Is there a reason to use the glibc version over the musl one? the latter would be slightly smaller/faster.

Is there a reason to use the glibc version over the musl one? the latter would be slightly smaller/faster.

Yes. As wolfi-os is based on alpine for package distribution it is by default musl. However alpine images are also known to have compatibility issues when it comes to c dependencies as alpine is based on musl.
To ensure we will not face those issues I choose to take the glibc variant which is comparable to the original busybox image that is also glibc based.
In essence spire itself was also having muslc issues, that is why we went with the ubuntu based builder images there as we couldn't use alpine for that purpose.

I get the musl compatibility issue with some programs. It generally shows up at build time in my experience. But this is a busybox image thats prebuilt and we're not adding any binaries to it. So if it builds and works, there shouldn't be any compatibility issues with it?

Even at runtime there are usecases. E.g. Nvidia AI workloads  is an example from the top of my head. Anyhow choose glibc to have the same as original busybox which is also glibc based by default. https://wiki.musl-libc.org/building-busybox.html

NVIDIA AI is a bit weird as they often build at runtime. :/  For our use cases though, we're just calling really basic stuff like nc/wget/curl. Not sure we need glib in that case?
Also, at this point, we have several pr's that are interacting with each other and blocking each other. At least, this one, the namespace override one, the ingress-nginx one, and a new one I made to kind of test out the chainguard images. You can find it here: https://github.com/spiffe/helm-charts/pull/178
We need to come up with a game plan on how to do the chainguard switchover I think, since there are so many pr's at play.
Based on pull/178, I prefer the chainguard bash container over the busybox one. It can do all 3 of nc,wget, and curl, and we can switch over all the tests to use curl which is needed at least for the ingress-nginx pr, and can be made to work for all the tests including the spire-server one as per pull/178.
How should we proceed? Merge several small pr's starting with pull/178? merge 178 with this one and expand it to do all the test subdirs? other?

NVIDIA AI is a bit weird as they often build at runtime. :/ For our use cases though, we're just calling really basic stuff like nc/wget/curl. Not sure we need glib in that case?
Also, at this point, we have several pr's that are interacting with each other and blocking each other. At least, this one, the namespace override one, the ingress-nginx one, and a new one I made to kind of test out the chainguard images. You can find it here: #178
We need to come up with a game plan on how to do the chainguard switchover I think, since there are so many pr's at play.
Based on pull/178, I prefer the chainguard bash container over the busybox one. It can do all 3 of nc,wget, and curl, and we can switch over all the tests to use curl which is needed at least for the ingress-nginx pr, and can be made to work for all the tests including the spire-server one as per pull/178.
How should we proceed? Merge several small pr's starting with pull/178? merge 178 with this one and expand it to do all the test subdirs? other?

To keep similarity with the standard busybox image we will sticking with the glibc version is better IMHO.
Once this is merged all the other PRs can be rebased. That is the easiest approach.

Oh. I didn't realize the glibc one is actually smaller. never seen a glibc variant of the container be smaller. I'm good with using the glibc variant over the musl variant in that case.
as for curl, this is why we need it:
[kfox@zathras ~]$ podman run -it --rm cgr.dev/chainguard/busybox:latest-glibc sh -c 'cd /tmp; wget https://google.com'
Connecting to google.com (<IP_ADDRESS>:443)
wget: note: TLS certificate validation not implemented
Connecting to www.google.com (<IP_ADDRESS>:443)
No proper TLS support in wget. its not a full wget, but a busybox stub:
[kfox@zathras ~]$ podman run -it --rm cgr.dev/chainguard/busybox:latest-glibc sh -c 'wget --help'
BusyBox v1.36.0 (1970-01-01 00:00:00 UTC) multi-call binary.
Also, the version of wget in this image doesn't support the flag --no-check-certificate:
https://github.com/spiffe/helm-charts/blob/main/charts/spire/charts/spire-server/templates/tests/test-connection.yaml#L24
Thats why the federation-bundle-endpoint test failed when I tried to switch that image to chainguard/busybox.
The other pr has a fixed version of it using curl that actually tests the service still.
As for more images, we've been talking about minimizing the number values to a minimal set. Having two sets of images to have to override will double the number of values we will need. The bash image will work for all tests, while the busybox one wont because of lack of curl. Its unusable for proper https testing.


Take MachineConfig results into account for aggregations

Description
This is required, but why did this test pass before
Checklist

[ ] Investigated and inspected CI test results
[ ] Unit test and regression tests added
[ ] Evaluated and added CHANGELOG entry if required
[ ] Determined and documented upgrade steps
[ ] Documented user facing changes (create PR based on openshift/openshift-docs and merge into rhacs-docs)

If any of these don't apply, please comment below.
Testing Performed
CI

/test openshift-4-qa-e2e-tests
might as well test in the prow world now that I've fixed the name
/shrug


Alt key press, keyboard shortcuts and support for Emacs keyboard commands.

Problem Description
As can be seen in the card below, a lot of the shortcuts defined in Emacs consist of the Alt key and another key. Note that the Alt modifier key corresponds to the symbol M in the table.
However, on Windows, the focus is automatically given to the mainwindow's menubar when the Alt key is held down. If one pressed another key, like F for example, while the Alt key is down, it expands the menu starting with that letter. So in Spyder, if the user does Alt+F, it resuts in the File menu being expanded and focused.
So... this will obviously cause problems for the support of Emacs keybindings. I can think of two options:

We use something else to replace the Alt + <another key> shortcuts.
We override the default behavior in Windows and prevent the menubar from grabbing focus after Alt is pressed.

So what do you guys think? @ccordoba12 @jitseniesen @CAM-Gerlach
https://www.gnu.org/software/emacs/refcards/pdf/refcard.pdf

Resources:
https://stackoverflow.com/questions/37020992/qt-prevent-menubar-from-grabbing-focus-after-alt-pressed-on-windows

We override the default behavior in Windows and prevent the menubar from grabbing focus after Alt is pressed.

This is what we need to do because Emacs shortcuts are ingrained in muscle memory for its long time users.

We override the default behavior in Windows and prevent the menubar from grabbing focus after Alt is pressed.

This is what we need to do because Emacs shortcuts are ingrained in muscle memory for its long time users.

The problem is that Alt-<F/E/V/etc>-<Scroll/Key>l-Enter is ingrained in muscle memory for many longtime Windows users for quickly accessing menu commands, and I frequently use it myself. I don't recall a single Windows-native or cross-platform application I've ever used that's broken this convention, and as generally more "power users", people using Spyder are more likely than average to employ them.
Furthermore, I believe (although I'm not 100% certain) that Alt-Spacebar relies on the behavior as well, which allows quick access to the minimize, maximize, restore, etc. window commands—and most crucially, Alt-Spacebar, c is the standard window close command (equivalent to Cmd-Q on Windows) that's drilled into my muscle memory and I've never, ever seen an application override it.
Therefore, given this is basic, nearly universal OS-standard behavior that users expect of any Windows application, I don't see how we can justify overriding it on that platform by default to cater to a minority of longtime users of one particular editor native to a different platform. However, I see no problem with only doing so if an Emacs shortcut preset is enabled (perhaps with a warning dialog or other admonition so users aren't surprised when the functionality stops working), or offering it as a checkbox option in the keyboard shortcut preferences, off by default on Windows. We should ensure Alt-Spacebar still works, since that triggers OS-level functionality (equivalent to blocking Alt-Tab or Ctrl-Alt-Delete) and leaves the user without the means to easily close (or minimize, etc) Spyder itself on Windows.

I am not comfortable with overriding the default behavior on Windows also... but I don't know how important support for Emacs is...
Personally, I don't care much about Emacs. I'm more focused about fixing everything that is not working and make the keyboard shortcuts as much configurable as possible.
So bottom line, supporting the entire set of Emacs commands on Windows is not going to be an easy task...

but I don't know how important support for Emacs is...

If it really is that important, an off-by default option configurable by a checkbox or by explicitly enabling the emacs shortcuts/emacs mod would be the best of both worlds between the advantages of both options you present, without either changing the default Emacs shortcuts or disabling OS behavior by default, unless the user explicitly preferred it.

Yeah, the Alt behavior for Emacs should be activated only if the Emacs shortcuts set is selected.

Yeah, the Alt behavior for Emacs should be activated only if the Emacs shortcuts set is selected.

This solution doesn't take into account custom shortcuts that are defined by the users though...
I think we need to add an option configurable by a checkbox instead in the Keyboard Shortcut preferences panel.

I think we need to add an option configurable by a checkbox instead in the Keyboard Shortcut preferences panel.

Agreed, that's the best option—best be explicit about it.

Ok, sure, that's a good option too.


Conda package 2.0.0b4 broken?

I was trying to install the default version ESMValTool from Conda and it got jammed in infinitely collecting package metadata. Switching to 2.0.0b3 works better. Also notable is the size of 2.0.0b4 Conda package, which is only 23.4kB. Well I do not know how it is supposed to work, but default version, which I assume is 2.0.0b4, is not installing with Conda.

A new build of the package is now available on conda and installs in about 2 minutes on my computer. I had to label all older versions of the package with the deprecated label to make it work.
@tommibergman Could you check if this solves your problem?

Regarding the size difference between the v2.0.0b3 and v2.0.0b4 packages: in the b4 version we introduced subpackages, i.e. the esmvaltool is now just a placeholder with four dependencies esmvaltool-python, esmvaltool-r, esmvaltool-julia, esmvaltool-ncl, that's why it's so small.

legend, @bouweandela :beer: I shall test this myself now!

It is faster and looks good, but no cigar. esmvaltool-julia fails due to inability clone  General.git:
LoadError: git repository not found at https://github.com/JuliaRegistries/General.git``
I did a bit of digging, and it seems our proxy might be causing this. I will test some changes next week.
Also R-packages fail to install:
cannot open URL 'https://cloud.r-project.org/src/contrib/PACKAGES'
I suppose both errors occur due to our proxy, but I will investigate further next week.

Are you interested in running a particular recipe or all of them? If you don't need the R or Julia recipes, you can also install the tool with just
conda install esmvaltool-python esmvaltool-ncl

That will get about 70 percent of the recipes working.

@tommibergman Any news? Did you manage to solve the issue with the proxies? It would be interesting to know how you did it, because then we can add that as a hint to our installation instructions. Note that we released a new version of ESMValTool, v2.0.0 and a new conda package in the mean time.

Please re-open the issue if this is still a problem.


No warning is given when two Formbuilder fields have the same name

It is possible to create a Formbuilder form that has two fields with the same name. If a user views this form, the first duplicate field will not appear. If the user submits the form then validation will fail and the page will reload.

Re-tested on 0.8:
If two fields have the same name then the field will only appear once on the form. If a user submits the form then the form will submit successfully with no validation error. When the results are viewed in the "Forms" section of the admin, there will be two fields with the same name and the same value will appear in both.


Request manual verification

In case you use a hosting provider which is not yet supported by Flathub yet, e.g. SourceForge or Codeberg, it is currently not possible to verify the App. In this case, it would be nice to allow requesting a manual verification from the Flathub staff in the Developer Settings.

We will probably need context / back and forth communication to handle this in a sane way. So it might make sense to just do this via the flathub issue tracker.


[JENKINS-41270] improved error message for invalid enum values

Thanks so much for this.  Job DSL just keeps getting better!


Ability to list different submit application instructions for each listing

AC:

A listing can either (1) Not accept postmark OR (2) Accept postmark
If the listing (1) Does not accept postmark, then display 'Applications must be received by the deadline and postmarks will not be considered.' in the 2. Submit a Paper Application instructions
If the listing (2) Accepts Postmark, then display the following 'Applications must be received by the deadline. If sending by U.S. Mail, the application must be postmarked by [Application Due Date] and received by mail no later than [Postmark Due Date]. Applications received after [Postmark Due Date] via mail will not be accepted even if they are postmarked by [Application Due Date]. [Developer] is not responsible for lost or delayed mail.'

Notes:
Application Due Date, and Developer should be existing fields. Postmark Due Date and the Accepts Postmark? should be new fields that need to be created.
Example of Submit Application instructions on Archer Studios:
https://sj.housingbayarea.org/listings/5
Applications must be received by the deadline. If sending by U.S. Mail, the application must be postmarked by November 1, 2019 and received by mail no later than November 5, 2019. Applications received after November 5, 2019 via mail will not be accepted even if they are postmarked by November 1, 2019. Charities Housing is not responsible for lost or delayed mail.
Pivotal corresponding issue for SJ Bloom: https://www.pivotaltracker.com/story/show/169185822

Completed with #82


How do we handle dynamically loading libraries with additional functionality?

We expect to have non-general functionality that we would want specific users to be able to load into the single app.
For example, we will implement an image processing engine that is only used by specific users completing questionnaires with a call out to image interpretation.
Conceptually, this is similar to app-store-like apps, e.g. the Roblox app, which is a single app that can load specific games that are not predefined or compile into the app.

Initial findings

Adding text here for reference:
We’d want to dynamically load modules at runtime to support better configurability of OpenSRP apps.

### Approach 1

This involves directly managing the downloading and loading of classes at runtime:

- We can use the DexClassLoader https://stackoverflow.com/a/6860579/9782187
- Someone tried to provide a library for this a while back (https://github.com/lukeFalsina/Grab-n-Run). Looks dead at the moment
- https://medium.com/@artyomdangizyan/aar-to-dex-loading-and-running-code-at-runtime-in-android-application-69089a30c715  this is a plugin to facilitate the same

#### Advantages:

- Hands-on control of the entire process

#### Disadvantages:

- Would not want to do dependency management ourselves e.g. downloading, loading etc. since there may be a wide range of errors (e.g. failure when downloading) which we'd need to handle
- Vulnerabilities added as part of the loading process as it can get quite complex and security bugs could be introduced
- Bugs are difficult to debug if they come from our implementation of the dependency management - they may be difficult to replicate and transient (only occurring for specific devices at random instances)

### Approach 2

Use Google’s Play Feature Delivery which allows publishing modules as Android App Bundles (AABs) alongside a core app:

- Supports breaking down functionality into modules which can be downloaded and installed at runtime
- Some design work is needed to create appropriate interfaces that call into the modules from the core app (modules are not directly accessible from core app). This post provides some pointers
- https://developer.android.com/guide/app-bundle/on-demand-delivery looks like a good solution
- https://medium.com/androiddevelopers/patterns-for-accessing-code-from-dynamic-feature-modules-7e5dca6f9123  sample code for above
- https://medium.com/androiddevelopers/a-patchwork-plaid-monolith-to-modularized-app-60235d9f212e great resource on how Plaid was refactored/modularized
- https://github.com/googlesamples/android-dynamic-code-loading/ sample code using Dagger, Reflection (nice sample implementation)
- https://github.com/android/app-bundle-samples/tree/main/DynamicCodeLoadingKotlin  same as above in a different repo

#### Advantages:

- Officially supported by Google
- Secure (artifacts are from Google Play)
- Scalable (able to add new modules in future)

#### Disadvantages:

- Might be hard to implement for existing apps since it would likely require non-trivial refactoring (not so much an issue for a well-designed fresh implementation)

Approach (2) sounds good, especially since we wouldn't need this for existing apps, what do you think? Did you have a recommendation?

I'd go with 2 as well


Add support for multiple short circuit regions

Fix #22

Codecov Report

Merging #23 into master will increase coverage by 0.17%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #23      +/-   ##
==========================================
+ Coverage   94.22%   94.39%   +0.17%
==========================================
  Files           5        5
  Lines         225      232       +7
==========================================
+ Hits          212      219       +7
  Misses         13       13

Impacted Files
Coverage Δ

src/raster.jl
98.38% <100%> (+0.2%)
:white_check_mark:

Continue to review full report at Codecov.

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


Doesn't work on IOS

During using your lib I've noticed that it doesn't work in IOS (13.7). The popup opens but after choosing the files nothing changed. I've tested it for a little bit and figured out that change event is not fired. After a quick search, I've found out that change is not fired if an input is not in DOM. Function openFileDialog creates the input but doesn't add it to DOM.
So, might be worth adding an argument like addToDOM or even do it by default as it very popular case in my view.

Hey @Jaaneek!
Could you please take a look at the issue?

Hi Man, i will look into it after the weekend. Thank you for pointing that out and sorry for late response.

Hello @Jaaneek!
any updates?

Hey @Jaaneek!
I've opened a pull request with adding the input to the body to make it work on IOS. (https://github.com/Jaaneek/useFilePicker/pull/24)

@MrKampla and I are investigating this, I didn't know of this issue when creating this package and I think putting the element into the document is something I would like to avoid. But for now I don't see a better option. I need to wait on @MrKampla opinion on this matter as well, and then we are ready to go

Hi @Ivanko5417, we've been investigating the issue and as @Jaaneek said, adding the element to the document is not considered as a good practice, so we'd like to avoid it. I've done some research, and it seems like ios does not always fire change events on inputs: https://stackoverflow.com/questions/8004227/ios-select-onchange-not-firing/10544704#10544704
My suggestion is to try adding onBlur event listener on top of existing onChange listener.
In src/helpers/openFileDialog.ts add:

// set onchange event to call callback when user has selected file
inputElement.addEventListener('change', callback);
// fire a blur event to call a callback on ios devices, as they do not fire onChange event
inputElement.addEventListener('blur', callback);

Test cases to cover:

try to open a file selector, then close it without choosing any files
check if change and blur events interfere with each other in any way on non-ios devices
blur event callback should be called only on ios devices
it would be nice to test it on React Native as well

If my solution with blur event doesn't work or introduces any new bugs, then we'll accept Your PR.

@Ivanko5417 We opened another pull request that aims at fixing this issue, can you test it?
#25

Thank you very much for your PR. I've tested it and looks like it works!

For me I still see the issue while using it on Safari browser, the on change event is not always triggered. I need to try to upload a couple of times to make it work

What version of the library do you use?

Hi !
Sorry to bump this, but I encounter the exact same problem : nothing happens after image selection.
With about all returns logged (filesContent, loading, errors and plainFiles),  console shows 0 value change
It works fine on Safari desktop
use-file-picker 1.4.1
iOS 13.3

@NicoMilk Can you show us which props are You passing to the useFilePicker hook? I've tested several scenarios, both on MacBook and iPhone, and I see that Safari doesn't like getting image files to be read as text - the browser just freezes on my devices. Try to disable file content reading with readFileContent: false and this should fix the problem. Everything works on Google Chrome without crashing, but I don't see a point in reading an image file as a text.

@MrKampla, thanks for replying
The current config is :
 // file picker config   const [     openFileSelector,     { filesContent, loading, errors, plainFiles, clear },   ] = useFilePicker({     multiple: allowMultiple,     readAs: 'DataURL', // availible formats: "Text" | "BinaryString" | "ArrayBuffer" | "DataURL"     accept: ['.jpeg', '.jpg', '.png'],     limitFilesConfig: limitFilesConfig,     // minFileSize: 1, // in megabytes     // maxFileSize: 1,     // readFilesContent: false, // ignores file content   })
with allowMultiple and limitFilesConfig set respectively to false and { min: 1, max: 3 } by default
Again, the problem occurs only on Safari mobile. All our other tests (desktop Safari, Fifrefox, Chrome and mobile Firefox on Android) are running fine.
I'm gonna try to set readFileContent: false as you suggested and I'll let you know.

Nothing changes with readFileContent: false

have anyone solved this issue? Also stuck on this one

Same here, on safari mobile the change event does not fire...


Connecting to qwiic device requires reading from device with smbus2

I'm using the qwiic alphanumeric library to connect to this display from a jetson nano using pHAT and running into an issue where the device doesn't get detected. For example, no device is detected when I run
import qwiic_alphanumeric
my_display = qwiic_alphanumeric.QwiicAlphanumeric()
mydisplay.begin()

However, if I run the following then the devices gets detected and works as expected.
import qwiic_alphanumeric
import smbus2

bus = smbus2.SMBus(1)
bus.read_byte(0x70)

my_display = qwiic_alphanumeric.QwiicAlphanumeric()
my_display.begin()
my_display.print("hi")

I'm new to the qwiic ecosystem and I'd greatly appreciate if someone has insight about why I would need to bus.read_byte(0x70) off the device so it can initialize.
Thank you!

For technical assistance, users should post questions on our forum.
With that said, have you also installed the overarching qwiic Python package (in addition to the qwiic_alphanumaric Python package)?


DBus.Error.AccessDenied - not allowed to own the service "org.bluez.TestService"

The problem
Bless fails to launch on Linux with the error: txdbus.error.RemoteError: org.freedesktop.DBus.Error.AccessDenied: Connection ":1.136" is not allowed to own the service "org.bluez.TestService" due to security policies in the configuration file
Not sure if this is an invalid call, or if it actually needs a system config change. In addition I did run it as root one time, but no difference.
Reproduction
Simply run an example script: server.py or gattserver.py.
Expected behavior
Working bless on Linux.
Full log
$ python gattserver.py
DEBUG:asyncio:Using selector: EpollSelector
Traceback (most recent call last):
  File "/home/jk/Hobby/BMS-ble/ble-serial/gattserver.py", line 87, in <module>
    loop.run_until_complete(run(loop))
  File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/home/jk/Hobby/BMS-ble/ble-serial/gattserver.py", line 66, in run
    await server.add_gatt(gatt)
  File "/home/jk/Hobby/BMS-ble/venv/lib/python3.9/site-packages/bless/backends/server.py", line 223, in add_gatt
    await self.add_new_service(service_uuid)
  File "/home/jk/Hobby/BMS-ble/venv/lib/python3.9/site-packages/bless/backends/bluezdbus/server.py", line 148, in add_new_service
    await service.init(self)
  File "/home/jk/Hobby/BMS-ble/venv/lib/python3.9/site-packages/bless/backends/bluezdbus/service.py", line 42, in init
    gatt_service: BlueZGattService = await bluez_server.app.add_service(self._uuid)
  File "/home/jk/Hobby/BMS-ble/venv/lib/python3.9/site-packages/bless/backends/bluezdbus/dbus/application.py", line 85, in add_service
    await self.bus.requestBusName(self.destination).asFuture(self.loop)
txdbus.error.RemoteError: org.freedesktop.DBus.Error.AccessDenied: Connection ":1.136" is not allowed to own the service "org.bluez.TestService" due to security policies in the configuration file

Desktop (please complete the following information):

OS: Arch Linux
BlueZ 5.62

Additional context
Tried it in addition on Ubuntu 21.10 and got exactly the same error.
It works flawlessly on Windows 10, so my hardware definitely supports it.
Also I see that it is a DBus error, thrown by txdbus. Since bleak switched away from it (see issue here) now to dbus-next, might it make sense to switch here too?
Edit: It works on my system with this code, which uses standard python-dbus.

@Jakeler, I made an attempt to switch to dbus-next. See the 60-dbus-next branch.
I'm still unsure whether this switch will actually address the issue you came across on permissions though. Let me know if you still see that behavior with this change. Any additions you have on your end are also welcome still.

Nice, thanks!
This still does not solve this issue though. I digged a while in the dbus documentation and configs, now it makes actually a lot of sense: /usr/share/dbus-1/system.conf
    <!-- Holes must be punched in service configuration files for
         name ownership and sending method calls -->
    <deny own="*"/>

/usr/share/dbus-1/system.d/bluetooth.conf
  <!-- ../system.conf have denied everything, so we just punch some holes -->
  <policy user="root">
    <allow own="org.bluez"/>
    ...

It is actually important for security, so not any unprivileged program can take over names of system services.
I found 4 calls to Messagebus.request_name() in bless and to be honest I don't understand why they are in there. A unique name (for example :1.394) gets dynamically assigned for every bus connection, that is enough to setup a BLE server. It allows to export the required objects with the paths.
So I tried patching it out, but then I have problems with get_obj() of service and characteristic:
Exception: Rejected send message, 1 matched rules; type="method_call", sender=":1.330" (uid=1000 pid=107006 comm="python examples/server.py ") interface="org.freedesktop.DBus.Properties" member="GetAll" error name="(unset)" requested_reply="0" destination=":1.330" (uid=1000 pid=107006 comm="python examples/server.py ")

Which also makes sense, because sending on the system bus is only allowed to whitelisted destinations. But again I don't understand why this is even done in bless, should the local object (self) not already contain all data? Then these remote calls that basically do introspection on itself could also be removed.
PS: A workaround would be to change the system config, adding something like this:
  <policy user="jake">
    <allow own="org.bluez.TestService"/>
    <allow send_destination="org.bluez.TestService"/>
  </policy>

With that I can get it to start up, would not recommend it though, as it should not be required.

PS: A workaround would be to change the system config, adding something like this:

Having this problem on rpi, untill a better solution is available, this workaround is fine for me. Thanks!!
Question: I would expect the client to see the service TestService, but my client sees the ble-ADDRESS.
What parameter did I not specify?

@Jakeler thanks for that run down. I'm certainly not well versed in D-bus, the current dbus-next implementation was a quick spin up based on experimenting and putting together a bluez advertisement using the command line, so the calls to request_name were used to export and expose each service and characteristc object on the D-Bus. So even though there are only 4 calls, they could be called as many times as services/characteristics are implemented by the end user. But as you suggest that this may not be necessary, I'll explore other methods:
Security Issue
I'll see if I can get the implementation working not he Session bus as opposed to the system bus. Will need to ensure that access to the hardware bluetooth hci adapter on the D-Bus is still accessible with a SESSION bus type.
Self introspection & Virtualization
Perhaps keeping all the GATT service and characteristic information off the D-Bus will release the need to place the services on the D-Bus at all (via request_name).

@Jakeler Alright, I think I've got this resolved. The app now exposes all services and characteristics on the primary org.bluez dbus connection/object rather than it's own (previously org.bluez.<app_name>. This should remove the security issues you brought up. Can you confirm?

Good news, I will test Monday

Hi @kevincar
With @Jakeler's solution:

The master branch and develop branch work
The 60-dbus-next branch does not: clsBleServer._Server(); start() exception Connection ":1.198" is not allowed to own the service "org.bluez" due to security policies in the configuration file

/etc/dbus-1/system.d/bluetooth.conf
<!-- This configuration file specifies the required security policies
     for Bluetooth core daemon to work. -->

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- ../system.conf have denied everything, so we just punch some holes -->

  <policy user="root">
    <allow own="org.bluez"/>
    <allow send_destination="org.bluez"/>
    <allow send_interface="org.bluez.Agent1"/>
    <allow send_interface="org.bluez.MediaEndpoint1"/>
    <allow send_interface="org.bluez.MediaPlayer1"/>
    <allow send_interface="org.bluez.Profile1"/>
    <allow send_interface="org.bluez.GattCharacteristic1"/>
    <allow send_interface="org.bluez.GattDescriptor1"/>
    <allow send_interface="org.bluez.LEAdvertisement1"/>
    <allow send_interface="org.freedesktop.DBus.ObjectManager"/>
    <allow send_interface="org.freedesktop.DBus.Properties"/>
  </policy>

  <!-- allow users of bluetooth group to communicate -->
  <policy group="bluetooth">
    <allow send_destination="org.bluez"/>
  </policy>

  <policy at_console="true">
    <allow send_destination="org.bluez"/>
  </policy>

  <!-- allow users of lp group (printing subsystem) to
       communicate with bluetoothd -->
  <policy group="lp">
    <allow send_destination="org.bluez"/>
  </policy>

  <policy context="default">
    <deny send_destination="org.bluez"/>
  </policy>

  <policy user="pi">
    <allow own="org.bluez.FortiusAntTrainer"/>
    <allow send_destination="org.bluez.FortiusAntTrainer"/>
  </policy>
</busconfig>

The logging (only) provides:
INFO:root:clsBleServer.Open()
DEBUG:asyncio:Using selector: EpollSelector
INFO:root:clsBleServer._Server(FortiusAntTrainer)
INFO:root:clsBleServer._Server(): self.BlessServer.add_gatt()
INFO:root:clsBleServer._Server(): self.BlessServer.start()
ERROR:root:clsBleServer._Server(); start() exception Connection ":1.215" is not allowed to own the service "org.bluez" due to security policies in the configuration file
ERROR:root:, Bluetooth interface n/a; BLE-5 required!
INFO:root:clsBleServer._Server(): 1 second loop untill Close() called
INFO:root:clsBleServer._Server() ended
Note that my "main" contains, is that not correct?
logging.basicConfig(level=logging.DEBUG)

Sorry, I meant if you could show your error trace?
Also, just to double check,  your 60-dbus-next is up-to-date?

I install with pip3 install --force-reinstall git+https://github.com/kevincar/bless.git@60-dbus-next so I assume yes.
You main the stack trace ... I will remove the try and get it for you

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/home/pi/FortiusANT/pythoncode/FTMSserverClass.py", line 140, in _OpenThread
    self.loop.run_until_complete(self._Server())
  File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
    return future.result()
  File "/home/pi/FortiusANT/pythoncode/FTMSserverClass.py", line 184, in _Server
    await self.BlessServer.start()
  File "/home/pi/.local/lib/python3.7/site-packages/bless/backends/bluezdbus/server.py", line 85, in start
    await self.bus.request_name(self.app.destination)
  File "/home/pi/.local/lib/python3.7/site-packages/dbus_next/aio/message_bus.py", line 246, in request_name
    return await future
  File "/home/pi/.local/lib/python3.7/site-packages/dbus_next/message_bus.py", line 292, in reply_notify
    BaseMessageBus._check_method_return(reply, err, 'u')
  File "/home/pi/.local/lib/python3.7/site-packages/dbus_next/message_bus.py", line 615, in _check_method_return
    raise DBusError._from_message(msg)
dbus_next.errors.DBusError: Connection ":1.216" is not allowed to own the service "org.bluez" due to security policies in the configuration file

I saw that you rid off the most request_name calls, that is good. Now there is only one left that causes this:
https://github.com/kevincar/bless/blob/60-dbus-next/bless/backends/bluezdbus/server.py#L85
It is also not needed and not allowed on the system bus, especially for a existing system service name like org.bluez.
Otherwise the following call to org.bluez.GattManager1.RegisterApplication looks fine, should be enough to activate the exported app object.
So the fix seems to be to simply remove that request. Then it starts up - at least in my quick test, connection works and the services show up.
Only problem is that it does not react to read/writes with the example, even though I can see that bluez sends messages to the app (checked with sudo dbus-monitor --system "sender=org.bluez")

I found I had extra permissions in my bluetooth.conf as follows:
...
  <policy context="default">
    <allow send_destination="org.bluez"/>
  </policy>
...

I switched this back to deny. However, have you both added your users to be apart of the bluetooth group? Otherwise, I can't even introspect on the org.bluez connection.

No, I did not add my user to a bluetooth group (on Arch it does not even exist). Also I am running the default config from the bluez package, which directly takes the dbus config from upstream: https://github.com/bluez/bluez/blob/5.63/src/bluetooth.conf
So the allow send_destination="org.bluez" is normal and should be there.
Otherwise sending (method calls) are globally denied on the system bus, you can see this in the system.conf again:
<deny send_type="method_call"/>

Introspect is also just a method call on interface org.freedesktop.DBus.Introspectable. So it is required to punch a hole there with bluetooth.conf, also for the following method calls that register the advertsiment, app etc.
The system config is well commented in general, for example everyone can receive:
    <!-- All messages may be received by default -->
    <allow receive_type="method_call"/>
    <allow receive_type="method_return"/>

Back to the bluetooth.conf:
  <policy user="root">
    ...
    <allow send_interface="org.bluez.GattCharacteristic1"/>
    ...

root/bluez is allowed to send to specific interfaces, that explains why this works:
method call time=1648574035.379263 sender=:1.100 -> destination=:1.178 serial=922 path=/org/bluez/TestService/service0001/char0001; interface=org.bluez.GattCharacteristic1; member=WriteValue
   array of bytes [
      0f
   ]
   array [
      dict entry(
         string "device"
         variant             object path "/org/bluez/hci0/dev_45_F4_23_78_40_18"
      )
      dict entry(
         string "link"
         variant             string "LE"
      )
      dict entry(
         string "mtu"
         variant             uint16 517
      )
   ]

method call time=1648574144.052803 sender=:1.100 -> destination=:1.178 serial=923 path=/org/bluez/TestService/service0001/char0001; interface=org.bluez.GattCharacteristic1; member=ReadValue
   array [
      dict entry(
         string "device"
         variant             object path "/org/bluez/hci0/dev_45_F4_23_78_40_18"
      )
      dict entry(
         string "link"
         variant             string "LE"
      )
      dict entry(
         string "mtu"
         variant             uint16 517
      )
   ]

Here bluez was setup as server and a client read/writes a value, bluez forwards the event to the actual application.
Sender is org.bluez which resolves to the unique name :1.100, that is what dbus-monitor --system "sender=org.bluez" displays. Destination is bless, which got the unique name :1.178 from dbus in this case (and requested no well known name, how it should be).
I hope this explanation helps a bit. dbus is indeed quite confusing, but I can recommend to launch some working programs and watch with dbus-monitor. Also graphical d-feet is useful to check bus names, interfaces etc.
The setup from bless is fine I think, just have to figure out why it does not handle the received method calls.

Wauw @kevincar @Jakeler that's a lot of information.
Is bless now ready for testing and what should I do?
Please suggest.

Apologies for the hiatus. Just removed the remaining request name call.
I also found that my permissions issue was related to running bless as an ssh user is different than running it otherwise and fixed that. I can read, write, request, and notify now.
If there are no issues remaining with the security here, I'll push this through.

I can confirm that this fixed the error and runs with default config (without security implications), thank you so much!
To get it running on my system it only needed a few other adjustments, see my PR #85.


[Docs] homeDir property is confusing

One of the first things mentioned in the documentation is the homeDir property. It's not clearly said that this is a setting for the TS compiler only. So it would be good to mention that plugins' paths are still relative to the fuse.js config file, not to the homeDir.

Will close this for now.


Version Release

Hi,
I was just wondering if it would be possible to trigger a release?
It would be super helpful as we are currently trying to complete our solana integration! :tada:
I am in dependency hell pending the websockets relaxation we resolved in;
https://github.com/michaelhly/solana-py/pull/347

Done!


feat: custom chart colors support within existing colors prop

Description
This change is refactor of #836 to provide support for custom colors, but instead of the additive customChartColors prop - this ports functionality to the existing colors prop.
With this change, the colors prop can accept custom colors or tremor base colors ((Color | string)[]). customChartColors is removed in this change.
Example Usage
<LineChart
  {...props}
  colors={[
    // now supports any mix of tremor base colors...
    'emerald',
    'indigo',

    // ... and custom colors
    '#32a852',
    'custom-color-100',
  ]}
/>

Example safelist needed in Tailwind config to support the above implementation:
safelist: [
  // ..
  // ..
  // custom colors
  ...["[#32a852]", "custom-color-100"].flatMap((customColor) => [
    `bg-${customColor}`,
    `border-${customColor}`,
    `hover:bg-${customColor}`,
    `hover:border-${customColor}`,
    `hover:text-${customColor}`,
    `fill-${customColor}`,
    `ring-${customColor}`,
    `stroke-${customColor}`,
    `text-${customColor}`,
    `ui-selected:bg-${customColor}`,
    `ui-selected:border-${customColor}`,
    `ui-selected:text-${customColor}`,
  ]),
],

Updated Components

AreaChart
BarChart
DonutChart
LineChart
ScatterChart
SparkAreaChart
SparkBarChart
SparkLineChart

Related issues and PRs

Related #836
Related #565
Related #80
Related #640

What kind of change does this PR introduce?
Although this change updates the existing colors prop, the functionality is additive and doesn't break existing behavior.

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New Feature (non-breaking change which adds functionality)
[ ] Refactor
[ ] Build-related changes
[ ] Other, please describe:

Does this PR introduce a breaking change? (check one)

[ ] Yes
[x] No

How has This been tested?
Storybook stories have been added for all components demonstrating new support of custom colors in the colors prop.
The PR fulfills these requirements:

[x] It's submitted to the main branch
[x] When resolving a specific issue, it's referenced in the related issue section above
[x] My change requires a change to the documentation. (Managed by Tremor Team)
[x] I have added tests to cover my changes
[x] Check the "Allow edits from maintainers" option while creating your PR.
[x] Add refs #XXX or fixes #XXX to the related issue section if your PR refers to or fixes an issue.
[x] By contributing to Tremor, you confirm that you have read and agreed to Tremor's CONTRIBUTING.md guideline. You also agree that your contributions will be licensed under the Apache License 2.0 license.

This PR is what open-source maintainers dream of🫶 Will go to bed now and review it tomorrow!

Hah! Awesome, thanks @severinlandolt - appreciated 🙏

Just released a beta and testing it on our website. Two small questions:

Legend
I think we do not need the customColor prop in the svg anymore, or am I missing something?

Interestingly, I use Tremor together with MDXRemote, and there is a TS error popping up. I am not 100% sure if this is a problem of Tremor or MDXRemote. I will do some tests, but I suppose there should be a type for the colorValues array?
export const colorValues: string[] = [...

Thanks @severinlandolt! And thanks for testing. Yes, correct, we don't need customColor... I must have missed that one. Regarding the second issue - I wonder if there is a way I can reproduce 🤔
In the meantime, I'll open a branch against beta-customcolors to fix that first issue.

Would you be able to provide the full error @severinlandolt?

Sure @adamhenson,
Type '{ Accordion: ForwardRefExoticComponent<tremor.AccordionProps & RefAttributes<HTMLDivElement>>; AccordionBody: ForwardRefExoticComponent<...>; ... 180 more ...; blockquote: (props: any) => JSX.Element; }' is not assignable to type 'MDXComponents | MergeComponents | null | undefined'.
  Type '{ Accordion: ForwardRefExoticComponent<tremor.AccordionProps & RefAttributes<HTMLDivElement>>; AccordionBody: ForwardRefExoticComponent<...>; ... 180 more ...; blockquote: (props: any) => JSX.Element; }' is not assignable to type 'MDXComponents'.
    Type '{ Accordion: ForwardRefExoticComponent<tremor.AccordionProps & RefAttributes<HTMLDivElement>>; AccordionBody: ForwardRefExoticComponent<...>; ... 180 more ...; blockquote: (props: any) => JSX.Element; }' is not assignable to type 'NestedMDXComponents'.
      Property 'colorValues' is incompatible with index signature.
        Type 'readonly ["slate", "gray", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"]' is not assignable to type 'NestedMDXComponents | Component<any>'.
          Type 'readonly ["slate", "gray", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"]' is not assignable to type 'NestedMDXComponents'.
            Index signature for type 'string' is missing in type 'readonly ["slate", "gray", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"]'.ts(2322)
index.d.ts(30, 5): The expected type comes from property 'components' which is declared here on type 'IntrinsicAttributes & MDXRemoteSerializeResult<Record<string, unknown>, Record<string, unknown>> & { components?: MDXComponents | MergeComponents | null | undefined; lazy?: boolean | undefined; }'

I try to create a small repo to replicate the issue in the meantime

Also, with that said this could be a breaking change in types if Color type is being imported and expected to be colors: Color[]. I could see indexing being a problem. I am surprised the colorValues: readonly string[] change didn't work. But still digging in.
I'm wondering if we should do something like this and replace all occurrences of (Color | string)[].
- export type Color = (typeof colorValues)[number];
+ export type Color = (typeof colorValues)[number] | string;

Hey @adamhenson, I added you as an outside collaborator to this repo so feel free to directly push to https://github.com/tremorlabs/tremor/tree/beta-customcolors

Great, thanks @severinlandolt!

Another thought I had is maybe the build tool doesn't like my type casting in this one.
export const getIsBaseColor = (color: Color | string) => colorValues.includes(color as Color);

But will wait to look at the repro.

Alright, sent you another invitation 📨

Perfect, thanks @severinlandolt 👀

@adamhenson Feel free to make as many beta releases of https://github.com/tremorlabs/tremor/tree/beta-customcolors as you wish. Just prefix your commit with fix: and a new beta should be released

Oh awesome, thanks @severinlandolt! I might be able to get away with local testing via npm link but if not, that will be super helpful.

I have a theory that it's because I added export to export colorValues and it looks like it's being exported from the main package and being interpreted as a component. About to test this now.
From the built index.d.ts from the tremor package.

I can remove that export statement anyways, since I'm no longer using it in other files. My theory is that this will fix it. More coming soon... just need to test.

True, in the previous version the type in question was not exported!

Yep! It does fix it but, now I see a different build error... but seems unrelated?
./data/blocks/components/landing-cards/LandingCardListBar.tsx:152:16
Type error: Type 'VisitsData[]' is not assignable to type 'Bar[]'.
  Type 'VisitsData' is not assignable to type 'Bar'.
    Types of property 'icon' are incompatible.
      Type 'JSXElementConstructor<any>' is not assignable to type 'JSXElementConstructor<any> | undefined'.
        Type '(props: any, deprecatedLegacyContext?: any) => ReactNode' is not assignable to type 'JSXElementConstructor<any> | undefined'.
          Type '(props: any, deprecatedLegacyContext?: any) => React.ReactNode' is not assignable to type '(props: any, deprecatedLegacyContext?: any) => import("/Users/adam/Projects/tremor/node_modules/@types/react/index").ReactNode'.
            Type 'React.ReactNode' is not assignable to type 'import("/Users/adam/Projects/tremor/node_modules/@types/react/index").ReactNode'.
              Type 'ReactElement<any, string | JSXElementConstructor<any>>' is not assignable to type 'ReactNode'.
                Property 'children' is missing in type 'ReactElement<any, string | JSXElementConstructor<any>>' but required in type 'ReactPortal'.

  150 |         </Text>
  151 |       </Flex>
> 152 |       <BarList data={filteredData} showAnimation={false} className="mt-4" />
      |                ^
  153 |     </Card>
  154 |   );
  155 | }

@severinlandolt, yep - 3.12.0-beta-customcolors.5 fixes! I just removed the export - it was no longer needed anyways. I deleted my previous comment because that error might have been a bi-product of npm link. I ran the build with the new release and build completes successfully. I pushed to the bug repo too with the updated version.

Phew, thanks for all the help here @severinlandolt.

No, I have to thank you! I will test the new beta in my repos asap🚀

Hah! Yep, the main entrypoint of the package exports everything from ./lib/inputTypes.
https://github.com/tremorlabs/tremor/blob/1744e4dda4562d17e74947c5e2804578677177ed/src/index.ts#L2
And the repro project expects all those imports to be components.


Add monitoring service

Monitor cluster hardware health with Prometheus and Grafana. Probably doable at the end when the nodes are all deployable.

It was actually trivial to add full hardware/OS/network monitoring via the official "node exporter" so that was included.
Monitoring now implemented and working.


feat: MOPLAT-417 Send Email pt 2: Send Artwork(s) via email

Description
This PR resolves MOPLAT-417
PR Checklist

[ ] I tested my changes on iOS and Android.
[ ] I added screenshots or videos to illustrate my changes.
[ ] I added Tests and Stories for my changes.

To the reviewers 👀

[ ] I would like at least one of the reviewers to run this PR on the simulator or device.

Need help with something? Have a look at our docs, or get in touch with us.
https://user-images.githubusercontent.com/36475005/193308189-b14f0d83-1ccd-4ead-9aa3-311b833dcd13.MOV

https://artsy.slack.com/archives/C02NAJ2CGLW/p1665073971939519 for the expo decision.

template to be worked on monday 👍


"Asynchronous"

I think the readme/comments should be reworded, it says that if you pass a callback the function will execute asynchronously which is not true. It still runs synchronously, it just passes the error/data to the callback. I was confused for a while why it wasn't acting asynchronously.

I suppose you're right. how do you suppose it should be worded?
"asynchronous syntax"?
On 17 January 2015 at 00:48, Chad Engler<EMAIL_ADDRESS>wrote:

I think the readme/comments should be reworded, it says that if you pass a
callback the function will execute asynchronously which is not true. It
still runs synchronously, it just passes the error/data to the callback. I
was confused for a while why it wasn't acting asynchronously.
—
Reply to this email directly or view it on GitHub
https://github.com/oferei/json-gate/issues/32.

@oferei Doesn't have to be too complicated, "you can pass a callback that will receive the error and result, or don't pass one and any errors will be thrown."


chart cash and equity based on income and expenses

from my hours admin, importing data with now with:

day timestamp
project name
amount

from expenses, import:

purchase timestamp
asset group name
amount
writeOffStart timestamp
writeOffEnd timestamp

from invoices, import:

day timestamp
project name
amount

Got this working now for our company expenses and hours tracking.
Next step: chart personal finance situations based on downloaded bankstatements, parsed through run.ts.

Got this working now for our company liquid / credit / assets tracking:

in a private repo I have some js code that lists:

our expenses

date, description, amount (eur or usd)
vat tracked separately, if applicable (and whether vat was paid in NL, EU, or non-EU)
write-off periods, for instance writeOffStrategy 'monthly' for office space, 'yearly' for domain name registration, or with a specific writeOffStart and writeOffEnd

hours worked on various projects, and hourly rates for that.

from that I have 3 functions, 'buy', 'writeOff' and 'work', that convert these rich event descriptions into simplified transactions:

-liquid; +assets for what we buy and for salary payments,
-liquid; +credit for the deductable vat we pay over it,
-assets for writeOff (this creates one transaction per day, we don't really need financial insight more granular than a day)
+credit for hours worked
-credit; +liquid when a customer pays a bill, or the government returns the deductable vat we paid

salaries are written of per calendar day into thin air, and hours worked are entered like they come in from thin air; there is no tracking of productivity, nor of holiday / sick leave / pto budgets. So in that sense it's really quite a simple bookkeeping system.
these transactions are sorted and grouped, then accumulated over time, to create three time series:

seriesLiquid accumulates the +liquid and -liquid transaction
seriesLiquidCredit accumulates liquid + credit
seriesLiquidCreditAssets accumulates liquid + credit + assets, in other words, equity.

the three time series are charted using chart.js (see the chart-js branch) and it looks something like this:


chore: upgrade lean-action to v1

@austinletson How about using dependabot?
It automatically creates an update PR for each new release of lean-action.

Thanks!

@Seasawher that is a great idea. Thank you!


Branch client note implementation

Implemented Client Notes Add. In progress for #97
AdressBook parser needs to be improved on (for v1.3). Take note that we either need to change the regex pattern matcher for the future or find a non-hacky way to solve this:
I did a quick fix could be to check the first word in arguments variable and see if it says "add", but it's ugly for now.
In @raysonkoh 's implementation, he didn't face this issue because his command word was country note ....
this is fine for v1.2 but we might have to relook how we do the parsing when we want to do country note add, delete, update...
@tankangliang has a suggested possible regex pattern to KIV:

Codecov Report

Merging #134 into master will decrease coverage by 0.68%.
The diff coverage is 57.35%.

@@             Coverage Diff              @@
##             master     #134      +/-   ##
============================================
- Coverage     71.68%   71.00%   -0.69%
- Complexity      446      458      +12
============================================
  Files            81       83       +2
  Lines          1402     1469      +67
  Branches        144      154      +10
============================================
+ Hits           1005     1043      +38
- Misses          349      372      +23
- Partials         48       54       +6

Impacted Files
Coverage Δ
Complexity Δ

.../address/logic/parser/ClientEditCommandParser.java
92.30% <ø> (ø)
11.00 <0.00> (ø)

...in/java/seedu/address/logic/parser/ParserUtil.java
93.47% <ø> (ø)
17.00 <0.00> (ø)

src/main/java/seedu/address/model/Model.java
100.00% <ø> (ø)
1.00 <0.00> (ø)

src/main/java/seedu/address/model/note/Note.java
66.66% <0.00%> (-8.34%)
2.00 <0.00> (ø)

.../seedu/address/logic/parser/AddressBookParser.java
41.37% <15.00%> (-15.04%)
13.00 <0.00> (ø)

...u/address/logic/commands/ClientNoteAddCommand.java
66.66% <66.66%> (ø)
4.00 <4.00> (?)

...dress/logic/parser/ClientNoteAddCommandParser.java
80.00% <80.00%> (ø)
4.00 <4.00> (?)

...c/main/java/seedu/address/model/client/Client.java
96.15% <83.33%> (-1.68%)
25.00 <2.00> (+2.00)
:arrow_down:

...rc/main/java/seedu/address/model/ModelManager.java
100.00% <100.00%> (ø)
27.00 <2.00> (+2.00)

... and 1 more

Continue to review full report at Codecov.

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


allow range for mux test

Fix current failing yosys tests, fixes #2100

So, just curious, what is the root cause?  It seems weird to me that it's OK with either 11 or 12.  Why should there be a difference?  Is it not deterministic?  Or it changes with the platform?

@boqwxp it is not deterministic since it depends of naming in file given to ABC,  and in that case it can produce 11 or 12 LUTs, and we have similar situation with Efinix platform in past, where this was bouncing between these two values as well.


potential variables missing file name in mapping

Currently we're not writing to template the specific input file pattern for derived variables

This was just a bug introduced by other changes it's working again now


DualSense not working in RDR 2

Hello,
I cannot figure out how to get the DualSense controller working with Red Dead Redemption 2.
I have the ViGEm Bus driver installed and have tried both 360 and DS4 emulation running as administrator with no success. The game just refuses to acknowledge the controller.
I don’t have HidHide installed because the game doesn’t even support the DualSense to begin with so it shouldn’t be necessary, right?
Also, I can confirm that DualSenseY does recognize my DualSense and that the TouchPad emulation is working fine in the software.
Any ideas?

What version are you using
Check here https://hardwaretester.com/gamepad


Update MacOS GHA test env to fix deprecation error

Closes #1711

@Saartank, the current ubuntu failure looks like another flaky test, and should be unrelated to the changes here (which only touch the MacOS GHA tests).
I'll try re-running the failing ubuntu test a few times to see if the tests eventually pass, but if that isn't working by EoD, let's moved forward with the PR anyway.


Split Examples into Separate Pages

For the Github Page with documentation and examples, we list examples inline above the documentation currently.
Let's make them bookmarkable by giving each heading an 'id'.
This issue was revised from a previous request for separate pages, because we don't really need separate pages yet.

Note: Remember to update the README.md directions on the gh-pages branch when making this change.

I'm not sure we really need a landing page for all examples yet. I'd say just give the heading an ID so it can be linked to and we'll be golden.

Sounds good; Updated the description above.


Design nudges

Design adjustments to make the layout look neater

Changes were incomplete opened another PR https://github.com/saleor/storefront/pull/1056


Add : table_unlogged service

Add : table_unlogged service
Check if table are changed to unlogged. In 9.5+, you can switch between logged and unlogged. This service track change and a critical alert is raised if an unlogged table is detected.

I'll do some tiny changes in a next commit to:

enforce a check on the 9.5 version and more
use a simple query instead of query_ver

Thank your for this patch!


Preprocessor Decorator should accept async code

As of today, Preprocessor Decorators acts as a Middlewares to endpoints.
But from my experience, if you want to prevent endpoint access from inside a Preprocessor function, you must throw an exception. This leads to issues like when you have to make an async (eg. database) operations.
It would be interesting if a Preprocessor actually expected a Promise in order to know if it should trigger or not the endpoint.
A promise resolved resumes the endpoint execution, while a rejected Promise leads to an http error, for example.
c/c @DR-BoneZ

This is the expected behaviour. Are you facing problems with it? Which version are you using?

Do you have a snippet for the problem?

Actually, it was my fault. Doing further isolated testing I noticed Promise-based Preprocessors indeed work as expected.
Closing the issue now. 🐒


[swift-3.0-preview-1-branch][Parser] Don't report AttrsRequiringFoundation in inactive config block

Explanation:

In Linux, compiling this used to emit an error:
#if os(OSX)
import Foundation
@objc class Foo: NSObject { }
#else
class Foo { }
#endif

error: @objc attribute used without importing module 'Foundation'
@objc class Foo: NSObject { }
~^~~~

While we can silence it with -disable-objc-attr-requires-foundation-module option,
Entirely disabling this diagnosis is not safe for us.
Fixes rdar://problem/23487944

Scope of Issue: code that uses #if and @objc.  Does not change behavior of existing code that used to work.

Risk: Low.

Reviewed By: @jrose-apple @gribozavr

Testing: new regression tests.

Before merging this pull request to apple/swift repository:

[ ] Test pull request on Swift continuous integration.

Triggering Swift CI
The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:
Smoke Testing
    Platform     | Comment
    ------------ | -------------
    All supported platforms     | @swift-ci Please smoke test
    All supported platforms     | @swift-ci Please smoke test and merge
    OS X platform               | @swift-ci Please smoke test OS X platform
    Linux platform              | @swift-ci Please smoke test Linux platform

Validation Testing
    Platform     | Comment
    ------------ | -------------
    All supported platforms     | @swift-ci Please test
    All supported platforms     | @swift-ci Please test and merge
    OS X platform               | @swift-ci Please test OS X platform
    OS X platform               | @swift-ci Please benchmark
    Linux platform              | @swift-ci Please test Linux platform

Lint Testing
    Language     | Comment
    ------------ | -------------
    Python       | @swift-ci Please Python lint

Note: Only members of the Apple organization can trigger swift-ci.

@swift-ci Please test


🚀 : Update package.name with 'tech.newchapter.langx',

Is your feature request related to a problem? Please describe.
Yes. The current package name is not descriptive enough and does not reflect the technological advancement and innovative nature of the product.  A more fitting and memorable name is needed to enhance brand recognition and better communicate the purpose of the language model.
Describe the solution you'd like
Update the package name to 'tech.newchapter.langx'. This new name is concise, relevant to the language model domain, and hints at the cutting-edge technology behind it.
'tech.newchapter.langx' was deemed the most suitable due to its clarity, memorability, and relevance to the product's positioning.
Additional context
This change is primarily aimed at improving brand perception and making the package name more aligned with the product's identity. We believe this minor adjustment can have a significant positive impact on user engagement and overall product success.
If you want speed up process of this issue, please send 🚀 as a reaction.

Solved: https://github.com/langx/langx-flutter/commit/41820b21a6842d4514c9224a47c29bfc0cdc813d


maintain consistency

Like other callback functions, i have omitted space.

Honestly, it doesn't seem at all necessary to fix "issues" like this piecewise since it will only cause git blame to be needlessly shifted for these lines. If these sort of changes should be done, they ought to be enforced by ESLint such that the entire code-base is fixed at once.
Also, please note all patches much contain a good commit message that describes exactly what's being changed and why the change is made; please note that "maintain consistency" isn't useful.

I agree. There are definitely more places where this is the case, so using an ESLint rule like https://eslint.org/docs/rules/space-before-function-paren would be a much better solution.


SemVer rules failed for 2.3.2

MAX Plugin Version
2.3.2
Flutter Version
3.3.8
Device/Platform Info
Any
Current Behavior
Update from 2.3.1 to 2.3.2 needs to update code which depends from
  /// The ad’s revenue amount, or 0 if no revenue amount exists.
  final String revenue;

It is not ok https://dart.dev/tools/pub/versioning#semantic-versions
Expected Behavior
No response
How to Reproduce
Update from 2.3.1 to 2.3.2 breaks existing code
Additional Info
No response

@al-tush, thanks for reporting the issue, and we apologize for any inconvenience this may have caused.   Since the plugin is still pretty new, there are many iterations, and we don’t want to bump the major version all the time.

Pretty new == less than 1.0.
It is very important to follow SemVer rules. Otherwise a lot of projects will be broken.

@al-tush - The plugin is < 6 months old, with some changes in between that warranted a major version bump. But it is fair to not break semantic versioning rules no matter how big or small the breaking change(s) are. We'll note that going forward, and we thank you for raising this concern with us.


Error building on a Raspberry Pi using Docker

I try to build this project by following the README.
First I pulled the repo and changed the docker-compose.yml according to the instructions provided by the README.md.
After the build finished without error, I tried to deploy the container using docker-compose up -d
Error I get:
Step 6/10 : COPY ./ /photo-stream
 ---> 67abb44bda60
Step 7/10 : WORKDIR /photo-stream
 ---> [Warning] The requested image's platform (linux/arm) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
 ---> Running in 52c90a63e1ab
Removing intermediate container 52c90a63e1ab
 ---> 7f2f829b64f2
Step 8/10 : RUN ruby -v && gem install bundler jekyll &&    bundle config --local build.sassc --disable-march-tune-native &&    bundle install
 ---> [Warning] The requested image's platform (linux/arm) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
 ---> Running in ff1d41042927
ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [arm-linux-musleabihf]
Successfully installed bundler-2.3.17
Successfully installed unicode-display_width-1.8.0
Successfully installed terminal-table-2.0.0
Successfully installed safe_yaml-1.0.5
Successfully installed rouge-3.29.0
Successfully installed forwardable-extended-2.6.0
Successfully installed pathutil-0.16.2
Successfully installed mercenary-0.4.0
Successfully installed liquid-4.0.3
Successfully installed kramdown-2.4.0
Successfully installed kramdown-parser-gfm-1.1.0
Building native extensions. This could take a while...
Successfully installed ffi-1.15.5
Successfully installed rb-inotify-0.10.1
Successfully installed rb-fsevent-0.11.1
Successfully installed listen-3.7.1
Successfully installed jekyll-watch-2.2.1
Building native extensions. This could take a while...
Successfully installed sassc-2.4.0
Successfully installed jekyll-sass-converter-2.2.0
Successfully installed concurrent-ruby-1.1.10
Successfully installed i18n-1.10.0
Building native extensions. This could take a while...
Successfully installed http_parser.rb-0.8.0
Building native extensions. This could take a while...
Successfully installed eventmachine-1.2.7
Successfully installed em-websocket-0.5.3
Successfully installed colorator-1.1.0
Successfully installed public_suffix-4.0.7
Successfully installed addressable-2.8.0
Successfully installed jekyll-4.2.2
27 gems installed
Your Ruby version is 3.0.1, but your Gemfile specified ~> 3.1.2
ERROR: Service 'photo-stream' failed to build: The command '/bin/sh -c ruby -v && gem install bundler jekyll &&    bundle config --local build.sassc --disable-march-tune-native &&    bundle install' returned a non-zero code: 18

OS Info:
OS: Debian GNU/Linux 11 (bullseye) aarch64
Host: Raspberry Pi 4 Model B Rev 1.2
Kernel: 5.15.32-v8+

docker-compose version output:
docker-compose version 1.25.0, build unknown
docker-py version: 4.1.0
CPython version: 3.9.2
OpenSSL version: OpenSSL 1.1.1n  15 Mar 2022

docker version output:
Client: Docker Engine - Community
 Version:           20.10.17
 API version:       1.41
 Go version:        go1.17.11
 Git commit:        100c701
 Built:             Mon Jun  6 23:02:34 2022
 OS/Arch:           linux/arm64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.17
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.17.11
  Git commit:       a89b842
  Built:            Mon Jun  6 23:01:01 2022
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.6
  GitCommit:        10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1
 runc:
  Version:          1.1.2
  GitCommit:        v1.1.2-0-ga916309
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Hello,
recently the ruby version for the Docker image was updated to 3.1.2. But the ARM build uses another base image for building the image. As the version for the ARM base image was not adapted in the docker-compose file, you have used an old version of ruby image which has caused the version mismatch error.
I have adapted the version in the docker-compose file and if you pull the newest commit, you should be able to build the image. :)