Error out of memory at line 380 in file /mmfs1/gscratch/zlab/timdettmers/git/bitsandbytes/csrc/pythonInterface.c

System Info

transformers version: 4.37.0.dev0
Platform: Linux-<IP_ADDRESS>-microsoft-standard-WSL2-x86_64-with-glibc2.35
Python version: 3.11.0
Huggingface_hub version: 0.20.1
Safetensors version: 0.4.0
Accelerate version: 0.25.0
Accelerate config:    not found
PyTorch version (GPU?): 2.1.2 (True)
Tensorflow version (GPU?): not installed (NA)
Flax version (CPU?/GPU?/TPU?): not installed (NA)
Jax version: not installed
JaxLib version: not installed
Using GPU in script?: NVIDIA GeForce RTX 4090 24GB
Using distributed or parallel set-up in script?:

Reproduction

I used own remote local machine via AnyDesk.
There happens some warning messages like “You’re using a LlamaTokenizerFast tokenizer. Please note that with a fast tokenizer, using the call method is faster than using a method to encode the text followed by a call to the pad method to get a padded encoding.” and “The input hidden states seems to be silently casted in float32, this might be related to the fact you have upcasted embedding or layer norm layers in float32. We will cast back the input in torch.float16.”
At first, I used windows environment, not linux. In the beginning, training was successful, with no crash, the model saved well after the training. After then, I added target module in lora config then training went well but crashed only after the training. Thought it was due to the individually compiled version of bitsandbytes, so I made wsl2 linux environment and tried to run the code but this time, training doesn't even start due to the following error: "Error out of memory at line 380 in file /mmfs1/gscratch/zlab/timdettmers/git/bitsandbytes/csrc/pythonInterface.c"
I didn't add any custom code I made, but only used hugging face library code for training.
I wonder that why does OOM happen even when shared GPU memory is avaliable about more than 100GB. Training only uses 3GB/128GB of shared GPU memory while using 23.5GB/24GB of dedicated GPU memory. Also, in the middle process of my project why did train went well while saving process didn't work properly. Is memory required more when saving the model?
By the fact that all of the process went well at the beginning, I think my hardware can support the training. Am I wrong??

Here is the code.
import transformers
from transformers import (BitsAndBytesConfig, AutoModelForCausalLM, AutoTokenizer, GenerationConfig, TrainingArguments, logging)
import torch
import os
from datasets import load_dataset, concatenate_datasets
import json
from peft import LoraConfig
from trl import SFTTrainer, DataCollatorForCompletionOnlyLM

def main():
	base_model = "mistralai/Mistral-7B-Instruct-v0.2"
	new_model = "Mistral-7B-Instruct-v0.2_newmodel"

	compute_dtype = getattr(torch, "float16")

	quant_config = BitsAndBytesConfig(
		load_in_4bit=True,
		bnb_4bit_quant_type="nf4",
		bnb_4bit_compute_dtype=compute_dtype,
		bnb_4bit_use_double_quant=False
	)

	tokenizer = AutoTokenizer.from_pretrained(base_model, trust_remote_code = True, padding_side = "right")
	model = AutoModelForCausalLM.from_pretrained(base_model, quantization_config = quant_config, attn_implementation = "flash_attention_2", device_map = {"": 0})
	model.config.use_cache = False
	model.config.pretraining_tp = 1

	if tokenizer.pad_token is None:
		tokenizer.pad_token = tokenizer.eos_token

	train_dataset = load_dataset('json', data_files = './dataset/mixed_train.json', split = 'train')
	eval_dataset = load_dataset('json', data_files = './dataset/mixed_val.json', split = 'train')
	print(f"train dataset size: {len(train_dataset)}, eval dataset size: {len(eval_dataset)}")

	training_params = TrainingArguments(
		output_dir="./FT_newmodel",
		num_train_epochs=1,
		per_device_train_batch_size=2,
		per_device_eval_batch_size= 1,
		evaluation_strategy='steps',
		eval_steps=25,
		gradient_accumulation_steps=4,
		optim="paged_adamw_32bit",
		logging_steps=25,
		learning_rate=2e-5,
		weight_decay=0.001,
		fp16=False,
		bf16=False,
		max_grad_norm=0.3,
		max_steps=-1,
		warmup_ratio=0.03,
		group_by_length=True,
		lr_scheduler_type="constant",
		report_to="tensorboard"
	)

	peft_config = LoraConfig(
		lora_alpha=16,
		lora_dropout=0.1,
		r=64,
		bias="none",
		target_modules=[
        "q_proj",
        "k_proj",
        "v_proj",
        "o_proj",
        "gate_proj",
        "up_proj",
        "down_proj",
        "lm_head",
    	],
		task_type="CAUSAL_LM"
	)

	trainer = SFTTrainer(
		model = model,
		tokenizer = tokenizer,
		train_dataset = train_dataset,
		eval_dataset = eval_dataset,
		dataset_text_field= "text",
		args = training_params,
		peft_config = peft_config,
		max_seq_length = 512,
		packing = False,
		neftune_noise_alpha = 5
	)

	trainer.train()
	trainer.model.save_pretrained(new_model)
	trainer.tokenizer.save_pretrained(new_model)

if __name__ == "__main__":
	print("Training starts")
	main()
	print("Training ended")

Expected behavior
I just want to know the answers of my questions in the reproduction section and way to solve the problem.

How did you solve it?


Cache all OGNL expressions (when enabled) irrespective of their execution status [Fixes WW-5147]

Thanks! LGTM :+1: just curious why you want to keep an expression which always fails!

Very good question, indeed. ;-)
This is because this single expression can be evaluated through a chain, and the way the method {{ognl.ASTChain.getValueBody(OgnlContext, Object)}} is built can lead to method {{ognl.OgnlRuntime.getProperty(OgnlContext, Object, Object)}} throwing a {{OgnlException("source is null for getProperty(null, "" + name + "")")}} (line 2733).
Hence the expression is not cached, before this code change.
Here a stack trace of the such an occurence (Struts 2.5.20):
Daemon Thread [http-nio-8080-exec-6] (Suspended (breakpoint at line 2733 in OgnlRuntime))        owns: NioEndpoint$NioSocketWrapper  (id=294)         OgnlRuntime.getProperty(OgnlContext, Object, Object) line: 2733      ASTProperty.getValueBody(OgnlContext, Object) line: 114      ASTProperty(SimpleNode).evaluateGetValueBody(OgnlContext, Object) line: 212      ASTProperty(SimpleNode).getValue(OgnlContext, Object) line: 258      ASTChain.getValueBody(OgnlContext, Object) line: 141         ASTChain(SimpleNode).evaluateGetValueBody(OgnlContext, Object) line: 212         ASTChain(SimpleNode).getValue(OgnlContext, Object) line: 258         Ognl.getValue(Object, Map, Object, Class) line: 470      Ognl.getValue(Object, Map, Object) line: 434         OgnlUtil$2.execute(Object) line: 401         OgnlUtil.compileAndExecute(String, Map<String,Object>, OgnlTask<T>) line: 442        OgnlUtil.getValue(String, Map<String,Object>, Object) line: 399      OgnlValueStack.getValueUsingOgnl(String) line: 293       OgnlValueStack.tryFindValue(String) line: 276        OgnlValueStack.tryFindValueWhenExpressionIsNotNull(String) line: 258         OgnlValueStack.findValue(String, boolean) line: 238      OgnlValueStack.findValue(String) line: 300       StrutsRequestWrapper.getAttribute(String) line: 94   ...
And a few values of the {{name}} attribute of method {{ognl.OgnlRuntime.getProperty(OgnlContext, Object, Object)}} creating this scenario:
actionMapping opensymphony apache valueStack actiontag servlet Application__ Request__
And finally a stack trace for the {{actionMapping}} case:
Daemon Thread [http-nio-8080-exec-6] (Suspended (breakpoint at line 2733 in OgnlRuntime))        owns: NioEndpoint$NioSocketWrapper  (id=294)         OgnlRuntime.getProperty(OgnlContext, Object, Object) line: 2733      ASTProperty.getValueBody(OgnlContext, Object) line: 114      ASTProperty(SimpleNode).evaluateGetValueBody(OgnlContext, Object) line: 212      ASTProperty(SimpleNode).getValue(OgnlContext, Object) line: 258      ASTChain.getValueBody(OgnlContext, Object) line: 141         ASTChain(SimpleNode).evaluateGetValueBody(OgnlContext, Object) line: 212         ASTChain(SimpleNode).getValue(OgnlContext, Object) line: 258         Ognl.getValue(Object, Map, Object, Class) line: 470      Ognl.getValue(Object, Map, Object) line: 434         OgnlUtil$2.execute(Object) line: 401         OgnlUtil.compileAndExecute(String, Map<String,Object>, OgnlTask<T>) line: 442        OgnlUtil.getValue(String, Map<String,Object>, Object) line: 399      OgnlValueStack.getValueUsingOgnl(String) line: 293       OgnlValueStack.tryFindValue(String) line: 276        OgnlValueStack.tryFindValueWhenExpressionIsNotNull(String) line: 258         OgnlValueStack.findValue(String, boolean) line: 238      OgnlValueStack.findValue(String) line: 300       StrutsRequestWrapper.getAttribute(String) line: 94       PrepareOperations.findActionMapping(HttpServletRequest, HttpServletResponse, boolean) line: 181      PrepareOperations.findActionMapping(HttpServletRequest, HttpServletResponse) line: 165       StrutsPrepareFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 90      ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 189       ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 162   ...
Here, the Struts layer attempts to find the {{actionMapping}} to use, which is first evaluated using OGNL onto the ValueStack - and in this specific case, there is no such entry in the stack - before it actually gets into the struts configuration to find the appropriate mapping.
I did spent some time to check how method {{ognl.ASTChain.getValueBody(OgnlContext, Object)}} works, and I'm actually puzzled to see that the {{source}} attribute is actually the result of the previous step in the chain (which can be null, leading to the exception being raised). But I'm not sure whether this is a problem or a by-design choice (and I sure don't have enough background onto the OGNL internals to decide).
Would you say that this sequence of event is normal, or is it something that should not occur?
Let me know, and I'll open another issue - I can reproduce it 100% so it's easy to investigate if you find it useful...

Hi @davoustp.
Thanks for producing this PR in response to the JIRA issue.  👍 The proposed change addresses the JIRA issue that was raised, by adding any expression/tree that can be "successfully parsed" to the expression cache.
The original logic (prior to the change) would only add the expression/tree to the expression cache if the expression could be successfully executed (in addition to being "successfully parsed").  Looking at the history of OgnlUtil (as far back as I can see in the repository), it looks like the logic considered an expression "valid" to put in the expression cache if-and-only-if it could be successfully executed.  It seems like that may have been an intentional decision based on the original code comment ?
There may be a trade-off in execution performance (by allowing more expressions to be considered "valid" and cached) and memory utilization (due to the larger number of potential expressions now being cached).
It may be difficult to predict if the change in this PR might result in unexpected memory overhead, for some applications, due to potentially increased expression cache size.
Having expressions considered "valid" if-and-only-if they can be executed successfully may have provided a limiting factor to keep the cache size more manageable in the past, but that is just my speculation.
This change may be safer to attempt for the 2.6.x branch (as opposed to PR #503 for 2.5.x), since it introduces a new behaviour for the expression cache.
Thoughts ?

Thanks for producing this PR in response to the JIRA issue. 👍

My pleasure, that's normal to contribute back when we find something useful for the community (OSS rocks).

Looking at the history of OgnlUtil (as far back as I can see in the repository), it looks like the logic considered an expression "valid" to put in the expression cache if-and-only-if it could be successfully executed. It seems like that may have been an intentional decision based on the original code comment ?

Yep, that's my belief as well, the logic/behaviour is not documented, neither as a comment nor in commit history, so we're stuck in a guess game.

There may be a trade-off in execution performance (by allowing more expressions to be considered "valid" and cached) and memory utilization (due to the larger number of potential expressions now being cached).

Very true, as with any caching strategy: you trade off CPU or latency against memory.

Having expressions considered "valid" if-and-only-if they can be executed successfully may have provided a limiting factor to keep the cache size more manageable in the past, but that is just my speculation.

Definitely. However, I do think that this is a weird way to implement memory usage control.
The problem I see is that the fact that an expression evaluates successfully or not does not depend on the expression itself, but on the context it's evaluated against.
Such an expression may fail to execute 1000 times, and succeeds on the next attempt (because using a different context which allows the expression to evaluate successfully). So all in a sudden, the expression gets cached...
All in all, the condition to cache a valid expression entirely depends onto the context we throw at it.
Weird, isn't it?
If we care about memory control, I would then rather go using a real cache with a proper eviction policy, such as https://github.com/ben-manes/caffeine (I use it a lot, it's rock stable, highly efficient and extremely flexible).
This would allow to evict least frequently used expressions, which can even be balanced against its cost to build if needed. This could be bounded or not, time-based...
(we'd need to check the minimum JDK version supported by Struts2, though, since caffeine requires JDK 8 minimum if I remember correctly)
This way, any application generating a very large set of expressions would still get the benefit of caching for the more frequently used expressions without growing the cache too large. And expressions get cached irrespective of any evaluation result.
A small set of configuration knobs might be required as well (to allow user control on cache retention duration, bounded/unbounded and upper bound if needed...).
And going this way could only go into the 2.6.x branch of course.

This change may be safer to attempt for the 2.6.x branch (as opposed to PR #503 for 2.5.x), since it introduces a new behaviour for the expression cache.

If we prefer keeping the changes low, yes, of course, we could have that change in 2.6.x only.

I tried looking at ASTChain processing, and the behaviour you mentioned above, by debugging really basic application.  From what I can determine so far, the cases where the source can be null looks like it was probably a design choice.  It seems to happen for compound node statements where there is no value for the "parent node", so the "child node" cannot have a value.  I am not 100% certain, though, so if someone can see and explain things clearly, please feel free to comment.  :)
Looking into using a full-fledged cache (like cache2k or caffeine, possibly using the JSR107/JCache API to be provider-agnostic) for the expression cache could be interesting.  Alternatively, implementing a slightly more sophisticated customization of the existing cache (without introducing any new dependencies), could be interesting too.  That could be a new feature request for 2.6.x.
As for this PR and 2.6.x, given the explanation and arguments you have provided, I think it seems reasonable to apply to 2.6.x, and see how things behave.  👍

Thanks @JCgH4164838Gh792C124B5  !
I do have the same analysis as yours re: the ASTChain logic - this looks by design, but no clue as to whether this is normal or not.
I opened up the new issue https://issues.apache.org/jira/browse/OGNL-261 to continue to discuss about these OGNL internals and get this PR limited to the OGNL expression caching scope.

Thanks a lot @davoustp for the explanations. My only concern was cache as with caching all the valid expressions DDoS can be easily performed - yet I think this can be also improved by using a better caching mechanism.
I opt to merge this PR, but only support those changes in Struts 2.6.x - I wouldn't introduce such behaviour in 2.5.x (also I just want to focus on 2.6.x branch, tbh)

Hi @lukaszlenart,
Please feel free to accept and merge this PR and reject PR #503 (Struts 2.5.x), as you see fit.
(I do understand the concern about being focused ;-) )

Thanks a lot @davoustp 💯


OSError: [Errno 66] Directory not empty

./build.sh

...
INFO: Unpacking "chromium" to ./ ...
Traceback (most recent call last):
  File "/xxx/ungoogled-chromium-macos/ungoogled-chromium/utils/downloads.py", line 439, in <module>
    main()
  File "/xxx/ungoogled-chromium-macos/ungoogled-chromium/utils/downloads.py", line 435, in main
    args.callback(args)
  File "/xxx/ungoogled-chromium-macos/ungoogled-chromium/utils/downloads.py", line 378, in _unpack_callback
    unpack_downloads(DownloadInfo(args.ini), args.cache, args.output, args.skip_unused, extractors)
  File "/xxx/ungoogled-chromium-macos/ungoogled-chromium/utils/downloads.py", line 341, in unpack_downloads
    extractor_func(archive_path=download_path,
  File "/xxx/ungoogled-chromium-macos/ungoogled-chromium/utils/_extraction.py", line 246, in extract_tar_file
    _extract_tar_with_tar(tar_bin, archive_path, output_dir, relative_to, skip_unused)
  File "/xxx/ungoogled-chromium-macos/ungoogled-chromium/utils/_extraction.py", line 132, in _extract_tar_with_tar
    _process_relative_to(output_dir, relative_to)
  File "/xxx/ungoogled-chromium-macos/ungoogled-chromium/utils/_extraction.py", line 87, in _process_relative_to
    src_path.rename(dest_path)
  File<EMAIL_ADDRESS>line 1363, in rename
    os.rename(self, target)
OSError: [Errno 66] Directory not empty: '/xxx/ungoogled-chromium-macos/build/src/chromium-126.0.6478.61/skia' -> '/xxx/ungoogled-chromium-macos/build/src/skia'

Have you tried cleaning src directory?

Delete the build directory before build.


Add guidance on using turquoise backgrounds

Fixes the problem discussed in issue #200.

@gemmaleigh Not quite sure why the CI failed there...

I'd like to revise this to:
Make sure text on a coloured background is legible.
To meet WCAG2 Level AA, you need to make sure the:

font size is at least 18px, or 14px bold
contrast ratio is 3:1

--
I've run this past the content designers on the Service Manual team.
@sanjaypoyzer let me know if you're happy to amend and squash those two commits, otherwise I can.

@gemmaleigh Does that mean that essentially services shouldn't use core-19 in those boxes? (since the font size goes down to 16px on mobile).

Yeah sure, that looks clearer. Will just wait for the clarification on the core-19 point before doing it.

Yes, the example as-is would fail WCAG2 Level AA for smaller viewports, where .core-19 for body text at 19px decreases to 16px.
If we don't intend to change the colour of the background - then the font size can either be increased, or the 19px white text on a turquoise background could use .bold-19 which would pass.

Should we add that to the guidance as well, or do you think it's clear enough to be inferred?

This was added in #481, closing as this has now been resolved.


Add ghc 8.10.4 and stack.yaml

Fixes for 8.10. Added also stack.yaml

@vlatkoB Please don't add stack.yaml as part of this PR. I don't know if @phadej wants that in his project. If not, that could torpedo this whole PR fro getting merged. The important thing for us is support for >= 8.10.4.
Maybe @phadej doesn't mind - so you can submit stack.yaml as a separate PR and let him decide that separately.


bugfix: Missing SpiderMonkey AST node type: Property

Thanks!

@sqs Mind publishing?

Yep, will do tomorrow!

I just published v0.0.5 at f78a2ad0aca112fc6159c0a225d4d47115f7cf0a.


Updated all files with JsDocs

For #8
Still not done as of time of writing, just giving everyone a headsup that I'm working on this

@SwapnikKatkoori I left some comments where I'm not sure what the correct type is, or how the function works. If you could give me some guidance that'd be great! Once this is done I can make the Typescript typings

You can clone my fork and make the change he’s there if you’d like.
Cheers,
Caelin
Owner - Caelin Sutch Creative - Photography, Videography, Graphic Design,
Web Design, and More!
<EMAIL_ADDRESS>(916) 317 4484


License missing :)

@inutano please add a License to your project.

Hello Björn, thank you for pointing this out! LICENSE.txt has been uploaded along with updated README.


Upgraded from obsolete IdentityServer4 to Duende.IdentityServer

Try the replay with the current server library.

Hey Aviad,
Thanks for the PR, unfortunately even with the upgraded library I am still able to login using the stored previous response.
I have been looking at implementing BFF, but even the Duende example from the github repo, still allows me to intercept the response and replace it.
Thanks,
Alex

This should be opened as an issue in the library's repo


[REQ]

Acknowledgement of preliminary instructions

[X] I have read and acknowledged the preliminary instructions.

What idea do you have?
if its possible an option to fix the camera bug when using a controller on PC with high FPS would be pretty cool :)

Camera bug? Can you elaborate more on this please?

Camera bug? Can you elaborate more on this please?

when using a controller on PC with high FPS the camera is WAY too fast for some reason. and changing it in the settings doesn’t make a difference.

I've looked through the flag list, and I don't believe that there is an option available to alter this. Sorry.


Calendar panel vanishes when changing month quickly

There basically seems to be a race condition in the post-transition handler in https://github.com/chemerisuk/better-dateinput-polyfill/blob/08b15d52ecf7b1654ef60e1bac63295137174262/src/main.js#L133 . So, because the code ends up re-using the same two chunks of dom, swapping them each time you switch month, it's possible to end up with an event sequence roughly like:
Hide calenderDays[0] (with remove on finish)
Hide calenderDays[1] (with remove on finish)
(transitions occur)
Remove calenderDays[0]
Remove calenderDays[1]

Is it a duplicate of https://github.com/chemerisuk/better-dateinput-polyfill/issues/47?


Follow-Up Issues for Resource Detection in .NET

[ ] Adding a call to AddService() between these lines (see https://github.com/open-telemetry/opentelemetry.io/pull/1795#discussion_r991028322 for the line numbers)
[ ] Add resource detection with a Detector (like JS for container.id -> https://github.com/open-telemetry/opentelemetry-dotnet-contrib/tree/main/src/OpenTelemetry.Extensions.Docker)

Assigning myself here. The package does work, I just need to fit it in correctly with a good code sample.

Blegh. Unfortunately stumped because it's to do with environments and there's wonky behavior:

service.instance.id always shows up even though it's not in env
The package doesn't appear to actually work, as there is no container ID listed when the container is run

Will need to investigate but I'll add the servicename stuff for now.

Aha, this explains the service.instance.id being set: https://github.com/open-telemetry/opentelemetry-dotnet/blob/d7afc1bcb0092a56ac1ea55bfbcf5a9430c72cf9/src/OpenTelemetry/Resources/ResourceBuilderExtensions.cs#L54

The package doesn't appear to actually work, as there is no container ID listed when the container is run

It's a corner case, but the package does not work if cgroupv2 is used, there's a work around, so far only implemented by  JS. So, by any chance, can you run the container again and check if /proc/self/cgroup gives you something?

Wanting to play around with dotnet anways, I just gave it a try:
I get some container.id (I use colima with docker engine)
$ docker run --rm -t -i dotnetty
Activity.TraceId:          a289ca5f184994a23f19aeec477e2882
Activity.SpanId:           9b0a995ef440242f
Activity.TraceFlags:           Recorded
Activity.ActivitySourceName: MyCompany.MyProduct.MyService
Activity.DisplayName: SayHello
Activity.Kind:        Internal
Activity.StartTime:   2022-10-11T09:17:59.6471556Z
Activity.Duration:    00:00:00.0003996
Activity.Tags:
    foo: 1
    bar: Hello, World!
    baz: [1,2,3]
Resource associated with Activity:
    container.id: b1e2f740d45828051ae474b34074c152c7a98409bfbdaf6f3c9781edc2e457c7
    service.name: MyCompany.MyProduct.MyService
    service.version: 1.0.0
    service.instance.id: 7c9de23c-7e67-433a-b25e-132d685a7c8f

When I overwrite the entrypoint with cat /proc/self/cgroup I see the following
❯ docker run --rm -t -i dotnetty cat /proc/self/cgroup
13:pids:/docker/9c742a2055836b7c0cc9583f062a9fccd9950f3fc22784dbbd1372f8f3738a72
12:hugetlb:/docker/9c742a2055836b7c0cc9583f062a9fccd9950f3fc22784dbbd1372f8f3738a72
11:net_prio:/docker/9c742a2055836b7c0cc9583f062a9fccd9950f3fc22784dbbd1372f8f3738a72
10:perf_event:/docker/9c742a2055836b7c0cc9583f062a9fccd9950f3fc22784dbbd1372f8f3738a72
9:net_cls:/docker/9c742a2055836b7c0cc9583f062a9fccd9950f3fc22784dbbd1372f8f3738a72
8:freezer:/docker/9c742a2055836b7c0cc9583f062a9fccd9950f3fc22784dbbd1372f8f3738a72
7:devices:/docker/9c742a2055836b7c0cc9583f062a9fccd9950f3fc22784dbbd1372f8f3738a72
6:memory:/docker/9c742a2055836b7c0cc9583f062a9fccd9950f3fc22784dbbd1372f8f3738a72
5:blkio:/docker/9c742a2055836b7c0cc9583f062a9fccd9950f3fc22784dbbd1372f8f3738a72
4:cpuacct:/docker/9c742a2055836b7c0cc9583f062a9fccd9950f3fc22784dbbd1372f8f3738a72
3:cpu:/docker/9c742a2055836b7c0cc9583f062a9fccd9950f3fc22784dbbd1372f8f3738a72
2:cpuset:/docker/9c742a2055836b7c0cc9583f062a9fccd9950f3fc22784dbbd1372f8f3738a72
1:name=openrc:/docker
0::/docker


[Bug] Tests always run in the default viewport

Describe the bug
The test runner runs tests full screen inside the default playwright Chrome viewport. It does not resize the viewport according to the viewport parameter of the story.
Steps to reproduce the behavior
I have a component where a dropdown is hidden on large screens using a media query. I configured the story to use a mobile2 viewport by default and wrote a play function to test the visibility of the element:
export const Mobile = Template.bind({})
Mobile.parameters = {
  viewport: {
    defaultViewport: 'mobile2',
  },
}
Mobile.play = async ({ canvasElement }) => {
  const canvas = within(canvasElement)
  const toggleButton = await canvas.findByTestId('dropdownToggle')
  await waitFor(() => expect(toggleButton).toBeVisible())
}

When I run storybook locally and use the interactions addon, the test runs fine, but when I run the test runner, it fails.
I debugged the test runner using this custom test-runner-jest.config.js, --maxWorkers 1 and by adding sleep timeouts after every line. I can see that the playwright Chrome window has the wrong size and that it loads the story iframe in fullscreen.
const { getJestConfig } = require('@storybook/test-runner');

module.exports = {
  ...getJestConfig(),
  testEnvironmentOptions: {
    'jest-playwright': {
      launchOptions: {
        headless: false,
      }
    },
  },
}

Environment

Storybook 6.4.20
@storybook/test-runner 0.0.4
@storybook/testing-library 0.0.9

Additional context
As a workaround, I wrote a prerender hook in .storybook/test-runner.js that resizes the playwright page if the test has Mobile in its name. A solution that does not rely on magic strings would be better though.
module.exports = {
  preRender(page, story) {
    if (story.name.includes('Mobile')) {
      page.setViewportSize({ width: 896, height: 414 })
    }
  },
}

It will make stories-json mode feel more limited.

Is that because parameters are not available in stories-json mode?

I just want to share that this is possible now with the getStoryContext/page.evaluate.
I'm using it to get storyContext.parameters.viewport.defaultViewport and then calling page.setViewportSize(devices[storyContext.parameters.viewport.defaultViewport].viewport) where devices is a shared list between the custom viewports I've set up in storybook (and I'm leveraging playwright's devices because why not :) const { devices } = require("playwright");)

Thanks @VickyKoblinski! Your project must be super cool, given all the stuff you've been doing with the test runner!

TODO: add a recipe for that ☝

We got inspired by @VickyKoblinski's answer with little changes, our stories are configured with viewports imported or customized with @storybook/addon-viewport. So here's our little magic 🍡 :
`
const { getStoryContext } = require('@storybook/test-runner');
module.exports = {
    async preRender(page, story) {
    const context = await getStoryContext(page, story);
    const viewPortParams = context.parameters?.viewport;
    const defaultViewport = viewPortParams?.defaultViewport;
    const viewport =
      defaultViewport && viewPortParams.viewports[defaultViewport].styles;

    const parsedViewportSizes =
      viewport &&
      Object.entries(viewport).reduce(
        (acc, cur) => ({
          ...acc,
          [cur[0]]: parseInt(cur[1]),
        }),
        {},
      );

    if (parsedViewportSizes) page.setViewportSize(parsedViewportSizes);
  },
};`

@ibrahimgabsi I want to note that when the viewPort is resized, it will not return to its original state for the following stories. So we have to call something like setViewportSize(globalDefaultSize) if no custom window is specified.

I slightly improved solution of @ibrahimgabsi to use built-in viewport sizes or reset to default on pages without viewport parameter.
Create .storybook/test-runner.js:
const { getStoryContext } = require('@storybook/test-runner');
const { MINIMAL_VIEWPORTS } = require('@storybook/addon-viewport');

const DEFAULT_VP_SIZE = { width: 1280, height: 720 };

module.exports = {
	async preRender(page, story) {
		const context = await getStoryContext(page, story);
		const vpName = context.parameters?.viewport?.defaultViewport;
		const vpParams = MINIMAL_VIEWPORTS[vpName];

		if (vpParams) {
			const vpSize = Object.entries(vpParams.styles).reduce(
				(acc, [screen, size]) => ({
					...acc,
					[screen]: parseInt(size),
				}),
				{}
			);

			page.setViewportSize(vpSize);
		} else {
			page.setViewportSize(DEFAULT_VP_SIZE);
		}
	},
};

Hey peeps! I will close this issue as the recipe has been documented in the README. Thank you!


Issue Versioning APIs Behind an API Gateway/Swagger UI

Background:
We are currently using Azure's API Management (APIM) Gateway for our public-facing developer portal, and are looking to add API versioning using this library.  The below issue could be related to other API gateways as well, not just APIM.
APIM also has a concept of versioning using the same mechanisms that are used by this library (i'm guessing it may be the same code).  Our organization has chosen to use query string versioning in APIM, thus allowing us to support multiple versions in a controlled "pretty" fashion through the gateway.
The Issue:
My issue is that although I can successfully generate swagger documents for all versions defined in my code, the fact that the "api-version" query element is also defined is causing issues with APIM, which is configured identcally. Because of this, APIM is doubling-up on the querystring parameters and passing two "api-version" parameters in the querystring which is causing issues.
If I manually take these parameters out from the specifications in APIM, or add a new OperationFilter within the services.AddSwaggerGen() call, I can eliminate this querystring parameter from the resulting swagger doc so that it will import into the APIM ecosystem and work correctly.  This works since APIM requires the same version number in the querystring, it is automagically passed to the back-end API as well. While this configuration will work, it ultimately does not allow the swagger UI to work out of the box, as the querystring parameter is no longer an option and is not sent to the back-end, causing an error.
My Question:
Is there any way to be able to generate multiple swagger documents - one that includes this (for use in the swagger UI for debugging) and another for use with APIM consumption. (Effectively two versions of the same "version" of the swagger document: one with the parameter, and one without this added.
I have tried without success in the operation filter to detemine selectively when to remove values, but there is nothing based on this code that will allow me to determine this.  Also,  when looking at the *-APIM versions in the UI, it states that there are no operations available.  (I'm guessing because this version is not defined anywhere in our code.)
services.AddSwaggerGen(opt =>
{
    var provider = services.BuildServiceProvider().GetRequiredService<IApiVersionDescriptionProvider>();
    foreach (var description in provider.ApiVersionDescriptions.Where(d => !string.IsNullOrWhiteSpace(d.GroupName)))
    {
        opt.SwaggerDoc(description.GroupName, CreateInfoForApiVersion(description));
        opt.SwaggerDoc($"{description.GroupName}-APIM", CreateInfoForApiVersion(description));
    }

    opt.OperationFilter<SwaggerDefaultValues>();
    opt.OperationFilter<APIMRemoveVersionParameter>();

    opt.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, $"{System.Reflection.Assembly.GetEntryAssembly().GetName().Name}.xml"), true);

});

app.UseSwaggerUI(c =>
{
    foreach (var description in provider.ApiVersionDescriptions.Where(d => !string.IsNullOrWhiteSpace(d.GroupName)))
    {
        c.SwaggerEndpoint($"/swagger/{description.GroupName}/swagger.json", description.GroupName.ToUpperInvariant());
        c.SwaggerEndpoint($"/swagger/{description.GroupName}/swagger.json", $"{description.GroupName.ToUpperInvariant()}-APIM");
    }
});

I'm at a loss on what I can do to be able to make this functionality work, or if there is some other feature out there I could use to accomplish this.

I have taken your suggestion and submitted a question to the APIM team.  Upon further inspection, APIM is actually not sending anything to the back-end API because it cannot find a proper route (due to the doubled api-version parameters) and returns a 404.
https://social.msdn.microsoft.com/Forums/en-US/193c102a-b3d3-42c1-8a00-54d36fd9edc9/apim-versioning-with-backend-api-versioning?forum=azureapimgmt&prof=required
I would appreciate anyone up-voting this thread that is interested in a solution for this issue with APIM.
I will investigate further into your two options, and will report back as to what solution I used.
Thanks for your help!

Well-articulated. I agree with your assessment. I upvoted. We'll see what happens.

With respect to this issue, I believe it has reached its conclusion. I've replied to the APIM discussion. The answers aren't particuarly great, so I've attempted to reach out internally to try and get traction for you.
Although it's wonky, I should mention that it's ok if your endpoint is using API versioning and has the api-version query parameter specified multiple times as long as the values are exactly the same. The validation is performed very early in the pipeline so the API version is not parsed. This means that semantically equivalent API versions are not enough. The requested values must be exactly the same literal values (but case-insensitive). I agree that it's silly, but this might be a workable solution for you with APIM without having to modify the Swagger document by hand.

With respect to this issue, I believe it has reached its conclusion. I've replied to the APIM discussion. The answers aren't particuarly great, so I've attempted to reach out internally to try and get traction for you.
Although it's wonky, I should mention that it's ok if your endpoint is using API versioning and has the api-version query parameter specified multiple times as long as the values are exactly the same. The validation is performed very early in the pipeline so the API version is not parsed. This means that semantically equivalent API versions are not enough. The requested values must be exactly the same literal values (but case-insensitive). I agree that it's silly, but this might be a workable solution for you with APIM without having to modify the Swagger document by hand.

This does not work. For some reason APIM is not fowarding  to the backend. I created a filter that runs during publish that removes the api-version from swagger and that turns out to look and work fine in APIM. The problem then becomes the swagger definition that is downloaded doesn't have a param for api-version which then causes issues when generating the clients via AutoRest.


R2 custom domain

Current Terraform and Cloudflare provider version
terraform: v1.4.6
provider: 4.8.0
Description
Currently it is not possible to configure public access to a R2 bucket via the terraform provider.
Use cases
See https://developers.cloudflare.com/r2/buckets/public-buckets/
Potential Terraform configuration
resource "cloudflare_r2_bucket" "example" {
  account_id = "f037e56e89293a057740de681ac9abbe"
  name       = "terraform-bucket"
  location   = "enam"

  public_access {
    enabled = true
    custom_domains = ["media.example.org", "media.example.com"]
  }

}

References
No response

Switching over to Cloudflare as a result of the Google killing off Google Domains, but the inability to automate this via Terraform is a big bummer, previously my static websites were completely Terraform-managed.

We are trying to import our assets from CF into terraform, and it would be really nice if this would all hook in nicely.

Would be cool to have a more advanced version of cloudflare_r2_bucket. Now I rely on the AWS resource to setup CORS etc, which isn't very stable when used by other providers.

hmm, this seems a bit half-assed
is there a workaround... e.g. is there a private bucket url or something that I can use with a Record resource to manually set up the same thing that the custom domain feature does?

Hello, is there any update on this? Will these be implemented anytime soon? I was wanting to manage a public bucket (with the additional DNS records). I also found a similar issue on the Cloudflare boards.
https://community.cloudflare.com/t/adding-custom-domains-to-r2-buckets/504805
Thanks

is there a workaround

there's some undocumented API
POST  /client/v4/accounts/${account_id}/r2/buckets/${bucket}/custom_domains
{
  domain: ${domain}
  zoneId: ${zone_id}
  zoneName: ${zone_name}
}

PUT /client/v4/accounts/${account_id}/r2/buckets/${bucket}/policy?access=CnamesOnly&cname=${domain}&cname=${otherDomain}&...

DELETE /client/v4/accounts/${account_id}/r2/buckets/${bucket}/custom_domains/${domain}

but I'm guessing it's undocumented for a reason

This issue has been closed as we are now tracking this internally with service teams directly. If you would like an update or to be notified when/if the product ships with this change, please reach out to Cloudflare Support or your account team who can watch the internal feature request for you.

@jacobbednarz  I highly disagree with you marking this issue as "completed" just because you are also tracking it in another system now. Especially since you indicate you may not even implement this.

@markbaird very bizarre, indeed. So 2007 or something. And certainly not how GitHub issues are intended to be used.

I'm surprised that this a) isn't possible; but more so that b) it got removed from public view when people are actively asking for it.  I think it's great that it's being worked on internally; but surely there's a better process than asking people to work with CF support in order to track its progress.

As @wolf-cosmose mentioned, I managed to set a custom domain by using an undocumented API as a workaround. However, I'm not sure how long this solution will remain functional.
I am a fan of Cloudflare R2, so it would be great if this feature could be officially supported.
In Terraform, I'm using the API as shown below:
resource "terraform_data" "public_custom_domain" {
  triggers_replace = [
    aws_s3_bucket.public.bucket,
    var.public_bucket_custom_fqdn,
  ]

  input = {
    bucket     = aws_s3_bucket.public.bucket
    token      = var.cloudflare_r2_token
    account_id = var.cloudflare_account_id
    fqdn       = var.public_bucket_custom_fqdn
  }

  provisioner "local-exec" {
    on_failure = fail
    when       = create
    command    = <<-EOT
      curl -X POST \
        -H 'Authorization: Bearer ${var.cloudflare_r2_token}' \
        -d '{"domain":"${var.public_bucket_custom_fqdn}", "zoneId":"${var.cloudflare_zone_id}", "zoneName":"${var.domain}"}' \
        'https://api.cloudflare.com/client/v4/accounts/${var.cloudflare_account_id}/r2/buckets/${aws_s3_bucket.public.bucket}/custom_domains'

      curl -X PUT \
        -H 'Authorization: Bearer ${var.cloudflare_r2_token}' \
        'https://api.cloudflare.com/client/v4/accounts/${var.cloudflare_account_id}/r2/buckets/${aws_s3_bucket.public.bucket}/policy?cname=${var.public_bucket_custom_fqdn}&access=CnamesOnly'
    EOT
  }

  provisioner "local-exec" {
    on_failure = fail
    when       = destroy
    command    = <<-EOT
      curl -X DELETE \
        -H 'Authorization: Bearer ${self.input.token}' \
        'https://api.cloudflare.com/client/v4/accounts/${self.input.account_id}/r2/buckets/${self.input.bucket}/custom_domains/${self.input.fqdn}'

      curl -X PUT \
        -H 'Authorization: Bearer ${self.input.token}' \
        'https://api.cloudflare.com/client/v4/accounts/${self.input.account_id}/r2/buckets/${self.input.bucket}/policy?cname=&access=CnamesOnly'
    EOT
  }
}

@jacobbednarz we are also waiting for this functionality. It blocks us from migrating to R2.

Closing the issue says "this is never happening"


fix: publish cjs and esm modules

Description
Publish esm and cjs modules to npm. Use for imports module and main fields in package.json. Publish also types for TS.
Related issue(s)
Resolves https://github.com/asyncapi/modelina/issues/228

Pull Request Test Coverage Report for Build 917748821

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 94.174%

Totals

Change from base Build 914916142:
0.0%

Covered Lines:
1187

Relevant Lines:
1217

💛  - Coveralls

@jonaslagoni Thanks!


Adds the routes API

Closes #166
This is the big first commit for the route api. It switches most
of the places over to it. There may be a few places that need to
still be switched over and a search through the code base will be
needed to ensure that they are all found.
The other thing that needs to be done is the tests are still in
need of completion. Mainly this has to do with the API for removing
a route, since their is no where that does that in the code base
itself.
Other then that the server is working with the new API in place and
can run. So this is probably pretty close to what it is going to
end up looking like.

still work to be done but this is the PR that will add the route API to the 2.4.x release


Adds get_to

This PR adds a get_to method that does exactly the same thing as get, except that it doesn't create a new value to store the final result (it takes a reference instead).
It's a convenience function that can be easily implemented in userland (which is also true for get), but I felt like it was simple and useful enough to be added into the core.
A few things have to be fixed before this PR can be merged, I plan to work on them if this API is accepted:

[ ] Fixes the documentation
[ ] Adds tests

If you don't like the idea of adding a new member name, the API can also look like this:
ValueType val;
json.get<ValueType&>(val);

What is the difference to the existing get_ref method?

Unless I got it wrong, get_ref only works for underlying value types. get_to would work with anything, going through the whole from_json pipeline, just like get.

Coverage remained the same at 100.0% when pulling 1f41287078b35beb81927cae1a443f09a228b105 on arcanis:patch-1 into 1af5601a2a51b39aff45b65dd5a9fc3df907509b on nlohmann:develop.

@arcanis I would personally go for an overload of get, I don't find get_to expressive enough.

I do not like the name get_to. But before we start to bikeshed, can you please provide some example usages?

Sure! The following snippet showcases the two main use cases I see, which is deserializing a value without overwriting the existing members if the corresponding json fields are missing.
#include <iostream>
#include "./json.hh"

struct Foobar
{
    int value;
};

void from_json(nlohmann::json const & json, Foobar & val)
{
    auto valueIt = json.find("value");

    if (valueIt != json.end()) {
        valueIt->get_to<decltype(val.value)>(val.value);
    }
}

int main(void)
{
    Foobar foobar;

    nlohmann::json json1 = nlohmann::json::object_t({
        { "value", 42 },
    });

    json1.get_to<Foobar>(foobar);
    std::cout << foobar.value << std::endl;

    nlohmann::json json2 = nlohmann::json::object_t({
        { "not a value", 66 },
    });

    json2.get_to<Foobar>(foobar);
    std::cout << foobar.value << std::endl;
}

How is it different? Frankly, the only thing this function do is to make it easier for users to specify their own target object where to deserialize a value instead of always creating a new one.
It seems like a nice way to solve both the partial deserialization and the default construction issues, with a simple and backward compatible API.

It's the "deserializing a value without overwriting the existing members" bit that threw me.  It's not quite what I was thinking at first since it's only if the json values are missing, and I was thinking it was if the object fields was already set, which is not what you were saying it all.

On a second thought, it seems users could simply call from_json(j, existing_object) to get the desired behavior.

@arcanis I'm self-bumping my last post but, what do you think about the following:
std::string existing_str;
auto j = nlohmann::json::parse(...);
nlohmann::from_json(j, existing_string);

This has the benefit of not adding a new API. I'm not against the principle, but it seems to me that the lower level API alreary covers your use-case.

I agree with @theodelrieu. Unless there is a compelling reason to add a new function to the API, I would rather (re)use the from_json function.

Any further opinion on this? Otherwise I would close this PR.

I can't check right now; would this syntax also work with custom JSON data types? For example in my app I actually do something like using Json = nlohmann::basic_json<...>.
I guess syntax-wise I still like get_to (or just get) better because they look complementary with the already existing get and get_ref functions, but your call.


hotfix: update context for slash commands

Description
This PR mainly focuses on fixing one major bug on passing context in slash commands.
Bug:

Selected context is not passing to slash commands except /edit and /comment.
This problem, we fixed in Get context from context provider in slash commands pull request.
Then we found, the selected code context is not passing to edit and comment slash commands. These slash commands always throwing error as Please highlight the code you want to edit, then press cmd/ctrl+shift+L to add it to chat with selected code but getting it.

Hotfix made:

In useChatHandler hook, for edit and comment slash commands alone passing selected code as context. For other slash commands, passing the selected context (Eg: Files, folders etc.,) as context.
For now, we made this fix. Currently exploring on usage of context providers and to generalize it instead of if else conditions.

Checklist

[x] The base branch of this PR is dev, rather than main
[ ] The relevant docs, if any, have been updated or created

Screenshots
N/A
Testing
Manual testing is done.

Thanks for circling back and getting this hotfix in @vijaisivakumar 👍 much appreciated.


Choose license

I noticed that we are still using the Gatsby default LICENSE file ("0BSD License").
That's not a license we usually use at @openknowledgebe ; should we change to our usual "MIT License" ?
You can find more information here : https://choosealicense.com/

Since @lpmi-13 contributed to the project, we need his/her consent to change the license.

I'm 100% fine with updating it


Use instructor to clean up jsonschema and function calling.

This PR uses instructo to clean up the function calling api, now the models are easily editable, and we can get dict/model back out with more confidence.

Summary by CodeRabbit
Release Notes:

New Feature: Introduced the KnowledgeGraph class to encapsulate knowledge graph data and operations.
Refactor: Updated the main.py script to use the new KnowledgeGraph class, improving code readability and maintainability.
Bug Fix: Resolved a naming conflict in the Neo4j query by renaming from to from_.
Chore: Added a new dependency "instructor" version 0.2.8 to support the new features.

@jxnl nice PR!
so instructor is your module that allows this response_model param? I was trying to figure that out. very neat!
https://github.com/jxnl/instructor
can i clarify what this does -
use not only the KnowledgeGraph class, but also the subclasses, edge and node
creates a JSON schema from those classes to pass to openAI?
are all the docs/comments in the classes also passed to openAI as instructions?
is there anything like this for use with typescript, where the typings can be applied more rigorously?


Fix typo: now to know

While reading through the documentation, I noticed this typo where you meant to use the word know instead of now.

Right - thanks!


魔法科高校の劣等生Out Of Order [PCSG00456]

Game summary

Game name: 魔法科高校の劣等生Out Of Order
Game serial: PCSG00456
Game version: 01.00

Vita3K summary

Version: v0.1
Build number: 1365
Commit hash: https://github.com/vita3k/vita3k/commit/0e17fd18305200790861e8f24be35107f0eed5de

Test environment summary

Tested by: wcy1216
OS: Windows 10
CPU: Intel i7-9750H
GPU: NVIDIA GeForce RTX 2060
RAM: 16 GB

Issues
It is possible to load in menu but exit when I start the game
Screenshots

Log
vita3k.log
Recommended labels

A?
B?
C?

Vita3K v0.1.5 2734-0751c4ee
goes ingame
text missing from the menus
crashes at the beginning of the game
vita3k.log


Opens in Sublime instead of browser

I right-click to open in browser normally, but instead it just opens the same file in Sublime.

Chang the default application to open files with extension html to your browser instead of Sublime.

I got the same problem, where do I set that up?  I was looking around and couldn't find where to switch it.

same issue here. html are set to open with browser by default but still they are open from Atom in Sublime ... any ideas how to solve this ?

Setting the default application for HTML-Files to something other than my editor is no option. The main problem is the package itself: It should be called "open-in-default-application" than "open-in-browser", because this is exactly what it does: Calling the open command with nothing more than the file path and therefore triggering the default application to open the file.
The package should either detect the default browser and specify it using open -b [Bundle Identifier] [File] or allow to set it manually.


Kurun version 0.6.0 issues

Bugs should be filed for issues encountered whilst operating bank-vaults.
You should first attempt to resolve your issues through the community support
channels, e.g. Slack, in order to rule out individual configuration errors.
Please provide as much detail as possible.

Describe the bug:
A clear and concise description of what the bug is.
When I try to run the webhook locally for testing purposes, I get issues related to kurun:

The version mentioned in the title cannot be installed with Homebrew due to an obsolete inlets dependency
Even after successful installation there is an invalid memory address panic:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x1e483b3]

goroutine 1 [running]:
github.com/banzaicloud/kurun/internal/cmd.NewPortForwardCommand.func1(0xc0003fdb80, {0xc000510a80, 0x7, 0x7})
	/Users/nandork@cisco.com/Code/src/github.com/banzaicloud/kurun/internal/cmd/portforward.go:287 +0x1733
github.com/spf13/cobra.(*Command).execute(0xc0003fdb80, {0xc000510a10, 0x7, 0x7})
	/Users/nandork@cisco.com/Code/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:856 +0x60e
github.com/spf13/cobra.(*Command).ExecuteC(0xc0003fd680)
	/Users/nandork@cisco.com/Code/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:974 +0x3bc
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/nandork@cisco.com/Code/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:902
main.main()
	/Users/nandork@cisco.com/Code/src/github.com/banzaicloud/kurun/main.go:13 +0x1e

Expected behaviour:
A concise description of what you expected to happen.
Kurun can be installed via Homebrew and works properly
Steps to reproduce the bug:
Steps to reproduce the bug should be clear and easily reproducible to help people
gain an understanding of the problem.
brew install banzaicloud/tap/kurun
make webhook up -j
Environment details:

Kubernetes version (e.g. v1.10.2): 1.25.2
Cloud-provider/provisioner (e.g. AKS, GKE, EKS, PKE etc): Docker Desktop
bank-vaults version (e.g. 0.4.17): 1.16.0
Install method (e.g. helm or static manifests): helm
Logs from the misbehaving component (and any other relevant logs): above
Resource definition (possibly in YAML format) that caused the issue, without sensitive data:

/kind bug

Fixed in https://github.com/banzaicloud/kurun/releases/tag/0.6.1 and https://github.com/banzaicloud/kurun/releases/tag/0.6.2


Update universal.js

for access cra-service in docker network, for example http://cra-webapp:3000

Codecov Report

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

@@          Coverage Diff          @@
##           master    #84   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files           4      4
  Lines          58     59    +1
  Branches       10     11    +1
=====================================
+ Hits           58     59    +1

Impacted Files
Coverage Δ

<EMAIL_ADDRESS>100% <100%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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

Hi, can you make this changes into this PR?
Thanks for the PR!

Thanks! 🎉 🎉
Will be released as 4.0.0 soon


Collect different peer-reviewed pipelines for MTBC

Description of feature
The pre-requisites for the pipelines to be a part of tbanalyzer

Should be published in a peer-reviewed journal

Should (preferably) have some citations i.e. other projects using that pipeline

Pipelines should be open-source and ideally a license which allows redistribution ( https://choosealicense.com/)

Pipelines which are already in Nextflow, are initial priorities due to ease of collaboration and inclusion.

Some pipelines which fullfil this criteria

MAGMA https://doi.org/10.1371/journal.pcbi.1011648

MTBseq https://doi.org/10.7717/peerj.5895

TBpore https://doi.org/10.1016/S2666-5247(22)00301-9

Bovis pipelines (TODO)

Q: TBprofiler, Mykrobe - shall we address these popular (independent) tools and allow them to be run directly?

In terms of design of each workflow/method
Style of parameters
- mtbseq-minimal-coverage:

- magma-skip-phylogeny-and-clustering

- tbpore-cutoff

Per-method test profiles
Add a custom test_magma , test_full_mtbseq for all methods.
Resources

Github search https://github.com/topics/tuberculosis
PubMed

List of experimental candidates:

https://github.com/cvn001/transflow


Editing via CumulusTV mobile interface seems to not update

Open CumulusTV on mobile device
Ensure cloud file is selected
Select View Streams
Select a video in the list
Change attributes within Edit Channel box
Select Update
???
No Profit.

Seems to revert back to the original information.

Creating a New Channel seems to be broken as well.

Am investigating

Its working for me in lastest version. Everything seems to be fine, except for some new visual issues. Will report later.

Tried it again, and it appears to be working now.  I am now running 1.5.1 on the mobile device, so it may have been an issue with an older version.


Written methods and function blocks not called

"aspect_hook" blocks are not being called for me for methods (or dynamic swift functions). If I use a comparable implementation such as  this, it works for public methods as expected.
It seems the issue lies partly in the aspect_isCompatibleBlockSignature function... if the method being intercepted is a dynamic swift function, there is a mismatch around line 210 in .m:
if (signaturesMatch) {
For loop, the condition for signaturesMatch = NO is not compatible with a dynamic Swift function.
}
commenting out this loop allows a dynamic Swift function to work correctly.
If it is an objective-C method, the mismatch occurs due to the blockSignature's numberOfArguments being larger than the methodSignature.
I am still trying to figure out what all this means, and if I do I will attempt a solution. Otherwise some help would be great because I really want to use it.

I have the same question. I aspect tableView:didSelectRowAtIndexPath:[self aspect_hookSelector:@selector(tableView:didSelectRowAtIndexPath:) withOptions:AspectPositionAfter usingBlock:^(id<AspectInfo> info, UITableView *tableView, NSIndexPath *indexPath) {.....，when code run into invokeWithInfo, it happens "blockSignature's numberOfArguments being larger than the methodSignature."


useStaticFilesLoader with files-array

I try to use the StaticFileLoader with an array of files, as suggested in the docs, but this does not seem to work
$translateProvider.useStaticFilesLoader(
files: [{
prefix: 'locale-',
suffix: '.json'
}, {
prefix: '/absolute/path/to/locale-',
suffix: '.json'
}, {
prefix: 'another/path/to/locales/',
suffix: ''
}]
);
The files are not found.

Which angular-translate version are you using? There have been some fixes recently.

Yes, that was the problem, updated to the latest version and now it works! Thanks.


ibmq_qasm_simulator should have coupling_map=None

Information

Qiskit Terra version: master
Python version:
Operating system:

What is the current behavior?
currently:
back = IBMQ.backends('ibmq_qasm_simulator')
back.configuration().coupling_map

gives
AttributeError: 'BackendConfiguration' object has no attribute 'coupling_map'

All simulators should have coupling_map = None
Steps to reproduce the problem
What is the expected behavior?
Suggested solutions

Good catch, this will be fixed in the next day or so. It is outside Terra though.

Yeah I know. But this is the only place to keep track of such things.

Ok this is fixed now.


support different camera FPS

Currently the camera runs with 30FPS. Increasing the FPS would help performance

Changes to improve FPS sent to meta-intel-aero-base https://github.com/intel-aero/meta-intel-aero-base/pull/7


[BUG] gantt column 2 is not display data

i found gantt column 2 is not display data.
use Vue 3
gantt v 2.1.12
**** test by copy and past

is there a solution?


add virtual table component

added a light weight virtual table component that has really smooth scrolling
its based on https://github.com/rintoj/angular2-virtual-scroll

Coverage remained the same at 97.552% when pulling 0d8bce5f95f33debbc4fda37f518aa9bf81e56e2 on kmcs:master into 8ecd9eb5211aa66bb61c91ec69a74b87e60d8af6 on mseemann:master.

hi. thx for your contribution and sorry for the late reponse. I hope i have time next week to review your component.

Coverage decreased (-4.0%) to 93.559% when pulling 1f326cb18f7f439f931f468b939958a6251ab67b on kmcs:master into 183da20968234d810b78aa27376e93c25eb0abf2 on mseemann:master.

Coverage decreased (-1.8%) to 95.77% when pulling dbb69c40b1c4002c5bd3a9c99efdd94720aea1e9 on kmcs:master into 183da20968234d810b78aa27376e93c25eb0abf2 on mseemann:master.

Coverage decreased (-0.1%) to 97.432% when pulling 1e72a45316718486319c3fd1853afffc3fffc25a on kmcs:master into 183da20968234d810b78aa27376e93c25eb0abf2 on mseemann:master.

Coverage decreased (-0.1%) to 97.447% when pulling b341b22f986135390077b8ab6815cf0bab2f6420 on kmcs:master into 183da20968234d810b78aa27376e93c25eb0abf2 on mseemann:master.

Coverage increased (+0.6%) to 97.447% when pulling f1ce915be4c5503e44307b4c471849ef07e7bcdc on kmcs:master into 53ef4f7a760ceff5ad4f827b5f97eb9cf8eb0394 on mseemann:master.

hi, is there something I've forgotten?

yes, to tell me that you are ready:) i will have a look...

Hi, I updated to the latest master and got some build errors. It works after update to webpack 4.x. Please merge.

Now I'm ready :-)


Fixed intermittent failure in ItMiiDynamicUpdatePart1.testMiiUpdateDynamicClusterSize

When the test failed on nightly below, server managed-server4 is upand running but not ready to receive JMS message yet because JNDI [ClusterJmsServer<EMAIL_ADDRESS>is not fully ready. That caused the JMS message sent to it got rejected and the test failed

https://build.weblogick8s.org:8443/job/wko34-kind-nightly-parallel/187/artifact/logdir/jenkins-wko34-kind-nightly-parallel-187/wl_k8s_test_results/diagnostics/ItMiiDynamicUpdatePart1/ItMiiDynamicUpdatePart1.out/*view*/
<09-08-2022 13:11:47>  <oracle.weblogic.kubernetes.utils.CommonTestUtils lambda$runClientInsidePod$22> <java returned EXIT value 255>
<09-08-2022 13:11:47>  <oracle.weblogic.kubernetes.utils.CommonTestUtils$1 conditionEvaluated> <Waiting for: Wait for t3 JMS Client to access WLS (elapsed time 281,900 ms, remaining time 18,100 ms)>
<09-08-2022 13:12:00>  <oracle.weblogic.kubernetes.utils.CommonTestUtils lambda$runClientInsidePod$22> <java returned ExecResult: exitValue = 255, stdout = WebLogic Cluster Context URL --> t3://mii-dynamic-update1-cluster-cluster-1:8001
Found JMS connection from server managed-server1
Found JMS connection from server managed-server2
Found JMS connection from server managed-server3
Found JMS connection from server managed-server4
Got anonymous JNDI Context
Member JNDI [ClusterJmsServer<EMAIL_ADDRESS>Member@managed-server1 got [75] messages
Member JNDI [ClusterJmsServer<EMAIL_ADDRESS>Member@managed-server2 got [75] messages
Member JNDI [ClusterJmsServer<EMAIL_ADDRESS>Member@managed-server3 got [75] messages
Member JNDI [ClusterJmsServer<EMAIL_ADDRESS>Unknown Exception javax.naming.NameNotFoundException: While trying to lookup 'ClusterJmsServer<EMAIL_ADDRESS>didn't find subcontext 'ClusterJmsServer@managed-server4@jms'. Resolved ''; remaining name 'ClusterJmsServer@managed-server4@jms/DistributedQueue', stderr = Unable to use a TTY - input is not a terminal or the right kind of file
command terminated with exit code 255>

When the test passed locally, we can see that  JNDI [ClusterJmsServer<EMAIL_ADDRESS>is ready and JMS message evenly distributed and test passed:

 <oracle.weblogic.kubernetes.utils.CommonTestUtils lambda$runClientInsidePod$12> <java returned ExecResult: exitValue = 0, stdout = WebLogic Cluster Context URL --> t3://mii-dynamic-update1-cluster-cluster-1:8001
Found JMS connection from server managed-server1
Found JMS connection from server managed-server2
Found JMS connection from server managed-server3
Found JMS connection from server managed-server4
Got anonymous JNDI Context
Member JNDI [ClusterJmsServer<EMAIL_ADDRESS>Member@managed-server1 got [75] messages
Member JNDI [ClusterJmsServer<EMAIL_ADDRESS>Member@managed-server2 got [75] messages
Member JNDI [ClusterJmsServer<EMAIL_ADDRESS>Member@managed-server3 got [75] messages
Member JNDI [ClusterJmsServer<EMAIL_ADDRESS>Member@managed-server4 got [75] messages
SUCCESS: The messages are evenly distributed, stderr = Unable to use a TTY - input is not a terminal or the right kind of file>
 <oracle.weblogic.kubernetes.utils.CommonTestUtils lambda$runClientInsidePod$12> <java returned EXIT value 0>
Solution to fix the issue is to change waiting time from withStandardRetryPolicy to withLongRetryPolicy

Jenkins jobs:

https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/13092
https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/13093
https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/13094
https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/13095
https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/13104
https://build.weblogick8s.org:8443/job/weblogic-kubernetes-operator-kind-new/13106

When the test failed on nightly below, server managed-server4 is upand running but not ready to receive JMS message yet because JNDI [ClusterJmsServer<EMAIL_ADDRESS>is not fully ready. That caused the JMS message sent to it got rejected and the test failed

@hzhao-github, I don't understand this comment. What do you mean that the server is "up and running but not ready"? Is the managed server ready but somehow the JMS server isn't ready to receive messages?

yes

When the test failed on nightly below, server managed-server4 is upand running but not ready to receive JMS message yet because JNDI [ClusterJmsServer<EMAIL_ADDRESS>is not fully ready. That caused the JMS message sent to it got rejected and the test failed

@hzhao-github, I don't understand this comment. What do you mean that the server is "up and running but not ready"? Is the managed server ready but somehow the JMS server isn't ready to receive messages?

@tbarnes-us, @hzhao-github responded that "yes" she is observing that the managed server becomes ready but that the JMS server isn't yet ready to receive messages. Is there anything we could do to ensure that the server doesn't reach RUNNING if it's not actually ready to receive messages?


Make Google TTS secure

Description:
I noticed that my TTS queries were showing up in the log on my router, so I was curious if there was a way to make it secure. A quick search showed people using https instead of http (https://stackoverflow.com/questions/32053442/google-translate-tts-api-blocked), so I figure that should work. I am using hass.io, so I'm not actually sure how to test this, but its a pretty simple change.
Related issue (if applicable): Related to #5064. I'm not sure if this is actually the same thing. I think that is talking about having home assistant behind SSL. This is talking to Google via SSL.
Checklist:
If user exposed functionality or configuration variables are added/changed:

[ ] Documentation added/updated in home-assistant.github.io

If the code communicates with devices, web services, or third-party tools:

[ ] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[ ] New dependencies have been added to the REQUIREMENTS variable (example).
[ ] New dependencies are only imported inside functions that use them (example).
[ ] New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[ ] New files were added to .coveragerc.

If the code does not interact with devices:

[ ] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[ ] Tests have been added to verify that the new code works.

Hi @PRabahy,
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!

Sorry if I did this MR wrong. I'm new to home assistant, and this is my first time looking at the actual code.

Did you test this locally?

No, I have not tested it locally. I'm running hass.io, and didn't see any easy way to try changing the actual code. I did a quick search for ways to do that, and look around inside HASS Configurator for these files, but couldn't find them

https://home-assistant.io/developers/component_loading/


Benchmark list page

Benchmark Result Summary refactored into Benchmark Run which contains a list of all the results and a summary. These two objects are stored separately as only the summary is necessary to generate the list. The summaries are used to generate a list and plotly graph which is synced to index.html by the runner script. Benchmark specific templates are moved to the benchmarks module.
There are two things you may want to test locally:

All the benchmarks now generate a summary. For instance if you run:

./benchmarks/exercism_practice.py --max_iterations 1 --language python --max_benchmarks 1

You should see the familiar results.json that contains full transcript information as well as summary/index.json which only contains summary information about cost, pass, etc.

That you can build the list page. If you have a directory with some summaries in it you can built the list page. After running the previous command for instance you can run:

./benchmarks/benchmark_result_list.py benchmarks/benchmark_repos/exercism-python/summary index.html

to build a summary list with just one run.
You can see a page built with all our runs at benchmarks.mentat.ai
With this PR there are two pieces of tech debt:

Instead of syncing our results to json in an s3 bucket we should setup a database. It shouldn't be too hard to migrate the jsons later when we get around to this.
The run and upload benchmark script is getting more complicated and should probably be converted to a python script.

Miscellaneous other things in the PR:

Date, git branch and git commit of mentat are all added to a benchmark's metadata.
I added the script I used to backfill the metadata and split apart previously generated runs into run+summary.

Pull Request Checklist

[x] Documentation has been updated, or this change doesn't require that

default to passed instead of cost? also not sure what's going on with those symbols on the right

default to passed instead of cost? also not sure what's going on with those symbols on the right

Both fixed. Thanks!


Error compressing files.

Hello, i'm trying to send a file using the command portal --verbose send E01.mp4, however it fails almost instantly with the only output being "Error compressing files."
What would be a good way to diagnose what's causing the issue? as even verbose mode doesn't say anything in particular

That is strange, I think in that case errors during the compression stage do not propagate to stderr. If you are willing to share this file with us (if it's not private), I will have a look at it.


boardd: fix context leak in init_usb_ctx

This was the actual cause of the leak. libusb_init got a libusb_context ** that was pointing to the argument of the init_usb_ctx not the context that the caller passed in.
Introduced in https://github.com/commaai/openpilot/commit/603ad435bef2a1db28b294b36768fda5f53fc814
Fixes https://github.com/commaai/openpilot/issues/22423

This bug is really hard to find if you don’t look at it carefully :+1::+1::+1: I have read the code many times but never noticed this problem


Compile MaterializeCSS files

Description
I cannot reproduce the compilation according described on the Wiki running grunt monitor.
Repro Steps
Run grunt monitor in the MaterializeCSS folder. It returns: Fatal error: Unable to find Gruntfile.

I guess you downloaded the folder from the materializecss.com website? Yeah, thats not possible. To be able to compile files, you need to clone or download the repo from github. Then it will work

@tomscholz I used npm to install it. Is it possible?

Can you check if there is the file Gruntfile.js in the directory where you run the command?

There isn't, so, I believe that is really impossible to run grunt when download it using npm. Thanks @tomscholz


Investigate how to unify package publishing and versioning

It might be convenient to version and publish all the packages in tandem, to ensure that they are compatible with each other and that the published versions mimic the state of the development environment.

https://github.com/changesets/changesets
https://turborepo.org/
https://lerna.js.org/

Fixed by #191 .


Added support to post_build.ps1 and runcitests.cmd to have extra test params.

The build scripts pass a new parameter to post_build.ps1 (-testparams)
which post_build.ps1 on release/1.4 does not know about. This causes post_build.ps1 to
throw an error.
Fixed by porting the change from master. Cherry-picked 803abd5a30.

@dilijev can you take a look ?

Yes, this should get pumped to every branch we currently work with. Thanks for catching this. LGTM :shipit:


Implement control plane template

This should be part of #62
The main focus of this PR is to enable Cluster Classes.
The KThreesControlPlaneTemplateSpec was introduced for this very reason.
Changes to the existing KThreesControlPlaneMachineTemplate are also required for the correct reconciliation of the Cluster topology.
Still in draft as I'm testing if everything still works.
I am not sure whether this will introduce backward compatibility, probably yes since the API changed, however I am not sure how else this could be implemented differently.

As you mention this change really needs to be done as part of a API version bump to v1beta2 as the change is API breaking.

@zawachte - i'll start work on a PR to bump the API version so that we can start work on v1beta1 (will also create the 0.1 release branch)

PR is ready for review.
I did implement the new v1beta2 version, added conversion and the webhooks (for conversion, validation is empty).
I bumped the GOLANGCI_LINT_VER to solve an issue with the depguard linter I'm having. Didn't really help but the bump should not harm.
Same for CONTROLLER_GEN_VER.
Also note that I tweaked the generated manifests. For example when generating the bootstrap manifests, we now only include the bootstrap subfolder: paths=./bootstrap/...
The reason for this is to avoid generating overlapping manifests. This is fine in the current version, but it was conflicting with the creation of the webhooks (generating the same webhook for the same resource on both controllers).
I also tested this patch locally by:

Provisioning a v1beta1 k3s cluster from this cluster template and the resources are correctly converted to v1beta2 as expected.

Provisioning a v1beta2 k3s cluster from a cluster class and it works as expected thanks to the addition of the KThreesControlPlaneTemplate as required by CAPI.

Thanks @anmazzotti . I will start reviewing.

It would have been easier for reviewers if the introduction of the v1beta2 api version was in a separate PR to the introduction of the control plane template.

I did not see this PR coming, sorry for that and thank you for the review.
I'll also squash as you recommended.

@anmazzotti what is the status here? Are you waiting for my review?

@anmazzotti what is the status here? Are you waiting for my review?

Affirmative.

This is looking good @anmazzotti. Great work.
Just a couple of things:
* Could you confirm what manual testing you have done with the new control plane template?

* Could you squash the commits so they tell a story?

Thank you.
Yes I did manual test using the Elemental provider and it works.
I will also start working on deprecating the DisableExternalCloudProvider flag as soon as this is merged and I will do a full round of testing for that as well, so we are confident before the next release.
I'll squash two commits to highlight the new version being added and the KThreesControlPlaneTemplate addition too. I think those two are the most important features for this PR, rest is scaffolding.

I'll squash two commits to highlight the new version being added and the KThreesControlPlaneTemplate addition too. I think those two are the most important features for this PR, rest is scaffolding.

Sounds good to me :+1:

I see there are thousands of new files in vendor folder, do we need check in this folder?

@anmazzotti  would you please resolve conflicts?

@anmazzotti would you mind adding a e2e test case to cover clusterclass?


Persist volume across videos

The volume preference is preserved during the same session.
#574

Which tag do you refer to? As for the cast devices, do you have any idea how can I mock one to do that part as well?

setVolume holds the value to be set in the  DOM element. thats why is set and cleared in the UI.

@grunjol it should be better now. In any case, only for the local renderer.

Thanks for the PR, @furstenheim!
This works for now, but it would be better if this was a permanent setting and if it was rendered directly into the volume control html as a default starting volume.
Thanks for taking a stab at this!

Rebased and merged your commits onto master. GitHub is showing this PR as not merged, but it really is.


CAMEL-12741: The copy method on Message should by default set the exc…

…hange on the copied message to the same instance as from the source. If the copied message is re-attached to another exchange it will reset the exchange anyway.

@zregvart here is a extended PR for this problem, you are welcome to take a look


Single-dimension std and var.

Implementation of std and var across a single dimension. The computation
is the same as in Torch. The reduction code is similar to the one used
for sum, max etc., but it's not restricted to <= 4 dimensions.

awesome! fixes #91 fixes one of the case in #70


Mod_security not logging, even at debug 9 and Audit on

I am running a forum, based on flarum. When I turn on mod security, it seems to be blocking /api/, which in return stops me from posting in the forum. When I try to check logs for this, all appear to be blank. My Mod sec conf is as follows.
https://pastebin.com/RxptAPpA
Issue in flarum -- https://github.com/flarum/core/issues/2994

Hi @Rejected-Peice ,
Do you ever see output in the debug log?  For example, if you send a request to something other than this particular use case?
If not, does /var/log/mod_sec_debug.log get created when you start ngnix with ModSecurity?
Are you getting output in ModSecurity's audit log?

A file got created, but nothing gets written to it.
PS - I currently removed mod-security cause it was causing way too many issues.

I'm still a little unclear on what your overall situation is.  Were all requests to that nginx+ModSecurity deployment resulting in lack of writing to ModSecurity debug log?  Or just a subset of requests (attempts to post to a particular api)?  Based on the thread at the other location, it sounds like the latter.
Also, in the flarum thread, it sounds like you are seeing the following in the nginx log when you hit the use case you are reporting about.
2021/07/31 16:05:06 [error] 22044#22044: *6503 [client [IP REMOVED]] ModSecurity: Access denied with code 403 (phase 2). Matched "Operator `Ge' with parameter `5' against variable `TX:ANOMALY_SCORE' (Value: `5' ) [file "/etc/nginx/modsec/coreruleset-3.3.0/rules/REQUEST-949-BLOCKING-EVALUATION.conf"] [line "80"] [id "949110"] [rev ""] [msg "Inbound Anomaly Score Exceeded (Total Score: 5)"] [data ""] [severity "2"] [ver "OWASP_CRS/3.3.0"] [maturity "0"] [accuracy "0"] [tag "application-multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-generic"] [hostname "[IP REMOVED]"] [uri "/api/discussions"] [unique_id "1627740306"] [ref ""], client: [IP REMOVED], server: mydomain.com, request: "POST /api/discussions HTTP/1.1", host: "mydomain.com", referrer: "https://mydomain.com/"

So you are using coreruleset (CRS).
It looks like you have set their rules to use anomaly scoring mode.  You might gain more insight into what is happening by using "Self-contained mode" instead.  Since you are getting output in the nginx log, you should hopefully then see which substantive rule is being triggered rather than the 949110 score-check rule.
Also per your comment elsewhere:
One way is to disable mod_security for /api URI. I tried that, but still failed. I doubt, if I did this correctly, I don't see this documented anywhere.

You can turn off ModSecurity for a particular URI with a phase:1 rule that uses the action 'ctl:ruleEngine=Off'.  Depending on what is happening exactly, this might be too late, in which case the other option is to do it in your nginx configuration with something similar to:
location /uri {
    modsecurity off;
}

Also:  Which version of ModSecurity are you using?  And which version of the ModSecurity-nginx connector?

The site was returning 403 for some crucial URIs. I did do what you said in the last, but no changes.
My issues are:

Mod security blocking /api , I tried making a location block and setting modsec to off, but nothing changed (and yes, I reloaded Nginx)
To investigate this, I went to check logs, to realise that there was nothing being written there.

Presently, I have removed mod security. I will be setting up a test environment and proceeding further with this issue.

After clean reinstall of everything, it finally works!
But for some reason, I had to reboot sometimes for the mod_sec rules to apply (mainly for using location block)

Since it was working as expected after clean reinstall, I'm going to go ahead and close this.


Mac support

Most of the driver is cross-platform, however, some code in:

https://github.com/OSVR/OSVR-Vive/blob/master/DriverLoader.cpp
https://github.com/OSVR/OSVR-Vive/blob/master/FindDriver.cpp

is necessarily platform-specific (paths, details of loading dynamic libraries at runtime) and was only initially implemented for Windows. Valve is shipping SteamVR lighthouse drivers for OS X at this time.
Also, it has come to my attention that while SteamVR has the driver_lighthouse.dylib file in a osx32 directory, it's actually a universal binary, so getPlatformDirname() here https://github.com/OSVR/OSVR-Vive/blob/master/FindDriver.cpp#L78 on Mac should be hard-coded to always append 32 regardless of build bitness. (Why would you append 32 if you're going to make it universal? just leave off the suffix... arg)

Just checking that is this suppose to be fixed by those merges?
I'm getting this when trying to run ViveDisplayExtractor:
libc++abi.dylib: terminating with uncaught exception of type osvr::vive::CouldNotLoadDriverModule: Could not load driver module: dlopen(/Users/zero/Library/Application Support/Steam/steamapps/common/SteamVR/drivers/lighthouse/bin/osx32/driver_lighthouse.dylib, 10): Library not loaded: @loader_path/libaitcamlib.dylib
  Referenced from: /Users/zero/Library/Application Support/Steam/steamapps/common/SteamVR/drivers/lighthouse/bin/osx32/driver_lighthouse.dylib
  Reason: image not found

Running OSX 10.10.5 and I've latest SteamVR installed.

Yes, it should work, but you have to set LD_LIBRARY_PATH or DYLIB_LOADER_PATH or something like that to include the lighthouse driver dir. No working mac here anymore so I can't test, but it's something like that. Documentation contribution on osvr-docs would be greatly appreciated.


chore(demo): Add CTR_REGISTRY_CREDS_NAME to mysql demo container

Allows users to run the demo with a private registry
Signed-off-by: Sotiris Nanopoulos<EMAIL_ADDRESS>
Description:

Testing done:

Affected area:

Functional Area

New Functionality
[ ]

CI System
[ ]

CLI Tool
[ ]

Certificate Management
[ ]

Control Plane
[ ]

Demo
[ ]

Documentation
[ ]

Egress
[ ]

Ingress
[ ]

Install
[ ]

Networking
[ ]

Observability
[ ]

Performance
[ ]

SMI Policy
[ ]

Security
[ ]

Sidecar Injection
[ ]

Tests
[ ]

Upgrade
[ ]

Other
[ ]

Please answer the following questions with yes/no.

Does this change contain code from or inspired by another project?

Did you notify the maintainers and provide attribution?

Is this a breaking change?

cc @allenlsy

Codecov Report

Merging #4186 (b5f619e) into main (045f5bf) will decrease coverage by 0.02%.
The diff coverage is 20.00%.

@@            Coverage Diff             @@
##             main    #4186      +/-   ##
==========================================
- Coverage   69.84%   69.81%   -0.03%
==========================================
  Files         212      212
  Lines       11618    11620       +2
==========================================
- Hits         8115     8113       -2
- Misses       3451     3455       +4
  Partials       52       52

Flag
Coverage Δ

unittests
69.81% <20.00%> (-0.03%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

cmd/osm-controller/osm-controller.go
15.72% <0.00%> (ø)

pkg/reconciler/client.go
0.00% <0.00%> (ø)

cmd/osm-bootstrap/osm-bootstrap.go
42.22% <50.00%> (+0.43%)
:arrow_up:

pkg/crdconversion/crdconversion.go
72.44% <0.00%> (-3.07%)
: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 2f10130...b5f619e. Read the comment docs.

btw I don't have permissions to merge so a maintainer will need to do that.


Refresh Recipe and update to latest version - 6.0.5

Checklist

[x] Used a personal fork of the feedstock to propose changes
[x] Bumped the build number (if the version is unchanged)
[x] Reset the build number to 0 (if the version changed)
[x] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

@conda-forge-admin, please rerender

depends on

https://github.com/conda-forge/python-ipware-feedstock/pull/3
https://github.com/conda-forge/python-ipware-feedstock/pull/4

I merged 7.x. If you still want this one, please create a new PR from the updated main.

I merged 7.x. If you still want this one, please create a new PR from the updated main.

Thank you @swainn - version 7.x is enough for my needs. Regards.


Properly handle GitLab merge request event in RHTAP pipeline

Update deployment task should be skipped in pull request pipeline.
Pipelines as Code has different name of the event for GitHub and GitLab. Take both into account.

Is this documented somewhere or just based on testing?

@chmeliik I haven't seen it in the docs, just what PaC substantiated for {{event_type}} in case of GitLab and merge request.


cocomac: Watch haxor1337.com

cocomac requests the watch of the watch_keyword haxor1337\.com. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

haxor1337\.com has been seen in 2 true positives, 0 false positives, and 0 NAAs.

Approved by Mast in Charcoal HQ


Improve debugging for (go) function developers

Describe your problem
Right now its very hard (or not clearly documented, anyhow) how to debug function generation.
I personally struggled quite a bit getting a simple function working; a large part of that was it was hard to actually debug. The function runtime seems to swallow all stdout/stderr; the best I came up with was writing to stderr then intentionally os.Exit(1) to get it to display.
I also could not find a obvious way to get a valid input so I can run from an IDE debugger.
It would be great to:

Have a flag to always output stderr, or some other way of logging

This may be useful for non-developement too! Think deprecation warnings, like kubectl now gives

Have documentation on how to test functions with a debugger

@mengqiy I see this as one of the biggest friction point during function development. So keep the logging requirement in mind when you are working on Go SDK improvements.


Number 2 icon

why is number 2 get icon pencil after press continue ?
could you make it right?

It means your adapter implementation returns true for isEditable(1). When you can jump back to a previous step the icon becomes an edit-pencil as per Material design spec.


RuntimeError when running run.py for training

When I tried to train a model for ans_depth via the command "python -u run.py --exp-config configs/model_configs/ans_depth/ppo_exploration.yaml --run-type train", the following error occurs ("RuntimeError: inverse_cuda: For batch 0: U(360710144,360710144) is zero, singular U."). I have no idea on how the error is generated. Is it caused by incorrect installed environments, or other things? I followed the installation guidance, and checked that habitat_sim and habitat did work well. Hope someone to help me figure out the reason or provide solution.
2021-08-16 11:24:35,760 local_agent number of parameters: 489697
2021-08-16 11:24:35,761 global_agent number of parameters: 60739
=================== Mapper rollouts ======================
key: action_at_t_1                           , memory:     0.0000 GB
key: depth_at_t                              , memory:     0.0655 GB
key: depth_at_t_1                            , memory:     0.0655 GB
key: ego_map_gt_anticipated_at_t             , memory:     0.0338 GB
key: ego_map_gt_at_t                         , memory:     0.0338 GB
key: ego_map_gt_at_t_1                       , memory:     0.0338 GB
key: pose_at_t                               , memory:     0.0000 GB
key: pose_at_t_1                             , memory:     0.0000 GB
key: pose_gt_at_t                            , memory:     0.0000 GB
key: pose_gt_at_t_1                          , memory:     0.0000 GB
key: pose_hat_at_t_1                         , memory:     0.0000 GB
key: rgb_at_t                                , memory:     0.1966 GB
key: rgb_at_t_1                              , memory:     0.1966 GB
Total memory:     0.6258 GB
================== Local policy rollouts =====================
key: goal_at_t                               , memory:     0.0000 GB
key: rgb_at_t                                , memory:     0.0613 GB
key: t                                       , memory:     0.0000 GB
Total memory:     0.0613 GB
================== Global policy rollouts ====================
key: map_at_t                                , memory:     3.7236 GB
key: pose_in_map_at_t                        , memory:     0.0000 GB
Total memory:     3.7236 GB
Traceback (most recent call last):
File "run.py", line 70, in
main()
File "run.py", line 39, in main
run_exp(**vars(args))
File "run.py", line 64, in run_exp
trainer.train()
File "OccupancyAnticipation/occant_baselines/rl/occant_exp_trainer.py", line 1079, in train
batch["pose_gt"],
File "OccupancyAnticipation/occant_baselines/rl/policy.py", line 481, in ext_register_map
return self._register_map(m, p, x)
File "OccupancyAnticipation/occant_baselines/rl/policy.py", line 423, in _register_map
p_reg = self._spatial_transform(p_pad, x)
File "OccupancyAnticipation/occant_baselines/rl/policy.py", line 394, in _spatial_transform
p_trans = spatial_transform_map(p, dx_map, invert=invert)
File "OccupancyAnticipation/occant_utils/common.py", line 60, in spatial_transform_map
Ainv = torch.inverse(A)
RuntimeError: inverse_cuda: For batch 0: U(360710144,360710144) is zero, singular U.
Exception ignored in: <function VectorEnv.del at 0x7f0836dde680>
Traceback (most recent call last):
File "OccupancyAnticipation/environments/habitat/habitat-api/habitat/core/vector_env.py", line 534, in del
self.close()
File "OccupancyAnticipation/environments/habitat/habitat-api/habitat/core/vector_env.py", line 416, in close
write_fn((CLOSE_COMMAND, None))
File "/home/agent/anaconda3/envs/ocan/lib/python3.7/multiprocessing/connection.py", line 206, in send
self._send_bytes(_ForkingPickler.dumps(obj))
File "/home/agent/anaconda3/envs/ocan/lib/python3.7/multiprocessing/connection.py", line 404, in _send_bytes
self._send(header + buf)
File "/home/agent/anaconda3/envs/ocan/lib/python3.7/multiprocessing/connection.py", line 368, in _send
n = write(self._handle, buf)
BrokenPipeError: [Errno 32] Broken pipe

Sorry for asking, I've found the reason. It is caused by unmatched versions between cuda and pytorch.


ayuda para la traduccion de summer clover al español

quiero traducir summer clover a español pero no puedo

Read the readme carefully.

where is??

where is??

You're not a child, right?
because this tool is not for children and no one will spoon-feed you
If you haven't seen it yet, here's the guide:
https://github.com/bbepis/XUnity.AutoTranslator/blob/master/README.md
there, the authors explain everything about how to connect the translator and what is needed for this
From what I see in your screenshot, the option you are using works with a 50% chance. You need either
Bepinex loader
or
Melon Loader
Read the instructions!

lo llegaste a solucionar?

disculpa pudiste encontrar una solucion?

Well I tried everything and it's not working.
I tried with Reipatcher, BepInEx and MelonLoader.
With Reipatcher, the tools doesn't create the translation files.
With BepInEx, the tool don't create the config files after the first run.
But in this case I assume this game use IL2CPP, so I used the BepInEx 6 in the bleeding edge page. When I use this version, the game doesn't even start (if I delete the BepInEx files, it works again). I tried several builds, including the 704, which the readme say is the more recent working with the current autotraslation tool (5.4.0). Neither of this works.
With MelonLoader, the problem is the same as BepInEx, the game doesn't even start. I also tried several builds, auto and manual.
So, I run out of ideas.
All I wrote is only for info.
The problem is not the autoranslation tools, but MelonLoader or BepInEx, which are not compatible at this moment with the game.

The game is clearly using mono not il2cpp, you probably messed up the install by using wrong patchers. Reinstall the game and use the correct version of BepInEx5 for the bitness of the game, together with BepInEx5 AutoTranslator.

I already tried the mono version. The il2cpp was just a last attempt.
I used a clean install with every version.
With BepInEx, the tool don't create the config files after the first run.

Probably you picked the wrong bitness version then.

I picked the 64bits version. Just in case I tried with de 32bits too, with the same problem.
And Melon Loader auto install also detect the game as an 64 bits application.
And also I tried all of this in a fresh install windows environment in another PC just in case.

pudieron traducirlo ?? ayudaaaaa

Se pudo?


Failed to redeploy the resource after updating the matching rule

Describe the bug

Steps to reproduce

New a resource definition as below:

Using the definition to create a resource.

Update the definition as below:

Update the project label, make it match the rule and redeploy the resource.

Result

Failed to redeploy the resource after updating the matching rule.

https://github.com/seal-io/walrus/assets/26084756/33e2592e-36e7-4100-9d02-2d61aa98fc1f
Expected behavior

Environment

Walrus version: v0.5.0-rc3

Additional context
Add any other context about the problem here.

Haven't reproduced it, need more info.

Steps to reproduce

Create two resource definitions with the same type and one identical rule.

Create a resource that meets the above conditions. The resource matches the first created resource definition (my-test).

Modify the rule of the resource definition created later  (my-test-2).

Modify the resource created in step 2 to match the rules of "my-test-2".

Redeploy the resource.

Matched definition changes and the redeploy follows validation of the new schema. It should be by design.


How to use http query params with oas tools?

Here goes my open API 3.0 specs
"/templates": {
      "get": {
        "x-swagger-router-controller": "templates",
        "x-swagger-router-handle-subpaths": false,
        "operationId": "getTemplates",
        "tags": ["Templates"],
        "description": "API to get list of templates",
        "parameters": [
          {
            "name": "filterUseCases",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "onboarding",
                  "offboarding"
                ]
              }
            }
          }
        ]
}

I used the following way to send the query params to send the array,

I always got "array expected but found string" or "convertArrayValue failed" or "cannot read map of undefined" error
Could anyone help with this?
Cheers.

Hello, which version of OAS Tools are you using? I could not reproduce your situation, it works fine for me. I'm using OAS Tools v3.0.1 since full support for parameter serialization was implemented in v3.0.0.
I copied your parameters' spec into a development server's endpoint and sent a request just as you did:
GET http://localhost:8080/api/v1/test-dev-server?filterUseCases=onboarding&filterUseCases=offboarding
# Spec
/test-dev-server:
    get:
      x-router-controller: devServerController
      operationId: getRequest
      "parameters": [
          {
            "name": "filterUseCases",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "onboarding",
                  "offboarding"
                ]
              }
            }
          }
        ]
      responses:
        200:
          description: test
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/placeholderModel'

Then I printed to console res.locals.oas object and got:
{
  params: { filterUseCases: [ 'onboarding', 'offboarding' ] },
  body: {}
}

Also, please consider using OAS Tools' discussions for this kind of issues.

Thanks, @alesancor1 , I was using version 2.2.2 when I posted this question

@alesancor1 just migrate this question to oas-tools discussion


Update to 10.1.21; other Fedora upstream changes

Let's wait until Ocata is GA to update mariadb in RDO :)

@dciabrin but we do want to push 10.1.20 update we already have in pending repo?
Tests with Puppet and Packstack  passed https://ci.centos.org/view/rdo/view/weirdo/job/weirdo-generic-wrapper/25/

So I've checked what is in 10.1.21 and unfortunately it breaks the galera resource agent again, because in commit 8fcdd6b0 mysqld_safe hardened the permission needed when writing to log files. I'll open a pull request to fix that, but we have to wait until resource agent is fixed and pushed to centos.
@apevec In 10.1.20 logging was unchanged, so it's safe to switch. We don't rely on any immediate feature though, so I think we could wait a few weeks until Ocata is GA. @zzzeek, any opinion?

I don't have a problem delaying.    I'm mostly concerned with having to remember to keep producing these PRs every time fedora updates.

so my tl;dr would be

update mariadb in RDO to 10.1.20 before Ocata GA
continue updating to later version post-GA, keeping it in sync with Fedora (eventually merge back to Fedora all packaging diff)

So I've tried to build 10.1.21 for rhel/centos, and it looks like the specfile uses new tokens "Suggests" and "Recommends" which are not yet recognized in rhel.
Moreover, this version introduces a new executable mysqld_safe_helper which apparently doesn't have associated SELinux rules yet (I get all sorts of denials), so we need to hold this PR a bit longer until this is sorted out. I'll opened a bz in Fedora shortly.

@dciabrin @zzzeek should we proceed with this rebase in RDO ? What is Fedora bz for the issues mentioned above?

ping again @dciabrin @zzzeek should we proceed with this rebase in RDO ? What is Fedora bz for the issues mentioned above?
Latest in Fedora is in the meantime mariadb-10.2.11 https://koji.fedoraproject.org/koji/buildinfo?buildID=1008529 - let's work on that for Queens?

this is now obsolete, mariadb was updated to 10.3.x