[BUG] Properties are randomly overwritten/empty when moving between environments.

Release version
APIOps v6 (v6.0.1 and v<IP_ADDRESS>)
Describe the bug
The "Description" and "Web Service Url" properties of APIs are sometimes incorrectly overwritten/empty when moving between environments.
The environment I tested in consists of 3 APIM instances, Test, PreProd and Prod. What may differ a little from the standard config is that the 3 APIM instances are each in their own subscription.
Since all other properties seem to work, I don't think that should be the cause.
The API's is imported WSDL services with no problem and have all properties correct in APIM test-Environment after the import.
When moving APIs (about 60 pcs) from Test to PreProd, sometimes the properties is overwritten with incorrect values for some APIs. It can be overwritten in both Test and PreProd.
There may be different APIs that are overwritten at different times.
Property "Description" becomes empty, Property "Web Service Url" gets the value for APIM (base url).
This seems to happen a bit randomly, sometimes it works sometimes it doesn't.
Never seen the problem with other properties.
It seems to appear at the Publish step and that it write wrong values to APIM Test or/and APIM Preprod.
I normally use "publish-artifacts-in-last-commit", but I see that it also could appear when using "Publish-All-Artifact-in-repo".
Also tested version 5 of APIOps but there I don't experience the same problem.
Expected behavior
That the properties are the same as those in the repo and are not overwritten.
Actual behavior
See description
Reproduction Steps
See description. Hard to make a reproduction step. Properties are overwritten randomly at the publish step (I guess)

Please check open/closed issues as this topic has been discussed before.

@psvn - I would suggest enabling trace logging. It will show the contents of the API calls to update your WSDL APIs. If your properties get overwritten unexpectedly, you can go back to the logs and see what was in the API calls to update them.

@psvn
Could be related to my issue: #670


New Id type for better type safeguard. agrenst using wrong Id to call a function

Current PR is an example version if the maintainer wants the change I will continue with this PR
What does it do?
Adds a ID type currently with only 2 valid IDs

Group
Rank
This causes the Id value not to be usable in anyting what expect a Id

I call into on whatever the function gets so you can give it a u64 and it will auto convert it to a Id
Why is it needed?
To make the api better.
Reason to say no to this.
This will add extra complexity to the codebase the question in the end is the extra complexity worth it for the added saveguard?
This is a breaking chance since we change the input and output types.

Thanks for the PR. I'd like to investigate this approach some more another time but for now I'm going to close this.


OSP Invite - For managed IDP it got failed with error :clientId saidp** not found on shared idp

Current Behavior
As an OSP user if you send the invite from Managed IDP than process worker got failed at activation process because code tries to set the theme in shared realm which don't exist.
Expected Behavior
It should not failed during activation as Managed Idp dont have a shared realm
Steps To Reproduce

Login to portal
Create managed IDP (Please use any other IDP than shared realm)
Invite user
Fill all the details
Now check process worker logs or Application checklist table for the error : clientId saidp** not found on shared idp

Hi @jjeroch , I discussed this issue with @Phil91  already.
Can you please check if i am missing anything.
I will raise PR to fix this .


Migrate to remix and update the code style

Add eslint and improve the code quality.

Will migrate and update after react router v7 release


Appstudio update test-component-pac-ctkb

Pipelines as Code configuration proposal

Pipelines as Code CI/test-component-pac-ctkb-on-pull-request has successfully validated your commit.

StatusDurationName

✅ Succeeded
9 seconds
init

✅ Succeeded
13 seconds
clone-repository

✅ Succeeded
23 seconds
build-container

✅ Succeeded
25 seconds
deprecated-base-image-check

✅ Succeeded
25 seconds
inspect-image

✅ Succeeded
8 seconds
clair-scan

✅ Succeeded
50 seconds
clamav-scan

✅ Succeeded
9 seconds
sbom-json-check

✅ Succeeded
8 seconds
optional-label-check

✅ Succeeded
9 seconds
label-check

✅ Succeeded
5 seconds
show-sbom

✅ Succeeded
8 seconds
show-summary

Pipelines as Code CI/test-component-pac-ctkb-on-pull-request has successfully validated your commit.

StatusDurationName

✅ Succeeded
7 seconds
init

✅ Succeeded
13 seconds
clone-repository

✅ Succeeded
58 seconds
build-container

✅ Succeeded
14 seconds
inspect-image

✅ Succeeded
12 seconds
deprecated-base-image-check

✅ Succeeded
14 seconds
clair-scan

✅ Succeeded
10 seconds
sbom-json-check

✅ Succeeded
42 seconds
clamav-scan

✅ Succeeded
11 seconds
optional-label-check

✅ Succeeded
10 seconds
label-check

✅ Succeeded
6 seconds
show-sbom

✅ Succeeded
8 seconds
show-summary


How to make the control display by default

RT

Good point. I will work on it in a few hours.

Hi @shingohu,

Now buffering indicator is always visible.
I have added a new property called visibleOnMount to keep controls visible initially:

It is available for both MaterialVideoControls & MaterialDesktopVideoControls.
MaterialVideoControlsTheme(
  normal: const MaterialVideoControlsThemeData(
    visibleOnMount: true,
  ),
  fullscreen: const MaterialVideoControlsThemeData(
    visibleOnMount: true,
  ),
  child: MaterialDesktopVideoControlsTheme(
    normal: const MaterialDesktopVideoControlsThemeData(
      visibleOnMount: true,
    ),
    fullscreen: const MaterialDesktopVideoControlsThemeData(
      visibleOnMount: true,
    ),
    child: Video(
      controller: controller,
    ),
  ),
);

Refer to "Installation" section of the README for updating.

Hi,
I am using mediakit to play live video stream from rtsp url, it works fine.
Since this is a live stream I don't need the progress bar,... and I'm setting it up like this:
child: Video(                       controller: _videoPlayerController,                       controls: NoVideoControls,                       fit: BoxFit.fill,                     ),
But with this setting CircularProgressIndicator will not show. Is there a setting that allows me to show it only?

Please read the README, it has a "custom controls" section.
You can still use the existing event  streams & a Stack widget none the less. 🤷♂

Thanks,
I can do that by Custom Control:
controls: (state){
return Center(child: Visibility(
visible: _videoPlayer.state.buffering,
child: const CircularProgressIndicator()));
},


Resolve delete-ltp-and-dependents forwarding is not being sent when a…

…pplication is disregarded.
Fixes #290

Reviewer is @PrathibaJee


Help

Please all the folders and files make my brain hurt, simpler the setup is the better the rat is. I can help you customize your readme. make it look better and other things.
bcuz is looks 🤮 rn:

message on discord and yeah i wanted to do the file thing with only one bat yee gonna do it soon


private package renamed

Changed name of private package for some modules

This change is

Coverage remained the same at 60.59% when pulling 412cfbfaa70517dbec30574c40e71abf6a34e662 on private-packages into 23705b1a90d01cb81fa517f6f65799144f80b134 on master.

Will redo this based on conflicts in package names


Add migration to autofix corrupted users.org_id entrys in db

No idea why the corrupt entrys did exist ... we might should dig into the reason.
anyway it only happens on very old accounts and I did the migrations mannually at codeberg and now at kithara.
so we clearly should run it to catch potential hick-ups ...

might be an regression of #2126

Perhaps, related #3328

symptoms: you get just weard behaviour and some functions 'randomly' dont work ..
deleting all of that ward user related stuff (in db) and recreate the user by log in newly do fix it.

it only happens on very old accounts

Define "very old" - if it happened on v1 -> v2, I'd not use that adjective here.
Also: #3319 -> can likely be closed then. Great that there is a fix now for this, a bit sad that it took almost a year. However I am not sure whether you discovered this "just recently" or were actually aware of it the whole time but it simply wasn't important enough (?).

anyway it only happens on very old accounts and I did the migrations mannually at codeberg and now at kithara.

Hmm, just for the protocol, I did 20-30 manual corrections at CB throughout this time and was also solely commenting to user requests. Not sure which one you're referring to specifically but unless you did some in the recent days, this sounds a bit unfortunate.

but unless you did some in the recent days,

On monday to be exact

-> #4327


Documentation Redesign & Rewrite

Starts addressing #255 for Hacktoberfest

Modified theme to echo the Dictu brand.
Rewrote homepage, getting started, and variables pages for clarity and grammar.

For the first change, I added a copy of Just the Docs, which was necessary to run the Jekyll site locally and customize it. However, it might be possible to customize a remote theme so I'll look into that for next time. I'm planning on working my way through the pages in their order in the sidebar in the future.
I also added a sample program to the homepage. What really stood out to me was the ease of HTTP requests and JSON within Dictu, so I decided to feature that. Let me know if there's a different program you'd rather feature. In the process of rewriting, I also changed the markdown code blocks to C# formatting as they seem a bit more complete than JavaScript formatting, but they're both close.
Lastly, I'm not sure which branch GitHub Pages pulls the documentation from, so this might have to merge into another branch.

This is awesome, really appreciate all the work you've done for this!


Adding resources and running ship update with a kustomize step fails to add new resources to the kustomization.yaml

Expected behavior
Newly added resources will get added to the kustomization.yaml file when added to the ship app after running ship update.
Actual behavior
Newly added resources do not get added to the kustomization.yaml file when added to the ship app after running ship update.
Information

Ship version: 0.49.0
Docker version: 18.09.5
Command line run: ship init replicated.app...

Steps to reproduce the behavior

create ship.yaml

assets:
  v1:
  - inline:
      contents: |
        apiVersion: apps/v1
        kind: Deployment
        metadata:
          name: redis
          labels:
            component: redis
        spec:
          replicas: 1
          selector:
            matchLabels:
              component: redis
          template:
            metadata:
              labels:
                component: redis
            spec:
              containers:
                - name: redis
                  image: redis
      dest: base/redis-deployment.yaml
      mode: 0644
config:
  v1: []
lifecycle:
  v1:
    - config:
        invalidates: ["render"]
    - render:
        requires: ["config"]
        root: "."
    - kustomize:
        requires: ["render"]
        base: ./base
        overlay: overlays/ship
        dest: rendered.yaml

ship init --headless ship.yaml
edit ship.yaml add a second k8s yaml file

assets:
  v1:
  - inline:
      contents: |
        apiVersion: apps/v1
        kind: Deployment
        metadata:
          name: redis
          labels:
            component: redis
        spec:
          replicas: 1
          selector:
            matchLabels:
              component: redis
          template:
            metadata:
              labels:
                component: redis
            spec:
              containers:
                - name: redis
                  image: redis
      dest: base/redis-deployment.yaml
      mode: 0644
  - inline:
      contents: |
        apiVersion: apps/v1
        kind: Deployment
        metadata:
          name: redis2
          labels:
            component: redis2
        spec:
          replicas: 1
          selector:
            matchLabels:
              component: redis2
          template:
            metadata:
              labels:
                component: redis2
            spec:
              containers:
                - name: redis2
                  image: redis
      dest: base/redis2-deployment.yaml
      mode: 0644
config:
  v1: []
lifecycle:
  v1:
    - config:
        invalidates: ["render"]
    - render:
        requires: ["config"]
        root: "."
    - kustomize:
        requires: ["render"]
        base: ./base
        overlay: overlays/ship
        dest: rendered.yaml

ship update --headless ship.yaml

$ tree
.
├── base
│   ├── kustomization.yaml
│   ├── redis2-deployment.yaml
│   └── redis-deployment.yaml
├── overlays
│   ├── defaults
│   │   ├── chart-patch.json
│   │   ├── heritage-patch.json
│   │   └── kustomization.yaml
│   └── ship
│       └── kustomization.yaml
├── rendered.yaml
└── ship.yml

$ cat base/kustomization.yaml
kind: ""
apiversion: ""
resources:
- redis-deployment.yaml

It feels like we should be removing and recreating the base directory here, to ensure that the kustomization yaml gets regenerated


[EBPF-499] Remove "Verification_time" field from the verifier stats output

What does this PR do?
Don't include in the output the verification time
Motivation
non-deterministic value which doesn't reflect the stats about the target programs, but affecting the diff output of the task.
Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

/merge

/merge


vscode delete ftp file when dragging ftp file onto it and vscode would not open that file.

VSCode Version: 1.13.1
OS Version: Windows 10 (1703)

VS Code will automatically delete ftp file when I drag a ftp file onto VS Code.
Some other text editor like notepad++ does not allow you to drag a ftp file onto it. However, vscode does, it would not open that file but delete it.How shocking, it would ruin my day!
Steps to Reproduce:

Open a ftp with username and password in windows explorer.
Drag a html file on ftp onto vscode.
The ftp file will disappear. And vscode would not open that file.

https://github.com/Microsoft/vscode/issues/25196


List keywords in documentation

It’s useful to list reserved keywords in the documentation, and to include something in the release notes when new reserved keywords are added. This is because when we add new reserved keywords, it becomes impossible to use those keywords as identifiers in queries unless they are quoted. This can break pre-existing queries that use unquoted identifiers.
Most of our reserved keywords are inherited from Calcite, which we can see here: https://calcite.apache.org/docs/reference.html#keywords
We also add a small number of our own, which are here: https://github.com/apache/druid/blob/master/sql/src/main/codegen/config.fmpp
The doc should recommend quoting all identifiers as a good practice for production queries.

I'm wondering if we can add sys.keywords table for all keywords. It will be much easier for people to search and helps the frontend editor highlight keywords.

I'm interested in writing something up for the docs that lists all the served keywords, where in the docs would that be best placed? Design?


test: RuntimePolicies: Fix flake when validating logs

For the first test executed as part of RuntimePolicies, the validation of logs may include logs from the BeforeAll block's execution. Given we restart Cilium in that block, it may lead to JoinEP messages in logs if Cilium was stopped while endpoints were being regenerated.
An example of such a flake is visible at Cilium-PR-Runtime-4.9#3207. That test failed because JoinEP messages were found in logs. Using timestamps from test-output.log, we can check that the validation of logs included the BeforeAll block:
18:58:10 STEP: Running BeforeAll block for EntireTestsuite RuntimePolicies
[...]
19:03:27 STEP: Running JustAfterEach block for EntireTestsuite RuntimePolicies
time="2021-01-05T19:03:27Z" level=debug msg="running command: sudo journalctl -au cilium --since '316.7919274 seconds ago'"

This pull request changes our validation of logs in RuntimePolicies to ensure we only validate logs that correspond to the current test, excluding BeforeAll/BeforeEach blocks.
Related: e558100 ("test: RuntimeKVStoreTest: Fix flake when validating logs")

test-runtime

test-runtime

retest-runtime

retest-runtime

What if there is a panic in starting the cilium agent?

If there is a panic in starting the agent, the tests won't be able to pass anyway. They will fail with the usual "beforeAll failures". I think that's preferable given it highlights it's not the test itself failing but its preparation.

What if there is a panic in starting the cilium agent?

If there is a panic in starting the agent, the tests won't be able to pass anyway. They will fail with the usual "beforeAll failures". I think that's preferable given it highlights it's not the test itself failing but its preparation.

But doesn't it defeat the purpose of having ValidateNoErrorsInLogs? Aren't the cilium start-up logs are as critical, if not more when highlighting/validating logs in test runs?
// ValidateNoErrorsInLogs checks in cilium logs since the given duration (By
// default `CurrentGinkgoTestDescription().Duration`) do not contain `panic`,
// `deadlocks` or `segmentation faults` messages . In case of any of these
// messages, it'll mark the test as failed.

The test should be marked as failed when there are any of these messages in the start-up phase too. What do you think?

But doesn't it defeat the purpose of having ValidateNoErrorsInLogs? Aren't the cilium start-up logs are as critical, if not more when highlighting/validating logs in test runs?
// ValidateNoErrorsInLogs checks in cilium logs since the given duration (By
// default `CurrentGinkgoTestDescription().Duration`) do not contain `panic`,
// `deadlocks` or `segmentation faults` messages . In case of any of these
// messages, it'll mark the test as failed.

The test should be marked as failed when there are any of these messages in the start-up phase too. What do you think?

But doesn't it defeat the purpose of having ValidateNoErrorsInLogs? Aren't the cilium start-up logs are as critical, if not more when highlighting/validating logs in test runs?

Yes, but in this case, we start Cilium with our default configuration, which we already do in a bunch of other places. So if any of these "bad messages" pop up during startup here, they also will in other places.
That said, I agree we should ideally fail if those messages appear in this Cilium startup. Maybe we could add a call to ValidateNoErrorsInLogs in the BeforeAll block here. WDYT?

But doesn't it defeat the purpose of having ValidateNoErrorsInLogs? Aren't the cilium start-up logs are as critical, if not more when highlighting/validating logs in test runs?

Yes, but in this case, we start Cilium with our default configuration, which we already do in a bunch of other places. So if any of these "bad messages" pop up during startup here, they also will in other places.
That said, I agree we should ideally fail if those messages appear in this Cilium startup. Maybe we could add a call to ValidateNoErrorsInLogs in the BeforeAll block here. WDYT?

But doesn't it defeat the purpose of having ValidateNoErrorsInLogs? Aren't the cilium start-up logs are as critical, if not more when highlighting/validating logs in test runs?

Yes, but in this case, we start Cilium with our default configuration, which we already do in a bunch of other places. So if any of these "bad messages" pop up during startup here, they also will in other places.
That said, I agree we should ideally fail if those messages appear in this Cilium startup. Maybe we could add a call to ValidateNoErrorsInLogs in the BeforeAll block here. WDYT?

If I understand correctly, we want to validate logs from BeforeAll (once) as well as during every test run? I wonder if we make another call to ValidateNoErrorsInLogs in addition to JustAfterEach, would we get the desired behavior?
This is what I have in mind -
BeforeAll(func() {
testStartTime = time.Now()
:

vm.ValidateNoErrorsInLogs(time.Since(testStartTime))
}

&

JustBeforeEach and JustAfterEach from your current patch

But doesn't it defeat the purpose of having ValidateNoErrorsInLogs? Aren't the cilium start-up logs are as critical, if not more when highlighting/validating logs in test runs?

Yes, but in this case, we start Cilium with our default configuration, which we already do in a bunch of other places. So if any of these "bad messages" pop up during startup here, they also will in other places.
That said, I agree we should ideally fail if those messages appear in this Cilium startup. Maybe we could add a call to ValidateNoErrorsInLogs in the BeforeAll block here. WDYT?

If I understand correctly, we want to validate logs from BeforeAll (once) as well as during every test run? I wonder if we make another call to ValidateNoErrorsInLogs in addition to JustAfterEach, would we get the desired behavior?
This is what I have in mind -
BeforeAll(func() {
testStartTime = time.Now()
:

vm.ValidateNoErrorsInLogs(time.Since(testStartTime))
}

&

JustBeforeEach and JustAfterEach from your current patch

If I understand correctly, we want to validate logs from BeforeAll (once) as well as during every test run?

Yes. Your snippet of code is also what I had in mind :-)

If I understand correctly, we want to validate logs from BeforeAll (once) as well as during every test run?

Yes. Your snippet of code is also what I had in mind :-)

Hm, actually, if we do that, we'll get error from the previous shutdown again. We should stop Cilium, register time.Now(), then only start Cilium and check the logs. I'll update tomorrow morning.

Hm, actually, if we do that, we'll get error from the previous shutdown again. We should stop Cilium, register time.Now(), then only start Cilium and check the logs. I'll update tomorrow morning.

test-me-please

test-me-please

The Runtime CI pipeline is passing and reviews are in, so I think this is ready to merge.

The Runtime CI pipeline is passing and reviews are in, so I think this is ready to merge.


Add Grav Docs

http://learn.getgrav.org/
Cheers!

These are quite lovely. Shoot me a PR and I'll get them added.

PR Sent.. cheers.


[JASA] Next round of improvements

On-going work implementing the changes we discussed last week.

I did quite a lot of changes. Everything should be in place now, except for the toy example that I have to continue.
Feel free to merge and to make further changes :)

@jgpavez Before we forget, could you try to dig up references stating that the best function for losses different from the squared error loss corresponds to something which is monotonic with the ratio? (e.g. the huber loss)

Hi @glouppe about the references for the loss function

The proof for exponential error and for binomial log likelihood (cross-entropy) can be found in 'Additive logistic regression: a statistical view of boosting' by Friedman et al. (http://people.csail.mit.edu/torralba/courses/6.869/lectures/lecture6/boosting.pdf)
The proof for squared hinge loss can be found in 'Support vector machines and the Bayes rule in classification' by Yi Lin (http://www.iipl.fudan.edu.cn/~zhangjp/literatures/Statistical Learning Theory/upload_498_tr1014.pdf)

Thanks for these references Juan! I added a note at the end of the appendix (see ee3341e0a45ee691567fb3352f90ce49e95b8944).


Estimate our best-case user base

Based on the stats we've collected and stats from USA Cycling we can estimate our potential user base.
We can go with the following assumptions (each point reduces given set of all racers):

most users will be in-between 16 and 45 year old (older folks might not use our app)
only active racers will be interested (we can define "active" as 15+ races per year)

For example if there are 2000 racers in CA, we might figure out that it's just 1000 of them in-between 16 and 45 year old. Then only 500 of them can be described as active. This means that our potential user base is 500 if all 100% will use our app.
We don't have to have stats for all other states, we can take CA and approximate the rest. So if our user base is only 500/2000 = 25%, then knowing that there are 70000 racers in USA we can calculate total = 70000 * 0.25 = 17500
--
As a result of this issue we need two numbers (post them here for now):

[x] CA best-case user base
[x] USA best-case user base

This would allow us to understand how many people theoretically can use our product.

USA. Active ~ 38 155 (~ 60.2%)
Total 63 377 (USA by states stat sheet).
Active riders 60.2% from all USA riders (74% from responded riders who did the 9 and more events in 2013 year + 5% from non responded riders, since they might be active too)
CA. Active ~ 3 000 (60.2%)
Total 7 500 (from usacycling.org rating list).
Active riders 60.2%, just the same % as in the USA stat.
https://docs.google.com/spreadsheets/d/1gWdb5VPyeVuQVCyz5bUIjCR7B_t7FKfSrZ2709Lu168/edit#gid=1407621024

       |USA                      | CA

---------|-----------------------| -------------
Active | 38155 (~60.2%) | ~3000 (60.2%)
Total   | 63377               | 7500

yep

Active is >= 15 events/year.
       |USA                      | CA

---------|-----------------------| -------------
Active | 28463 (44.9%) | 3368 (44.9%)
Total   | 63377               | 7500

Potential user base
CA: 3.3k-4.5K
USA: 28K-38K


Sending links

In theory, I should be able to send links using the format <http://example.com|Name of site> which is supposed to turn into a hyperlink with my chosen text to the provided URL. (See https://api.slack.com/docs/message-formatting - which is linked from the RTM API docs page under "formatting messages".)
In practice, this is displaying exactly as is. It seems that the string is getting encoded somewhere (e.g. < becomes <), but I can't for the life of me find what's doing this in your source. Any tips on tracking this down and/or bypassing it?

Yes, there is a problem with the documentation about this.
Please see https://github.com/slackhq/slack-api-docs/issues/32
You can only use http://example.com to send a link with RTM.
In https://api.slack.com/rtm

The RTM API only supports posting simple messages formatted using our default message formatting mode. It does not support attachments or other message formatting modes. To post a more complex message as a user clients can call the chat.postMessage Web API method with as_user set to true.

So I think you can bypass this by using the chat.postMessage Web API in order to format your message properly.

What would I have to do to use the chat.postMessage Web API within your application? Or would this mean looking elsewhere?


Enable simpler installation and installation into system Python

This likely means:

Getting the wheel working and verifying its packages exist in any environment, system or virtual
Combining the setup.py
Ensuring that editable install still works

#6482 related to this
cc: @eyonland @arakhmati @TT-billteng

A couple of high-level directives for future wheel:

move tt_eager into ttnn/experimental or something similar
combine python bindings of tt_lib and ttnn so we have one SO
remove any forced rpath / patchelf changes during __init__.py setup of installed wheel environment

@tt-rkim says the wheel works!


testing functional tests on LXD VM

This is enhancement to move out from using our own self-hosted runner and external OpenStack.

I have done the rebase in my fork and pushed #71 , which supersedes this PR. Closing.


sweethome3d: fix decompress error

Closes #10937
Problem solved by not unzipping the folder SweetHome3D-macosx.app.

[X] I have read the Contributing Guide.

/verify


feature request - add files stripping

Hi
is it possible to add a flag to command line to strip video into 1Gb video (or any other size)
when record reach 1Gb ... then start a new file
to avoid to get a single file of 2Gb (or more) ...   :)

The program in 0.7 Alpha has updated for new -s [FILESIZE_MB] flag, usage as below:
> ./chaturbate-dvr -u hello -s 1024

1024 for 1024 MiB which is 1 GiB, and later in the output log you shall see messages like these:
2022/09/07 18:08:43 specifying stripping limit as 1024 MiB(s)
...
2022/09/07 18:08:58 exceeded the specified stripping limit, creating new video file. (file: ./video/hello_2022-09-07_18-08-43_1.ts)

Make sure you redownload the program from /bin,
the filesize for splitting might not be very precision (due to each chunks are not evenly divided) but atleast does the trick.


Fields with whitespace characters represented with escape sequences return the wrong character

Had a CSV file with escaped whitespace characters in it. Processing will always return the unescaped character representing the whitespace character (e.g. "\n" turns into 'n' instead of a new line.)
	[Fact]
	public void InlineEscapedWhitespaceCharacters()
	{
		using var reader = new StringReader(@"_,a1 \a a2,_,b1 \b b2,_,f1 \f f2,_,n1 \n n2,_,r1 \r r2,_,t1 \t t2,_,v1 \v v2");
		using var csvReader = CsvDataReader.Create(reader, new CsvDataReaderOptions
		{
			CsvStyle = CsvStyle.Escaped,
			Escape = '\\',
			Delimiter = ',',
			HasHeaders = false,
		});

		csvReader.Read();
		var value00 = csvReader.GetString(0);
		var value01 = csvReader.GetString(1);
		var value02 = csvReader.GetString(2);
		var value03 = csvReader.GetString(3);
		var value04 = csvReader.GetString(4);
		var value05 = csvReader.GetString(5);
		var value06 = csvReader.GetString(6);
		var value07 = csvReader.GetString(7);
		var value08 = csvReader.GetString(8);
		var value09 = csvReader.GetString(9);
		var value10 = csvReader.GetString(10);
		var value11 = csvReader.GetString(11);
		var value12 = csvReader.GetString(12);
		var value13 = csvReader.GetString(13);
		Assert.Multiple(
			() => Assert.Equal("_", value00),
			() => Assert.Equal("a1 \a a2", value01), // This will fail; will be "a1 a a2"
			() => Assert.Equal("_", value02),
			() => Assert.Equal("b1 \b b2", value03), // This will fail; will be "b1 b b2"
			() => Assert.Equal("_", value04),
			() => Assert.Equal("f1 \f f2", value05), // This will fail; will be "f1 f f2"
			() => Assert.Equal("_", value06),
			() => Assert.Equal("n1 \n n2", value07), // This will fail; will be "n1 n n2"
			() => Assert.Equal("_", value08),
			() => Assert.Equal("r1 \r r2", value09), // This will fail; will be "r1 r r2"
			() => Assert.Equal("_", value10),
			() => Assert.Equal("t1 \t t2", value11), // This will fail; will be "t1 t t2"
			() => Assert.Equal("_", value12),
			() => Assert.Equal("v1 \v v2", value13)  // This will fail; will be "v1 v v2"
		);
	}

CsvDataReader.PrepareField could have the escape block modified to cover this:
				if (c == escape)
				{
					if (i < len)
					{
						c = buffer[offset + i++];
						if (c != quote && c != escape)
						{
							if (quote == escape)
							{
								// the escape we just saw was actually the closing quote
								// the remainder of the field will be added verbatim
								inQuote = false;
							}
							else if ('\\' == escape)
							{
								switch (c)
								{
									case 'a':	// bell
										c = '\a';
										break;
									case 'b':	// backspace
										c = '\b';
										break;
									case 'f':	// form feed
										c = '\f';
										break;
									case 'n':	// new line
										c = '\n';
										break;
									case 'r':	// carriage return
										c = '\r';
										break;
									case 't':	// horizontal tab
										c = '\t';
										break;
									case 'v':	// vertical tab
										c = '\v';
										break;
								}
							}
						}
					}
					else
					{
						// we should never get here. Invalid fields should always be
						// handled in ReadField and end up in PrepareInvalidField
						throw new CsvFormatException(rowNumber, -1);
					}
				}

All existing unit tests pass with this modification.

This is working as expected. The Escaped mode parser only expects delimiters, newlines and escape characters to be escaped. Yes, it is similar to C-style string literal escaping, but is not exactly the same. The test-cases that you provide are invalid, as a doesn't need to be escaped, so a \a sequence is invalid. I've made the design decision to simply remove the unnecessary escape character. If you want a bell (\a) character, or a tab (\t) character, you can simply include that character in the output stream without needing to escape it.

Agreed on characters like tab and bell not needing escaping for the format to output correctly. The designer of the application that creates the files I'm consuming unfortunately decided to escape every character anyways and isn't open to changing the behavior since the choice was made over 25 years ago.
That said, the newline characters \r and \n were also not working in my tests. A CSV line like
Hello,A\r\nB
would result in parsing to
"Hello"
"ArnB"
field values, instead of
"Hello"
"A
B"
The newline character parsing was primarily where I was encountering issues. I don't think any of the data from this application will seriously include the bell character, but I included it to try and be comprehensive.

After having my coffee I realize you said the design accommodates newlines by using the escape character followed by the actual newline character itself and not the C-style escape. Sorry about that.


Unable to build for IOS

Hi guys, i'm getting this error every time I try to build for IOS.

Can anyone help me how to solve?
Right now, I'm using mobile_scanner 5.0.0-beta.3, because I know the mlkit was update in beta.3.
Flutter doctor
[✓] Flutter (Channel stable, 3.19.5, on macOS 14.4 23E214 darwin-arm64, locale pt-BR)
• Flutter version 3.19.5 on channel stable
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 300451adae (3 weeks ago), 2024-03-27 21:54:07 -0500
• Engine revision e76c956498
• Dart version 3.3.3
• DevTools version 2.31.1
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/jeanlucasdecamillo/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• ANDROID_HOME = /Users/jeanlucasdecamillo/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15E204a
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2023.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
[✓] VS Code (version 1.88.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.86.0
[✓] Connected device (3 available)
• moto e5 (mobile)                    • ZL5223CQ7G                           • android-arm    • Android 8.0.0 (API 26)
• iPhone SE (3rd generation) (mobile) • A3A102CB-15D1-4CD3-9684-3CF309254045 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-4 (simulator)
• Chrome (web)                        • chrome                               • web-javascript • Google Chrome 123.0.6312.124
[✓] Network resources
• All expected network resources are available.

The first warning seems unrelated.
However, the second warning indicates that you're unable to build for arm64.
Since you have an ARM Mac, can you confirm that you are either testing on an ARM iOS Simulator or an ARM iOS device?
IIRC MLKit does support ARM and we also don't specify its exclusion in the podspec here https://github.com/juliansteenbakker/mobile_scanner/blob/master/ios/mobile_scanner.podspec
The Simulator is excluded, though, as specified on Cocoapods.org: https://github.com/CocoaPods/Specs/blob/master/Specs/b/5/4/MLKitBarcodeScanning/5.0.0/MLKitBarcodeScanning.podspec.json
Just to be sure, you specified building for the ARM64 architecture in your project settings?

Thanks for your response @navaronbracke.
I'm trying to embed my application to a native one. So, the time native code try to build using my SDK, it shows me this error and I can't build.
I have these lines in my generated podspec: (maybe add "excluded archs arm64" works?)
s.ios.deployment_target = '12.0'
s.swift_version = '5.0'
s.static_framework = true
s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }

Build my Flutter application with mobile_scanner works well, but in this case, building my sdk in a native code, don't. I tried to build from an intel mac but I don't have success too.

Update:
I added those configs to my podspec:
  s.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386 arm64 armv7' }
  s.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386 arm64 armv7' }

And the error changed a little, but it persists :(

I have related issue when try to use different flavors for flutter on iOS, it says Unsupported swift architecture. No idea haw to fix it. So with default scheme it works, but If I make a copy of default one it says error.

I am also facing the same issue in v5.1.1. I am using XCode 15.4. Using MacBook Pro (M1 Pro)
Running on my iPhone 14 Pro Device
Please help how to fix this.

Facing same issue... Any update on this.

I have related issue when try to use different flavors for flutter on iOS, it says Unsupported swift architecture. No idea haw to fix it. So with default scheme it works, but If I make a copy of default one it says error.

I had the same problem using flavors

I have related issue when try to use different flavors for flutter on iOS, it says Unsupported swift architecture. No idea haw to fix it. So with default scheme it works, but If I make a copy of default one it says error.

@juliansteenbakker I'm having the same exact problem, and also with the flutter_secure_storage package, also coming from steenbaker.dev.
I could unfortunately reproduce the problem over and over by following the official step-by-step guider for the setup of flutter ios flavors, tried to fix it, but I always get the exact same mentioned error; User-Defined Issue (Xcode): Unsupported Swift architecture, for the two mentioned packages.
I'm wondering if this may be a systematic error somewhere; or if not; do you know why this could happen?

I have related issue when try to use different flavors for flutter on iOS, it says Unsupported swift architecture. No idea haw to fix it. So with default scheme it works, but If I make a copy of default one it says error.

@juliansteenbakker I'm having the same exact problem, and also with the flutter_secure_storage package, also coming from steenbaker.dev.
I could unfortunately reproduce the problem over and over by following the official step-by-step guider for the setup of flutter ios flavors, tried to fix it, but I always get the exact same mentioned error; User-Defined Issue (Xcode): Unsupported Swift architecture, for the two mentioned packages.
I'm wondering if this may be a systematic error somewhere; or if not; do you know why this could happen?

For me what solved it was adding these lines to the Podfile:
post_install do |installer|       # ADD THIS       installer.pods_project.build_configurations.each do |config|           config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"       end       ...

@GerlanStanley That workaround seems to align with the fact that arm64 is not supported, I wonder if we can make it supported (as on M1 Macs the simulators would be arm64)

But don't all of the current iOS devices use the arm64 architecture, isn't that rather modern and excluding it could be risky? Or am I completely wrong here?

This is talking about arm64 iOS Simulators, not real devices. Presumably this is an issue that occurs only when developing on M1 Macs.

Okay I was worried that these things may not be explicitly separated from each other, as e.g. configuring the architecture for android releases in your gradle configs does not make that differentiation AFAIK. But FYI, I'm having the issue too and I'm developing on an M2 Mac, latest version of XCode (15.4) + Flutter (Current Latest Stable Release, flutter doctor output > all good).

installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end

just FYI, this did not work for me. I instead had to add the following in my Podfile, then it worked:
post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)

    target.build_configurations.each do |config|

          config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"

        end
  end
end

Since this is specifically for arm64 iOS Simulators (I don't know if the reports of this bug also happen with Intel Macs),
I think what we can do is check if we are running on the iOS Simulator, and do:

A conditional import of MLKit
An early return with an "unsupported" mobile scanner error, since Simulators do not have a camera anyway

Any changes ?

We updated MLKit to version 7.0.0 in mobile_scanner 6.0.0. If that upgrade didn't help then I do not have any updates.

I'd love to test out the new version, but the new minimum ios version is 15.5.0, which is much too high for our project.

same issue encountered with mobile_scanner: ^6.0.1
User-Defined Issue (Xcode): Unsupported Swift architecture
Had to modify podfile to exclude ARM64 as explain there https://github.com/juliansteenbakker/mobile_scanner/issues/1018#issuecomment-2268413760

It seems that this issue is listed in the MLKit "Known Issues", which I previously missed.
https://developers.google.com/ml-kit/known-issues#ios_issues
Simulators on M1-based Mac are not supported.
I'll add the arm64 simulator to our excluded archs as well, which should fix this issue.
I'll also add a documentation update for this.

This should be fixed in version 6.0.2

For anyone wanting to follow along with adding back support for arm64 Simulators, see #1225

I upgrade to version 6.0.2 and still can not run in simulator. Real device start normally.
mobile_scanner: ^6.0.2
Issue:

User-Defined Issue (Xcode): Unsupported Swift architecture

Apple silicon M2
Flutter version 3.27.1
Dart version 3.6.0
CocoaPods version 1.15.2
Xcode 15.4
Has anyone try 6.0.2 version and still happen error?


Download the file using Hashkey

Hello @TrekDev ,
I like your library and i am using it and i want to download the file using hash key and also want to show the peers and downloading progress in %, can you guide me on this issue.
Thank You

Showing peers and downloading a file is easy:
var client = new IpfsClient();

var peers = await ipfs.Swarm.Peers(); // Gives you an ICollection of multiaddresses.

Stream outputStream = await ipfs.Cat("Qm...");
// Write outputStream to a byte[] or file here.

To show download percentage you can inject the IpfsClient with your own HttpClient which has your own Handler to show download completion as shown here
HttpClient httpClient; // httpClient with our handler.
var ifps = new IpfsClient(new Uri("http://<IP_ADDRESS>:5001"), httpClient);

Hello @TrekDev ,
Thank You for the solution , one question ,
var peers = await client.Swarm.Peers();
will search for particular file peer or peer is related to something for all files

@pbpraveen1988 I don't understand the question.

@pbpraveen1988 it will list all peers with opnen connections.
It does not allow you to specifically list peers hosting a certain file.
Reference: https://ipfs.io/docs/commands/#ipfs-swarm-peers


feat(Button): add isActive state and style for button component

Add isActive state for button component which will having the same style as hover.

http://seek-asia-style-guide--a9acefc95f09c1ca09b8b9bcc7f41afa67968998.surge.sh/button

may be just pick one ? Active and isActive?

@ChanJit I am trying not to use back the existing active state as it actually have different behavior between active and isActive.
isActive will change the background color hence if combine this two will impact to existing component.

since hover and active options are not control by props i will remove them from the demo options, hope this will reduce the confuse.

The point of those options is so you can see the button's behaviour though, I'm not sure if it's helpful to remove them.
More to the point, if the term is easily confused with an existing term, that's a pretty strong signal we need to change it.
Which designer were you working with on this one?

@mengtzu I am working with Shazwan on this. For active and hover are not control by the prop I am thinking it might be not useful to show as on option? Or we can just rename isActive to something else.

Taking the discussion to that Trello card - I think it'll be simple to work out though

Hover state option is useful as it works quite similar to the feature that Chrome dev tools provided

Is there a way to get this work for demo page only? That distinct hover props seems not necessary when it's being used in real world scenario...

@patrickliu-sa it is demo-only - note those options on the demo compose a class onto the component rather than setting a prop

After discuss with @shawn-dsz we decided to name the state as isSelected. I have put back the active & hover demo options.


Add support for Basic auth in client's tunnel URL

I tried to use a tunnel with an nginx-based reverse proxy with Basic auth in between server and client.
That didn't work, as Basic auth was only supported in the -proxy argument. Unfortunately, nginx does not implement the HTTP CONNECT method used in that.
This PR parses Basic auth credentials from the -server argument and adds a corresponding Authorization header if found.
The RFC states that it should be ok to do so.
Mind that no server-side auth is implemented and we rely on the reverse proxy to handle it.

@mporsch thank you for the PR, would you mind fixing the Go Vet issue?

Any comments on the code changes?
The URI parsing code is inspired by the handling of the 'proxy' argument and I moved the URI validation in with the parser.
I successfully tested the authentication-required case with ws:// and wss:// against an nginx reverse proxy.


Develocity integration

@gutoveronezi, it was nice meeting you at Community over Code today. This PR will enable you to publish Build Scans to ge.apache.org as discussed.
Description
This PR publishes a build scan for every CI build and for every local build from an authenticated Apache committer. The build will not fail if publishing fails. Local and remote caching was left disabled on this PR by design so that the build is not affected by this change.
The build scans of the Apache Cloudstack project are published to the Develocity instance at ge.apache.org, hosted by the Apache Software Foundation and run in partnership between the ASF and Gradle. This Develocity instance has all features and extensions enabled and is freely available for use by the Apache Cloudstack project and all other Apache projects.
On this Develocity instance, Apache Cloudstack will have access not only to all of the published build scans but other aggregate data features such as:

Dashboards to view all historical build scans, along with performance trends over time
Build failure analytics for enhanced investigation and diagnosis of build failures
Test failure analytics to better understand trends and causes around slow, failing, and flaky tests

Please let me know if there are any questions about the value of Develocity or the changes in this pull request and I’d be happy to address them.
Types of changes

[ ] Breaking change (fix or feature that would cause existing functionality to change)
[x] New feature (non-breaking change which adds functionality)
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] Enhancement (improves an existing feature and functionality)
[ ] Cleanup (Code refactoring and cleanup, that may add test cases)
[x] build/CI

@ribafish, thanks for the PR; it was nice to meet you at the conference. Now we will run the tests and, as soon we meet the requirements, we will merge the PR.

@GutoVeronezi a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

Packaging result [SF]: ✔ el7 ✔ el8 ✔ el9 ✔ debian ✔ suse15. SL-JID 9793

@GutoVeronezi what is your intention with this?  Are you proposing to base some policy on this?
Also,
do we need more testing than the github actions and build/packaging?

@GutoVeronezi what is your intention with this? Are you proposing to base some policy on this?

The main goal is to identify slow and flaky tests, so we can improve our code and workflow. Having those metrics can also help us to identify other problems that might be there and we are not seeing.

Also, do we need more testing than the github actions and build/packaging?

Not sure if more, but well structured.

Also, do we need more testing than the github actions and build/packaging?

Not sure if more, but well structured.

@GutoVeronezi , my communication skill are way below par. I meant to ask if we need more testing on this PR. You are absolutely right in your reply and it is valid with repect to the question I posed, just not to the one I intended ;)

Also, do we need more testing than the github actions and build/packaging?

Not sure if more, but well structured.

@GutoVeronezi , my communication skill are way below par. I meant to ask if we need more testing on this PR. You are absolutely right in your reply and it is valid with repect to the question I posed, just not to the one I intended ;)

I see hehe
It should not affect the system itself; however, I would run it just for sanity.

@ribafish Thanks for PR.
I don't remember exactly, but there was some issue related to security in github actions resulting in leaking of secrets. One of the reasons we disabled sonar on PRs from forks.
@DaanHoogland Do you think that might be an issue here as well?

@ribafish Thanks for PR.
I don't remember exactly, but there was some issue related to security in github actions resulting in leaking of secrets. One of the reasons we disabled sonar on PRs from forks.
@DaanHoogland Do you think that might be an issue here as well?

It was because of target in the github actions. I think this pr doesn't have the issue.
I have no idea what this pr is used for. Let's see

Hi @vishesh92 and @weizhouapache
This PR enables you to push build scans to Apache Develocity at ge.apache.org. These capture metadata about your build, which can then be used to monitor and improve the build performance, test times and fix flaky tests. It is also a prerequisite for other build performance improvements, such as using local and remote build cache, test distribution or predictive test selection (not part of this PR).
Develocity supports multiple build tools; there are also several Apache projects built with Maven that use it already, such as Camel, Pulsar, Creadur RAT, etc. -> you can see their build scans at ge.apache.org with the Maven filter applied.
The information captured includes the execution plan and timings, tests executed, dependencies and their versions, etc., but it does not include information such as the full list of env vars or the full cli command used to start a build unless added explicitly via custom values.

It is set up that any authenticated build will get published - at the moment, only CI jobs are authenticated and ASF infra already added GE_ACCESS_TOKEN to the organization secrets, so there's no need to do anything else. If you wanted to also publish local build scans, all you need to do is to authenticate with ge.apache.org, which you can do like this. To sign in to ge.apache.org you can use your ASF credentials, as your LDAP is set up with Develocity.

It is set up that any authenticated build will get published - at the moment, only CI jobs are authenticated and ASF infra already added GE_ACCESS_TOKEN to the organization secrets, so there's no need to do anything else. If you wanted to also publish local build scans, all you need to do is to authenticate with ge.apache.org, which you can do like this. To sign in to ge.apache.org you can use your ASF credentials, as your LDAP is set up with Develocity.

cool, thanks @ribafish

@ribafish
quick question, is it possible to remove some build scans ?

@weizhouapache  - an admin can do this. Are you referring to the 4 local build scans from this project?

@weizhouapache  - an admin can do this. Are you referring to the 4 local build scans from this project? If so, I can ensure this happens

@clayburn
Yes, can you please remove them?
thanks

Done

@blueorangutan package

@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with  KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

Packaging result [SF]: ✔ el7 ✔ el8 ✔ el9 ✔ debian ✔ suse15. SL-JID 9874

have we (a) added the token secrets.GE_ACCESS_TOKEN to the repo

GE_ACCESS_TOKEN is an org-wide secret for the GitHub Apache org, managed by ASF Infra. As such, it is available to the cloudstack repo (but not for builds originating from forks).

(b) does having this in the .mvn affect private builds who may not want to publish build related data to the central server?

No, there are two scenarios here:

For community contributors - they will not be able to authenticate to ge.apache.org, so no data is published
For ASF committers - no data will be shared unless the committer explicitly opts-in by provisioning an access key using ASF LDAP credentials. Otherwise, they will have unauthenticated builds, same as community contributors, so no build data will be published.

For ASF committers - no data will be shared unless the committer explicitly opts-in by provisioning an access key using ASF LDAP credentials. Otherwise, they will have unauthenticated builds, same as community contributors, so no build data will be published.

@clayburn
it would be good to allow ASF committers to remove their own build data


Spins with maximum cpu usage indefinitely if no workspace file is open

This extension consumes maximum CPU if no workspace file is open

Looking into it, thanks for the note.

Could you provide specific steps to reproduce, and let me know which version you're using?  I'm not seeing this happen so far.
The extension should only be activated once, right when a VSCode window is opened.

No other steps are required except for "Close Workspace"
I am running VSCode release version, on macOS

when vscode is open, what all is in your .vscode directory?  what files and their contents?
maybe it's having trouble deleting the settings

When vscode is open,
$ ls ~/.vscode
commandbar.json
projects.json
extensions

When vscode is open,
$ ls ~/.vscode
commandbar.json
extensions/
projects.json

In the VSCode Explorer, it says "You have not yet opened a folder"

maybe it's having trouble deleting the settings

Which settings would it be deleting? And from what location? There is no project open so it would not even know the directory to delete from since there is no directory and no folder open.
How would the .vscode directory make any difference here? That one is not used for storing settings and there's no project config there.

maybe it's having trouble deleting the settings

Which settings would it be deleting? And from what location? There is no project open so it would not even know the directory to delete from since there is no directory and no folder open.
How would the .vscode directory make any difference here?
That one is not used for storing settings and there's no project config there.

maybe it's having trouble deleting the settings

Which location would it be trying to delete from? There is no project open so it would not even know the directory to delete from since there is no directory and no folder open.
How would the .vscode directory make a difference here? There's no project config in that location and it's not used for storing any window settings.

when vscode opens, it adds some settings to .vscode/settings.json, and creates that file if it doens't exist.  as you close a vscode window, it detects that the window (and extension) are being closed, and removes the settings from that file (unless the colors were manually modified), and deletes the file and directory (.vscode) if there are no other contents
so it seems weird to me that there is no settings.json file while VSCode is open.
questions:

is the extension successfully changing the sidebar and titlebar colors of your vscode windows?
where are you seeing that the extension is using maximum CPU usage?

hi @Zyrsha - i think this is fixed.  i changed the code to exit the main function if no workspace folder exists and it's no longer maxing CPU in vscode 1.20 for me (wasn't able to reproduce in 1.30).
Let me know if it's still happening for you in the latest Window Colors version.
Thank you for letting me know about this issue!


The bot remembers only 5 past messages

What to do? The original Bing remembers 30 :(

This problem occurs if Microsoft changes the maximum number of messages in a conversation.  Please update cookies and redeploy.


Suppress svg.path element if no children

I need to control the color of the svg collapse indicator using css as I switch between different themes in my app. I can target the color using css like:
svg path {
        stroke: green;
    }

This works, but a side effect is the indicator is visible for nodes with no children.  The no-children <path> is generated with stroke="transparent" but is overridden by the css stroke.
A proposed solution is to not generate the <path> element if there are no children. Change to ListItem.razor:
@if (HasChildren) {
    <path d="M 4 2 l 7 6 l -7 6" class="@(TreeView.Disabled ? "tree-view-disabled" : "")" stroke="@(TreeView.Disabled ? "gray" : "black")" fill="transparent" stroke-width="2" />
}

https://github.com/RobWunderlich/Blazor.TreeViews/commit/6cadd87dec6e4547de7e9fb76a0fc7ef3f972c47
I also added class="tree-view-disabled" for disabled nodes to allow css targeting.

Hi @RobWunderlich,
Thanks for uncovering this. Wouldn't it be easier if we also defined a treeview css class that controls the stroke & fill? I didn't try this out, but something like the following should work:
@{
   var classes = string.Join(";",
      "excubo-blazor-treeview",
      (TreeView.Disabled ? "excubo-blazor-treeview-disabled" : ""),
      (HasChildren ? "" : "excubo-blazor-treeview-nochildren")
   );
}
<path d="M 4 2 l 7 6 l -7 6" class="@classes" />

Default CSS would then be something like
svg path .excubo-blazor-treeview {
   stroke: black;
   fill: transparent;
   stroke-width: 2;
}
svg path .excubo-blazor-treeview-disabled {
   stroke: gray;
}
svg path .excubo-blazor-treeview-nochildren {
   stroke: transparent;
}

Would that enable you to customize the path element correctly?
Thanks,
Stefan

Hi @stefanloerwald,
That would work as well and has the advantage of allowing nochildren to be targeted. I tested the code and made a couple of tweaks. Use " " as the Join separator.
@{
    var classes = string.Join(" ",
    "excubo-blazor-treeview",
    (TreeView.Disabled ? "excubo-blazor-treeview-disabled" : ""),
    (HasChildren ? "" : "excubo-blazor-treeview-nochildren")
    );
}
<path d="M 4 2 l 7 6 l -7 6" class="@classes" />

And the css:
.excubo-blazor-treeview {
  stroke: black;
  fill: transparent;
  stroke-width: 2;
}

.excubo-blazor-treeview-disabled {
    stroke: gray;
    fill: gray;
}

.excubo-blazor-treeview-nochildren {
    visibility: hidden;
}

I prefer visibility: hidden; over transparent color. I think it makes more sense semantically.
Thanks,
Rob

While we're adding classes, can we also add an expanded/collapsed class? It makes sense to me to move the classes up to the <li> like this:
@{
    var classes = string.Join(" ",
    "excubo-blazor-treeview",
    (TreeView.Disabled ? "excubo-blazor-treeview-disabled" : ""),
    (HasChildren ? "" : "excubo-blazor-treeview-nochildren"),
    ($"excubo-blazor-treeview-{(Collapsed ? "collapsed" : "expanded")}")
    );
}
<li class="@Class @classes">

And then the css like this:
.excubo-blazor-treeview svg path {
        stroke: black;
        fill: transparent;
        stroke-width: 2;
}

.excubo-blazor-treeview-disabled svg path {
    stroke: gray;
}

.excubo-blazor-treeview-nochildren svg path {
    visibility: hidden;
}

.excubo-blazor-treeview-expanded {
}

.excubo-blazor-treeview-collapsed {
}

Thanks,
Rob

Hi Rob,
That all looks very good. Would you mind creating a PR for this?
Thanks
Stefan

Hi Stefan,
Created https://github.com/excubo-ag/Blazor.TreeViews/pull/43#issue-1515671561.
I added the string "-item" into the css classes for more clarity.
Thanks,
Rob

Thanks Rob!
I've merged the PR and a new version is now in deployment.
Thanks
Stefan


UHD not working

I noticed the app does not actually display photos in UHD. I ensured the photos are in the cloud at 3840x2160 and that I selected UHD in the app settings.

This is documented in the FAQ. See: https://www.photoviewapp.com/faq/#uhd


New attributes panel

The black is gone!

 Please keep the buttons at the bottom using the same approach as https://github.com/concrete5/concrete5/issues/8479
Before you work on this, make sure you read the following two articles about working UI pull requests for concrete5 version 9:
concrete5 Bedrock: A Foundation for concrete5 and concrete5 Themes
https://documentation.concrete5.org/developers/appendix/concrete5-bedrock-a-foundation-for-concrete5-and-concrete5-themes
Submitting User Interface Pull Requests for concrete5 Version 9
https://documentation.concrete5.org/tutorials/submitting-user-interface-pull-requests-for-concrete5-version-9

@aembler added the updated design above. Let me know if I should also post the spec to this thread, thx!

I'm working on this but I have two questions about the design.

The description is missing in the main panel. Is this removed?
When should attributes be highlighted in the main panel?

I'm not sure what's going on there. I would ignore that detail and just treat it like other text areas in  this view.
I believe they are highlighted in the main panel when mousing over them on the lefthand side.

Thanks for looking into this!

Some things came up while implementing the design:

The new design suggests you can remove attributes from the left panel. If you remove one there you might not inspect the content first and be sure you remove the right attribute. Is this an issue or can I go ahead and add that functionality?

The other elements in the left panel seem to be elements that appear more often on other panels but I haven't found a shared set of styling rules yet. Are some supposed to become centralized or existing already? The elements are headers, search and back button (which is in the versions panel)

I'm not sure about transitions. It looks really nice when I apply the transition (background-color 0.25s ease-in-out), which is also on the toolbar buttons . But the "Page settings" panel, which attributes is in, doesn't have transitions for the nav items that are very similar in style.

I don't see this being an issue but will leave it to Andy to make the call. We can also possibly add a confirmation dialog when removing attributes but this may be annoying if removing multiple attributes.

I am working on a style guide for repeatable elements and will update you all with it shortly.

I'm a fan of transitions when appropriate and feel that we should update the "Page Settings" to be consistent. Is this something you would take care of or should we create a ticket for this update?

I don't think this is an issue; if you add the wrong attribute you can just remove it from the righthand view and it should come back into the list.

These appear different enough from other things that I've seen that you should make these their ow self-contained styles in your cms/scss/panels/pages/_attributes.scss file. As always, try to use bootstrap 4 classes and markup for the underlying items so we don't duplicate efforts.

I like transitions as well – I'm mostly concerned that applying transitions to the menu items in the pages panel makes them feel pretty laggy when you mouse over them in quick succession. As you notice, when you hover over the toolbar icons in the header there are no transitions, it's only when you click. That being said I'd be happy with a consistent hover/click transition for these elements, but I don't want to take a shot in the dark with it. @gary-portlandlabs if you can mock up transitions for hovering over and clicking on the left panel items in this menu that would go a long way toward dialing this in:

@aembler @Ruud-Zuiderlicht Here's the states for the attributes panel.

This is the current state on my repo, almost done. But I have some more questions

Is the search box also for me to give style? It is in a container which isn't wide enough (header). Is there a similar search box elsewhere that solved the issue?

In the design the field "Author" can be removed and also doesn't have a border. Is this something I should look at as well?

The header in the main panel reads "Attributes". The actual says "Page ID: 1". Should I drop the page id (isn't displayed anymore) or keep it and style as the header in the design?

The new add block task has an updated styling for this search - you might try checking out how it looks there. https://github.com/concrete5/concrete5/issues/8475

No, that can't be removed. Let's ignore this detail for right now.

Let's keep "Attributes" as the header like in the comp, and move the Page ID: 1 over to the righthand side with a class of text-muted kind of like it is in 8.5.2

So I've copied the search style from that issue. But that duplicates code. Can we move that (where) so it can be reused (@extend).

I still need to add the "remove" functionality in JavaScript and tidy up. Other then that I'm almost done.

Sounds good!

I haven't changed the left-margin of the details panel as discussed in Slack. It can be changed to 0 so it matches the comp.

Thank you!


Dropdown position on AJAX searches

Version 4.0.5
Steps to reproduce the bug:

Open https://select2.org/data-sources/ajax and resize your browser height such that the 'search for a repository' box appears at the bottom the viewport, forcing the dropdown to appear above
Type a string e.g. 'matthew'
Wait for the results to display
Delete the string by selecting all, and pressing backspace
You should the advisory text label hanging where the top of the results list used to be i.e. not flush with the top of the search box - see attached screenshot.

Has already been reported here: https://github.com/select2/select2/issues/4614

I got a video here: https://youtu.be/ykbAxAI6_k8

Followed the trail from #4616 (Closed Issue) to #5196 (Open Pull Request)


Raf 253 tree lib

Please review the binary search tree library.

What was wrong with SortedSet?
http://www.scala-lang.org/api/2.11.4/index.html#scala.collection.SortedSet

Sets do not have duplicate values, we need to keep duplicates.

If you need to count keys and have the keys sorted, there are already data structures for that.
just keys:
http://www.scala-lang.org/api/2.11.4/index.html#scala.collection.immutable.TreeSet
keys and values
http://www.scala-lang.org/api/2.11.4/index.html#scala.collection.immutable.TreeMap
furthermore many data structures in scala have a method called "Sorted".
It sorts the data structure according to a given Ordering.

We need a sorted list. However, we do not use a List structure, as by inserting a new value in the sorted list, the ordering time will be higher (O(n)) than using a binary search tree (O(log n)).

That's exactly why you can use the tree map/set for that.


[Bug] When using https and the user is authenticated when refresh it gets log out

Hi @manchenkoff,
I noticed an issue when using HTTPS with both Laravel and Nuxt, and setting ssr: true in my nuxt.config. After authenticating, if I refresh the Nuxt app, it redirects me to the login page. Additionally, if I try to directly access the URL https://larabells.local/dashboard in the browser, it also redirects me to the login page.
Note:
Disabling the ssr works fine
I am using frankenphp laravell 11 and nuxt3 and caddy and docker
.env
NUXT_PUBLIC_SANCTUM_BASE_URL=https://api.larabells.local
nuxt.config.ts
// https://nuxt.com/docs/api/configuration/nuxt-config

export default defineNuxtConfig({

   compatibilityDate: '2024-04-03',
   devtools: {enabled: true},
   ssr: true,
   devServer: {
       host: 'larabells.local',
       port: 4000,
       //https:true

   },
    // vite: {
    //     server: {
    //        hmr: {
    //             protocol: 'wss',
    //             clientPort: 443,
    //         },
    //    },
    // },
   modules: [
       "@nuxtjs/tailwindcss",
       "shadcn-nuxt",
       '@nuxtjs/tailwindcss',
       '@nuxtjs/color-mode',
       "nuxt-auth-sanctum"
   ],
   colorMode: {
       classSuffix: ''
   },
   shadcn: {
       /**
        * Prefix for all the imported component
        */
       prefix: '',
       /**
        * Directory that the component lives in.
        * @default "./components/ui"
        */
       componentDir: './components/ui'
   },
   sanctum: {
       baseUrl:  process.env.NUXT_PUBLIC_API_URL, // Laravel API
       mode: 'cookie',

       /*endpoints: {
           user: '/api/user',
       },*/
       redirect: {
           onGuestOnly: '/dashboard',
           onLogin:'/dashboard',
           onLogout: '/login',
       },
   },
})

login.vue
<script setup lang="ts">
definePageMeta({
 /*layout: 'minimal',*/
 middleware: ['sanctum:guest'],
})

</script>

<template>
 <AuthLoginForm />
</template>

<style scoped>

</style>

dashboard.vue
<script setup lang="ts">
import { Button } from '~/components/ui/button'

definePageMeta({
  layout: 'auth',
  middleware: ['sanctum:auth','sanctum-verified'],
})

  <Button type="submit" class="mt-5" @click="books">
    Books
  </Button>

see my video
https://github.com/user-attachments/assets/c25147cb-15c7-4a69-b274-975082ce90e2
Thank you in advance

Hey @ezekel, do you have different URL for Laravel which is accessible by your Nuxt server app?
Usually it happens if SSR and CSR call different URLs and thus cookies are not available. For more details, you can also change the sanctum module log level to 5 (you can find it in the module docs) and attach output here, it should show why your user gets unauthenticated on page refresh.

Hi @manchenkoff ,
can you show me where to edit the sanctum module to level 5 ?

Usually it happens if SSR and CSR call different URLs and thus cookies are not available.

but why if disable ssr it will works fine ? if I refresh it will not redirect to login page if I disable the ssr.
Thank you in advance.

can you show me where to edit the sanctum module to level 5 ?

Please, check this link - https://manchenkoff.gitbook.io/nuxt-auth-sanctum/advanced/logging

but why if disable ssr it will works fine ? if I refresh it will not redirect to login page if I disable the ssr.

The difference between SSR and CSR is that your Laravel API is being called from different hosts, which can cause CORS issues and may not be supported by the Laravel app if the SSR host is not included in stateful domain list.
You can check more details here - https://manchenkoff.gitbook.io/nuxt-auth-sanctum/usage/cookie-authentication

Hi @manchenkoff
I don't know if I get the correct using logLevel
nuxt.config.ts
sanctum: {
        baseUrl:  process.env.NUXT_PUBLIC_API_URL, // Laravel API
        mode: 'cookie',

        endpoints: {
            user: '/api/user',
        },
        redirect: {
            onGuestOnly: '/dashboard',
            onLogin:'/dashboard',
            onLogout: '/login',
        },
        logLevel: 5,
    },
    ```

    here is the log of my docker node

    ```
    [nuxt-auth-sanctum:ssr]  ERROR  Unable to load user identity from API [GET] "https://api.larabells.local/api/user": <no response> fetch failed
2024-12-31T02:30:20.075973400Z
2024-12-31T02:30:20.075977500Z     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
2024-12-31T02:30:20.075981600Z     at async $fetch2 (node_modules/ofetch/dist/shared/ofetch.03887fc3.mjs:316:15)
2024-12-31T02:30:20.075985700Z     at async initialIdentityLoad (node_modules/nuxt-auth-sanctum/dist/runtime/plugin.js:42:20)
2024-12-31T02:30:20.075989400Z     at async setup (node_modules/nuxt-auth-sanctum/dist/runtime/plugin.js:70:119)
2024-12-31T02:30:20.076006200Z     at async Object.callAsync (node_modules/unctx/dist/index.mjs:72:16)
2024-12-31T02:30:20.076009800Z     at async applyPlugin (node_modules/nuxt/dist/app/nuxt.js:142:25)
2024-12-31T02:30:20.076012600Z     at async executePlugin (node_modules/nuxt/dist/app/nuxt.js:179:9)
2024-12-31T02:30:20.076015300Z     at async applyPlugins (node_modules/nuxt/dist/app/nuxt.js:193:5)
2024-12-31T02:30:20.076018300Z     at async createNuxtAppServer (node_modules/nuxt/dist/app/entry.js:15:7)
2024-12-31T02:30:20.076021800Z     at async default (node_modules/@nuxt/vite-builder/dist/runtime/vite-node.mjs:34:18)
2024-12-31T02:30:20.076024900Z
2024-12-31T02:30:20.076027800Z   [cause]: fetch failed
2024-12-31T02:30:20.076031200Z
2024-12-31T02:30:20.076034200Z       at node:internal/deps/undici/undici:13185:13
2024-12-31T02:30:20.076039500Z       at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
2024-12-31T02:30:20.076042600Z       at async $fetchRaw2 (node_modules/ofetch/dist/shared/ofetch.03887fc3.mjs:258:26)
2024-12-31T02:30:20.076045500Z       at async $fetch2 (node_modules/ofetch/dist/shared/ofetch.03887fc3.mjs:316:15)
2024-12-31T02:30:20.076048600Z       at async initialIdentityLoad (node_modules/nuxt-auth-sanctum/dist/runtime/plugin.js:42:20)
2024-12-31T02:30:20.076052600Z       at async setup (node_modules/nuxt-auth-sanctum/dist/runtime/plugin.js:70:119)
2024-12-31T02:30:20.076055800Z       at async Object.callAsync (node_modules/unctx/dist/index.mjs:72:16)
2024-12-31T02:30:20.076059500Z       at async applyPlugin (node_modules/nuxt/dist/app/nuxt.js:142:25)
2024-12-31T02:30:20.076063900Z       at async executePlugin (node_modules/nuxt/dist/app/nuxt.js:179:9)
2024-12-31T02:30:20.076066900Z       at async applyPlugins (node_modules/nuxt/dist/app/nuxt.js:193:5)
2024-12-31T02:30:20.076069800Z
2024-12-31T02:30:20.076072500Z     [cause]: connect ECONNREFUSED <IP_ADDRESS>:443
2024-12-31T02:30:20.076075500Z
2024-12-31T02:30:20.076078200Z         at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1611:16)
2024-12-31T02:30:20.076081100Z         at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17)
2024-12-31T02:30:20.076136300Z
2024-12-31T02:30:20.148382300Z
2024-12-31T02:30:20.148408400Z [nuxt-auth-sanctum:ssr]  ERROR  Unable to load user identity from API [GET] "https://api.larabells.local/api/user": <no response> fetch failed
2024-12-31T02:30:20.148414000Z
2024-12-31T02:30:20.148418000Z     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
2024-12-31T02:30:20.148425200Z     at async $fetch2 (node_modules/ofetch/dist/shared/ofetch.03887fc3.mjs:316:15)
2024-12-31T02:30:20.148429400Z     at async initialIdentityLoad (node_modules/nuxt-auth-sanctum/dist/runtime/plugin.js:42:20)
2024-12-31T02:30:20.148431700Z     at async setup (node_modules/nuxt-auth-sanctum/dist/runtime/plugin.js:70:119)
2024-12-31T02:30:20.148446700Z     at async Object.callAsync (node_modules/unctx/dist/index.mjs:72:16)
2024-12-31T02:30:20.148451000Z     at async applyPlugin (node_modules/nuxt/dist/app/nuxt.js:142:25)
2024-12-31T02:30:20.148454700Z     at async executePlugin (node_modules/nuxt/dist/app/nuxt.js:179:9)
2024-12-31T02:30:20.148457600Z     at async applyPlugins (node_modules/nuxt/dist/app/nuxt.js:193:5)
2024-12-31T02:30:20.148460900Z     at async createNuxtAppServer (node_modules/nuxt/dist/app/entry.js:15:7)
2024-12-31T02:30:20.148464500Z     at async default (node_modules/@nuxt/vite-builder/dist/runtime/vite-node.mjs:34:18)
2024-12-31T02:30:20.148468500Z
2024-12-31T02:30:20.148474100Z   [cause]: fetch failed
2024-12-31T02:30:20.148478700Z
2024-12-31T02:30:20.148482100Z       at node:internal/deps/undici/undici:13185:13
2024-12-31T02:30:20.148486500Z       at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
2024-12-31T02:30:20.148489200Z       at async $fetchRaw2 (node_modules/ofetch/dist/shared/ofetch.03887fc3.mjs:258:26)
2024-12-31T02:30:20.148492000Z       at async $fetch2 (node_modules/ofetch/dist/shared/ofetch.03887fc3.mjs:316:15)
2024-12-31T02:30:20.148495000Z       at async initialIdentityLoad (node_modules/nuxt-auth-sanctum/dist/runtime/plugin.js:42:20)
2024-12-31T02:30:20.148497900Z       at async setup (node_modules/nuxt-auth-sanctum/dist/runtime/plugin.js:70:119)
2024-12-31T02:30:20.148502000Z       at async Object.callAsync (node_modules/unctx/dist/index.mjs:72:16)
2024-12-31T02:30:20.148505200Z       at async applyPlugin (node_modules/nuxt/dist/app/nuxt.js:142:25)
2024-12-31T02:30:20.148508100Z       at async executePlugin (node_modules/nuxt/dist/app/nuxt.js:179:9)
2024-12-31T02:30:20.148511100Z       at async applyPlugins (node_modules/nuxt/dist/app/nuxt.js:193:5)
2024-12-31T02:30:20.148514000Z
2024-12-31T02:30:20.148516600Z     [cause]: connect ECONNREFUSED <IP_ADDRESS>:443
2024-12-31T02:30:20.148519300Z
2024-12-31T02:30:20.148522100Z         at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1611:16)
2024-12-31T02:30:20.148576600Z         at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17)
2024-12-31T02:30:20.148582500Z

I saw this it looks like same problem withe me ssr enable
https://github.com/manchenkoff/nuxt-auth-sanctum/issues/209
but I tried to put this to sanctum module it doesnt work
    sanctum: {
        baseUrl:  process.env.NUXT_PUBLIC_API_URL, // Laravel API
        mode: 'cookie',

        endpoints: {
            user: '/api/user',
        },
        redirect: {
            onGuestOnly: '/dashboard',
            onLogin:'/dashboard',
            onLogout: '/login',
        },
        logLevel: 5,
        client: {
            initialRequest: true,
        }
    },

2024-12-31T07:30:04.048885100Z [nuxt-auth-sanctum:ssr]  ERROR  Unable to load user identity from API [GET] "https://api.larabells.local/api/user":  fetch failed

@ezekel, in your case, this is a problem. Your Laravel API is not reachable from the Nuxt SSR image, probably because your Docker container is named differently. It has nothing to do with the initialRequest config. If you have Laravel and Nuxt apps under the same network, you should name your Laravel container by the domain name as well, in your case - api.larabells.local should be fine.

I tried also to include the api to the stateful domains but no luck SANCTUM_STATEFUL_DOMAINS=larabells.local,api.larabells.local

This is unnecessary because api.* domain is not for frontend callers.


SDL cannot load arial10x10

Hi!
Ive been following this tutorial word for word, but after following the instructions for everything, when I first tried to run the program after putting a @ on the screen, I got the above error message. Not sure if this is a bug or if I missed some step before.

Edit, I ened up finding out where to place the font file, in the same directory as the src file, you may want to include this in the install doc somewhere as it wasn't obvious without some trial and error.

Hey, sorry for the late reply!
Do you mean this tutorial? https://tomassedovic.github.io/roguelike-tutorial/
Yeah it should be in the crate root, i.e. where you have Cargo.toml and src directory. Good point, I should fix the tutorial to make this clearer.


execSync('code --version').toString() returns node.js version instead of vs code version

VSCode Version: 1.50.1
OS Version: Windows_NT x64

Steps to Reproduce:

Create a new project
Add the below code in the function active()

   const execSync = require('child_process').execSync;
  var codeOut = execSync('code --version').toString();
  console.log(`codeOut = ${codeOut}`);

Click F5 or Start Debugging.
Check the debug console.

It should print vs code version but it prints node.js version.
OUTPUT in DEBUG CONSOLE:-
codeOut = v12.14.1

I have created a sample program in node.js and executed it and the output is correct. It prints the vscode version.
C:\WORK_VsCode>node vscodeversion.js
codeOut = 1.50.1
d2e414d9e4239a252d1ab117bd7067f125afd80a
x64

Does this issue occur when all extensions are disabled?: Yes
Thanks,
Akhil

That would be because ELECTRON_RUN_AS_NODE env being leaked into the launched process from debugger. You can set the following environment config to workaround
"environment": [
    {"name": "ELECTRON_RUN_AS_NODE", "value": ""}
],

Hi @deepak1556
Thanks for the prompt response.
I see a debug label that means only when the user installs the extension then the output will be correct?
I try to get the node version to find the electron version.
Like this:-
      try {
        var codeOut = execSync('code --version').toString();
        console.log(`codeOut = ${codeOut}`);
        vscodeVer = parseFloat(codeOut.split('\n')[0]);
        console.log(`vscodeVer = ${vscodeVer}`);
        if(!isNaN(vscodeVer)) {
          if (vscodeVer >= 1.49) {
              electron_version = "9.2.1";
          }
          else if (vscodeVer >= 1.47) {
              electron_version = "7.3.2";
          }
          else if (vscodeVer >= 1.46) {
              electron_version = "7.3.1";
          }
          else if (vscodeVer >= 1.45) {
              electron_version = "7.2.4";
          }
          else {// vscode version older than 1.45 not supported
              electron_version = "7.1.11"; // old binary, not getting updated.
          }
          console.log("Detected VSCode version", vscodeVer,
                  ", will use Electron version ", electron_version);
        }

Is there any other way to find the electron version on which vs code is build(from the code---function active(){})?
Thanks,
Akhil

you can get that info from process.versions

But process.versions only works in developer tools right.
Thanks,
Akhil

Hi @deepak1556
Sorry!!
Able to retrieve the electron version in extension.s file using process.versions.electron
Thanks,
Akhil

I'm unable to reproduce this. When launching debugged programs we do unset ELECTRON_RUN_AS_NODE

Can you share a small sample repo that contains the code and launch config you're using?


Add changesets for release tracking

Closes: #17
If we agree on it, we should install https://github.com/apps/changeset-bot
Why changesets instead of release-please
Forcing semantic commits on PR title and squash strategy might be enough for us, but we need to check it always for ourselves before merging a PR. With changesets we have a bot during PR that prepares for the "Release tracking" and it makes it easier. If we accept contributions from outsiders it will be much easier and we reduce human error.
How it works

@fabien0102 Would love to hear your opinion on this 😄

Let's try this 🤞🏻


Improvements

This is a start on some cleanups and modernizations ... If you're happy with these, I have a couple of additional things that I'd still like to do before a new release.

Hello, thanks for your contribution. I'd be more than happy to merge your others changes. This code has been rotting for too long.


Add several new ops relative to convolution.

Add below aten ops and their tests into library:
conv1d
conv3d

Nice, thanks! Was there issue with conv transpose?

Yes, let's discuss it in today's meeting.


Change the link to the NEW Yarn installation instructions

Hello,
The README.md file direct users of React to use Yarn.

The link directed to an old version of Yarn (Yarn 1. URL: https://classic.yarnpkg.com/en/docs/install/#windows-stable). I fix it so now it directs to the new version of Yarn (Yarn 2. URL: https://yarnpkg.com/getting-started/install).
Thanks.

Hey @odeddugma, thanks for the suggestion.
I believe all of the core contributors are using Yarn 1 so we should leave the instructions to match the workflow we're using.
Thanks again!

Hey @odeddugma, thanks for the suggestion.
I believe all of the core contributors are using Yarn 1 so we should leave the instructions to match the workflow we're using.
Thanks again!


can I use this w replit and uptimer bot?

Describe the bug
A clear and concise description of what the bug is and steps to reproduce.
Error
Click on the home tab and send the full error if there is one.
Screenshots
If applicable, add screenshots to help explain your problem.
OS:
Windows, Linux arm64, Linux amd64 or MacOS

Nope, since this is gui. Also replit blocks selfbots now if iam right, so even if it wasn't a gui then also it wouldn't work.
[keep in mind that this is being re-written and a working version has not been released in releases yet.]

there is a cli option for mac, no?


how to use TouchableHighlight or TouchableOpacity inside renderheader?

_renderHeader(section, i, isActive) {
return (

<Animatable.View duration={400} style={[styles.header, isActive ? styles.active : styles.inactive]} transition="backgroundColor">
<View style={{flexDirection:'row'}}>

<Icon name='keyboard-arrow-up'size={25} color={isActive ?'#214263' : '#16a085'}/>
<Icon name='keyboard-arrow-down'size={25} color={isActive ?'#1abc9c' : '#214263'}/>

 {section.header}
   <Icon name='edit'size={25} color='skyblue'onPress={this.addInvoice} />
<Icon  name='file-upload'size={25} color='red'/>
<Icon name='delete'size={25} color='red'/>

</Animatable.View>
  </View>
);

}

You need to change the _renderHeader to the following
_renderHeader = (section, i, isActive) => {...}

yes, i did this and now its working


Suggestion: gain a little more performance by engaging the non-aligned memory access.

Hello!
In the end of the AnimatedGIF.h file there are the following lines:
// Due to unaligned memory causing an exception, we have to do these macros the slow way
#define INTELSHORT(p) ((*p) + (*(p+1)<<8))
#define INTELLONG(p) ((*p) + (*(p+1)<<8) + (*(p+2)<<16) + (*(p+3)<<24))

Some architectures support the non-aligned memory access. The Cortex-M4 is one of them. You may find the proof in the Generic User Guide, clause "3.3.5 Address alignment".
So I tried to utilize this feature and altered those definitions:
// Due to unaligned memory causing an exception, we have to do these macros the slow way
#define INTELSHORT(p) (*((unsigned short int*)p))
#define INTELLONG(p)  (*((unsigned int*)p))

The test image was the same I attached here. The image was decoded fine and about 5% faster. The average line decoding time for my test environment was 511.7 vs 541.6 us for the original "slow way".
Does this feature worth coming into your code? Of course it does not work for each and every CPU in the world, but at least Cortex-M4 as well as M3 are capable of it.
Thanks for your time.

ESP32-xx variants also supports unaligned access.

I already added that to the latest code (see Turbo branch)


[zero] fix init device bug in zero init context unittest

I found some code was changed in the previous PR: #515 . Can you rebase first?


MAJOR update: name change

Since this was written, i changed name, plesae fix :)

Sorry my bad haven't seen this earlier :sob:


⚠ Bofrost.de has degraded performance

In d444e00, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 715 ms

Resolved: Bofrost.de performance has improved in fc133f7.


[Question] Question about Padding Direction Choices

Required prerequisites

[X] I have read the documentation https://safe-rlhf.readthedocs.io.
[X] I have searched the Issue Tracker and Discussions that this hasn't already been reported. (+1 or comment there if it has.)
[X] Consider asking first in a Discussion.

Questions
Hello,
I've encountered an inconsistency in this repository when it comes to padding after loading pre-trained models. Right padding is chosen in certain instances, such as with SFT and reward model training:
class SupervisedTrainer(TrainerBase):
    def init_models(self) -> None:
        if self.ds_config is not None and self.ds_config['zero_optimization']['stage'] == 3:
            self.dstchf = HfDeepSpeedConfig(self.ds_config)

        self.model, self.tokenizer = load_pretrained_models(
            self.args.model_name_or_path,
            model_max_length=self.args.max_length,
            padding_side='right',
            auto_model_type=self.MODEL_TYPE,
            trust_remote_code=self.args.trust_remote_code,
            auto_model_kwargs=self.extra_model_kwargs,
            auto_tokenizer_kwargs=self.extra_tokenizer_kwargs,
        )

while left padding is used during PPO training:
class RLTrainer(TrainerBase):
    def init_models(self) -> None:
        if (
            self.ds_train_config is not None
            and self.ds_train_config['zero_optimization']['stage'] == 3
        ):
            self.dstchf_train = HfDeepSpeedConfig(self.ds_train_config)

        if (
            self.ds_eval_config is not None
            and self.ds_eval_config['zero_optimization']['stage'] == 3
        ):
            self.dsechf_eval = HfDeepSpeedConfig(self.ds_eval_config)

        self.actor_model, self.tokenizer = load_pretrained_models(
            self.args.actor_model_name_or_path,
            model_max_length=self.args.max_length,
            padding_side='left',
            auto_model_type=AutoModelForCausalLM,
            trust_remote_code=self.args.trust_remote_code,
        )
        self.actor_reference_model, _ = load_pretrained_models(
            self.args.actor_model_name_or_path,
            model_max_length=self.args.max_length,
            padding_side='left',
            auto_model_type=AutoModelForCausalLM,
            trust_remote_code=self.args.trust_remote_code,
        )
        self.reward_model, self.reward_tokenizer = load_pretrained_models(
            self.args.reward_model_name_or_path,
            model_max_length=self.args.max_length,
            auto_model_type=AutoModelForScore,
            padding_side='right',
            trust_remote_code=self.args.trust_remote_code,
            auto_model_kwargs={
                'score_type': 'reward',
                'do_normalize': self.args.normalize_reward,
            },
        )

What's the reasoning behind this varied approach?
Based on my understanding, when training SFT or RM, right padding doesn't impact autoregressive generation. However, it becomes an issue during inference, which is presumably why left padding is favored in those cases. With that said, wouldn't it be more straightforward to consistently use left padding across the board to ensure uniformity during both training and inference phases?
Thank you for your clarification on this matter.
Checklist

[X] I have made every effort to write this issue in English, including all comments, the title, and the description.
[X] I have provided all relevant and necessary information above.
[X] I have chosen a suitable title for this issue.

Hi @jc-ryan. This is an engineering choice that can split the prompt and response parts easily for the follow-up RL training stage.
Because the most popular foundation models are using the relative positional encoding rather than the absolute positional encoding. The padding direction has a relatively small impact on the results. Hope this resolves your concern about the inconsistency of the padding side.
The data set used for RLHF only provides prompt, and the corresponding response needs to be generated in rollout process during the training process. That is to generate new tokens after input_ids. It is easier to handle this using left padding.
Before:
                                                                # generate =====>
[[     PAD,      PAD,      PAD,      PAD, Prompt00, Prompt01, Prompt02, Prompt03],
       PAD,      PAD, Prompt10, Prompt11, Prompt12, Prompt13, Prompt14, Prompt15],
  ...
  [                                     ...                                     ]]

After:
                                                                # generate =====>
[[     PAD,      PAD,      PAD,      PAD, Prompt00, Prompt01, Prompt02, Prompt03, Response00, Response01, Response02, Response03, EOS, UNK, UNK, UNK],
       PAD,      PAD, Prompt10, Prompt11, Prompt12, Prompt13, Prompt14, Prompt15, Response10, Response11, Response12,        EOS, UNK, UNK, UNK, UNK],
  ...
  [                                     ...                                                                                ]]

See also https://github.com/PKU-Alignment/safe-rlhf/issues/58#issuecomment-1588691023.

Hi @jc-ryan. This is an engineering choice that can split the prompt and response parts easily for the follow-up RL training stage.
Because the most popular foundation models are using the relative positional encoding rather than the absolute positional encoding. The padding direction has a relatively small impact on the results. Hope this resolves your concern about the inconsistency of the padding side.
The data set used for RLHF only provides prompt, and the corresponding response needs to be generated in rollout process during the training process. That is to generate new tokens after input_ids. It is easier to handle this using left padding.
Before:
                                                                # generate =====>
[[     PAD,      PAD,      PAD,      PAD, Prompt00, Prompt01, Prompt02, Prompt03],
       PAD,      PAD, Prompt10, Prompt11, Prompt12, Prompt13, Prompt14, Prompt15],
  ...
  [                                     ...                                     ]]

After:
                                                                # generate =====>
[[     PAD,      PAD,      PAD,      PAD, Prompt00, Prompt01, Prompt02, Prompt03, Response00, Response01, Response02, Response03, EOS, UNK, UNK, UNK],
       PAD,      PAD, Prompt10, Prompt11, Prompt12, Prompt13, Prompt14, Prompt15, Response10, Response11, Response12,        EOS, UNK, UNK, UNK, UNK],
  ...
  [                                     ...                                                                                ]]

See also [#58 (comment)](https://github.com/PKU-Alignment/safe-rlhf/issues/58#issuecomment-1588691023).

Thank you, I understand your point. When performing inference on an entire batch, left padding is often the more preferred option. My concern is that if we were to use the same left padding during training as we do during inference, the discrepancy between training and inference might be reduced. For instance, when training a reward model, if right padding is used, the number of padding tokens before the final scalar token can vary when the same sentence is inferred in different batches (due to different maximum lengths in those batches). This could potentially affect the inference performance of the reward model. However, this problem doesn't arise with left padding.

Additionally, a small suggestion I have is that the newer version of HuggingFace introduced the "chat templates" feature. Perhaps you could consider implementing it to more conveniently convert any conversation into the Safe-RLHF conversation format.
I'm a loyal user of this repository and truly appreciate all your valuable contributions!


Ensure years_active() uses sorted results

This PR ensures that the functionyears_active() uses sorted results from the parameter duration_period.
The observed issue of years_active() returning incorrect results as described in #485 is herewith resolved.
How to review

Read the diff and note that the CI checks all pass.

PR checklist

[ ] Continuous integration checks all ✅
[x] Add or expand tests; coverage checks both ✅
[x] Update release notes.

@khaeru it seems that tests are failing unrelated to the PR changes. There seems to be some issues with the reporting.

@khaeru it seems that tests are failing unrelated to the PR changes. There seems to be some issues with the reporting.

There's one issue, see #492.
However, some others are just flaky tests. Whenever you see this, it's just Jupyter (or the nbclient package that we use, via ixmp.testing) failing to communicate with the kernel it has started.
E           nbclient.exceptions.CellTimeoutError: A cell timed out while it was being executed, after 10 seconds.
E           The message was: Cell execution timed out.

These failures sometimes occur in the nightly tests (@LauWien and I were just discussing). When they do, use the "Re-run jobs" button in the top-right corner of the "Checks" tab on the PR to restart them, and they should pass on the next attempt.

There's one issue, see #492.

Now merged. Please re-start these jobs, e.g. by a rebase & push.

@khaeru I believe the tests are failing because of the timeout issue mentioned above. I have restarted the jobs over three times now and the amount of failures vary, but the reason seems to always be the same.