Fix issue #1929

Description

Fix for issue#1929
The issue is caused by assuming that a '}' after a case statement always means the end of case block. Modified the code to accommodate the situation where '}' marks the end of another block within the case block, like an if block. Added a variable to record the position of the last case statement, and deindent accordingly for successive case statements.

sample input
case 1:
if (x == 1) {
}
case 2:
func();
Fixes Issue: #1929.

[x] JavaScript implementation
[x] Python implementation (NA if HTML beautifier)
[x] Added Tests to data file(s)
[NA ] Added command-line option(s) (NA if
[ NA] README.md documents new feature/option(s)

Is this needed now? or does #1943 also address this?

Is this needed now? or does #1943 also address this?
I wasn't aware of #1943 when I created the pull request. #1943 does address this, but I think the logic doesn't handle the case with multiple indents within a case block. Ex -

case 0:
if(x == 1)
if(y == 2)
if(z == 3)
func();
case 1:
func();

@SM-90
This code looks fine on https://beautifier.io :
switch (a) {
    case 0:
        if (x == 1)
            if (y == 2)
                if (z == 3)
                    func();
    case 1:
        func();
}

@SM-90
This code looks fine on https://beautifier.io not sure if #1943 changes this :
switch (a) {
    case 0:
        if (x == 1)
            if (y == 2)
                if (z == 3)
                    func();
    case 1:
        func();
}

Hi @bitwiseman , I had verified that my PR #1943 doesn't change this behaviour...thanks


多卡微调报错：RuntimeError: [enforce fail at inline_container.cc:471] . PytorchStreamWriter failed writing file data.pkl: file write failed

麻烦问一下使用accelerate+deepspeed进行多卡微调时出现以下报错是什么原因呢？
0%|                                                                                | 0/4575 [00:00<?, ?it/s][2023-07-18 14:24:38,015] [INFO] [loss_scaler.py:183:update_scale] [deepspeed] OVERFLOW! Rank 0 Skipping step. Attempted loss scale:<PHONE_NUMBER>, reducing to<PHONE_NUMBER>
0%|                                                                                | 1/4575 [00:03<4:56:55,  3.89s/it][2023-07-18 14:24:40,578] [INFO] [loss_scaler.py:183:update_scale] [deepspeed] OVERFLOW! Rank 0 Skipping step. Attempted loss scale:<PHONE_NUMBER>, reducing to<PHONE_NUMBER>
0%|                                                                                | 2/4575 [00:06<3:57:10,  3.11s/it][2023-07-18 14:24:43,029] [INFO] [loss_scaler.py:183:update_scale] [deepspeed] OVERFLOW! Rank 0 Skipping step. Attempted loss scale:<PHONE_NUMBER>, reducing to 536870912
0%|                                                                                | 3/4575 [00:08<3:34:07,  2.81s/it][2023-07-18 14:24:45,986] [INFO] [loss_scaler.py:183:update_scale] [deepspeed] OVERFLOW! Rank 0 Skipping step. Attempted loss scale: 536870912, reducing to 268435456
0%|                                                                                | 4/4575 [00:11<3:38:29,  2.87s/it][2023-07-18 14:24:49,292] [INFO] [loss_scaler.py:183:update_scale] [deepspeed] OVERFLOW! Rank 0 Skipping step. Attempted loss scale: 268435456, reducing to 134217728
0%|                                                                                | 5/4575 [00:15<3:50:27,  3.03s/it][2023-07-18 14:24:52,131] [INFO] [loss_scaler.py:183:update_scale] [deepspeed] OVERFLOW! Rank 0 Skipping step. Attempted loss scale: 134217728, reducing to 67108864
0%|                                                                                | 6/4575 [00:18<3:45:35,  2.96s/it][2023-07-18 14:24:55,452] [INFO] [loss_scaler.py:183:update_scale] [deepspeed] OVERFLOW! Rank 0 Skipping step. Attempted loss scale: 67108864, reducing to 33554432
0%|▏                                                                                | 7/4575 [00:21<3:54:27,  3.08s/it][2023-07-18 14:24:58,531] [INFO] [loss_scaler.py:183:update_scale] [deepspeed] OVERFLOW! Rank 0 Skipping step. Attempted loss scale: 33554432, reducing to 16777216
0%|▏                                                                                | 8/4575 [00:24<3:54:23,  3.08s/it][2023-07-18 14:25:01,503] [INFO] [loss_scaler.py:183:update_scale] [deepspeed] OVERFLOW! Rank 0 Skipping step. Attempted loss scale: 16777216, reducing to 8388608
0%|▏                                                                                | 9/4575 [00:27<3:51:46,  3.05s/it][2023-07-18 14:25:04,141] [INFO] [loss_scaler.py:183:update_scale] [deepspeed] OVERFLOW! Rank 0 Skipping step. Attempted loss scale: 8388608, reducing to 4194304
{'loss': 2.6843, 'learning_rate': 5e-05, 'epoch': 0.01}
0%|▏                                                                                | 10/4575 [00:33<3:42:09,  2.92s/it]07/18/2023 14:25:07 - INFO - glmtuner.tuner.core.trainer - Saving model checkpoint to lora_checkpoint/checkpoint-10
Traceback (most recent call last):
File "/noah/bin/anaconda3/envs/chatglm_etuning/lib/python3.10/site-packages/torch/serialization.py", line 441, in save
_save(obj, opened_zipfile, pickle_module, pickle_protocol)
File "/noah/bin/anaconda3/envs/chatglm_etuning/lib/python3.10/site-packages/torch/serialization.py", line 655, in _save
zip_file.write_record('data.pkl', data_value, len(data_value))
RuntimeError: [enforce fail at inline_container.cc:471] . PytorchStreamWriter failed writing file data.pkl: file write failed
Traceback (most recent call last):
File "/noah/download/aigc_llm/guobaixiu/ChatGLM-Efficient-Tuning-main/src/train_bash.py", line 21, in
main()
File "/noah/download/aigc_llm/guobaixiu/ChatGLM-Efficient-Tuning-main/src/train_bash.py", line 8, in main
run_sft(model_args, data_args, training_args, finetuning_args)
File "/noah/download/aigc_llm/guobaixiu/ChatGLM-Efficient-Tuning-main/src/glmtuner/tuner/sft/workflow.py", line 71, in run_sft
train_result = trainer.train()
File "/noah/bin/anaconda3/envs/chatglm_etuning/lib/python3.10/site-packages/transformers/trainer.py", line 1645, in train
return inner_training_loop(
File "/noah/bin/anaconda3/envs/chatglm_etuning/lib/python3.10/site-packages/transformers/trainer.py", line 2020, in _inner_training_loop
self._maybe_log_save_evaluate(tr_loss, model, trial, epoch, ignore_keys_for_eval)
File "/noah/bin/anaconda3/envs/chatglm_etuning/lib/python3.10/site-packages/transformers/trainer.py", line 2332, in _maybe_log_save_evaluate
self._save_checkpoint(model, trial, metrics=metrics)
File "/noah/bin/anaconda3/envs/chatglm_etuning/lib/python3.10/site-packages/transformers/trainer.py", line 2389, in _save_checkpoint
self.save_model(output_dir, _internal_call=True)
File "/noah/bin/anaconda3/envs/chatglm_etuning/lib/python3.10/site-packages/transformers/trainer.py", line 2863, in save_model
self._save(output_dir)
File "/noah/download/aigc_llm/guobaixiu/ChatGLM-Efficient-Tuning-main/src/glmtuner/tuner/core/trainer.py", line 63, in _save
backbone_model.save_pretrained(output_dir, state_dict=get_state_dict(backbone_model))
File "/noah/bin/anaconda3/envs/chatglm_etuning/lib/python3.10/site-packages/peft/peft_model.py", line 130, in save_pretrained
torch.save(output_state_dict, os.path.join(output_dir, WEIGHTS_NAME))
File "/noah/bin/anaconda3/envs/chatglm_etuning/lib/python3.10/site-packages/torch/serialization.py", line 440, in save
with _open_zipfile_writer(f) as opened_zipfile:
File "/noah/bin/anaconda3/envs/chatglm_etuning/lib/python3.10/site-packages/torch/serialization.py", line 291, in exit
self.file_like.write_end_of_file()
RuntimeError: [enforce fail at inline_container.cc:337] . unexpected pos 64 vs 0
0%|▏                                                                                | 10/4575 [00:33<4:18:01,  3.39s/it]
WARNING:torch.distributed.elastic.multiprocessing.api:Sending process 21093 closing signal SIGTERM

我也遇到了相似的报错，RuntimeError: [enforce fail at inline_container.cc:471] . PytorchStreamWriter failed writing file data/31: file write failed本以为是磁盘满了，结果free -h查了下还有180G空闲，很奇怪。
请问你解决这个问题了吗？


Use Microsoft.Data.SqlClient for all platforms except net452

Replaced System.Data.SqlClient with Microsoft.Data.SqlClient for all platforms except net452 (Microsoft.Data.SqlClient does not support net452).
Only the references and the namespaces needed to be changed in order to accommodate this. However, in order to support both packages in the same code base (again, due to net452), I had to add #if directives around the using statements to use the correct SqlClient library.
Resolves #208

Nice work @mungk! Thank you very much for the contribution!

Note for anyone else Googling for:
Unable to write 21 log events to the database due to following error: Keyword not supported: 'multiple active result sets'.
Upgrading to this version fixes the issue if you're using the newer connection string attribute names, described further here (https://github.com/dotnet/SqlClient/issues/811) as this PR means Microsoft.Data.SqlClient's SqlConnection will be used which knows about the newer attribute names (in my case MARS with spaces).
Thanks for this ❤


fix: addon handling when uninstalling clusters

Signed-off-by: zhuzhenfan<EMAIL_ADDRESS>
What type of PR is this?
/kind feature

What this PR does / why we need it:
addon handling when uninstalling clusters
Which issue(s) this PR fixes:

Fixes #119
Special notes for reviewers:
@x893675 @Xvv-v

Does this PR introduced a user-facing change?

None

Additional documentation, usage docs, etc.:

Codecov Report

Merging #118 (fe2730a) into master (93c50dc) will decrease coverage by 0.00%.
The diff coverage is 30.76%.

@@            Coverage Diff             @@
##           master     #118      +/-   ##
==========================================
- Coverage   11.79%   11.78%   -0.01%
==========================================
  Files          98       98
  Lines       15096    15104       +8
==========================================
  Hits         1780     1780
- Misses      13082    13089       +7
- Partials      234      235       +1

Impacted Files
Coverage Δ

pkg/component/nfs/nfs.go
0.57% <0.00%> (-0.01%)
:arrow_down:

pkg/scheme/core/v1/k8s/kubeadm_step.go
0.00% <0.00%> (ø)

pkg/apis/core/v1/utils.go
54.13% <44.44%> (-0.95%)
:arrow_down:

/cc @Xvv-v

/retitle optimize: use addon uninstall steps when delete cluster direct

/lgtm

/lgtm
/approve


Add to Homebrew

Hello,
Thank you for the awesome app!
Would you be willing to create a homebrew recipe for Memmon so it can be installed with brew install Memmon --cask?

Hi, sure, feel to create the formula yourself. Brew has no requirement to be submitted by the author. I've stopped using brew 3 years ago, so I would need to install it again to create the formula. Also, feel free to open a PR for a change request if needed for the brew application process.
I have read over the rejection rules and one of them is "The Cask is for an app that is too obscure. (under 30 forks, 30 watchers, 75 stars)." Which is the case here. I assume the formula would be rejected based on that. Also, I disapprove of statements like "The Cask is for an unmaintained app (no releases in the last year)". Only because the app isnt updated that often does not mean it is not maintained.

I know I could create the formula, but I'm going to disappear and would never update it again. Ideally, it should be part of your CD process so a new formula version is submitted every time you cut a new release. 🙃

As I said, feel free to open a pull request. You dont have to be responsible for the updates but you could create the first formula. Also, the rejection rules will still prohibit me from realsing the formula.


SABER not working with recent keras/tensorflow versions

While trying to launch test sample of SABER locally or using provided Google Notebook ("saber_lightning_tour.ipynb") I get the following error:
AttributeError: module 'tensorflow' has no attribute 'placeholder'
It's raises on model = model_from_json(f.read(), custom_objects={'CRF': CRF})
Tensorflow 2.0+ versions do not support placeholders, but since it's loaded through keras there is no options but to use old 1.X versions on tensorflow, which require to reinstall half of python's modules.
Could you please take a look?

Hey @DmitryMalishev,
Saber is no longer being maintained. If you need it to reproduce a score from our paper let me know and I can dig into this problem (or just report the score directly). Otherwise, I would look elsewhere for IE tools for biomed (like Stanzy). Thanks!


Crashing with hundreds of processes

I'm trying to monitor around 400 processes, eye jumps to 100% CPU on 1 core and then threads start crashing:
2020-03-08 20:19:12.603496 E [91602:70218487656520 logger.rb:53] eye -- [celluloid] thread crashed
Celluloid::TaskTerminated: task was terminated
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/task/fibered.rb:35:in `terminate'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/actor.rb:323:in `block in cleanup'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/actor.rb:321:in `each'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/actor.rb:321:in `cleanup'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/actor.rb:307:in `shutdown'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/actor.rb:169:in `run'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/actor.rb:131:in `block in start'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-essentials-0.20.5/lib/celluloid/internals/thread_handle.rb:14:in `block in initialize'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/actor/system.rb:78:in `block in get_thread'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/group/spawner.rb:50:in `block in instantiate'
	(celluloid):0:in `remote procedure call'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/call/sync.rb:45:in `value'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/proxy/sync.rb:22:in `method_missing'
	/data/deployer/timeagent/eye/helpers.rb:195:in `process_started?'
	/data/deployer/timeagent/eye/helpers.rb:205:in `block in wait_for_process'
	/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/trigger.rb:103:in `instance_exec'
	/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/trigger.rb:103:in `exec_proc'
	/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/trigger/starting_guard.rb:28:in `block in check_start'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/calls.rb:28:in `public_send'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/calls.rb:28:in `dispatch'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/call/sync.rb:16:in `dispatch'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/future.rb:18:in `block in new'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-essentials-0.20.5/lib/celluloid/internals/thread_handle.rb:14:in `block in initialize'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/actor/system.rb:78:in `block in get_thread'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/group/spawner.rb:50:in `block in instantiate'
2020-03-08 20:19:12.603970 E [91602:70216306749380 logger.rb:53] eye -- [celluloid] thread crashed

I'm also seeing errors like this:
2020-03-08 10:25:15.579624 E [42676:70134578180800 logger.rb:53] eye -- [celluloid] Actor crashed!
Celluloid::DeadActorError: attempted to call a dead actor: proc_cpu
        /data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/proxy/sync.rb:9:in `method_missing'
        /data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/system_resources.rb:26:in `start_time'
        /data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/process/system.rb:44:in `compare_identity'
        /data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/process/monitor.rb:84:in `check_identity'
        /data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/process/watchers.rb:16:in `block in add_watchers'
        /data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/process/watchers.rb:48:in `block in add_watcher'
        /data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/actor.rb:339:in `block in task'
        /data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/task.rb:44:in `block in initialize'
        /data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/task/fibered.rb:14:in `block in create'

and:
2020-03-08 10:25:15.601780 E [42676:70134578814120 logger.rb:53] eye -- [celluloid] Actor crashed!
Celluloid::DeadActorError: attempted to call a dead actor: proc_cpu
        /data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/proxy/sync.rb:9:in `method_missing'
        /data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/system_resources.rb:26:in `start_time'
        /data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/process/system.rb:44:in `compare_identity'
        /data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/process/monitor.rb:84:in `check_identity'
        /data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/process/watchers.rb:16:in `block in add_watchers'
        /data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/process/watchers.rb:48:in `block in add_watcher'
        /data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/actor.rb:339:in `block in task'
        /data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/task.rb:44:in `block in initialize'
        /data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/task/fibered.rb:14:in `block in create'

This is an AMD EPYC 7451 24-Core CPU, so it can handle it a lot more, with all processes running it's only 10% loaded. Are there any parameters I can tune in eye to handle this many processes?

i not tested so much processes, but ~100 was ok. Ruby uses 1 core for it concurrency, so 100% cpu usage possible. But still should not. Error repeated if restart eye? As workaround, you can try to run multiple eyes with group of processes in different folders (local eye - leye).

It's just constantly hovering with 100% and not responding to bundle exec eye i -- I can't really try multiple processes without re-architecturing how the app works.
Is there something, somewhere I can adjust to reduce how many times each process is checked or something? - anything else you can think of to help with reducing load with many many processes?
I temporarily reduced the number of processes to 300 and now it's taking 17 to 30% CPU - it seems it hits some kind of threshold and then everything stops working.

To minimize load, you can remove cpu, memory checks. Also disable identity check check_identity: false, increase check_alive prediod: check_alive_period: 30.seconds

I tried all of those things and still getting this:
2020-03-11 23:40:36.466493 E [79975:70006573067020 logger.rb:53] eye -- [recorder_5e65f1c2a79dfa42c5f0b87b:5e65f1c2a79dfa42c5f0b87b:live] check:cpu(<100%) Exception: attempted to call a dead actor: proc_cpu ["/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/proxy/sync.rb:9:in `method_missing'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/system_resources.rb:15:in `cpu'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/checker/cpu.rb:10:in `get_value'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/checker.rb:136:in `get_value_safe'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/checker.rb:108:in `check'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/process/watchers.rb:66:in `watcher_tick'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/process/watchers.rb:48:in `block in add_watcher'", "/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/actor.rb:339:in `block in task'", "/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/task.rb:44:in `block in initialize'", "/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/task/fibered.rb:14:in `block in create'"]
2020-03-11 23:40:36.545344 E [79975:70006572737640 logger.rb:53] eye -- [recorder_5e65f1cfa79dfa42c5f0b8aa:5e65f1cfa79dfa42c5f0b8aa:proxy] check:memory(<300Mb) Exception: undefined method `proc_mem' for nil:NilClass ["/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/system_resources.rb:9:in `memory'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/checker/memory.rb:10:in `get_value'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/checker.rb:136:in `get_value_safe'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/checker.rb:108:in `check'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/process/watchers.rb:66:in `watcher_tick'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/process/watchers.rb:48:in `block in add_watcher'", "/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/actor.rb:339:in `block in task'", "/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/task.rb:44:in `block in initialize'", "/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/task/fibered.rb:14:in `block in create'"]
2020-03-11 23:40:36.655136 E [79975:70006577492940 logger.rb:53] eye -- [recorder_5e63325716a95a181c898f6c:5e63325716a95a181c898f6c:detector] process <17218> not found, it may have crashed (you should check the process logs ["/data/deployer/timeagent/log/recorder/detector-5e63325716a95a181c898f6c.log", "/data/deployer/timeagent/log/recorder/detector-5e63325716a95a181c898f6c.log"])
2020-03-11 23:40:36.655316 E [79975:70006577492940 logger.rb:53] eye -- [recorder_5e63325716a95a181c898f6c:5e63325716a95a181c898f6c:detector] process <17218> failed to start (:not_really_running)
2020-03-11 23:40:36.664231 E [79975:70006572911200 logger.rb:53] eye -- [recorder_5e65f1c7a79dfa42c5f0b889:5e65f1c7a79dfa42c5f0b889:detector] check:cpu(<100%) Exception: undefined method `proc_cpu' for nil:NilClass ["/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/system_resources.rb:15:in `cpu'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/checker/cpu.rb:10:in `get_value'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/checker.rb:136:in `get_value_safe'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/checker.rb:108:in `check'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/process/watchers.rb:66:in `watcher_tick'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/process/watchers.rb:48:in `block in add_watcher'", "/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/actor.rb:339:in `block in task'", "/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/task.rb:44:in `block in initialize'", "/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/task/fibered.rb:14:in `block in create'"]
2020-03-11 23:40:36.668949 E [79975:70006573728220 logger.rb:53] eye -- [recorder_5e633a3a4caa415b13ddccef:5e633a3a4caa415b13ddccef:proxy] check:cpu(<30%) Exception: undefined method `proc_cpu' for nil:NilClass ["/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/system_resources.rb:15:in `cpu'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/checker/cpu.rb:10:in `get_value'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/checker.rb:136:in `get_value_safe'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/checker.rb:108:in `check'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/process/watchers.rb:66:in `watcher_tick'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/process/watchers.rb:48:in `block in add_watcher'", "/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/actor.rb:339:in `block in task'", "/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/task.rb:44:in `block in initialize'", "/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/task/fibered.rb:14:in `block in create'"]
2020-03-11 23:40:36.673219 E [79975:70006573105240 logger.rb:53] eye -- [recorder_5e6349775f439f29fd773901:5e6349775f439f29fd773901:recorder] check:cpu(<100%) Exception: undefined method `proc_cpu' for nil:NilClass ["/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/system_resources.rb:15:in `cpu'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/checker/cpu.rb:10:in `get_value'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/checker.rb:136:in `get_value_safe'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/checker.rb:108:in `check'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/process/watchers.rb:66:in `watcher_tick'", "/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/process/watchers.rb:48:in `block in add_watcher'", "/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/actor.rb:339:in `block in task'", "/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/task.rb:44:in `block in initialize'", "/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/task/fibered.rb:14:in `block in create'"]
2020-03-11 23:40:36.722170 E [79975:70006578352780 logger.rb:53] eye -- [celluloid] thread crashed
Celluloid::TaskTerminated: task was terminated
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/task/fibered.rb:35:in `terminate'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/actor.rb:323:in `block in cleanup'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/actor.rb:321:in `each'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/actor.rb:321:in `cleanup'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/actor.rb:307:in `shutdown'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/actor.rb:169:in `run'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/actor.rb:131:in `block in start'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-essentials-0.20.5/lib/celluloid/internals/thread_handle.rb:14:in `block in initialize'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/actor/system.rb:78:in `block in get_thread'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/group/spawner.rb:50:in `block in instantiate'
	(celluloid):0:in `remote procedure call'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/call/sync.rb:45:in `value'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/proxy/sync.rb:22:in `method_missing'
	/data/deployer/timeagent/eye/helpers.rb:195:in `process_started?'
	/data/deployer/timeagent/eye/helpers.rb:205:in `block in wait_for_process'
	/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/trigger.rb:103:in `instance_exec'
	/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/trigger.rb:103:in `exec_proc'
	/data/deployer/timeagent/vendor/cache/eye-7b8f32d1cdd4/lib/eye/trigger/starting_guard.rb:28:in `block in check_start'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/calls.rb:28:in `public_send'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/calls.rb:28:in `dispatch'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/call/sync.rb:16:in `dispatch'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/future.rb:18:in `block in new'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-essentials-0.20.5/lib/celluloid/internals/thread_handle.rb:14:in `block in initialize'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/actor/system.rb:78:in `block in get_thread'
	/data/deployer/timeagent/vendor/bundle/ruby/2.6.0/gems/celluloid-0.17.4/lib/celluloid/group/spawner.rb:50:in `block in instantiate'
2020-03-11 23:40:36.722753 E [79975:70006578844600 logger.rb:53] eye -- [celluloid] thread crashed
Celluloid::TaskTerminated: task was terminated

This is what's in top
Tasks: 1609 total,   8 running, 1070 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.1 us,  6.1 sy, 12.3 ni, 80.6 id,  0.0 wa,  0.0 hi,  1.0 si,  0.0 st
KiB Mem : 65649456 total,  8356892 free, 15504224 used, 41788340 buff/cache
KiB Swap:  8388604 total,  8375792 free,    12812 used. 49448092 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
18519 deployer  35  15 45.117g 158928  12396 S 101.9  0.2   1:26.30 eye monitoring v0.10.1.pre [recorder_5e63325316a95a181c898f5d, recorder_5e63325416a95
13808 deployer  30  10 3291700 342060  14968 S  43.2  0.5   6:21.70 puma 4.3.1 (tcp://<IP_ADDRESS>:3001) [timeagent]
69395 deployer  35  15  171752  23540   5984 S  32.6  0.0   0:01.01 ruby2.6 /data/deployer/timeagent/vendor/bundle/ruby/2.6.0/bin/eye xinfo
69712 deployer  35  15  171756  23584   6008 S  31.6  0.0   0:00.98 ruby2.6 /data/deployer/timeagent/vendor/bundle/ruby/2.6.0/bin/eye i -j
42865 deployer  35  15 8825944 495948  15276 S  20.3  0.8   3:40.19 sidekiq 6.0.5 timeagent [2 of 8 busy]
92068 deployer  35  15 13.847g 228424  35692 S  19.7  0.3   0:25.49 python3 /data/deployer/timeagent/vendor/xanDetector/xanDetector.py --camera_id 5e633a384caa415b13ddcce6 --listen_port 10738 --brand Te+
96621 deployer  35  15 13.846g 231320  35640 S  19.4  0.4   0:24.70 python3 /data/deployer/timeagent/vendor/xanDetector/xanDetector.py --camera_id 5e636e34a79dfa1d11329522 --listen_port 10810 --brand Te+
96309 deployer  35  15 13.846g 228176  35408 S  18.7  0.3   0:24.56 python3 /data/deployer/timeagent/vendor/xanDetector/xanDetector.py --camera_id 5e636e33a79dfa1d1132951c --listen_port 10807 --brand Te+
95581 deployer  35  15 13.846g 226416  35760 S  17.7  0.3   0:27.16 python3 /data/deployer/timeagent/vendor/xanDetector/xanDetector.py --camera_id 5e6349755f439f29fd7738f7 --listen_port 10792 --brand Te+
91260 deployer  35  15 13.847g 230768  35684 S  17.4  0.4   0:25.22 python3 /data/deployer/timeagent/vendor/xanDetector/xanDetector.py --camera_id 5e633a364caa415b13ddccd9 --listen_port 10723 --brand Te+
93139 deployer  35  15 13.847g 224536  36116 S  17.4  0.3   0:24.98 python3 /data/deployer/timeagent/vendor/xanDetector/xanDetector.py --camera_id 5e6349715f439f29fd7738d6 --listen_port 10759 --brand Te+
96870 deployer  35  15 13.846g 230900  35404 S  15.5  0.4   0:24.11 python3 /data/deployer/timeagent/vendor/xanDetector/xanDetector.py --camera_id 5e636e37a79dfa1d11329529 --listen_port 10813 --brand Te+
92506 deployer  35  15 13.847g 235220  35480 S  14.8  0.4   0:23.46 python3 /data/deployer/timeagent/vendor/xanDetector/xanDetector.py --camera_id 5e633a3b4caa415b13ddccf6 --listen_port 10756 --brand Te+
93298 deployer  35  15 7508252 183024  35376 S  14.5  0.3   0:19.63 python3 /data/deployer/timeagent/vendor/xanDetector/xanDetector.py --camera_id 5e6349725f439f29fd7738df --listen_port 10765 --brand Te+
96120 deployer  35  15 13.847g 228884  35860 S  14.5  0.3   0:26.14 python3 /data/deployer/timeagent/vendor/xanDetector/xanDetector.py --camera_id 5e6349775f439f29fd773901 --listen_port 10801 --brand Te+
90826 deployer  35  15 13.847g 224616  35204 S  13.9  0.3   0:24.04 python3 /data/deployer/timeagent/vendor/xanDetector/xanDetector.py --camera_id 5e633a364caa415b13ddccd5 --listen_port 10717 --brand Te+
...

I've added
Eye::SystemResources.cache.setup_expire(30)
Eye.application "recorder_#{camera[:camera_id]}" do
   ...
  check_identity false
  check_alive_period 30.seconds
end

Any other ideas/suggestions?

hard to say, looks like may be celluloid bug. undefined method proc_cpu' for nil:NilClassthis error impossible because proc_cpu called from global class, which impossible to be nil, it created when eye start. May be there was first error in log, after which thisundefined method proc_cpu' for nil:NilClass appears.

I have been trying to play with this without success :(
I think I am going to have to come up with another strategy. Maybe to create a simple layer to systemd, where adding an application will create .service files and reload the systemd daemon. Kind of like the whenever gem does with cron.
From there, the process will just be a single loop, that queries systemd and checks CPU/Ram and performs the required systemd action. This way, each iteration will just take a bit longer depending on the number of processes, without adding additional load.

Yea ruby just bad, when high concurrency, try to split processes to multiple eyes or snt else, i dont know what to fix here.

Have you made progress on this by chance @kostya?

No, try all advices in this thread.

@rgaufman With systemd, why use eye at all?

I removed eye from our application, it's fantastic for managing a smaller number of processes but seems celluloid didn't work well when it came to 100+ processes. But even with smaller number of processes, we now just script systemd as it's much more resource intensive and has some other advantages like better dependency handling.

@rgaufman do you have anything to share on this on github?


ionTab with complex path doesn't work

If you try use ionTab with path="post" and _id="xyz" it doesn't work. This format does work for ionItem.
The problem is here:
https://github.com/meteoric/meteor-ionic/blob/master/components/ionTab/ionTab.js#L30
It should handle it like ionItem handles it here:
https://github.com/meteoric/meteor-ionic/blob/master/components/ionItem/ionItem.js#L52

Slight mistake. ionItem does work the same way as on this line:
https://github.com/meteoric/meteor-ionic/blob/master/components/ionItem/ionItem.js#L75
The real issue seems to be with the guide that says to use path as follows:
{{#ionItem path="item.detail" _id="" data="" query="" hash="" class=""}}...{{/ionItem}}
The problem with this is that _id on this line isn't used to build the path, the parentData _id field is.

Made a pull request to fix this here: https://github.com/meteoric/meteor-ionic/pull/230

My tabs do not work anymore since the following changes in meteoric components/ionTab/ionTab.js (v0.1.18 and v0.1.19):
https://github.com/meteoric/meteor-ionic/commit/8dd6d43e7586bb37a2294827b993d552c0776538#diff-88fffa912ec2f704c11c2f679f4ef5ee
and
https://github.com/meteoric/meteor-ionic/commit/8437b552d972729f5e85b83e6f2118876c88aec2#diff-88fffa912ec2f704c11c2f679f4ef5ee
Since these changes the tabs always appears unselected, and clicking on each tab has no effect anymore.
My routes for each tabs look like this:
Router.route('/app/alerts/:_id', {
name: 'alertsTab',
layoutTemplate: 'tabsLayout',
data: function() { return Trackers.findOne(this.params._id); }
});
Any advice to fix this problem would be greatly appreciated :)

@maxzzznz Tabs are working fine here: http://meteorhunt.meteor.com/ - which is using the latest versions of all the packages.

@nickw Thanks for responding Nick. Yes you are right they are working fine in your meteorhunt example, nevertheless my tabs are only working when I change Template.currentData() back to Template.parentData(1) like it was and I don't really understand why.
I also had a look at this "Meteor data context reference" page
https://docs.google.com/spreadsheets/d/14DTa0096y7cA1wkbUXUo_lLPwHJji0ft14_9EnArhsM/edit#gid=0
but I do not understand yet why this change prevented my tabs from working, I guess I will have to investigate more.

There was a breaking change. I'd try changing your code to work with the
new syntax
On 10 Sep 2015 11:38 am, "MaX"<EMAIL_ADDRESS>wrote:

@nickw https://github.com/nickw Thanks for responding Nick. Yes you are
right they are working fine in your meteorhunt example, nevertheless my
tabs are only working when I change Template.currentData() back to
Template.parentData(1) like it was and I don't really understand why.
I also had a look at this "Meteor data context reference" page
https://docs.google.com/spreadsheets/d/14DTa0096y7cA1wkbUXUo_lLPwHJji0ft14_9EnArhsM/edit#gid=0
but I do not understand yet why this change prevented my tabs from
working, I guess I will have to investigate more.
—
Reply to this email directly or view it on GitHub
https://github.com/meteoric/meteor-ionic/issues/215#issuecomment-139168466
.


feat(executor): Minimize the number of Kubernetes API requests made by executors

This PR minimizes the number of Kubernetes API requests made by the executor.
Today, start-up, the executors make 2 Kubernetes API requests immediately, get pod and watch pod. Tomorrow, a maximum of 1 request is now only made under two circumstances:

Using the k8sapi executor. Obviously.
When PNS has been unable to determine the container IDs due to a short-running main container.

I've added the logging of K8S requests to help diagnose regression in the future.

Executor

Remove get pod for getting annotations on start-up (read from mounted annotation path)
Remove watch pod on start-up completely

docker use docker ps to determine container IDs instead of API request
k8sapi business as usual
kubelet use localhost/pods API request to determine container IDs
pns introduce ARGO_CONTAINER_NAME to identify the container name for processes, works on long-running containers.

TestPropagateMaxDuration

TestPropagateMaxDuration

Before:
hello-world-xlp8t wait time="2021-02-02T01:08:22.850Z" level=info msg="Watch pods 200"
hello-world-xlp8t wait time="2021-02-02T01:08:37.590Z" level=info msg="Get pods 200"
hello-world-xlp8t wait time="2021-02-02T01:08:37.598Z" level=info msg="Get pods 200"
hello-world-xlp8t wait time="2021-02-02T01:08:37.614Z" level=info msg="List log 200"

PNS
hello-world-xdjwc wait time="2021-02-02T01:23:32.626Z" level=info msg="Get pods 200"
hello-world-xdjwc wait time="2021-02-02T01:23:32.642Z" level=info msg="List log 200"
hello-world-xdjwc wait time="2021-02-02T01:23:32.668Z" level=info msg="Patch pods 200"

Kubelet/Docker:
hello-world-56gh2 wait time="2021-02-02T01:27:04.661Z" level=info msg="Patch pods 200"

Relates to https://github.com/argoproj/argo/issues/4634

@jessesuen can I please ask you to review this personally? The PNS executor I have almost re-written and so really needs your eyes on it.

Hmm. Checks should NOT have passed as kubelet has a bug in it which clearly fails tests

Good. The builds are failing as they should.

@jessesuen I've addressed your comment.


_input is not working in editor but in game (for tool)

Godot version:
3.0.2 Stable
Issue description:
I created a tool script:
tool
extends Spatial
func _ready():
set_process_input(true)
print("START")
pass
func _input(event):
print("TEST 1")
The problem is that it only activates in game and not in the editor that the tool keyword should do. I may have missed something ovious as I'm new to Godot.
Steps to reproduce:

Create a spacial node
Attach a new script
Paste in my script
Play, it will print
Close the play window and you'll se that it doesn't print in the editor

It probably doesn't because if it is in the scene, it will be under a viewport which is not the global editor viewport (aka the Godot window). And as such, won't receive input... (same for controls you place in the scene, they are in C++ so they can't avoid executing in editor, but they don't receive input either)

How do I make it a part of the global editor viewport?

There should be some way to do this...

It should be explained on the doc for editor plugins and the EditorPlugin class. Sorry can't write much cause I'm on a phone, but for editorplugins you can override functions that are named likeforward_input, something like that. The Godot editor is basically written like a game, so _input should work, except on sub-viewports like the edited scene. To make it work on such viewports you have to explicitely forward input to them but it will cause issues with other nodes (like buttons).

That would work but I also found other way: Using the static Input.IsMouseButtonDown(it's maybe called something different) to detect clicks.
I don't know how the backend code looks but would it be possible to get the _input method to work in the editor? As a new user it's very confusing that the tool keyword should make it work the same as in game but the input doesn't. It feels kinda buggy and wierd.

Again, I think it can work. However if you use it, or if you use global Input directly in _process, be prepared to see your code run even when you don't expect (when scene isn't focused for example, or within the script editor). That's why EditorPlugin input functions exist, in order to integrate to the editor's input system.


GH1564: Allow deletion of read-only files

Fixes https://github.com/cake-build/cake/issues/1564

@DixonDs,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

@DixonDs
Thanks for your PR.
We have been discussing this internally and would rather see this behavior as opt-in. What do you think of creating overloads for all DeleteDirectory aliases?
Preferred solution could be:
DeleteDirectories(ICakeContext, IEnumerable<DirectoryPath>, DeleteDirectorySettings)
DeleteDirectories(ICakeContext, IEnumerable<string>, DeleteDirectorySettings)
DeleteDirectory(ICakeContext, DirectoryPath, DeleteDirectorySettings)

Where DeleteDirectorySettings could look like this:
public class DeleteDirectorySettings
{
   public bool Recursive { get; set; }
   public bool Force { get; set; }
}

I like the idea of the Force property but you have to take into mind files that are in use.  I have run into where a file in the packages directory is in use and cannot be deleted.

Yes I agree with opt-in but if the property is called Force it does not indicate it is only to delete read only files.  Just wanted to point that out.

@toddstewart sorry, didn't see your comment. Just submitted a review comment 😄
Is there any better name to use than force?  Force is quite commonly used in same situtations.. Even though it's called force, it might fail miserably if a) user doesn't have rights to remove files/directories, b) files/directories are in use c) anything else..

@mholo65 @toddstewart I think Force is an excellent name.

@mholo65 I've added overloads with DeleteDirectorySettings, but removed the ones with bool recursive which is a breaking change. Let me know if I need to put back those overloads with the boolean recursive flag.

@mholo65 @devlead Could you please review the latest changes?

@mholo65 @devlead Could you please review again?

@DixonDs

Could you please review again?

Looks good to me. I was thinking if we should obsolote the old aliases at the same time. Thoughts @cake-build/cake-team?
If @devlead or any other in team doesn't have any opinions on this, would you @DixonDs mind squashing commits before we do the final review. Thanks!

@mholo65

would you @DixonDs mind squashing commits before we do the final review

I will do later, but I am just wondering if it makes much sense if you can just complete PR with merge-squash.

@DixonDs no, that is not the process that we follow on this repository, as the git timeline isn't as clear.

@mholo65 Could you please do the final review?

@mholo65 done

@DixonDs CS0618 needs to be disabled case by case in the test project
i.e.
#pragma warning disable CS0618 // Type or member is obsolete
                var result = Record.Exception(() => DirectoryAliases.DeleteDirectory(null, "/Temp/DoNotExist"));
#pragma warning restore CS0618 // Type or member is obsolete

@DixonDs  your changes have been merged, thanks for your contribution 👍


Could not load file or assembly 'Microsoft.VisualStudio.CodeCoverage.Shim'

Description
I am unable to run tests with VS Professional version 17.8.4. I get the below error message:
========== Starting test run ==========
Testhost process for source(s) 'C:\Users\xxx\IntegrationTests.dll' exited with error: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.CodeCoverage.Shim, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
   at Microsoft.VisualStudio.TestPlatform.ObjectModel.EqtTrace.Error(String format, Object[] args)
   at Microsoft.VisualStudio.TestPlatform.TestHost.Program.Main(String[] args) in /_/src/testhost.x86/Program.cs:line 41
. Please check the diagnostic logs for more information.
Testhost process for source(s) 'C:\Users\xxx\IntegrationTests.dll' exited with error: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.CodeCoverage.Shim, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
   at Microsoft.VisualStudio.TestPlatform.ObjectModel.EqtTrace.Error(String format, Object[] args)
   at Microsoft.VisualStudio.TestPlatform.TestHost.Program.Main(String[] args) in /_/src/testhost.x86/Program.cs:line 41
. Please check the diagnostic logs for more information.
========== Test run aborted: 0 Tests (0 Passed, 0 Failed, 0 Skipped) run in < 1 ms ==========

I am using Microsoft::VisualStudio::CppUnitTestFramework. The only way to get around is by using this comment.
I am a little confused as my tests are native and not managed code. What can I do to get the test runner to behave?
Steps to reproduce
Expected behavior
I'd like to be able to run and debug my tests and gather code coverage.
Actual behavior
Tests are aborted
Diagnostic logs
Not sure how to force test runner to produce logs from inside Visual Studio.
Environment
Windows 11
vstest version 17.800.23.46802

Please collect logs: https://github.com/microsoft/vstest/blob/main/docs/troubleshooting.md#visual-studio
You can also open report here: https://developercommunity.visualstudio.com/VisualStudio and provide privately your solution so we can reproduce it.

logs.datacollector.24-01-11_18-46-07_32450_7.txt
logs.txt
[1/11/2024 6:45:53.732 PM]  Log level is set to Trace (Includes Platform logs).
[1/11/2024 6:45:53.763 PM]  Logging Test Platform diagnostic logs under 'C:\Users\user\AppData\Local\Temp\TestPlatformLogs\2024_01_11_18_45_53_11904'
[1/11/2024 6:45:53.771 PM]  Connected to test environment '< Local Windows Environment >'
[1/11/2024 6:46:06.973 PM]  Interrupt: Enqueueing RunSelectedOperation
[1/11/2024 6:46:06.974 PM]  Enqueue operation 'RunSelectedOperation', hashcode:59538345
[1/11/2024 6:46:06.974 PM]  Operation left in the the queue: 1
[1/11/2024 6:46:06.974 PM]  	'RunSelectedOperation', hashcode:59538345
[1/11/2024 6:46:06.974 PM]

[1/11/2024 6:46:06.974 PM]  Operation Dequeue : 'RunSelectedOperation'
[1/11/2024 6:46:06.976 PM]  Building Test Projects
[1/11/2024 6:46:07.006 PM]  Update Test run progress to 0/100.
[1/11/2024 6:46:07.007 PM]  Triggering build for 1 IProjectBasedTestContainers.
[1/11/2024 6:46:07.108 PM]  No IBuildableTestContainers were found.
[1/11/2024 6:46:07.108 PM]  Completed building containers.
[1/11/2024 6:46:07.108 PM]  Start updating 1 containers.
[1/11/2024 6:46:07.108 PM]  Updating container C:\Users\user\source\repos\software\Debug\IntegrationTests.dll.
[1/11/2024 6:46:07.112 PM]  Completed updating containers.
[1/11/2024 6:46:07.137 PM]  Test run animation has started.
[1/11/2024 6:46:07.143 PM]  Test run progress has started.
[1/11/2024 6:46:07.188 PM]  ========== Starting test run ==========
[1/11/2024 6:46:07.191 PM]  Tests run settings for C:\Users\user\source\repos\software\Debug\IntegrationTests.dll:
 <RunSettings>
  <Catch2Adapter>
    <FilenameFilter>^EftsrvHQUnitTest</FilenameFilter>
  </Catch2Adapter>
  <BoostTestInternalSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <VSProcessId>16144</VSProcessId>
  </BoostTestInternalSettings>
  <RunConfiguration>
    <ResultsDirectory>C:\Users\user\source\repos\software\TestResults</ResultsDirectory>
    <SolutionDirectory>C:\Users\user\source\repos\software\</SolutionDirectory>
    <TestAdaptersPaths>C:\Users\user\AppData\Local\FineCodeCoverage\msCodeCoverage\17.1.0\build\netstandard1.0</TestAdaptersPaths>
    <CollectSourceInformation>True</CollectSourceInformation>
  </RunConfiguration>
  <GoogleTestAdapterSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <SolutionSettings>
      <Settings>
        <PrintTestOutput>false</PrintTestOutput>
        <TestDiscoveryRegex />
        <TestDiscoveryTimeoutInSeconds>30</TestDiscoveryTimeoutInSeconds>
        <WorkingDir>$(ExecutableDir)</WorkingDir>
        <PathExtension />
        <CatchExceptions>true</CatchExceptions>
        <BreakOnFailure>false</BreakOnFailure>
        <RunDisabledTests>false</RunDisabledTests>
        <NrOfTestRepetitions>1</NrOfTestRepetitions>
        <ShuffleTests>false</ShuffleTests>
        <ShuffleTestsSeed>0</ShuffleTestsSeed>
        <TraitsRegexesBefore />
        <TraitsRegexesAfter />
        <TestNameSeparator />
        <DebugMode>false</DebugMode>
        <TimestampOutput>false</TimestampOutput>
        <ShowReleaseNotes>false</ShowReleaseNotes>
        <ParseSymbolInformation>true</ParseSymbolInformation>
        <AdditionalTestDiscoveryParam />
        <AdditionalTestExecutionParam />
        <ParallelTestExecution>false</ParallelTestExecution>
        <MaxNrOfThreads>0</MaxNrOfThreads>
        <BatchForTestSetup />
        <BatchForTestTeardown />
        <KillProcessesOnCancel>false</KillProcessesOnCancel>
        <UseNewTestExecutionFramework>true</UseNewTestExecutionFramework>
        <DebuggingNamedPipeId>7b2d3d5e-95b0-45a4-ab16-f325e362c2c2</DebuggingNamedPipeId>
      </Settings>
    </SolutionSettings>
    <ProjectSettings />
  </GoogleTestAdapterSettings>
  <DataCollectionRunSettings>
    <DataCollectors>
      <DataCollector friendlyName="Code Coverage" enabled="true">
        <Configuration>
          <CodeCoverage>
            <ModulePaths>
              <Exclude>
              </Exclude>
              <Include>
              </Include>
            </ModulePaths>
            <Functions>
              <Exclude>
              </Exclude>
              <Include>
              </Include>
            </Functions>
            <Attributes>
              <Exclude>
              </Exclude>
              <Include>
              </Include>
            </Attributes>
            <Sources>
              <Exclude>
              </Exclude>
              <Include>
              </Include>
            </Sources>
            <CompanyNames>
              <Exclude>
              </Exclude>
              <Include>
              </Include>
            </CompanyNames>
            <PublicKeyTokens>
              <Exclude>
              </Exclude>
              <Include>
              </Include>
            </PublicKeyTokens>
          </CodeCoverage>
          <Format>Cobertura</Format>
          <FCCGenerated />
        </Configuration>
      </DataCollector>
    </DataCollectors>
  </DataCollectionRunSettings>
</RunSettings>.
[1/11/2024 6:46:11.668 PM] [Error] Testhost process for source(s) 'C:\Users\user\source\repos\software\Debug\IntegrationTests.dll' exited with error: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.CodeCoverage.Shim, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
   at Microsoft.VisualStudio.TestPlatform.ObjectModel.EqtTrace.Error(String format, Object[] args)
   at Microsoft.VisualStudio.TestPlatform.TestHost.Program.Main(String[] args) in /_/src/testhost.x86/Program.cs:line 41
. Please check the diagnostic logs for more information.
[1/11/2024 6:46:11.669 PM] [Error] Testhost process for source(s) 'C:\Users\user\source\repos\software\Debug\IntegrationTests.dll' exited with error: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.CodeCoverage.Shim, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
   at Microsoft.VisualStudio.TestPlatform.ObjectModel.EqtTrace.Error(String format, Object[] args)
   at Microsoft.VisualStudio.TestPlatform.TestHost.Program.Main(String[] args) in /_/src/testhost.x86/Program.cs:line 41
. Please check the diagnostic logs for more information.
[1/11/2024 6:46:11.713 PM]  Attachments processing not needed
[1/11/2024 6:46:11.715 PM]  ========== Test run aborted: 0 Tests (0 Passed, 0 Failed, 0 Skipped) run in < 1 ms ==========
[1/11/2024 6:46:11.827 PM]  Update Test run progress to 100/100.
[1/11/2024 6:46:12.409 PM]  Test run animation has stopped.
[1/11/2024 6:46:12.424 PM]  Test run progress has stopped.

Unfortunately I cannot provide the solution as it is my employer's IP. I will try to create a new minimal application and test suit to reproduce the issue, but it might take a little bit of time.

From logs I can see you have code coverage enabled:
<DataCollector friendlyName="Code Coverage" enabled="true">
        <Configuration>
          <CodeCoverage>
            <ModulePaths>
              <Exclude>
              </Exclude>
              <Include>
              </Include>
            </ModulePaths>
            <Functions>
              <Exclude>
              </Exclude>
              <Include>
              </Include>
            </Functions>
            <Attributes>
              <Exclude>
              </Exclude>
              <Include>
              </Include>
            </Attributes>
            <Sources>
              <Exclude>
              </Exclude>
              <Include>
              </Include>
            </Sources>
            <CompanyNames>
              <Exclude>
              </Exclude>
              <Include>
              </Include>
            </CompanyNames>
            <PublicKeyTokens>
              <Exclude>
              </Exclude>
              <Include>
              </Include>
            </PublicKeyTokens>
          </CodeCoverage>
          <Format>Cobertura</Format>
          <FCCGenerated />
        </Configuration>
      </DataCollector>

<FCCGenerated /> suggests that those settings are generated by FineCodeCoverage extension. I suggests to open issue on this repo and ask them to generate settings with: <UseVerifiableInstrumentation>False</UseVerifiableInstrumentation>. From our point of view all is good as code coverage is not part of VS Professional so Microsoft.VisualStudio.CodeCoverage.Shim is not available.


Navigating away from a page with an open tour, do not close the tour

Hi, I have a scenario where I have a page with the tour functionality. I have the tour open on that page and if I navigate away from that page, the tour do not close but still shows up on the same spot where it was on the previous page.
I want the tour to stop, if the user has navigated away from the page.

Stange, if the elements which the tooltips are attached to are no longer on screen, they should not show. You should probably attach a function to the $locationChangeSuccess event that closes the tour.

That's what I did finally to close it. Thanks for the response.

The automatic closing of tooltips only occurs when the tooltip is appended to the body, which is not the default behavior. Just fixed the tour so it closes when the location changes.


Set CORS-related headers before writing body for flex env support

On flex env, it seems like custom headers set on the response after writing to the body are not always being written to the final http response.
This causes CORS support not to work with Cloud Endpints v2 on flex env (it works fine on AppEngine standard though).
Simply changing the code to write CORS headers before the response body fixes the issue.
Additionally, it makes any backend error that would happen available to CORS clients as well.

Codecov Report

Merging #79 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff            @@
##             master     #79   +/-   ##
========================================
  Coverage      79.4%   79.4%
  Complexity     1618    1618
========================================
  Files           154     154
  Lines          5449    5449
  Branches        702     702
========================================
  Hits           4327    4327
  Misses          848     848
  Partials        274     274

Impacted Files
Coverage Δ
Complexity Δ

...pi/server/spi/handlers/EndpointsMethodHandler.java
100% <100%> (ø)
10 <0> (ø)
:arrow_down:

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 5f73500...6c75b96. Read the comment docs.


All registered customer is saved in default channel at admin customer section.

Bug report
All registered customer is saved in default channel at admin customer section.
Issue Description
Create a customer at any website and at admin customer grid it will be saved in default channel only.
Preconditions
1. framework Version-0.1.7

Steps to reproduce
1. step1- Create a customer on any website
2. step2- Edit the customer from admin end.

Expected result
It should display in the channel on which the customer is created.
Actual result
Displaying in default channel.

Channels removed.


Potential vulnerabilities in Puppet files: Use of weak crypto algorithm

8 cases of using weak crypto algorithms were found in 6 different scripts.
 A weak crypto algorithm is susceptible to collision and modular differential attacks (e.g., MD5 and SHA-1).
This type of smell can lead to well-known types of vulnerabilities, as documented by CWE (CWE-327 and CWE-326). Weak crypto algorithms can be exploited to bypass protection mechanisms and gain access to sensitive data.
Using weak crypto algorithms in Puppet configuration files is considered to be a security smell (cf. [icse20]).
Recommendation
You can mitigate this by using stronger crypto algorithms. Thus, you will reduce the risk of an attacker finding your secret keys and passwords.

If you find any actual security problems in the future, please disclose them responsibly (not in public GitHub issues) by following our security policy.


Map numeric keys to edge cutoff slider if selected

To make it easier to set the slider to exactly 2, for example.

Should we add an input field so that the user can enter the value?

I'm not a fan of the additional input

Another possibility would be to have the slider "click" on integer values, i.e., gets a bit stuck on those values so that it resists further motion from the user to some limit.

No that's not great - hm.  What if using the arrow keys causes slider (if selected, active element) to jump on increments of 0.5?

@GopiGugan suggested adding arrow key buttons to this interface - let's try that


docs: add notes on contents of Postgres DB as Key-Value store to Postgres.md

Change Description
Adding notes on how Postgres DB is currently used as a Key-Value store, and which tables are included.
Addresses Issue #6619 - "Missing documentation for postgresql database structure"
Steps to Test
Key/Value pairs are not all TLV-encoded. Schema/structure is unclear (outside of K/V column names). However, some Key Names and Values are possible to decode into human-readable strings. For example: I used Python + psycopg2 + text processing to decode some of these, such as Node names (see comment on Gist): https://gist.github.com/84adam/d85f5f40e8821925585f263f68b655eb
SQL statements do not reveal any consistent encoding or structure:
select * from channeldb_kv limit 5;
                  key                   | value | parent_id | id | sequence
----------------------------------------+-------+-----------+----+----------
 \x6f70656e2d6368616e2d6275636b6574     |       |           |  1 |
 \x636c6f7365642d6368616e2d6275636b6574 |       |           |  2 |
 \x636972637569742d6677642d6c6f67       |       |           |  3 |
 \x6677642d7061636b61676573             |       |           |  4 |
 \x696e766f69636573                     |       |           |  5 |

select * from walletdb_kv limit 5;
        key         | value | parent_id | id | sequence
--------------------+-------+-----------+----+----------
 \x77616464726d6772 |       |           |  1 |
 \x7774786d6772     |       |           |  2 |
 \x6d61696e         |       |         1 |  3 |
 \x73796e63         |       |         1 |  4 |
 \x73636f7065       |       |         1 |  5 |

This documentation update attempts to make clear that users cannot expect consistency for now in issuing SQL queries to their Postgres databases, and points out where more documentation will be required once additional schema is introduced into these tables.

Thank you, @ellemouton. Updated.

Thanks, @yyforyongyu. I believe I have corrected this now.

@yyforyongyu I believe the requested changes have been completed. (Squashed commits.) Please let me know if I'm missing anything else. Thanks!

Removed previous "references" and squashed commits.
- https://twitter.com/positiveblue2/status/1621170766808256512 - "Currently LND supports Postgres but it is used as K/V store. Introducing better schemas will unlock better performance and make easier to get insights from our nodes."
- https://twitter.com/lndreviewclub/status/1618696557402152961 - "Postgres support was added in lnd 0.14, but the next step is to convert the invoices to a native SQL schema."
- https://lightningcommunity.slack.com/archives/C03ECAP7HK6/p1675357998163889?thread_ts=1675357814.564459&cid=C03ECAP7HK6 - 'Values are a mix of TLV and non-TLV-encoded data. Key/Values are just stored as plain byte slices. With more schema introduced it'll gain a lot of performance over time. This methodology allows for incrementally upgrading the DB code over time. Invoice DB transactions do not touch data in other buckets (they are self contained).'
- https://gist.github.com/84adam/d85f5f40e8821925585f263f68b655eb - Python script to decode keys/values from Postgres LND database

Anything I'm missing for this PR? Curious if you have any idea when it might be merged? @ellemouton @yyforyongyu
Thanks!

@84adam added to 0.16.1 so this will be merged before that release.


Blank white screen when switching back to a tab with webview on Android device

Bug description:
I have an expo app with tabs (using @react-navigation/bottom-tabs where in each tab I display a webview. When I am switching between tabs randomly at some point a page won't show anymore and I will be left with a blank white screen. If I scroll on the webview then the website reappears immediately.
To Reproduce:
I have created a small repository that is enough to break on my device: https://github.com/planeer/test-webview-tabs.
My device is Google Pixel 6 with Android 14.
The weird thing is that I cannot reproduce this in emulators, nor on iOS devices and not even on all Android devices, but it consistently happens on my Google Pixel 6 (Android 14).
Expected behavior:
Load the website when switching back to that tab.
Screenshots/Videos:
https://github.com/react-native-webview/react-native-webview/assets/25594581/7fe72b3a-3802-49fd-9d3a-1e46ce4eef8c
Environment:

OS: Android
OS version: 14
react-native version: 0.73.6
react-native-webview version: 13.6.4

Same here, only for Android and only on real devices, experience it on my Google Pixel 8 Pro but it's not limited with it.
Can be cured with  unmountOnBlur: true for tabs, but it's not really a good option to always load tabs

Same here, only for Android and only on real devices, experience it on my Google Pixel 8 Pro but it's not limited with it.
Can be cured with  unmountOnBlur: true for tabs, but it's not really a good option to always load tabs

Thanks for that suggestion.  It is true that  unmountOnBlur: true does present a workaround, but I would really like to avoid reloading the website each time tab is switched.

Having this issue also, unmountOnBlur and reloading the website each time is not very user friendly. Any solutions so far?

does the blank screen go away when you try to touch or scroll on the blank screen? Or is it permanently there?

does the blank screen go away when you try to touch or scroll on the blank screen? Or is it permanently there?

For me when I touch it or scroll the blank screen goes away and the page reappears.

As soon as I touch or scroll it appears again, very similar to what you are experiencing

I could not understand what was causing the issue. Anyway,  I came up with a fix that solved this problem:

You need to set up a listener and keep track of the current app state (background or active). You can do this using AppState from react-native as follows:

`const [currentAppState, setCurrentAppState] = useState();
useEffect(() => {
const appStateListener = AppState.addEventListener(
'change',
(nextAppState) => {
// Set app state if it is background or active
if (nextAppState === appStates.ACTIVE) {
setCurrentAppState((curState) => {
if (curState !== appStates.ACTIVE) {
return appStates.ACTIVE;
}
});
} else if (nextAppState === appStates.BACKGROUND) {
setCurrentAppState((curState) => {
if (curState !== appStates.BACKGROUND) {
return appStates.BACKGROUND;
}
});
}
}
);
return () => {
  appStateListener.remove();
};

}, []);`

Now, what I'm doing is checking whenever the app state changes from background to active, I toggle a hidden element in web document. For this, I create a div and assign it an id. Then check, if it is already present in the body then I remove it. If it is not present in the body I append it to the body.
Here is the code for it:

useEffect(() => {     // The webview shows a blank screen when the app is back to active state     // This is a workaround to fix the issue     // https://github.com/react-native-webview/react-native-webview/issues/3427     if (currentAppState === appStates.ACTIVE) {       setTimeout(() => {         webRef.current?.injectJavaScript(
var bodyElem = document.getElementsByTagName('body')[0];
var hiddenWebViewDiv = document.createElement('div');
hiddenWebViewDiv.id = 'hidden__web__view__div';
      if(document.getElementById('hidden__web__view__div')){
        bodyElem.removeChild(document.getElementById('hidden__web__view__div'));
      } else {
          bodyElem.appendChild(hiddenWebViewDiv);
        }

      true;
  `);
  }, 1000);
}

}, [currentAppState]);`
This modifies the state of the DOM and the Webview starts displaying the web page without any physical needs.
PS: This is just a work-around as our user base was being affected by this bug too much. This definitely needs to be fixed.

The backticks are messing with the code. You can have a look at the code on this gist:
https://gist.github.com/Asad520/e675a4290924bce729d3edb620e72c08

For me when I touch it or scroll the blank screen goes away and the page reappears.

same here

I could not understand what was causing the issue. Anyway, I came up with a fix that solved this problem:

You need to set up a listener and keep track of the current app state (background or active). You can do this using AppState from react-native as follows:

`const [currentAppState, setCurrentAppState] = useState();
useEffect(() => { const appStateListener = AppState.addEventListener( 'change', (nextAppState) => { // Set app state if it is background or active if (nextAppState === appStates.ACTIVE) { setCurrentAppState((curState) => { if (curState !== appStates.ACTIVE) { return appStates.ACTIVE; } }); } else if (nextAppState === appStates.BACKGROUND) { setCurrentAppState((curState) => { if (curState !== appStates.BACKGROUND) { return appStates.BACKGROUND; } }); } } );
return () => { appStateListener.remove(); }; }, []);`

Now, what I'm doing is checking whenever the app state changes from background to active, I toggle a hidden element in web document. For this, I create a div and assign it an id. Then check, if it is already present in the body then I remove it. If it is not present in the body I append it to the body.
Here is the code for it:

useEffect(() => { // The webview shows a blank screen when the app is back to active state // This is a workaround to fix the issue // #3427 if (currentAppState === appStates.ACTIVE) { setTimeout(() => { webRef.current?.injectJavaScript(` var bodyElem = document.getElementsByTagName('body')[0]; var hiddenWebViewDiv = document.createElement('div'); hiddenWebViewDiv.id = 'hidden__web__view__div';
      if(document.getElementById('hidden__web__view__div')){
        bodyElem.removeChild(document.getElementById('hidden__web__view__div'));
      } else {
          bodyElem.appendChild(hiddenWebViewDiv);
        }

      true;
  `);
  }, 1000);
}

}, [currentAppState]);
This modifies the state of the DOM and the Webview starts displaying the web page without any physical needs.
PS: This is just a work-around as our user base was being affected by this bug too much. This definitely needs to be fixed.

This unfortunately didn't help with my issue. Because my issue happens when app is active and I am switching between tabs. I also tried:
  useEffect(() => {
    navigation.addListener("focus", () => {
      setTimeout(() => {
        webViewRef.current?.injectJavaScript(`
        var bodyElem = document.getElementsByTagName('body')[0];
        var hiddenWebViewDiv = document.createElement('div');
        hiddenWebViewDiv.id = 'hidden__web__view__div';

        if(document.getElementById('hidden__web__view__div')){
          bodyElem.removeChild(document.getElementById('hidden__web__view__div'));
        } else {
            bodyElem.appendChild(hiddenWebViewDiv);
          }

        true;
    `);
      }, 1000);
    });
  }, []);

but it also did not fix it.

Can you all share your Android versions so we can maybe narrow down the issue somehow? I have this issue on Android 14 as well

I did some more digging and found this in adb logs when blank screen appears:
Memory warning (pressure level: TRIM_MEMORY_UI_HIDDEN) received by JS VM, ignoring because it's non-severe
Application backgrounded at: timestamp_millis:<PHONE_NUMBER>770

I believe someone from an Android background can help here now 🥹

Can you all share your device Android versions and target SDK versions in build.gradle so we can maybe narrow down the issue somehow? I have this issue on Android 14 as well and my target SDK is 34

For me it is also Android 14, and target SDK is also 34.

I’m experiencing the same issue and noticed it's relatively new. Did this problem exist if we roll back to version X?

I don't think the issue is related to this package. I built a small Kotlin project with a native webview and used our web app with just a URL prop. It also had the same issue.
Seems like an issue with some DOM HTML elements or some CSS properties that the Android Chromium webview fails to handle properly and causes the WebView to go blank sigh

I couldn't reproduce this bug in a simple native kotlin android application with couple of tabs that all open webviews. For me it there worked fine.

My app was just rejected from the first review submission on Google Play store.
The reviewer experienced this bug and reject the app saying “there is a broken functionality” 😭
I can reproduce the same issue but occasionally. This could be justified by a memory pressure on device?

I am having the same issue. Tab is blank occasionally when switching but will appear when you touch the screen. Android 14, Pixel 6.

Similar issue here #3524

still waiting and hoping, I don't want this issue is closed automatically...


exactOptionalPropertyTypes does not apply to constructor parameters

Bug Report

🔎 Search Terms

exact, optional, property, types, constructor, parameters, arguments, undefined, ?
🕗 Version & Regression Information

4.4 & above (including the latest nightly, v4.7.0-dev.20220504)

This is the behavior in every version I tried, and I reviewed the FAQ for entries about optional class members
I was unable to test this on prior versions because exactOptionalPropertyTypes was added in 4.4

⏯ Playground Link

Playground link with relevant code
💻 Code

class A {
    public prop?: 'bar';

    constructor(
        public ctorProp?: 'foo',
    ) {}
}

// correctly throws an error
new A().prop = undefined;

// incorrectly(?) doesn't throw an error, even though a developer might expect it to
new A().ctorProp = undefined;

🙁 Actual behavior

Only the property which is defined on the class itself reports as an error, when undefined is assigned to them.
// correctly throws an error
new A().prop = undefined;

// incorrectly(?) doesn't throw an error, even though a developer might expect it to
new A().ctorProp = undefined;

The types on the class is incorrect as well.
// 'bar'
new A().prop;

// 'bar' | undefined
new A().ctorProp;

In the JS emitted, one can see that an assignment is made regardless if a parameter is passed into it.
class A {
    ctorProp;
    prop;
    constructor(ctorProp) {
        this.ctorProp = ctorProp;
    }
}

While typescript's error is consistent with the outputted code, this may not be the expected behaviour when exactOptionalPropertyTypes is enabled. Related: #47350.
🙂 Expected behavior

Properties defined in both styles should report an error, when undefined is assigned to them.
// correctly throws an error
new A().prop = undefined;

// correctly throws an error
new A().ctorProp = undefined;

The types on the class should have their behaviours matched as well.
// 'bar'
new A().prop;

// 'bar'
new A().ctorProp;

The JS emitted, while I'm not sure how viable it is, should only assign when a parameter is passed in.
class A {
    ctorProp;
    prop;
    constructor(ctorProp) {
        // if target is >= es2021
        this.ctorProp ??= ctorProp;

        // else
        // if (0 in arguments) this.ctorProp = ctorProp;
    }
}

IMO this is a duplicate of #44548. Or at the very least it would first require #44548.
exactOptionalPropertyTypes does not apply for parameters. You can pass undefined as a value, and then you'd require additional logic to be emitted - something that TypeScript opted out quite a while ago.

Oops, could not find #44548 due to the setting being changed from --strictOptionalProperties to --exactOptionalPropertyTypes.
Though I don't think it's 100% a duplicate, I understand the viewpoint & don't believe this issue can be fixed without additional logic. It still is a big thorn in DX though imo when using the ctor params pattern.


'str' object has no attribute 'get'

Notice:  A new release of pip is available: 22.0.4 -> 23.1 Notice:  To update, run: pip install --upgrade pip Run dbt deps --profiles-dir ./ --target=github_actions 21:08:29  Encountered an error: 'str' object has no attribute 'get' 21:08:29  Traceback (most recent call last):   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/dbt/main.py", line 136, in main     results, succeeded = handle_and_check(args)   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/dbt/main.py", line 180, in handle_and_check     user_config = read_user_config(flags.PROFILES_DIR)  # This is read again later   File "/opt/hostedtoolcache/Python/3.7.16/x64/lib/python3.7/site-packages/dbt/config/profile.py", line 74, in read_user_config     user_config = coerce_dict_str(profile.get("config", {})) AttributeError: 'str' object has no attribute 'get'

Hmm, looks like a profiles issue -- can you confirm that your setup includes the below bit and that secrets.DBT_PROFILES is configured? Should be a straight copy-paste of .dbt/profiles.yml.
      - name: Create temp dbt profiles
        run: "printf %s \"$DBT_PROFILES\" > ./profiles.yml"
        env:
          DBT_PROFILES: ${{ secrets.DBT_PROFILES }}

Whoops, you're right thanks!

Any chance it's possible to change the dbt version being used? Getting this error now with one of my installed packages: Runtime Error   Failed to read package: Runtime Error     This version of dbt is not supported with the 'dbt_expectations' package.       Installed version of dbt: =1.0.9       Required version of dbt for 'dbt_expectations': ['>=1.2.0', '<2.0.0']     Check for a different version of the 'dbt_expectations' package, or run dbt again with --no-version-check

Some way other than via dbt-package?

Do I need to specify the block_id somewhere? I'm running into this issue: path.block_id should be a valid uuid, instead was "***"."}

DATABASE_PARENT_ID is used in the Python script but NOTION-DATABASE-ID is specified in the ReadMe. When I use both I get this error Response text: {"object":"error","status":400,"code":"invalid_request_url","message":"Invalid request URL."} so not sure which one is right.

notion-database-name is what you want to title the database the action creates, notion-parent-id is the page within which you want it to live (see inputs and example workflow).

I have those specified and was still running into an error- what is NOTION-DATABASE-ID in the Python script then?

How is this line generated? DATABASE_PARENT_ID = os.environ['DATABASE_PARENT_ID']

I have those specified and was still running into an error- what is NOTION-DATABASE-ID in the Python script then?

Where are you seeing NOTION-DATABASE-ID? That's not in the repo (currently, at least).

How is this line generated? DATABASE_PARENT_ID = os.environ['DATABASE_PARENT_ID']

Not sure I understand what you're asking, but os.environ['DATABASE_PARENT_ID'] is enabled by DATABASE_PARENT_ID: ${{ inputs.notion-parent-id }} in action.yml which in turn is enabled by notion-parent-id in your workflow file (i.e., .github/workflows/[some_name_here].yml).

Line 29 is the call that's failing but I've checked the same curl command that it should be using locally and it works just fine. Is there a way to log the url that it's using?

Also copied that code of the script and replaced the environment variables in that script with my values and the url generated is the same one I used for the curl request. The issue has to be with the DATABASE_PARENT_ID because I have no idea where that is coming from/how the script uses it if it's not a specified input.

Hmm ok I see that referenced in the action.yml

Finally got it to run, for some reason, it didn't like using Github secrets. I hardcoded the database id and it ran. Weird. But now it is completing successfully but not actually uploading any data onto notion. This is the last thing it says before completing database xxxxxxxx already exists, proceeding to update records! Any ideas? Is that supposed to be the last print statement?

The database got created but there is no data in it- what usually causes that?


Header Filters + PassThru + Clear Filters option

In addition to the previous pull request I've added the following:

Fixed issue with automatic population of select headerFilter
Added Clear Filter option when headerFilters are used
Added PassThru option (a bit of a hack but I found it useful)

Allows usage of filtered results within PowerShell
PassThru is either triggered by the file download (through a button)
or closure of the browser window (in which case the whole dataset is passed through)
Thanks,
Dirk

@DBremen really appreciate the PR. I'm concerned there is too much magic happening. Checking the registry, processes running, handling browsers etc. Can this PR be simplified?
I'm also thinking through how this module can be unit tested. That'll make it more manageable going forward.
Thanks

Hi Doug, no worries at all. This was just an experiment (it turned out to be more difficult than originally anticipated though), that I thought might be useful to others, too.

@DBremen thanks for doing the PR, great ideas! I was thinking about blending/extending HTML/JS/PS in the process and make it easy to maintain, debug etc.
Hope we can keep drilling in


Is this project alive?

Has anyone started to implement this?
It would be great to have a keras alternative to on gorgonia.

Oops...
I also am interested.
The docs are very well written btw in the repos - hats off

+1

+1

I'm excited to see this and try this out.

I see that some of them are just stubs, but what I see looks good. I'm hoping this will be something that is super user friendly on top of gorgonia, kind of like Keras can be for Tensorflow.

@steele232 that's the plan. I wrote the stubs because I had expected me to finish porting over my personal library to this over the weekend. Two things prevented this:

Life got in the way (furniture building takes more hours than expected)
I added a new term to the calculus that defines the language here but when I put it thru Coq I couldn't prove correctness so I had to go back to the drawing board for a bit.

Having said that, the Coq bits don't really affect much. I'll try to get the other layers in.


zlib-devel and perl-YAML-Tiny Cygwin packages fail to install

I suspect this is a bug with Chocolatey, but I'm not managing to work out what's going on well enough, or to reproduce the problem without using this GitHub Action, so I'm reporting this here in the hope we can work out what's going on.
Clearest example of the problem is at https://github.com/me-and/Cygwin-Git/actions/runs/441220070: I've used the action in this repository to install zlib-devel in the "Install Cygwin" job. However if you look at the cygcheck.out file, which is generated in the "Generate cygcheck output" job and stored as an artefact in "cyg-install-logs", you can see the package isn't listed in the set of installed packages.
Looking through the installation logs, everything seems to be reporting itself as successful, and in particular the logs from Chocolatey seem to show it attempting to install the zlib-devel package, running the Cygwin installer, which doesn't seem to meaningfully do anything, and reports success.

It works for me, see e.g. https://github.com/egor-tensin/setup-cygwin/runs/1605133267?check_suite_focus=true (only the "Set up Cygwin" step matters here).
Try not using the multiline YAML strings as the packages parameter value. Do this:
    with:
      platform: ${{ matrix.platform }}
      packages: zlib-devel

instead of
    with:
      platform: ${{ matrix.platform }}
      packages: >
        zlib-devel

I have to admit, I really didn't expect that to work; I was convinced the two bits of syntax were identical. But it very clearly does. I need to do some more digging to understand why it works, but I can go do that.
Thank you!

@me-and Maybe something like this would work, if you want to keep one package name per line:
    with:
      packages: >-
        package1
        package2

You can see https://yaml-multiline.info/ for the crazy multiline-string rules in YAML.


npmignore

add please dist/test to npmignore
600kb for tests is not very small.

:+1:

thanks for the fix!


why when i change the color of the dt bar the game crash

when i inject the cheat again the color of the menu health bar and the chocked packets does not saves
idk why i have those problems with configs

It doesn't crash for me when changing the DT Bar colors.

It doesn't crash for me when changing the DT Bar colors.

he didnt ask if you don't crash with it , help him you mongoloid

It doesn't crash for me when changing the DT Bar colors.

he didnt ask if you don't crash with it , help him you mongoloid

How is someone meant to help with something they can't get to happen for them? If you can get it to happen for everyone you can debug it and find out why it is crashing, hence why it is important for issues to be reproducible.

make the dt bar all white and makes you crash for some reason and bcuz of that the menu color and esp colors does not save

make the dt bar all white and makes you crash for some reason and bcuz of that the menu color and esp colors does not save

https://streamable.com/e37sm6
I'm still not able to reproduce this. Please upload your config and make sure that you're using the latest Fedoraware build

Can't reproduce it sorry, maybe you could read the template next time you make an issue?


https://davestephens.github.io/ansible-nas documentation page is broken

Describe the bug
https://davestephens.github.io/ansible-nas documentation page is broken

fixed

Thanks for closing - you beat me to it! (it was fixed today after I updated the new domain's DNS)


FBCCA average accuracy

I use the FBCCA and CCA to calculate the average accuracy.but the FBCCA's average accuracy is 84.the CCA‘s average accuracy  is 92.5.it's something wrong.the FBCCA's average accuracy should be higher than CCA.

@gdddara The FBCCA method relies on the selection of suitable values for its parameters, those values can be selected manually or through cross-validation grid search.
Read the research paper that introduced the method, the current implementation uses the same code:
ftp://sccn.ucsd.edu/pub/ssvep_benchmark_dataset/FBCCA_JNE15.pdf


pass caCertPath to shared test envs

This fixes a failure we are seeing in shared test environments where the
once created caCertPath was not being properly passed to the shared test
NT.

/assign @xinnywinne

/retest


Add a go.mod file for basic Go modules support.

In order to work well with Go modules, a package should have a go.mod file and semantic version tags on release versions. I have provided a rudimentary go.mod file here. Assuming you accept this change, and if you are willing to also git tag v0.0.1 master after it is merged, that would start the release history.
If the API of the package is considered stable, you could instead use v1.0.0, but at that point module users will expect breaking changes to increment the major version. I don't have a clear sense of how much this package is maintained, so v0 would be a safe default for now.

I haven't actually worked with Go modules before, so having a co-worker take a look. Should get back later today!

I haven't actually worked with Go modules before, so having a co-worker take a look. Should get back later today!

Thanks! Please let me know if you or they have any questions. Since this package is self-contained, the configuration is trivial—the main thing to make it work well will be adding one or more release tags.

Tagged by creating a release: https://github.com/google/orderedcode/releases/tag/v0.0.1
Thanks for the change! Let me know if anything else needs changing.

Thanks! Everything looks sound from my side.


Add support for IdentityProviders?

Duende IdentityServer lets you store a list of dynamically loaded OIDC idendity providers in a store...needs a custom
.AddIdentityProviderStore();
Similar to the other custom stores.
Could this be added to the package?

Hi @johnkwaters !
Sorry, I don't understand what you want to add?
If you are talking about AddIdentityProviderStore, you need implement interface IIdentityProviderStore that can be based on MongoDB (or any other store).
Then just register it:
class CustomIdentityProviderStore : IIdentityProviderStore
{
  // implementation
}
-------------
services.AddIdentityServer()
  .AddIdentityProviderStore(CustomIdentityProviderStore)

Please provide more information, if you meant something else.


Made IgnoredResourceExtensions configurable from the config

Great tool but I wanted to choose which file extensions to ignore myself so now I am now pulling this from the config as shown in Custom404Handler.cs line 21.
Github seemed to pick up on all the white space and autogen code :/

Thanks, this is a nice addition. Will have to double check it in another diff tool first, seems we have different tab-settings or something, everything is marked as changed :-)

So it looks like I had Windows line endings and you had Unix line endings so I've amended mine to be the same as yours so it should be easier to see whats changed now.
Thanks

If it happens again, just append ?w=1 to the url to ignore whitespace changes. It's the same as running git diff -w.

Merged, will be in next release.

Thanks guys!
Looking forward to the next release :)


Unable to set "Content-Type" header by @RequestHeader annotation

Spring Boot 2.3.1
Spring Cloud OpenFeign 2.2.3
Java 11

Hi!
It looks like there is an issue introduced by change #314.
I have following method in my Feign client:
@PostMapping("/api/v2/topics/{topicName}")
Response sendMessage(
            @PathVariable("topicName") String topicName,
            @RequestBody Message message,
            @RequestHeader(value = HttpHeaders.CONTENT_TYPE) String contentHeader);

So, here I'm able to set "Content-Type" header dynamically by passing contentHeader param and this works until Spring Cloud Hoxton.SR5. When I set "spring-cloud-dependencies" version to "Hoxton.SR5" my app start failed with exception:
org.springframework.util.InvalidMimeTypeException: Invalid mime type "{Content-Type}": does not contain '/'
Exception thrown from method org.springframework.cloud.openfeign.support.SpringMvcContract#isMultipartFormData because in the given example of Feign method we have placeholder instead of particular header value and code
MediaType.valueOf(type); // here type = "{Content-Type}"

failed with InvalidMimeTypeException.

Thanks @PhillipMek Was able to reproduce it.

@PhillipMek I have also tried running it against Hoxton.SR4, however, it still fails here, and that code was there before the changes you've linked. Can you provide a minimal, complete, verifiable example that works before Hoxton.SR5 and breaks after updating to this version?

@OlgaMaciaszek I forgot to mention that before update to Hoxton.SR5 I used Hoxton.SR2 version, so it works fine on Hoxton.SR2.

@PhillipMek have just checked on Hoxton.SR2 and am still getting feign.codec.EncodeException. I can work on it anyway, but if you are able to provide a demo where it works for you, it will be easier. Let me know if you are able to provide a sample.

@OlgaMaciaszek not today, maybe I could prepare a sample for you tomorrow.

Ok. Please do.

@OlgaMaciaszek here is demo which demonstrates the issue I described: https://github.com/PhillipMek/fiegn-example.
There are only one test, this test fails on Hoxton.SR5 and pass on Hoxton.SR4.

Thanks @PhillipMek will have a look

@OlgaMaciaszek, hi!
I've updated my project to Hoxton.SR7 and it looks like spring-cloud-openfeign-2.2.4.RELEASE does not contain this fix.

@OlgaMaciaszek was the example that @PhillipMek  priced the correct way to provide content type? I have an API that only accepts application/x-www-form-urlencoded. I'm having a hard time to finding the spring way to annotate openfeign. Thank you.


OrderModify failed with PendingOrders.

Hi,
I have issues with OrderModify when I want modify Pending orders.
For example I want change SellStop on GOLD.
apiclient.OrderModify(order.Ticket, 1300, 0, 0, DateTime.MaxValue);
And I get error 130.  What I do wrong?
Thanks

Hello Perens,
look at this page and understud what is error 130.
https://book.mql4.com/trading/ordermodify
I think your new price is to close or against the order direction.
Use RefreshRates bevore modify.
Change the price and see what happens

In time when I try it, was GOLD about 1330. I try it manually as you can see in first topic and its return error.
I solved it by delete order and make new one. But its not comfortable...
Thanks for advice

Did you modify the correct order ?

Yes I modify correct order. This working for you? Mofidy pending orders?
If I try modify SL or TP for BUY/SELL its ok. But pending orders not...

Post the complete Request structure for OrderSend .
like this
request.sl = 0;
request.tp = 0;
and so on

Iam not the devoloper of this API but i can help you to solve this problem.
Sorry i see that you use mtapi not mtapi5.
Enable debug mode in mtapi.mq4 like this
//#define DEBUG_LOG   old
#define DEBUG_LOG     new
compile and run
see output and post ist after OrderModify Error
greets


Horizon fails to start for public, complains history-archive-urls unset

See this for the standalone error:
https://github.com/stellar/docker-stellar-core-horizon/issues/162
Where do I start?
I'm using stellar-quickstart 12.4.0. In the environment variables file for horizon, I have:
NETWORK_PASSPHRASE="Public Global Stellar Network ; September 2015"

First off, an example I found elsewhere on the web uses bracketed strings for specifying multiple servers for HISTORY_ARCHIVE_URLS (["server1", "server2"...]); the example suggested in the post cited above uses a single string with embedded commas for multiple servers. So which is it? [for the moment I will use the single server you suggested as a single string: "https://history.stellar.org/prd/core-live/core_live_001"...]

I am getting this from my app when it tries to use the horizon server:
"type": "https://stellar.org/horizon-errors/still_ingesting",
"title": "Still Ingesting",
"status": 503,
"detail": "Data cannot be presented because it's still being ingested. Please wait for several minutes before trying your request again."

Well I wait minutes, hours; still get the same error.
So I try putting a LOG_LEVEL="debug" in the environment file for the horizon service (/etc/default/stellar-horizon) -some posts suggested that might work; but the log remains empty, nothing indicating that the service is doing anything.
Do I need to set ingest=true for horizon's history to work for the public network? (it is set that way, as stellar-quickstart had it...) Do I set HISTORY_ARCHIVE_URLS to a localhost URL associated with my stellar-core??
How can I tell from logs or curl commands if it's actually ingesting history? (I lost my history when a debian repo update of core got installed and am now trying a new catchup of core...)
I also saw a command online: horizon db backfill
But the latest version does not have it??

What command are you using to start a container? The history archives are already set in all the modes (pubnet, testnet, standalone).

Not using a container; using the recently updated stellar-quickstart debian package.
If you can point me to how those archives get set (either at run time or build time...), maybe I can fix it myself. I am about to attempt a build, per the cursory guidelines of:
https://galactictalk.org/d/20-setting-up-stellar-core-on-centos-7


AMBARI-22921. Unable to enable hive interactive, LLAP, on Ambari 2.5.2 managed cluster

While trying to enable the hive interactive plugin, we identified that Ambari was looking in the incorrect directory when trying to locate the users keytab.

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/454/
Test PASSed.


Cross-link dependent package option documentation better (e.g., Electron Packager)

Preflight Checklist

[x] I have read the contribution documentation for this project.
[x] I agree to follow the code of conduct that this project follows, as appropriate.
[x] I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Problem Description
At the moment trying to figure out how to configure electron-forge is not so easy.
For example, try searching for "icon" in the search bar, and you'll get no results. There isn't a clear path how to get from electron-forge to electron-packager and finally to electron-packager API docs. It will take a while for a new user to stumble around and to finally realize that for configuring the app icon (for example) they need to go see electron-packager.
Things are fairly hidden for new users.
Proposed Solution
Perhaps the electron-forge documentation can include a list of electron-packager options (so that they appear in search results) and point a link to the electron-packager docs.
Alternatives Considered
A more involved solution could be to document electron-packager as if it is part of electron-forge, and have all the documentation in one place. But the previous approach would at least help.

This is primarily dependent upon either typedoc being able to link to external docs or switching to a different TypeScript documentation generator.

Doing this in the electronforge.io docs site is not currently possible as it is built on gitbook.

I'm in the same boat as OP. I've currently been searching around for the last day or so trying to figure out a good configuration for submitting to the Mac App Store.
These are the most consequential docs I've found:

https://www.electronjs.org/docs/tutorial/code-signing#electron-forge
https://www.electronjs.org/docs/tutorial/mac-app-store-submission-guide#how-to-submit-your-app
https://js.electronforge.io/maker/pkg/interfaces/makerpkgconfig#install
https://github.com/electron/electron-osx-sign

I've had to read so many disparate pieces of documentation to get together a solid working electron-forge config for a signed DMG, and am now struggling with entitlements for the PKG file for the appstore. Things just feel scattered all over the place, and there should be the 'electron-forge' way of doing things that is more opinionated.
I would love the equivalent of "This is what you do to get a pretty standard, default config done". There are standard things people want to do:

Understand how to have an app icon
Get the app signed so that users don't have to go through multiple steps to allow the app to run
Distribute on app stores
Utilize an update server if they don't use app stores

Currently, doing these things feels like you're being thrown to the wolves. These are so standard that there should be very clear paths to getting it done that doesn't require so much digging and understanding.

Typedoc seems to have added third party API references as of today: https://github.com/TypeStrong/typedoc/blob/v0.22.0/internal-docs/third-party-symbols.md
However this will require a fair amount of work on this end since it appears to only be a low-level amount of support (despite pretty much every single linked API doc is generated using Typedoc...)

Completed with the merged PRs above!