some error in pryder

Description
What steps will reproduce the problem?

What is the expected output? What do you see instead?
Please provide any additional information below
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins\ipythonconsole.py", line 890, in run_script
self.execute_code(line, current_client, clear_variables)
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\plugins\ipythonconsole.py", line 936, in execute_code
sw.execute(to_text_string(to_text_string(lines)))
File "C:\ProgramData\Anaconda3\lib\site-packages\qtconsole\history_console_widget.py", line 47, in execute
source, hidden, interactive)
File "C:\ProgramData\Anaconda3\lib\site-packages\qtconsole\console_widget.py", line 632, in execute
self._execute(source, hidden)
File "C:\ProgramData\Anaconda3\lib\site-packages\qtconsole\frontend_widget.py", line 294, in _execute
msg_id = self.kernel_client.execute(source, hidden)
AttributeError: 'NoneType' object has no attribute 'execute'
Version and main components

Spyder Version: 3.2.3
Python Version: 3.6.2
Qt Versions: 5.6.2, PyQt5 5.6 on Windows

Dependencies
pyflakes >=0.6.0 :  1.5.0 (OK)
pycodestyle >=2.3:  2.3.1 (OK)
pygments >=2.0   :  2.2.0 (OK)
pandas >=0.13.1  :  0.20.3 (OK)
numpy >=1.7      :  1.13.1 (OK)
sphinx >=0.6.6   :  1.6.3 (

This is fixed in our latest release (3.2.6). Please update.

For the record, appears to be a duplicate of #5053 which was fixed in Spyder 3.2.4, released some time ago. You can update with conda update spyder.


[INLONG-2082] add GET method for getIpList

Title Name: [INLONG-XYZ][component] Title of the pull request
where XYZ should be replaced by the actual issue number.
Fixes #2082
Motivation
Explain here the context, and why you're making that change. What is the problem you're trying to solve.
Modifications
Describe the modifications you've done.
Verifying this change

[ ] Make sure that the change passes the CI checks.

(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)

Added integration tests for end-to-end deployment with large payloads (10MB)
Extended integration test for recovery after broker failure

Documentation

Does this pull request introduce a new feature? (yes / no)
If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
If a feature is not applicable for documentation, explain why?
If a feature is not documented yet in this PR, please create a followup issue for adding the documentation

Codecov Report

Merging #2083 (6381df9) into master (af6562a) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #2083      +/-   ##
============================================
- Coverage     12.27%   12.26%   -0.02%
+ Complexity     1160     1157       -3
============================================
  Files           413      413
  Lines         35215    35215
  Branches       5542     5542
============================================
- Hits           4322     4318       -4
- Misses        30123    30125       +2
- Partials        770      772       +2

Impacted Files
Coverage Δ

.../inlong/tubemq/corebase/policies/FlowCtrlItem.java
38.88% <0.00%> (-1.12%)
:arrow_down:

.../tubemq/corebase/policies/FlowCtrlRuleHandler.java
34.07% <0.00%> (-0.45%)
:arrow_down:

.../producer/qltystats/DefaultBrokerRcvQltyStats.java
45.31% <0.00%> (-0.40%)
:arrow_down:

Continue to review full report at Codecov.

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


Shared preferences plugin default values

Would be nice if the plugin allow to return a default value if the key is not in the preferences.
like:
String getString(String key, {String defaultValue = null})

@zoechi I've done a PR to fix this if you want to take a look :)

@jaumard Great, we'll have to wait for someone from the Flutter team though.

I don't think this is really necessary. You can just use ?? to have the same behavior. E.g.
String myString = getBool('myKey') ?? "a default string";

Closing this issue. Please feel free to open another issue if you think it is otherwise necessary.

Passing a default value as a second argument is more straight forward imho.
The example above is strange anyway. I'd say the type of the second argument has to match the return type.


Closes #206 Removed author from programming stratergy.

Thank you for your Pull Request! We have developed this task checklist from the Development Process Guide to help with the final steps of the process. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the admiral codebase remains robust and consistent.
Please check off each taskbox as an acknowledgment that you completed the task or check off that it is not relevant to your Pull Request. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the devel branch until you have checked off each task.

[x] Place Closes #<insert_issue_number> into the beginning of your Pull Request Title (Use Edit button in top-right if you need to update)
[x] Code is formatted according to the tidyverse style guide. Run styler::style_file() to style R and Rmd files
[x] Updated relevant unit tests or have written new unit tests, which should consider realistic data scenarios and edge cases, e.g. empty datasets, errors, boundary cases etc. - See Unit Test Guide
[x] If you removed/replaced any function and/or function parameters, did you fully follow the deprecation guidance?
[x] Update to all relevant roxygen headers and examples, including keywords and families. Refer to the categorization of functions to tag appropriate keyword/family.
[x] Run devtools::document() so all .Rd files in the man folder and the NAMESPACE file in the project root are updated appropriately
[x] Address any updates needed for vignettes and/or templates
[x] Update NEWS.md if the changes pertain to a user-facing function (i.e. it has an @export tag) or documentation aimed at users (rather than developers)
[x] Build admiral site pkgdown::build_site() and check that all affected examples are displayed correctly and that all new functions occur on the "Reference" page.
[x] Address or fix all lintr warnings and errors - lintr::lint_package()
[x] Run R CMD check locally and address all errors and warnings - devtools::check()
[x] Link the issue in the Development Section on the right hand side.
[x] Address all merge conflicts and resolve appropriately
[x] Pat yourself on the back for a job well done! Much love to your accomplishment!

Could you put in a note for the NEws that we are no longer tracking authors in the code scripts, but in the Description please

Hi Ben, I'm not sure what you meant by "but in the description", but I've added a note to the news. Is this okay?

Hi @bms63, I've made the changes, so this PR should be good to go.


Quick Tips Main Menu

Description
List of tips displayed in open help center main menu
https://www.figma.com/file/NHHMwIfxMnz39NxqkrFb7R/Stories-Post-Stable?node-id=2%3A91941

Acceptance Criteria

Should show when help center toggle button is set to open
Should be collapsable by clicking the 'x' button
Should have translated list of tips
Should show unread icon at front of items that are not read (UX only, logic separate),

Each list item should be clickable
When list item is clicked that tip should be the active view in the help center.

Updating footer links to:

Read start guide
Visit support forum
Storytime YouTube series

as per discussion here: https://xwp.slack.com/archives/CCCAUAH6F/p1612369517091700


Support Dialog

Started playing around with opening a dialog when you hit the "Support" button instead of taking you straight to email.

[x] How to add images in Frontend?
[x] Design tweaks
[x] Fix opacity

AMAZING

This is ready to go! /cc @ticky @toolmantim you can eyeball the design on my machine if you want.


inherting from electron.BrowserWindow not allowed

class BrowserWindow extends electron.BrowserWindow {
                              ^
TypeError: Class extends value undefined is not a constructor or null
https://stackoverflow.com/questions/50130888/error-when-extending-from-browserwindow-electron-class

Thank you for reporting this issue. I have looked at the sources, at it seems correct. Have you encountered this bug?

Yes, I was surprised at first and tried to workaround the issue but nothing seems to work.
I even tried to run with different version of electron to no avail.

Can you make a repository so I can recreate it?

Please close this the issue has seemingly been fixed on a new machine


carbonserver: support graphite-web's REMOTE_STORE_USE_POST

While Content-Type: application/x-www-form-urlencoded is supported, graphite-web sends POST requests with Content-Type: multipart/form-data.
Because we're explicitly calling req.ParseForm(), we are unable to process multipart/form-data.
Instead, we should remove req.ParseForm() entirely as calls to FormValue() automatically call ParseMultipartForm() / ParseForm() as necessary.
Ref: https://golang.org/pkg/net/http/#Request.FormValue
Fixes https://github.com/lomik/go-carbon/issues/249

"To access multiple values of the same key, call ParseForm and then inspect Request.Form directly."
I think removing ParseForm breaks ability to pass multiple targets in a query. So this shouldn't be done in all the places. Maybe something a bit more clever and format-dependant at least in getTargets func.
I'm also not sure how behavior will change if you specify e.x. &format=json&format=pickle


Fix sh issue.

Fix #82

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

thank you!


fix(diagram): Ignore labels with transforms from bounds calculation

Text transforms are used for translations and rotations. Right now we only use rotations, such that positions can be very large since they are transformed anyways. I propose to trust the user with the calculated points instead of checking them during our calculations.
This is needed to fix unnecessary whitespace in realization view diagrams in the context-diagrams extension #90.

Box labels shouldn't have any style overrides at all. They're just simply ignored during SVG conversion, and so it should be an error (or I guess "undefined behavior") in any other case.

They are not ignored because they come from the style of the Box:
https://github.com/DSD-DBS/py-capellambse/blob/799c529cc0824be59bac8ff5c5ca814fada2bc78/capellambse/diagram/_json_enc.py#L54-L89
This is done by text_style:
https://github.com/DSD-DBS/capellambse-context-diagrams/blob/main/capellambse_context_diagrams/context.py#L538-L561
Then this style override is resolved in draw_object.


[core] XML attributes contain unprintable bytes

APK: https://drive.google.com/file/d/1msaMxk32XHruCtEaQDJNk0IGnb7oOWBo/view?usp=sharing
Open AndroidManifest.xml and check attributes e.g.
    <application android:theme="@style/" android:label="@string/" android:icon="@mipmap/i_launcher_app" android:name="com.drweb.p000s.App" android:persistent="true" android:allowBackup="false" android:hardwareAccelerated="true" android:supportsRtl="true" android:roundIcon="@mipmap/i_launcher_app_round" android:appCategory="7" android:appComponentFactory="androidx.core.app.CoreComponentFactory">

Seems that those values are parsed in /jadx-core/src/main/java/jadx/core/xmlgen/ResTableParser.java
		String[] keyStrings = null;
		if (keyStringsOffset != 0) {
			is.skipToPos(keyStringsOffset, "Expected keyStrings string pool");
			keyStrings = parseStringPool(); // <<<
		}

		PackageChunk pkg = new PackageChunk(id, name, typeStrings, keyStrings);

That package is definitely obfuscated, @skylot do you have any ideas

how to restore valid values
at least where to filter original values? When written in file BinaryXMLParser.java, or when they are decoded?

@skylot
Can you please suggest something here? I meet this bug pretty often, so I want to fix it asap

The resources are heavily obfuscated and the key-strings are meaningless - Android just ignores them. Android only uses the resourceIds when loading a resource string, hence the only chance I see here is to check if the resource key name is an obfuscated string like in this case the character 0x1 and then ignore the string and generate a key name from it's resourceId instead.

@jpstotz
Yea, that's why I asked for an advise where is the best place to modify code and generate own resource names

I made some tests and it seems like the best way to handle such situations is to correct the resource names in the resources.arsc reader.
In detail I modified the end of the method private static String extractString8(byte[] strArray, int offset)
https://github.com/skylot/jadx/blob/master/jadx-core/src/main/java/jadx/core/xmlgen/CommonBinaryParser.java#L62:
	String s =  new String(arr, ParserStream.STRING_CHARSET_UTF8);
	if (s.length()==1) {
		s = "String_at_offset_0x"+Integer.toHexString(offset);
	}
	return s;

If you apply this hack all resources get generated unique and readable resource names that in the end are also referenced in the AndroidManifest.xml.

After some more tests I noticed that indeed you already pointed out a good position to perform the deobfuscation: https://github.com/skylot/jadx/blob/master/jadx-core/src/main/java/jadx/core/xmlgen/ResTableParser.java#L154
But back to your questions:

how to restore valid values

We are talking about Android resource names. If we just generate unique an ASCII name for each key this should be sufficient.

at least where to filter original values? When written in file BinaryXMLParser.java, or when they are decoded?

The correct approach IMHO would be to scan the keyValues for duplicate strings. I have not checked it but I would assume that in non-obfuscated apps the keyValues array does not contain a single duplicate value. Hence we could scan this array for duplicate and non-printable values and generate a new key value instead. The following code is a very simplified version without the check for duplicate values.
		keyStrings = parseStringPool();
		for (int i=0; i< keyStrings.length; i++) {
			String key = keyStrings[i];
			if (key.length()==1 && key.charAt(0)<32) { // ASCII 32 = SPACE
				keyStrings[i] = String.format("jadx_generated_key_%d", i);
			}
		}

Sorry guys I can't suggest anything here because I don't know much about resource processing in Android. I only can your implement suggestions :)
In PR #909 I implement @jpstotz approach, please check and review, hope this will help.

Fixed in PR #909


CreationHeight should not be accepted if set Immutable Properties

It is possible to pass creationHeight as immutables.
CreationHeight should not be accepted if set Immutable Properties.
https://github.com/AssetMantle/modules/blob/5571484f53d7b4b8716693cf58e58fbdce547e98/modules/orders/internal/transactions/make/keeper.go#L55-L63
Solution: CreationHeight should be picked from context everywhere, and in messages we should implement check if creationHeight set or not!

@deepanshutr

can use mutate method instead of add to avoid this issue


Remove kapa.ai bot from website due to ASF Policy

Expected Behavior
Kapa.ai is not allowed to use used as we don't have an privacy agreement with them and they potentially store users' queries
Actual Behavior
Kapa.ai is being used on the website
Steps to Reproduce the Problem
N/A
Release Note
N/A

Done


Changing cri.name=containerd to cri=nil still leaves containerd running on the node as systemd service

How to categorize this issue?
/kind bug
/priority 3
What happened:
When changing a worker pool from using containerd as a container runtime to docker, the new nodes still run containerd as systemd service
$ systemctl list-units | grep containerd
  containerd.service   loaded    active     running      containerd container runtime

The kubelet is correctly configured to not use containerd as external container runtime
$ ps -aux | grep kubelet
root        3962  4.7  1.5 1967744 116840 ?      SLsl 15:18   0:14 /opt/bin/kubelet --bootstrap-kubeconfig=/var/lib/kubelet/kubeconfig-bootstrap --config=/var/lib/kubelet/config/kubelet --cni-bin-dir=/opt/cni/bin/ --cni-conf-dir=/etc/cni/net.d/ --image-pull-progress-deadline=1m0s --kubeconfig=/var/lib/kubelet/kubeconfig-real --network-plugin=cni --pod-infra-container-image=<redacted> --v=2 --cloud-provider=external --enable-controller-attach-detach=true

The node is correctly reported to use the docker runtime
$ kubectl get nodes -o wide
NAME                                                      STATUS   ROLES    AGE     VERSION   INTERNAL-IP   EXTERNAL-IP   OS-IMAGE             KERNEL-VERSION        CONTAINER-RUNTIME
shoot--d058546--cri-migrate-worker-docke-z1-f8f48-c6bq2   Ready    <none>   5m24s   v1.20.6   <IP_ADDRESS>    <none>        Garden Linux 184.0   5.4.0-5-cloud-amd64   docker://19.3.13

What you expected to happen:
Only docker is started on the new nodes. There should be no signs of containerd
How to reproduce it (as minimally and precisely as possible):

Create a cluster with cri.name=containerd. This gets you a node using containerd as container runtime
Remove the cri and cri.name properties from your worker pool. This gets you a node using docker as container runtime, as this is the current default when cri==nil
Look at the output of kubectl get nodes -o wide to verify you're getting a new node with docker as container runtime while the old node with containerd container runtime is drained and deleted
ssh into the new node and look at the started systemd units

Anything else we need to know?:

This really is a new node

$ uptime
 15:28:09 up 10 min,  0 users,  load average: 0.34, 0.64, 0.52

The userData for the new node seems to incorrectly contain containerd (thanks @prashanth26)

kubectl get secret -n shoot--d058546--cri-migrate shoot--d058546--cri-migrate-worker-docke-z1-7c48e  -o json | jq -r .data.userData | base64 -d
#!/bin/bash
mkdir -p /etc/systemd/system/containerd.service.d
cat <<EOF > /etc/systemd/system/containerd.service.d/11-exec_config.conf
[Service]
ExecStart=
ExecStart=/usr/bin/containerd --config=/etc/containerd/config.toml
EOF
chmod 0644 /etc/systemd/system/containerd.service.d/11-exec_config.conf
[...]
systemctl daemon-reload
systemctl enable containerd && systemctl restart containerd
systemctl enable docker && systemctl restart docker
systemctl enable 'cloud-config-downloader.service' && systemctl restart 'cloud-config-downloader.service'

operatingsystemconfig-original is older than the machineset and has spec.criconfig.name=containerd
However, it does not contain containerd as a unit. status.units has

updatecacerts.service
docker-monitor.service
docker-logrotate.service
docker-logrotate.timer
systemd-sysctl.service
kubelet.service
kubelet-monitor.service
gardener-user.service

@vpnachev points out: seems like the operatingsystemconfig is re-used for the new machineset du to the fact how we compute the name: https://github.com/gardener/gardener/blob/2e0ba2a8efba0ce61c67fe09155bf41b04f2f0e7/pkg/operation/botanist/component/extensions/operatingsystemconfig/operatingsystemconfig.go#L330. With #4171 allowing changing cri.name on existing worker pools, we also need to consider this property in the name computation.

Environment:

Gardener version: 1.25.0
Kubernetes version (use kubectl version): 1.21.0
Cloud provider or hardware configuration: GCP
Others:

I think what we're seeing here is two things coming together

as @vpnachev pointed out, the oscName does not depend on the selected worker.cri and therefore the same operatingsystemconfig is used when the CRI for an existing worker pool is changed. My understanding is that this shouldn't be an issue in itself  – it should be possible to reconcile this correctly
osc.spec.criconfig is only changed when worker.cri!=nil: https://github.com/gardener/gardener/blob/278e9b4e584404e14ec1b0d214987a19f4352eb0/pkg/operation/botanist/component/extensions/operatingsystemconfig/operatingsystemconfig.go#L579-L583 – which means that in combination with the above explained re-usage, the operatingsystem extension ends up writing containerd related things into the cloud-config even if you just switched from docker to containerd: https://github.com/gardener/gardener-extension-os-gardenlinux/blob/a5dd5e2c0c83aaed570fa52384719ba8b2ba85cd/pkg/generator/templates/cloud-init.gardenlinux.template#L15
My conclusion is that although this is fixed by changing how oscName is generated to include worker.cri would help, this doesn't seem to be the intended way to fix it. I'd rather go ahead and modify the logic setting osc.spec.criconfig to respect the fact that it might have a value currently that doesn't match with the desired state (i.e. delete this when worker.cri==nil).

WDYT?

/assign

As the operatingsystemconfig is shared between the old worker pool and the new worker pool, this leads to a reconfiguration of the old worker pool during the node rollout. I think this is also what @vpnachev observed in the first place, when looking at this. Here's the scenario for a single node in a worker pool configured to use containerd. Afterwards the worker pool is changed to cri==nil, meaning it defaults to use docker:
 kubectl get nodes -o wide
NAME                                                   STATUS   ROLES    AGE   VERSION   INTERNAL-IP   EXTERNAL-IP   OS-IMAGE             KERNEL-VERSION        CONTAINER-RUNTIME
shoot--dev--shoot-gcp-cri-cpu-worker1-z1-6445c-24c5s   Ready    <none>   44m   v1.20.6   <IP_ADDRESS>    <none>        Garden Linux 184.0   5.4.0-5-cloud-amd64   containerd://1.4.1

After re-configuring the pool, a new nodes gets created and the old one gets reconfigured to also use docker(!)
 kubectl get nodes -o wide
NAME                                                   STATUS                     ROLES    AGE     VERSION   INTERNAL-IP   EXTERNAL-IP   OS-IMAGE             KERNEL-VERSION        CONTAINER-RUNTIME
shoot--dev--shoot-gcp-cri-cpu-worker1-z1-6445c-24c5s   Ready,SchedulingDisabled   <none>   47m     v1.20.6   <IP_ADDRESS>    <none>        Garden Linux 184.0   5.4.0-5-cloud-amd64   docker://19.3.13
shoot--dev--shoot-gcp-cri-cpu-worker1-z1-74fbd-7vhht   Ready                      <none>   2m56s   v1.20.6   <IP_ADDRESS>    <none>        Garden Linux 184.0   5.4.0-5-cloud-amd64   docker://19.3.13

So in contrast to my initial assumptions above, the only solution seems to be to include the cri in the operatingsystemconfig name in order to unwanted side-effects on nodes in the old worker pool.

Our change didn't quite work as expected: #4390

We agreed that we're not going to fix this one, but rather wait until everyone is on k8s >= 1.22 where this issue goes away automatically (as there's no way to configure nil anymore).

OK, thanks @voelzmo, then let's
/close
this issue for now given that there is nothing left to be done.


Get directory of VSCode for Portable Setup

I know the topic is exactly same as #82602 , more #11918
I'm struggled in the same problem
I want share vscode and python (lite version) with people,
if ${execPath} present the DIRECTORY where Code.exe located, not the full path like now...
forgive my poor English

if ${execPath} present the DIRECTORY where Code.exe located, not the full path like now...

Why exactly can't you use execPath? Seems to give you exactly what you need.

@joaomoreno what I need is exactly same as #82602
instead of Arduino，I need to share PYTHON lite pack with other fellow

And you want this in your debug launch configs?

@joaomoreno I placed the lite PYTHON pack in the VS Code DIRECTORY, like:
VSCode
 |-Code.exe
 |-Python
     |-python.exe
     |-...
 |-...

I want set the "python.pythonPath": "${execPath}\Python\python.exe"
so Python and VS code are all portalbe

So in your settings, I see.

/duplicate
https://github.com/microsoft/vscode/issues/2809
Variables in the settings are not supported out of the box. Right now extensions are resolving this by themselves.


Init version

Are you going for maximum perf?
The parser code looks nice but it is not efficient. If you want to I can elaborate and comment on the code.

Yes pref is indeed important! It's the first version, so it does need some improvements.
I'm curious what is currently the most inefficient part.

@jods4  I added you as collaborator :)

Current coverage is 0.00% (diff: 0.00%)

No coverage report found for master at 7d0235e.

Powered by Codecov. Last update 7d0235e...ef8d5d8

@304NotModified Please have a look at my fork:
https://github.com/jods4/yamtp/blob/init/src/Parser/FastTemplateParser.cs
I created an equivalent parser based on your code but faster. It passes all your tests.
In my fork there is a benchmark as well (with just one random string):

Host Process Environment Information:
BenchmarkDotNet=v<IP_ADDRESS>
OS=Windows
Processor=?, ProcessorCount=4
Frequency=3117797 ticks, Resolution=320.7393 ns, Timer=TSC
CLR=CORE, Arch=64-bit ? [RyuJIT]
GC=Concurrent Workstation
JitModules=?
dotnet cli version: 1.0.0-preview2-003121

Type=Program  Mode=Throughput  Toolchain=Core
GarbageCollection=Concurrent Workstation

 Method |        Median |     StdDev |

----------- |-------------- |----------- |
BaseParser | 2,320.8292 ns | 13.7305 ns |
FastParser |   866.4542 ns |  4.6910 ns |
Memory allocations are down as well.
Why is it faster?

Removed all iterators. They allocate on heap, require interface calls and are unlikely to be inlined. Moreover you were creating many iterators, sometimes just to read one character!
Removed all StringBuilders. They allocate needlessly on heap. You were doing one-by-one char copies. If you're unlucky with the size of your strings your SB may have to expand (more allocs and copies). I am only using Substring which allocates only the target string and performs a memcpy (or its moral equivalent).

The design is to have short methods likely to be inlined (like Peek), use direct char access with an index in a basic loop and rely on the built-in, natively optimized string functions (IndexOf, Substring).

Fantastic! Looks really great! 👍 👍   also thanks for the explanation!

Could you send a PR?

@304NotModified Since you gave write access to the repo, I directly merged my faster parser into your branch.

This is great :+1:
I'd like to have a shot at profiling and optimising a couple of things too, once this is merged (I think there could be some significant advantages to pursuing a struct-based part design, but need to tinker before I can come up with a decent proposal).
One thing you might consider; in Serilog I used the terms destructuring and destructuring operator (@) because the syntax was originally intended to have more sophisticated serialization abilities. In practice, this didn't turn out to be worth the syntactic complexity so it was never implemented, and we plug in policies to handle these scenarios instead.
Since that time I've been considering a proposal on the Serilog project to rename the concepts capturing and structure capturing operator which are closer in meaning to what the concept entails and generally should require less explanation.
Just a thought; I can see some benefits from us all being consistent, but it's also nice to start with a clean slate in a new implementation :-) (cc @AdamChester)

Since that time I've been considering a proposal on the Serilog project to rename the concepts capturing and structure capturing operator which are closer in meaning to what the concept entails and generally should require less explanation.

Great! The term destructuring has annoyed me :+1:

I'd like to have a shot at profiling and optimising a couple of things too, once this is merged (I think there could be some significant advantages to pursuing a struct-based part design, but need to tinker before I can come up with a decent proposal).

That would be great. It's indeed not in final state. Well merge this one then.

One thing you might consider; in Serilog I used the terms destructuring and destructuring operator (@) because the syntax was originally intended to have more sophisticated serialization abilities. In practice, this didn't turn out to be worth the syntactic complexity so it was never implemented, and we plug in policies to handle these scenarios instead.

I'm curious, do you have some examples of that?

Since that time I've been considering a proposal on the Serilog project to rename the concepts capturing and structure capturing operator which are closer in meaning to what the concept entails and generally should require less explanation.

So stringify will be capture and destructure will be structure?


add appId configuration parameter

Summary
add appId parameter to make this option configurable as well. See #51
Test plan
Unfortunately I was unable to test the changes locally with my fork, maybe you can take a look

I think one issue is that currently, this will result in supplying appId=null to algolia when no appId is specified. So we could set the current appId as a default. Or do you have a better idea?

I updated the PR to set the default value of appId to the current value upstream

Thanks!

Thanks a lot for merging this. Could you also release a new version, please? This is kind of blocking us at the moment to use this awesome theme internally.
Thanks a lot!

@msvechla done, sorry for the lonnggg delay!


VideoViewer Activity add key mapping

Hey @llaske
In the video viewer activity , I have found some issues. I would like you to review them & give your thoughts

Functionality break:  when I try to resize the window the library section popup breaks, the scrollbar comes on half of the section. I am attaching video for reference

https://user-images.githubusercontent.com/96445392/222932951-8aa2e93d-d11f-44d8-b1fb-c70e15038d30.mp4
Suggestion for mapping Arrow keys

I would like to add keyboard eventlisteners on the left and right, page changing buttons Because since there are so many pages it becomes   tiring to change the pages by clicking on buttons instead i would like to implement the functionality of left & right arrow keys to change pages which would improve the UX.

I'm okay to add a key mapping.
No for the resize feature. This popup is just displayed at the first start, we don't need to change it.

@llaske I'll work on the key mapping part then.

@llaske i have raised the pr please review it

Fixed in https://github.com/llaske/sugarizer/pull/1327


kd loss

why softmax for teacher output , but log softmax for student output ?

it would better help me understand your question if you could mention which file & lines that you were referring to.

oh It is in you Model /net.py/ loss_fn_kd function, line 107.

I see. You can refer to the definition/document of PyTorch's KL Divergence loss (KLDivLos). Here it requires inputs to be probability distributions and log-probability distributions, and that's why we're using softmax and log-softmax on teacher/student outputs (which were raw scores).

@peterliht  Why KL divergence is used to compute KD-loss? The paper "Distilling the Knowledge in a Neural Network" says,

The first objective function is the cross entropy with the soft targets

The KD-loss should be -\sum_{i=1}^C soft_target_i * \log(softmax(output / T))？

Ok. I got it. This is my naive implementation:
        x, target = x.to(device), target.to(device)
        with torch.no_grad():
            out = teacher(x)
            soft_target = F.softmax(out/T, dim=1)
        hard_target = target
        out = student(x)  ## this is the input to softmax
        logp = F.log_softmax(out/T, dim=1)
        loss_soft_target = -torch.mean(torch.sum(soft_target * logp, dim=1))
        loss_hard_target = nn.CrossEntropyLoss()(out, hard_target)
        loss = loss_soft_target * T * T + alpha * loss_hard_target

@nowgood The p_i in cross entropy with hard target is not the same p_i in cross entropy with soft target.
The first p_i = softmax(fc)
The second one = softmax(fc / T)

@xmfbit H(p) is constant, right ?

yes，it do not join backward.so wo can ignore this term

Has anyone tried cross-entropy? Does it work better or worse than KL?

Has anyone tried cross-entropy? Does it work better or worse than KL?

No. They should lead to same or similar result given the above discussion .

Has anyone tried cross-entropy? Does it work better or worse than KL?

@michaelklachko The gradients of student's output are same using KL divergence and classic KD loss by Hinton's paper. You can refer to the figure given by nowgood. Use this code to check it numerically (p, q are different from nowgood's figure).
import torch
import torch.nn as nn
import torch.nn.functional as F

N = 10
C = 5
# softmax output by teacher
p = torch.softmax(torch.rand(N, C), dim=1)
# softmax output by student
q = torch.softmax(torch.rand(N, C), dim=1)
#q = torch.ones(N, C)
q.requires_grad = True
# KL Diverse
kl_loss = nn.KLDivLoss()(torch.log(q), p)
kl_loss.backward()

grad = q.grad

q.grad.zero_()
ce_loss = torch.mean(torch.log(q) * p)
ce_loss.backward()

grad_check = q.grad
print grad
print grad_check

Great, thanks!

Great, thanks!

@michaelklachko  Sorry but I found there are some bugs in the code I provided. (when checking the gradient using print, the grad refer to the same instance with grad_check, so they must be equal!  )   I paste a right one below.
And I want to figure out that the author's implementation of KD loss using torch.mm.KLDivLoss in the code will cause the gradient  scaled by the number of classification categories, compared with using CrossEntropy. See the torch documentation for detail.

size_average (bool, optional) – Deprecated (see reduction). By default, the losses are averaged over each loss element in the batch. Note that for some losses, there multiple elements per sample.

reduction (string, optional) – Specifies the reduction to apply to the output: ‘none’ | ‘elementwise_mean’ | ‘sum’. ‘none’: no reduction will be applied, ‘elementwise_mean’: the sum of the output will be divided by the number of elements in the output, ‘sum’: the output will be summed. Note: size_average and reduce are in the process of being deprecated, and in the meantime, specifying either of those two args will override reduction. Default: ‘elementwise_mean’

import torch
import torch.nn as nn
import torch.nn.functional as F
# sample number
N = 10
# category number
C = 5
# softmax output of teacher
p = torch.softmax(torch.rand(N, C), dim=1)
# logit output of student
s = torch.rand(N, C, requires_grad=True)
# softmax output of student, T = 1
q = torch.softmax(s, dim=1)
# KL Diverse
# this is the implementation of the author's
# torch will do element mean because it is the default option
# kl_loss = nn.KLDivLoss()(torch.log(q), p)
# I think this should be the right solution
kl_loss = (nn.KLDivLoss(reduction='none')(torch.log(q), p)).sum(dim=1).mean()
kl_loss.backward(retain_graph=True)
print 'grad using KL DivLoss'
print s.grad
# clear the grad
s.grad.zero_()
ce_loss = torch.mean(torch.sum(-torch.log(q) * p, dim=1))
# ce_loss = torch.mean(-torch.log(q) * p)
ce_loss.backward()
print 'grad using ce loss'
print s.grad
# the real gradient of s should be `(q - p) / batch_size`
print 'real grad, should be (q-p) / batch_size'
print (q - p) / N

@peterliht Could you check this?

Great, thanks!

@michaelklachko Sorry but I found there are some bugs in the code I provided. (when checking the gradient using print, the grad refer to the same instance with grad_check, so they must be equal! ) I paste a right one below.
And I want to figure out that the author's implementation of KD loss using torch.mm.KLDivLoss in the code will cause the gradient scaled by the number of classification categories, compared with using CrossEntropy. See the torch documentation for detail.

size_average (bool, optional) – Deprecated (see reduction). By default, the losses are averaged over each loss element in the batch. Note that for some losses, there multiple elements per sample.

reduction (string, optional) – Specifies the reduction to apply to the output: ‘none’ | ‘elementwise_mean’ | ‘sum’. ‘none’: no reduction will be applied, ‘elementwise_mean’: the sum of the output will be divided by the number of elements in the output, ‘sum’: the output will be summed. Note: size_average and reduce are in the process of being deprecated, and in the meantime, specifying either of those two args will override reduction. Default: ‘elementwise_mean’

import torch
import torch.nn as nn
import torch.nn.functional as F
# sample number
N = 10
# category number
C = 5
# softmax output of teacher
p = torch.softmax(torch.rand(N, C), dim=1)
# logit output of student
s = torch.rand(N, C, requires_grad=True)
# softmax output of student, T = 1
q = torch.softmax(s, dim=1)
# KL Diverse
# this is the implementation of the author's
# torch will do element mean because it is the default option
# kl_loss = nn.KLDivLoss()(torch.log(q), p)
# I think this should be the right solution
kl_loss = (nn.KLDivLoss(reduction='none')(torch.log(q), p)).sum(dim=1).mean()
kl_loss.backward(retain_graph=True)
print 'grad using KL DivLoss'
print s.grad
# clear the grad
s.grad.zero_()
# bug2: should not do element wise mean operation
# ce_loss = torch.mean(-torch.log(q) * p)
ce_loss = torch.mean(torch.sum(-torch.log(q) * p, dim=1))
ce_loss.backward()
print 'grad using ce loss'
print s.grad
# the real gradient of s should be `(q - p) / batch_size`
print 'real grad, should be (q-p) / batch_size'
print (q - p) / N

@peterliht Could you check this?
when I tried to use the loss code provided by author in new task which has 1000 categories, I found the kl loss term is too small , nearly 1e-6, and both in CIFAR10 and my task, i seems the kl loss is never decrease.  Can you tell me how to fix this problem, thank you.

Great, thanks!

@michaelklachko Sorry but I found there are some bugs in the code I provided. (when checking the gradient using print, the grad refer to the same instance with grad_check, so they must be equal! ) I paste a right one below.
And I want to figure out that the author's implementation of KD loss using torch.mm.KLDivLoss in the code will cause the gradient scaled by the number of classification categories, compared with using CrossEntropy. See the torch documentation for detail.

size_average (bool, optional) – Deprecated (see reduction). By default, the losses are averaged over each loss element in the batch. Note that for some losses, there multiple elements per sample.

reduction (string, optional) – Specifies the reduction to apply to the output: ‘none’ | ‘elementwise_mean’ | ‘sum’. ‘none’: no reduction will be applied, ‘elementwise_mean’: the sum of the output will be divided by the number of elements in the output, ‘sum’: the output will be summed. Note: size_average and reduce are in the process of being deprecated, and in the meantime, specifying either of those two args will override reduction. Default: ‘elementwise_mean’

import torch
import torch.nn as nn
import torch.nn.functional as F
# sample number
N = 10
# category number
C = 5
# softmax output of teacher
p = torch.softmax(torch.rand(N, C), dim=1)
# logit output of student
s = torch.rand(N, C, requires_grad=True)
# softmax output of student, T = 1
q = torch.softmax(s, dim=1)
# KL Diverse
# this is the implementation of the author's
# torch will do element mean because it is the default option
# kl_loss = nn.KLDivLoss()(torch.log(q), p)
# I think this should be the right solution
kl_loss = (nn.KLDivLoss(reduction='none')(torch.log(q), p)).sum(dim=1).mean()
kl_loss.backward(retain_graph=True)
print 'grad using KL DivLoss'
print s.grad
# clear the grad
s.grad.zero_()
# bug2: should not do element wise mean operation
# ce_loss = torch.mean(-torch.log(q) * p)
ce_loss = torch.mean(torch.sum(-torch.log(q) * p, dim=1))
ce_loss.backward()
print 'grad using ce loss'
print s.grad
# the real gradient of s should be `(q - p) / batch_size`
print 'real grad, should be (q-p) / batch_size'
print (q - p) / N

@peterliht Could you check this?
when I tried to use the loss code provided by author in new task which has 1000 categories, I found the kl loss term is too small , nearly 1e-6, and both in CIFAR10 and my task, i seems the kl loss is never decrease.  Can you tell me how to fix this problem, thank you.

Try to decrease your lr or train with CE loss to check bugs

@Bo396543018 The same here, did you solve the problem?

@Bo396543018 The same here, did you solve the problem?

Hi,
Using https://github.com/peterliht/knowledge-distillation-pytorch/issues/2#issuecomment-389764777 implementation, I am getting large Soft loss values like 200, but using https://github.com/peterliht/knowledge-distillation-pytorch/blob/master/model/net.py#L100 implementation, my Soft loss value is like 1e-6. It's surprising because we expect results to be similar.
Any help will be grateful. Thanks!

So what is the answer for: why softmax for teacher output , but log softmax for student output ?

@pratikchhapolika
https://pytorch.org/docs/stable/generated/torch.nn.functional.kl_div.html#torch.nn.functional.kl_div
it's just how pytorch KLDIvLoss() takes the arguments
input=predicted log softmax
target=softmax if log_target==False
as shown above KL Divergence = CrossEntropy - Entropy

log(p(y)) = student output
q(y) = teacher output


Excluding entities

The text in this section states that there is an Excluded Machines tab, i'm not seeing this in my portal. Is there some prerequisite I need to get that feature or is this text out of date?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 8fbda4c0-2222-b67a-615e-261fea7f3f05
Version Independent ID: 13241ed3-46e9-5821-4760-4bdb9564c69e
Content: Working with discovered apps in Cloud App Security
Content Source: CloudAppSecurityDocs/discovered-apps.md
Service: cloud-app-security
GitHub Login: @shsagir
Microsoft Alias: shsagir

Thanks for contacting Microsoft about your issue. As we understand it, you're describing a problem with the product itself and not with the product documentation.
To get assistance or support for your product issue, please open a support ticket.


Recipe Creation Errors Should be displayed on the top of page

Add recipe
Open In Brief panel, leave decription filed empty
Close In Brief Panel
Complete rest of the steps
Click save and continue

The user is not taken to listing page, but the error -- 'description is required' is not visible. Confusing behavior

fixed: added alert at top of page with all the errors

This issue was moved to k-sheth/calendar-khana-lagao#48


Docs

Some early work on regression docs (-> blog post). In regions of the domain that were not seen during training, predictive uncertainty should be really high. See, for example, my results for a Bayesian Neural Network lifted from LaplaceRedux.jl:

When I run a similar experiment using CP (here split conformal for XGBoost), results look very different:

Considering how CP works, I don’t find this result too surprising, it’s just not great and I’m now a bit confused as to how exactly the coverage guarantees work.
The chart comes is produced in this notebook, where I’ve been trying to replicate this tutorial from MAPIE.
It would be useful to cross-check the results against the MAPIE results (notebook stored here). In there they don't really look at values of x outside of the training range at the prediction stage, but it should be straight-forward to make adjustments to the code in the notebook.

I've now run the MAPIE tutorial with gradient boosting instead of polynomial reg and the results are the same (so this is not an implementation issue):

Quite puzzled now: looking at the chart, test coverage left and right of the training points is essentially zero. I'm probably just misunderstanding the coverage guarantee.

Codecov Report

Merging #33 (0ad8296) into main (479b94f) will decrease coverage by 12.86%.
The diff coverage is 46.23%.

@@             Coverage Diff             @@
##             main      #33       +/-   ##
===========================================
- Coverage   99.32%   86.45%   -12.87%
===========================================
  Files           6        9        +3
  Lines         297      384       +87
===========================================
+ Hits          295      332       +37
- Misses          2       52       +50

Impacted Files
Coverage Δ

src/ConformalModels/inductive_bayes.jl
0.00% <0.00%> (ø)

src/ConformalModels/plotting.jl
50.00% <50.00%> (ø)

src/ConformalModels/inductive_classification.jl
98.41% <100.00%> (ø)

src/ConformalModels/inductive_regression.jl
100.00% <100.00%> (ø)

src/ConformalModels/transductive_classification.jl
100.00% <100.00%> (ø)

src/ConformalModels/transductive_regression.jl
100.00% <100.00%> (ø)

src/ConformalModels/utils.jl
100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

When using polynomial regression as opposed to gradient boosting, the results look better (in some cases). But this is driven by the fact that separate fits for subsets of the data (CV, Jackknife, ...) reflect the underlying stochasticity of the data.

Again, I suppose exchangeability is violated: I draw training data from $\mathcal{X}\sim\text{Unif}(-3,3)$ and then map to $\mathcal{Y}$. Test data left and right of the training data is not drawn from $\mathcal{X}$, so we have covariate shift (will be interesting to look at Section 4.5 in this context). Is that right @aangelopoulos? Thanks in advance and apologies if trivial (still fairly new territory for me and trying to wrap my head around things).

Hey @pat-alt !  Happy to help!
I think you have the right idea --- the example that you've given comes from an extreme covariate shift.
If you run covariate shift conformal using Section 4.5 of the gentle intro, what will happen is that your intervals will explode outside the training data, since the likelihood ratio gets very large.
Without using the covariate shift technique, conformal will only give you the marginal guarantee if the new data is i.i.d. with your old data... so the regions with no training data don't really matter, since they occur with very low probability.
My suggestion would be this.  If you like the way the Bayesian NN performs in this setting, use it as your heuristic notion of uncertainty. Then calibrate it with conformal. Best of both worlds!

Hey @pat-alt ! Happy to help!
I think you have the right idea --- the example that you've given comes from an extreme covariate shift. If you run covariate shift conformal using Section 4.5 of the gentle intro, what will happen is that your intervals will explode outside the training data, since the likelihood ratio gets very large.
Without using the covariate shift technique, conformal will only give you the marginal guarantee if the new data is i.i.d. with your old data... so the regions with no training data don't really matter, since they occur with very low probability.
My suggestion would be this. If you like the way the Bayesian NN performs in this setting, use it as your heuristic notion of uncertainty. Then calibrate it with conformal. Best of both worlds!

Got it - thank you very much!
I'm gradually working my way through your tutorial (which is fantastic by the way!). Both Conformalized Bayes #31 and covariate shift conformal #39 are on the to-do list 😄
Thanks again for your help - much appreciated!

Thanks Pat!!  This package that you are building is great!!


OS.get_system_time_msecs output is wrong

Godot version:

3.2.3
OS/device including version:

OS: Arch Linux
Issue description:

When running OS.get_system_time_msecs() in _physics_process(), it seems to be counting incorrectly. The last three numbers will stay the same for multiple lines before flipping even though they're supposed to be milliseconds. It's hard to describe, so here's a video of it happening:
https://user-images.githubusercontent.com/20866468/102701162-f440ef80-4208-11eb-9b7e-c9ca06ec1b32.mp4
Also, I'm not positive, but I think this might be causing some serious network sync latency issues, because my solution uses this function to sync the world state.
Steps to reproduce:
Put print(OS.get_system_time_msecs()) in _physics_process()
Minimal reproduction project:

SystemTimeTest.zip

I'm unable to reproduce this on Debian 10.7 (Linux pc 4.19.0-12-amd64 #1 SMP Debian 4.19.152-1 (2020-10-18) x86_64 GNU/Linux). Milliseconds are counting up just fine.

I don't think it's an issue with my system clock. This bash script seems to be counting just fine:
#!/bin/bash
while true
do
    date +"%T.%3N"
done

Out of curiosity, what do you get if you run date +%s.%3N multiple times?

This:
https://user-images.githubusercontent.com/20866468/102701743-ebebb300-420e-11eb-92ed-4424929f364b.mp4

I also can't reproduce but with Ubuntu 20.04
Are you sure, that you don't set physics fps in project settings to 1?

Yes I'm sure. I didn't change any project settings, you can check in the project I uploaded.

I ran a test on my laptop (also running Arch Linux) and got this result:
https://user-images.githubusercontent.com/20866468/102815211-deeed100-4380-11eb-8136-63453a30b2bd.mp4
Does this look right?

This is fixed by: #39189 . Also, don't use OS.get_*_time* functions for precision timing, use OS.get_ticks_* instead.

How does that pull request fix it not updating correctly?

How does that pull request fix it not updating correctly?

Oh, my bad I didn't read the description well, and thought you were on Windows (which had a broken get_system_time_msecs).

Replacing the OS.get_system_time_msecs() with OS.get_ticks_msecs() in the above problem yields the same broken results.

This is really weird, get_ticks_msec/get_ticks_usec use a completely different clock source (and that one is monotonic). What if you use get_ticks_usec? Even two consecutive calls to OS.get_ticks_usec() usually return different values.

What if you use get_ticks_usec?

https://user-images.githubusercontent.com/20866468/103105736-7a33b080-45e4-11eb-8302-3e661adb2365.mp4

So it just occurred to me that roughly the same output is printed exactly 8 times per iteration, which reminded me of this particular piece of code:
https://github.com/godotengine/godot/blob/31d0f8ad8d5cf50a310ee7e8ada4dcdb4510690b/main/main.cpp#L2064-L2068
I then managed to reproduce a similar output by executing the following snippet with godot --frame-delay 1000 -s main.gd
# main.gd
extends MainLoop

func _iteration(delta: float) -> bool:
	print(OS.get_system_time_msecs())
	return false

Output:
1608847883988
1608847883988
1608847883988
1608847883988
1608847883988
1608847883988
1608847883988
1608847883988
1608847884988
1608847884988
1608847884988
1608847884988
1608847884988
1608847884988
1608847884988
1608847884988
1608847885988
1608847885988
1608847885988
1608847885988
1608847885988
1608847885988
1608847885988
1608847885988

So the question now is: what is limiting the FPS?

Interesting. Have any ideas of what I can test to figure it out?

why do you keep using get_system_time_msecs while I explicitly told you that's a bad idea.
It's useless to post the result of get_system_time_msecs instead of get_ticks_usec.

What are you talking about? The last output I posted was from get_ticks_usec.

I was referring to @Demindiro 's last test.
Anyway, as @Demindiro mentioned, what you are seeing might be the side effect of the way _physics_process  happens (see also #17353), i.e. the fact that the delta there does not directly represent the time passed since the last function call, but only the time this step should care about.
Although, this should only be relevant when your FPSs (Main::iteration) is lower than the physics FPS (which needs to be constant if you want the simulation to be stable).
@PopeRigby can you provide some info on your system (CPU/GPU/Monitor refresh rate)?
Can you check if you end up having a higher physics FPS then rendering FPS?
Engine.get_frames_per_second() should be 60 or greater/equal to the value you set in physics/common/physics_fps project settings.
float(Engine.get_idle_frames()) / max(1, float(Engine.get_physics_frames())) should stabilize to be >= 1.
That said, I don't see how the minimal reproduction project you provided could end up doing less then 60 FPS unless there's some (driver?) issue which you should notice anyway when running any project :confused:  .

@PopeRigby can you provide some info on your system (CPU/GPU/Monitor refresh rate)?

Sure.
CPU: Ryzen 5 3700X
GPU: RX 5700XT
Refresh Rate: 60Hz

Can you check if you end up having a higher physics FPS then rendering FPS?

I'm getting some really bizarre numbers if I print Engine.get_frames_per_second() within physics_process. It starts out at around 44, then it drops down to 13, and then finally it drops to 1 and stays there.

I'm getting some really bizarre numbers if I print Engine.get_frames_per_second() within physics_process. It starts out at around 44, then it drops down to 13, and then finally it drops to 1 and stays there.

@PopeRigby this likely confirms you have some driver issues, with those specs, you definitively should not have problems reaching 60FPS in an empty scene.
One thing you can try is disabling vsync and see if that's an issue with your setup (OS.vsync_enabled = false), but you should also make sure that your drivers are working correctly and can run GL applications well (refer to Arch documentation for that).
In any case, I think you should open a new issue since this one has gone quite off-target, explaining the low FPS in an empty scene with your setup, detailing your hardware and software (OS version, kernel version, mesa version, etc) and reporting glxinfo and glxgears results.

One thing you can try is disabling vsync and see if that's an issue with your setup (OS.vsync_enabled = false)

After disabling v-sync, my FPS starts out at one and climbs to 5 digits.

but you should also make sure that your drivers are working correctly and can run GL applications well

I can run GL applications well. I can even run Godot applications very well.
Also, in that game, unfocusing the game window made it drop down to 1, but refocusing it made it climb back up to 60. I'm starting to think that it has something to do with unfocusing the window. That's what my new issue will be about.

Closing, as the discussion will move over to #44741.


Plagiarism checks: Mark programming submissions detected by cpc as plagiarism and reduce their score

⚠ This PR contains braking db changes. Please use ts4 to deploy it. More notes in Steps for Testing
Checklist
General

[x] I tested all changes and their related features with all corresponding user types on a test server.
[x] Language: I followed the guidelines for inclusive, diversity-sensitive, and appreciative language.
[x] I chose a title conforming to the naming conventions for pull requests.

Server

[x] Important: I implemented the changes with a very good performance and prevented too many (unnecessary) database calls.
[x] I followed the coding and design guidelines.
[x] I added multiple integration tests (Spring) related to the features (with a high test coverage).
[x] I added pre-authorization annotations according to the guidelines and checked the course groups for all new REST Calls (security).
[x] I documented the Java code using JavaDoc style.

Client

[x] Important: I implemented the changes with a very good performance, prevented too many (unnecessary) REST calls and made sure the UI is responsive, even with large data.
[x] I followed the coding and design guidelines.
[x] Following the theming guidelines, I specified colors only in the theming variable files and checked that the changes look consistent in both the light and the dark theme.
[x] I documented the TypeScript code using JSDoc style.
[x] I added multiple screenshots/screencasts of my UI changes.
[x] I translated all newly inserted strings into English and German.

Changes affecting Programming Exercises

[x] I tested all changes and their related features with all corresponding user types on Test Server 4 (due to breaking db changes)

Motivation and Context
My previous PR #6666 introduced cpc, but until this PR there was no immediate feedback delivered to the student about plagiarism detected in his or her submission. Changes introduces here notify the student about suspected plagiarism.
Due to an issue with the current implementation of handling results of plagiarism checks for programming exercises this PR contains also changes in how data is exchanged between Jplag and Artemis.
This implements CPC-3 and CPC-5 milestone. More about that can be discovered in my thesis proposal: https://confluence.ase.in.tum.de/display/ArTEMiS/MA+Jakub+Riegel?preview=/157431627/166332701/riegel_proposal.pdf
Description
This PR adds programming exercises to the features introduced in #6804. Please check its description for detailed information.
Steps for Testing

1 Instructor
2 Students
1 Course
for convenience use the cpc-mark-submissions-as-plagiarism-programing-1min branch which triggers cpc every 1 minute
due to database changes please deploy it to ts4 by using #6946

General:

Create programming exercise with continuous plagiarism control enabled (use Enabled checkbox on exercise creation form)
Create two similar submission for the exercise
Wait 2 minutes (results need to synchronise)
Verify that ⚠ Suspicion of plagiarism warning was placed and 0 points result was posted (see screenshots at the bottom)
Change one submission to something completely different
Wait 2 minutes
Verify that warnings and results are deleted

Disputing results:

Generate submissions with plagiarism detected by the cpc (using the steps above)
Change exercise due date to the past
As a student go into your submission page and dispute the result
As instructor approve and decline the dispute
If approved: new scores are displayed; if not: old results are displayed

Review Progress
Performance Review

[x] I confirm that the client changes (in particular related to REST calls and UI responsiveness) are implemented with a very good performance
[x] I confirm that the server changes (in particular related to database calls) are implemented with a very good performance

Code Review

[ ] Code Review 1
[ ] Code Review 2

Manual Tests

[ ] Test 1
[ ] Test 2

Exam Mode Test

[ ] Test 1
[ ] Test 2

Test Coverage

Class/File
Line Coverage
Confirmation (assert/expect)
Note

TextPlagiarismResultConverter.java
54%
✅
Logic of TextPlagiarismResultConverter was implemented already and this PR just moves it to separate class. Those methods were not tested before. It is out of the scope of cpc to implement detailed tests for them. There is an issue to do it: .#6966

JPlagSubmissionDataExtractor.java
86%
✅
-

Screenshots
Programming exercise page header when cpc detects plagiarism:

This PR is merged to cpc due to issues with running it on test servers. New cpc related features will be targeting cpc branch and tested locally until issues with test servers are resolved.


Disable bitcoin when using Ledger wallet

While supporting software wallets only, we need to hide bitcoin.

@kyranjamie this seems like an important one for me to take on today?

@fbwoolf  indeed!


[WIP] Fixes test_nccl_pushpull flaky test

Description
(Brief description on what this PR is about)
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.

[ ] The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant JIRA issue created (except PRs with tiny changes)
[ ] Changes are complete (i.e. I finished coding on this PR)
[ ] All changes have test coverage:
Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
[ ] Code is well-documented:
For user-facing API changes, API doc string has been updated.
For new C++ functions in header files, their functionalities and arguments are documented.
For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
[ ] To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

[ ] Feature1, tests, (and when applicable, API doc)
[ ] Feature2, tests, (and when applicable, API doc)

Comments

If this change is a backward incompatible change, why must this change be made.
Interesting edge cases to note here

CI doesn't have build with NCCL yet. cc @marcoabreu

@mxnet-label-bot [pr-work-in-progress]

@lebeg do you know if multiple gpus are required to reproduce the flakyness here? I haven't been able to reproduce on my single 1080 Ti (too poor to run dual T_T)

@perdasilva  Yes, I was. In fact if you look closer to the test than you realise that it would pass only in the case you have 1 GPU :) WIP fix is here https://github.com/apache/incubator-mxnet/pull/12477

@lebeg I'm sorry I came in too late for the game. I'll close this PR and look for another flaky test =D


In settings menu, no option to download homebrew covers

There is only the setting download covers for psx/psp/psvita but not for homebrews (if they have covers).

They do have covers, for example Bad Company 2 Android Port, Tomb Raider Classic Android Port, and Mario Kart Vita. They're vita style covers. Originally in v1.0.0 there was intended to be an option for it to override all at once every homebrew that had a cover, override it into vita and download said cover. It still has not been added yet but I'll definitely add it to the public "to-do list" since I had forgot to.
There will probably not be an option to download all homebrew covers without the app overriding them to vita for you all homebrew covers are vita-style due to a complication in HEXFlow launcher v0.5 where vita and homebrew share a cover folder and the community has been making vita-style homebrew covers ever since.

Massively revamped the mass-cover-downloader in the new RetroFlow+Grid View update V2.0, there is now the option to download all "Vita"-style covers available for your homebrews en-masse.


D2CND with gateway DRGATEWAYAA

Hi all,
I know this is not really an issue, but I don't have anywhere else to ask this question.
I have a Daikin D2CND with gateway DRGATEWAYAA, but I am using Opentherm Evohome. So, at the moment, the DRGATEWAYAA is not plugged in the gas boiler. I am wondering if anyone here can tell me if I plug it in, keep using Opentherm with no Daikin thermostat, would this integration still work and provide api functionality (such as energy consumption - which is what I am interested in)? and would the gas boiler still work with opentherm as expected - the app won't work for sure as far as I tested.
Many thanks.

In my case the Gas Boiler would go in an error state if I power it on without the Thermostat (DOTROOMTHEAA) connected while also having the gateway (DRGATEWAYAA) installed.

Boiler control SW: | N/A
Boiler control parameter file version: | N/A
DOTT: | not available
ODS: | not available
Active use case: | Use case without DOTT thermostat
HA detects it but creates no entities.
I don't have the thermostat as I'm using Tado.
I have a D2CND028A1AB
I can access it from the browser but then I add it in HA and get pretty much nothing except the  unavailable: operation_mode
Are there any endpoints I could try to see if I get something back?

So I used Charles as a proxy to check what is going on.
It seems that the MNAE endpoints are not working at all. The MNCSE-node are working:
> {"m2m:rqp":{"op":2,"to":"/[0]/MNCSE-node/deviceInfo","fr":"/S","rqi":"1234"}}
< {"m2m:rsp":{"rsc":2000,"rqi":"1234","to":"/S","fr":"/[0]/MNCSE-node/deviceInfo","pc":{"m2m:dvi":{"rn":"deviceInfo","ri":"009b","pi":"0099","ty":13,"ct":"20171129T005227Z","lt":"20171129T005227Z","st":0,"mgd":1007,"dlb":"182500086","man":"Daikin","mod":"DRGATEWAYAA","dty":"HVAC controller","fwv":"1700F107","swv":"438CC083000","hwv":""}}}}

> {"m2m:rqp":{"op":2,"to":"/[0]/MNCSE-node/firmware","fr":"/S","rqi":"1234"}}
< {"m2m:rsp":{"rsc":2000,"rqi":"1234","to":"/S","fr":"/[0]/MNCSE-node/firmware","pc":{"m2m:fwr":{"rn":"firmware","ri":"009a","pi":"0099","ty":13,"ct":"20171129T005227Z","lt":"20171129T005227Z","st":0,"mgd":1001,"vr":"1700F107","fwn":"","url":"","ud":false,"uds":{"sus":1}}}}}

> {"m2m:rqp":{"op":2,"to":"/[0]","fr":"/S","rqi":"1234"}}
< {"m2m:rsp":{"rsc":2000,"rqi":"1234","to":"/S","fr":"/[0]","pc":{"m2m:cb":{"rn":"[0]","ri":"0000","pi":"","ty":5,"ct":"20171129T005227Z","lt":"20171129T005227Z","st":5,"csi":"[0]"}}}}

> {"m2m:rqp":{"op":2,"to":"/[0]/MNAE/1/UnitProfile/la","fr":"/S","rqi":"1234"}}
< {"m2m:rsp":{"rsc":4004,"rqi":"1234","to":"/S","fr":"/[0]/MNAE/1/UnitProfile/la"}}

> {"m2m:rqp":{"op":2,"to":"/[0]/MNAE/2/UnitProfile/la","fr":"/S","rqi":"1234"}}
< {"m2m:rsp":{"rsc":4004,"rqi":"1234","to":"/S","fr":"/[0]/MNAE/2/UnitProfile/la"}}

Could it be an updated firmware version that has removed those endpoints?
The only one I got something out from is:
> {"m2m:rqp":{"op":2,"to":"/[0]/MNAE/","fr":"/S","rqi":"1234"}}
< {"m2m:rsp":{"rsc":2000,"rqi":"1234","to":"/S","fr":"/[0]/MNAE/","pc":{"m2m:cnt":{"rn":"","ri":"0005","pi":"C0003","ty":3,"ct":"20171129T005227Z","lt":"20171129T005227Z","st":13,"lbl":"function/SpaceHeating"}}}}


Update Cake.Issues.Recipe to 0.3.4

Update Cake.Issues.Recipe to 0.3.4. This brings support for parsing markdownlint log files, which is required for #240

@pascalberger your changes have been merged, thanks for your contribution 👍
Also thank you for implementing support for markdownlint in Cake.Issues.Recipe.


The mouse mode stays the same when an issue happens

Operating system or device - Godot version:
Ubuntu 15.10, Godot 2.0.2
Issue description (what happened, and what was expected):
I wrote a little code to capture the mouse like this "Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)"
the problem is when I add a new feature i get issues in the code just like every other human and when issues happen the editor pops up which is the problem, the mouse is still captured i can't type anything and can't use the editor's shortcuts to stop debugging or even close the window with "Alt+F4" the Ubuntu shortcut
My Wish
Add some feature that returns the mouse mode to un-captured, or saves the system's state before debugging the game and redo it when there are issues because the only solution that I can do is RESTART the computer which is why my development is SLOW

This is indeed a bug and should be fixed.  Alt+F4, or log in to tty2 and killall -9 godot.name.of.binary, etc.

Correct me if I'm wrong, but isn't this a duplicate of #2232, and has already been fixed by #4295 ?

Indeed, and the fix had been backported for 2.0.3-stable already, so closing.


Minor Bug: actuation function being applied to output layer in class MLP

The code for class MLP is mistakingly applying the actuation function to the last (i.e. output) layer. The error is in the evaluation of the is_last flag. The current code is:
class MLP(nn.Module):
    def __init__(self, dims, act = None):
        super().__init__()
        dims_pairs = list(zip(dims[:-1], dims[1:]))
        layers = []
        for ind, (dim_in, dim_out) in enumerate(dims_pairs):
            is_last = ind >= (len(dims) - 1)

The last line should be changed to is_last = ind >= (len(dims) - 2):
class MLP(nn.Module):
    def __init__(self, dims, act = None):
        super().__init__()
        dims_pairs = list(zip(dims[:-1], dims[1:]))
        layers = []
        for ind, (dim_in, dim_out) in enumerate(dims_pairs):
            is_last = ind >= (len(dims) - 2)

If you like, I can do a pull request.

@rminhas oh yes, thank you for finding this bug! fixed in 0.1.4


Initial Infrastructure Setup in CDC environment

[X] 2022-11-14: Onboarding email from @rmharrison on OCIO request process
[ ] Onboarding session with @boris-ning-usds
[ ] How to get a public endpoint, and how to route from public to private subscriptions
[ ] How to submit an OCIO Service Desk Request ticket for Resource Group provisioning: https://servicedesk.cdc.gov/sp?id=sc_cat_item&sys_id=11564733dba8f450d3a8ed384b961986
[ ] Azure infrastructure boundaries between OCIO and FHIR team

OCIO: Subnet (provisioning), VNET, Security Groups, Routing
FHIR: Subnet (address allocation)

2022-10-05; Boris added CSV team to AD so they have access to DEX Subscription Resource Group, including storage account (REQ0057512/RITM0057504)

Aaron has a couple of clarifications on the resource group request template that will be discussed during the Sprint review meeting with Leslyn and Ryan on 11/30. Once these questions are addressed, the ticket will be submitted asking for access to the CDC's Azure subscription.


checkbox and radio buttons

What do you think about design for checkboxes and radio buttons?
i suggest https://github.com/flatlogic/awesome-bootstrap-checkbox
Demo: https://flatlogic.github.io/awesome-bootstrap-checkbox/demo/
I can do it and add pull request for it...

wrong repository, sorry)


Handle more than one "window" (tab) when starting browser

This fixes #59 by recording the initial number of tabs opened and waiting until the number of tabs equals the initial number or the initial number + 1. This is more general behaviour which checked only for equality with 1, which meant that if a profile opened tab by default, or if an extension did so, there would be a timeout error.
I tested on the following case:

A "blank" profile that has a single tab and keeps a single tab (default expected behaviour)
A profile with an extension that opens a second tab as newtab (so initial number is 2)
A profile with a pinned tab that opens automatically (so that initial number is 2, or 3 if an extension opens a new tab)

EDIT: Added cases I tested.

Thanks for the PR and also leaving a very nice documentation!


How to use normal map on object created by ShapeFactory

Hy Guys! I would really appreciate Your help with this!
So first I created a normal cube with a color material (dont care about await, its for coroutines):
MaterialFactory.makeOpaqueWithColor(context, com.google.ar.sceneform.rendering.Color(color)).await()

then I supplied it to to shape:
ShapeFactory.makeCube(
        Vector3(planeWidth / scaleFactor, planeHeight, planeDepth / scaleFactor),
        Vector3(0.0f, planeHeight / 2, 0.0f),
        blueMaterial // <- here
)

Now I would like to do the same with a custom texture material so changed the material to this:
val wallTexture = Texture.builder()
        .setSource(context, texture_wall) // <- simple png image, x*x size, brick wall
        .build()
        .await()
MaterialFactory.makeOpaqueWithTexture(context, wallTexture).await()

My question is that if I have the normal map for the applied texture, how can I supply it to the material? I saw the Texture.Usage.Normal parameter but cant figure out how to apply it. My problem is that I cant set the colored texture png and the normalmap of that picture at the same time.
Is there a way to achive this? I wouldn't like to make custom shapes and import them, my main purpuse is to build every shape from code!
Bests and thanks in advance

Thanks @malik-at-work for Your response. I found a solution: in Unity I made a simple cube with the diffuse and normal map as material on it, exported, then in my code I'm creating a ModelRenderable from it and from the ModelRenderable I can get the material that I want (maybe it's make more sense to use the cube itself instead of just the material of it but my project now build around the ShapeFactory solution).
Maybe a better solution would be to use the Material (Sceneform/Rendering lib) class Builder() but 1, I don't know if that can build just the material from an sfb 2, it's private.
If this builder can build only the material from the sfb, would You mind to turn this issue to a feature request and make that builder call public?

Yes, we are tracking the request to open up Material at https://github.com/google-ar/sceneform-android-sdk/issues/393  A +1 or me too on that ticket would be great.

Done, thanks for your time I'm really appreciate it!


Fix Visitor.ts properties

It seems that the types for TsEnumDeclaration and ObjectPattern are slightly off. I found this when parsing a large TypeScript codebase and then debugging the issue. This PR fixes the types and implementation files.

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

Thanks, but types itself is out of sync with real data.

Yes exactly. The changes I made to the types are to match the actual data coming from the parser. Is that not the intention?

I meant that ast types declared in types.ts are outdated.

Ah, gotcha. Is there a plan to fix them? I'm trying to use the visitor and it throws an error on these lines on the latest version published to npm.

Of course, but currently I'm too busy porting typescript type system.

OK, then I'll patch locally for now. Thanks.


Investigate the with statement changes related to context manager

introduced from #4648 and #4649

I took a quick look, made the following patch, and it worked for test_with, but not for test_contextlib. I'll look into it a bit more.
dalinaum@f4b51e299f4dcaef3d72c3a16e7b46f2eacad9fd

done by @dalinaum on #4656 and #4659


Add InitReqType to classify FrameRefType by init/reset requirements.

Description
This change introduces a new enum InitReqType that describes how a resource needs to be initialized/reset for replay, according to its FrameRefType.

Looks good now, at least to the point where further bikeshedding won't help :). Thanks for the clarification. I'll merge when CI is green.


Show tooltips with a delay

Currently the EDS tooltip show up immediately, which can be distracting.  We believe that the user experience would benefit from delayed tooltips.  Desktop operating systems typically also use a delay before showing tooltips.  Material-ui tooltips support a "enterDelay" and "leaveDelay" parameters to control this behaviour.

Thanks for contributing with a feature request @doctorplop! 🎉  We're currently doing a makeover in Tooltip, a delay is functionality you'll be able to add yourself once this is merged.  We'll also add an extra example on how to do this delay. (I think it will be similar to Popover's hover example).


fix(power actions): shows visual bios when reset to bios is called ou…

…t of sol window

Codecov Report

Merging #142 (ebd51c1) into master (5e1698c) will decrease coverage by 0.12%.
The diff coverage is 33.33%.

@@            Coverage Diff             @@
##           master     #142      +/-   ##
==========================================
- Coverage   51.14%   51.01%   -0.13%
==========================================
  Files          31       31
  Lines         786      788       +2
  Branches       71       72       +1
==========================================
  Hits          402      402
- Misses        361      362       +1
- Partials       23       24       +1

Impacted Files
Coverage Δ

...devices/device-toolbar/device-toolbar.component.ts
60.86% <33.33%> (-5.80%)
:arrow_down:

Continue to review full report at Codecov.

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


Typo in phoneCheckCallback

https://github.com/tru-ID/server-example-node/blob/main/src/routes.js#L77
I think API_BASE_URL is a typo in line before and should be replaced with apiBaseUrl

Thanks, @OptimizmForever. Fixed in 985e7fccd5fb99aed7e6cf4dcea87f9859912ef1


Define supported Juju version for CKF 1.8 and 1.9

Context
In the past months, the team has hit different issues with certain juju versions. As we are approaching the CKF 1.9 release and to provide better support for users and customers, we have to define which version of juju we'll be using for testing and eventually communicate it as the supported one.
What needs to get done

Look into issues that are affecting the bundle, both on 3.5 and 3.4
Perform some testing to identify more potential issues
Decide which version of juju to go with
Based on 3, we may need to change the CI of all repositories if we decide to go with juju 3.4 (as we are using 3.5 now)
Create a discourse post or some sort of communication to let everybody know which version is supported
Update the Supported versions entry in public docs

Definition of Done
There is a communication with the juju version to use and it is guaranteed that it works.

Identified issues
Juju 3.5.0

https://bugs.launchpad.net/juju/+bug/2066517
https://bugs.launchpad.net/juju/+bug/2065284 - this issue is affecting mysql-k8s 8.0/stabe, which is used by CKF

Juju 3.5.1

https://bugs.launchpad.net/juju/+bug/2067636

Tests
Juju 3.4.3
I have deployed CKF 1.8/stable and I can confirm that https://bugs.launchpad.net/juju/+bug/2060943 and none of the issues present in 3.5.x are happening.
Juju 3.5.1
I have deployed CKF 1.8/stable and as expected, some charms are failing with the mentioned errors. I was only able to run on this version because 3.5.2 hasn't been released.

Conclusion

If mysql-k8s is bumped before juju 3.5.2 is released, CKF is not going to work. This is going to be a release blocker.
We do not know if 3.5.2 is going to be introducing new issues.
We should avoid using juju "edge"
It looks like we only have option 1
We should ask juju to test our product before releasing to avoid breaking

Work from here

Change the juju version to 3.4/stable in all CIs
Let's have a testing plan with SQA for testing future versions of juju

Closing this issue as the decision has been made, #944 will be used for tracking changes.


[CMAKE] add cmake config for cu112

Description
add cmake config for cu112
Checklist
Essentials

[x] PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
[x] Changes are complete (i.e. I finished coding on this PR)
[x] All changes have test coverage
[x] Code is well-documented

Changes

[x] add cmake config for cu112

@szha I have retriggered the win-gpu run. If these tests are flaky I can skip them to get this PR merged.

@access2rohit thanks. I expect the pipeline to fail though. @josephevans is disabling the failing tests in https://github.com/apache/incubator-mxnet/pull/19898 and is tracking the forward porting of onnx coverage from v1.x in #19899


#45 S-metro stile piotr022

Hi, is it possible to insert this change on the latest version of the 1off11 firmware?
#45 S-metro stile piotr022

already released

Yes, and works fine ;-)

I didn't read carefully enough, is it possible to port this to newest 1o11? This isn't 1o11's repository so you have to ask there.


Exception is not a constructor since Vite 5.1.0

Describe the bug
After upgrading from vite 5.0.12 to 5.1.0, I get a TypeError at runtime (in my browser's console)
Uncaught TypeError: paper.Point is not a constructor
    at index.ts:35:17
(anonymous) @ index.ts:35

paper is the library https://www.npmjs.com/package/paper installed with
Reproduction
https://stackblitz.com/edit/vitejs-vite-szaciy?file=main.js
Steps to reproduce
install paper
npm i paper

use it
// index.ts
import * as paper from 'paper/dist/paper-core'

const color = new paper.Color('#2e95c8')

See browser's logs
System Info
~/projects/vitejs-vite-szaciy
❯ npx envinfo --system --npmPackages '{vite,@vitejs/*,rollup}' --binaries --browsers
Need to install the following packages:
<EMAIL_ADDRESS>Ok to proceed? (y)

  System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.18.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.14.0 - /usr/local/bin/pnpm
  npmPackages:
    vite: ^5.1.0 => 5.1.0

### Used Package Manager

npm

### Logs

_No response_

### Validations

- [X] Follow our [Code of Conduct](https://github.com/vitejs/vite/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guidelines](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md).
- [X] Read the [docs](https://vitejs.dev/guide).
- [X] Check that there isn't [already an issue](https://github.com/vitejs/vite/issues) that reports the same bug to avoid creating a duplicate.
- [X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to [vuejs/core](https://github.com/vuejs/core) instead.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitejs/vite/discussions) or join our [Discord Chat Server](https://chat.vitejs.dev/).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.

This looks like a duplicate of https://github.com/vitejs/vite/issues/14048.
Vite community (including me) has recognized this and is working on it! If you have any suggestions, feel free to do so!

I think this issue is about cjs/esm interop. Probably this is a related PR:

https://github.com/vitejs/vite/pull/15619

Vite now uses object spread in some cases (something like const paper = { ...cjsLib, default: cjsLib }), but this object spread doesn't include "inherited" properties (in this case cjsLib.__proto__.Color), so paper.Color ends up undefined. Previous simple approach was just const paper = cjsLib, so it was somewhat magically handling such inheritance.
I updated a reproduction to illustrate this with a bunch of logging https://stackblitz.com/edit/vitejs-vite-qfx5gb?file=main.js
It looks like both dev and build were working previously, so I think rollup handles this case somehow. I guess technically this was a  breaking change, but I feel aligning this behavior feels go outside ESM concept since paper defined by import * as paper from ... should be a "plain object" without inheritance. Instead, hopefully user code can adjust it by using default import for cjs:
import paper from "paper/dist/paper-core"

Indeed, the necessary prototype chain is missing here. Thanks to @hi-ogawa for pointing out.

I feel aligning this behavior goes against ESM concept since paper defined by import * as paper from ... should be a plain module object without inheritance. Instead, hopefully user code can adjust it by using default import for cjs:
import paper from "paper/dist/paper-core"

indeed, this fix the issue.

I am also experiencing the same error with one of my project's dependencies. Recently, the import for one of the transitive dependencies have changed in the project and now the default exported module is not working with import * as Stats from 'stats.js'.
See issue in @react-three/drei: https://github.com/pmndrs/drei/issues/1865
@react-three/drei has "allowSyntheticDefaultImports": false, so it doesn't allow importing the module directly like import Stats from stats.js.
I have prepared a minimal stackblitz example. The import syntax in the example seems to be correct as TypeScript is able to recognize the constructor but running or building through vite fails.
See on stackblitz: https://stackblitz.com/edit/vitejs-vite-zbir1r?file=src%2Fmain.ts

The following is an interpretation of the namespace import object form:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import#module_namespace_object
I think that the error message "is not a constructor" when instantiating a regular object is as expected.

I tried the default create-react-app template that uses webpack and the import seems to work there.

At the same time, I also tested webpack and found that the error messages it provides are consistent with vite.
https://stackblitz.com/edit/webpack-webpack-js-org-gnwump?file=src%2Findex.js
Therefore, I think vite is running as expected, so it's not a problem with vite. @9inpachi

@XiSenao
The version of webpack in the example is quite old. I have reproduced the problem using a newer version of webpack.
Check the updated example: https://stackblitz.com/edit/webpack-webpack-js-org-akoet6?file=package.json

@XiSenao
The version of webpack used in the example seems quite old.
I was able to make the import work in the latest version of webpack: https://stackblitz.com/edit/webpack-webpack-js-org-akoet6

@XiSenao Thanks for investigating. You closed a PR https://github.com/vitejs/vite/pull/16009 but it might be still better to have a fix since this was technically a breaking change and it seems like a new source of dev/build inconsistency.
Personally I get that namespace import with cjs is very odd in some cases, but if the fix is simple and align with rollup, then I think Vite team will consider it. If Vite team wants to make esm/cjs interop stricter, then that probably needs to postponed to major release.
@bluwy Do you have any thoughts on this issue and XiSenao's PR?

Thanks for discussing this and laying out the issue. I certainly should've looked in the regression earlier 😅 Reading both sides, I think I agree with @XiSenao that this isn't a bug given the behaviour aligns with node and what's documented in MDN. Personally, I'd prioritize build to match dev compared to the other way round, as dev is where one spends most of their time on.
However, I may be persuaded to make a fix instead if other maintainers feel that this is a big breaking change. I'll ping them to hear their thoughts on this. I'd like to start merging the minor PRs today, so if this issue isn't concluded today, the fix may only land in v5.2.

Thanks for discussing this and laying out the issue. I certainly should've looked in the regression earlier 😅 Reading both sides, I think I agree with @XiSenao that this isn't a bug given the behaviour aligns with node and what's documented in MDN. Personally, I'd prioritize build to match dev compared to the other way round, as dev is where one spends most of their time on.

@bluwy I am not sure how types for this are correct in TypeScript. The default export becomes part of the namespace import and there is no error there. And on the other hand, ImportNamespace.default gives a type error.
According to TypeScript, using export = syntax to export default modules is preferred and should work everywhere, so I am confused why Vite fails. Is TypeScript in the wrong here?
See reference TypeScript docs: https://www.typescriptlang.org/docs/handbook/declaration-files/templates/module-d-ts.html#:~:text=Note that using,using export%3D%3A

same issue. Is there any new progress?


Fix typo in readme

Wrong PR target? (Shouldn't it be the source repo?)

Oops, I used GitHub's UI for this, that was the wrong target indeed


cluster's slave node start service start failure,but start success with command

root@centos130:~/bin# etcd --version
etcd Version: 2.2.2
Git SHA: 6335fdc
Go Version: go1.4.2
Go OS/Arch: linux/amd64
root@centos130:~/bin#

root@centos130:~# systemctl cat etcd
# /usr/lib/systemd/system/etcd.service
[Unit]
Description=Etcd Server
After=network.target
After=network-online.target
Wants=network-online.target

[Service]
Type=notify
WorkingDirectory=/var/lib/etcd/
EnvironmentFile=-/etc/etcd/etcd.conf
User=etcd
# set GOMAXPROCS to number of processors
ExecStart=/bin/bash -c "GOMAXPROCS=$(nproc) /usr/bin/etcd --name=\"${ETCD_NAME}\" --data-dir=\"${ETCD_DATA_DIR}\" --listen-client-urls=\"${ETCD_LISTEN_CLIENT_URLS}\"
Restart=on-failure
LimitNOFILE=65536

[Install]
WantedBy=multi-user.target
root@centos130:~#

master ip=<IP_ADDRESS>
etcd.conf:
# [member]
 ETCD_NAME=etcd0
 ETCD_DATA_DIR="/var/lib/etcd/etcd0"
 ETCD_LISTEN_PEER_URLS="http://<IP_ADDRESS>:2380"
 ETCD_LISTEN_CLIENT_URLS="http://<IP_ADDRESS>:2379,http://<IP_ADDRESS>:2379"
 #[cluster]
 ETCD_INITIAL_ADVERTISE_PEER_URLS="http://<IP_ADDRESS>:2380"
 ETCD_INITIAL_CLUSTER="etcd0=http://<IP_ADDRESS>:2380,etcd1=http://<IP_ADDRESS>:2380"
 ETCD_INITIAL_CLUSTER_STATE="new"
 ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster"
 ETCD_ADVERTISE_CLIENT_URLS="http://<IP_ADDRESS>:2379"

slave node ip=<IP_ADDRESS>
etcd.conf:
 # [member]
 ETCD_NAME=etcd1
 ETCD_LISTEN_PEER_URLS="http://<IP_ADDRESS>:2380"
 ETCD_LISTEN_CLIENT_URLS="http://<IP_ADDRESS>:2379,http://<IP_ADDRESS>:2379"
 #[cluster]
 ETCD_INITIAL_ADVERTISE_PEER_URLS="http://<IP_ADDRESS>:2380"
 ETCD_INITIAL_CLUSTER="etcd0=http://<IP_ADDRESS>:2380,etcd1=http://<IP_ADDRESS>:2380"
 ETCD_INITIAL_CLUSTER_STATE="existing"
 ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster"
 ETCD_ADVERTISE_CLIENT_URLS="http://<IP_ADDRESS>:2379"

master etcd service start success, but slave start failure:
journalctl -u etcd
4月 05 02:28:11 centos130 etcd[1602]: etcd Version: 2.2.2
4月 05 02:28:11 centos130 etcd[1602]: Git SHA: 6335fdc
4月 05 02:28:11 centos130 systemd[1]: etcd.service: main process exited, code=exited, status=1/FAILURE
4月 05 02:28:11 centos130 systemd[1]: Failed to start Etcd Server.
4月 05 02:28:11 centos130 systemd[1]: Unit etcd.service entered failed state.
4月 05 02:28:11 centos130 systemd[1]: etcd.service failed.
4月 05 02:28:11 centos130 systemd[1]: etcd.service holdoff time over, scheduling restart.
4月 05 02:28:11 centos130 systemd[1]: Starting Etcd Server...
4月 05 02:28:11 centos130 etcd[1681]: recognized and used environment variable ETCD_ADVERTISE_CLIENT_URLS=http://<IP_ADDRESS>:2379
4月 05 02:28:11 centos130 etcd[1681]: recognized and used environment variable ETCD_INITIAL_ADVERTISE_PEER_URLS=http://<IP_ADDRESS>:2380
4月 05 02:28:11 centos130 etcd[1681]: recognized and used environment variable ETCD_INITIAL_CLUSTER=etcd0=http://<IP_ADDRESS>:2380,etcd1=http://<IP_ADDRESS>:2380
4月 05 02:28:11 centos130 systemd[1]: etcd.service: main process exited, code=exited, status=1/FAILURE
4月 05 02:28:11 centos130 systemd[1]: Failed to start Etcd Server.
4月 05 02:28:11 centos130 systemd[1]: Unit etcd.service entered failed state.
4月 05 02:28:11 centos130 systemd[1]: etcd.service failed.
4月 05 02:28:12 centos130 systemd[1]: etcd.service holdoff time over, scheduling restart.
4月 05 02:28:12 centos130 systemd[1]: Starting Etcd Server...
4月 05 02:28:12 centos130 etcd[1784]: recognized and used environment variable ETCD_ADVERTISE_CLIENT_URLS=http://<IP_ADDRESS>:2379
4月 05 02:28:12 centos130 etcd[1784]: recognized and used environment variable ETCD_INITIAL_ADVERTISE_PEER_URLS=http://<IP_ADDRESS>:2380
4月 05 02:28:12 centos130 etcd[1784]: recognized and used environment variable ETCD_INITIAL_CLUSTER=etcd0=http://<IP_ADDRESS>:2380,etcd1=http://<IP_ADDRESS>:2380
4月 05 02:28:12 centos130 etcd[1784]: recognized and used environment variable ETCD_INITIAL_CLUSTER_STATE=existing
4月 05 02:28:12 centos130 etcd[1784]: recognized and used environment variable ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster
4月 05 02:28:12 centos130 etcd[1784]: recognized and used environment variable ETCD_LISTEN_PEER_URLS=http://<IP_ADDRESS>:2380
4月 05 02:28:12 centos130 etcd[1784]: recognized environment variable ETCD_NAME, but unused: shadowed by corresponding flag
4月 05 02:28:12 centos130 etcd[1784]: recognized environment variable ETCD_LISTEN_CLIENT_URLS, but unused: shadowed by corresponding flag

I start slave etcd success with command :
etcd --name etcd1 --initial-advertise-peer-urls http://<IP_ADDRESS>:2380 \
    --listen-peer-urls http://<IP_ADDRESS>:2380 \
    --listen-client-urls http://<IP_ADDRESS>:2379,http://<IP_ADDRESS>:2379 \
    --advertise-client-urls http://<IP_ADDRESS>:2379 \
    --initial-cluster-token etcd-cluster \
    --initial-cluster etcd0=http://<IP_ADDRESS>:2380,etcd1=http://<IP_ADDRESS>:2380\
    --initial-cluster-state existing 2>&1 >> ~/etcd.log &

after start it with command, master check it is health:
root@centos129:~# etcdctl cluster-health
member ecbcfa8d255c48d4 is healthy: got healthy result from http://<IP_ADDRESS>:2379
member f1da3dbb828c6792 is healthy: got healthy result from http://<IP_ADDRESS>:2379
cluster is healthy
root@centos129:~#

I start slave etcd success with command :

So is this an etcd issue? Or a systemd question?

etcd issue with systemd
my os is CentOS7

@tianhao I do not really understand. From my understanding based on your original issue, etcd works without systemd, but it does not work when starts with systemd unit file. It seems like the problem is your systemd unit configuration or your environment to start the service. Also journalctl does not show all the logging before etcd exists. Probably try to get all the log first?

@tianhao https://github.com/coreos/etcd/blob/master/Documentation/reporting_bugs.md#how-to-get-etcd-configuration-and-log-when-it-runs-as-systemd-service-etcd2service

I am closing this due to low activity. If you still have the issue and can provide more information, feel free to reopen. Thanks.

I rebuild my cluster, and this issue not happen, may be my vm software settings was wrong


Pattern: Card Design QA testing

User Story

As a [user role below]:
DDS Designer and Developer

I need to:
test the Card

so that I can:
be sure the developer's code correctly works as designed

Additional Information

Dev Issue (#1249 )
Design and functional specs sketch

Tasks
Ensure the Card pattern has been tested and reviewed by design + dev.
Acceptance criteria

[ ] Pattern is reviewed by designer and design defects are identified
[ ] New issues are opened to log individual defects
[ ] Screenshots of as-is and to-be design should be added to the issue when needed
[ ] Developer associated with building the pattern is assigned to the new issues
[ ] Appropriate labels are added to the issue  eg.  bug, dev

@wonilsuhibm and @RobertaJHahn development for card is done

@RobertaJHahn did we decide to not do this QA since this is a sub-pattern?

@wonilsuhibm closing this issue as agreed.


Support reproducible downloads

Consider the caller who cares about reproducibility:
- uses: EricCrosson/install-github-release-binary@f8eb4478eab436937f635434489bb7c7a2893fee
  with:
    targets<EMAIL_ADDRESS>
We can pin the sha of this action, but there is no way to pin the sha of the target.
Possible solutions:

support specifying the sha of the release (this information is available in the GitHub API response we pull)
- uses: EricCrosson/install-github-release-binary@f8eb4478eab436937f635434489bb7c7a2893fee
  with:
    targets: EricCrosson/retry@<sha>

support checksum verification of the downloaded binary
- uses: EricCrosson/install-github-release-binary@f8eb4478eab436937f635434489bb7c7a2893fee
  with:
    targets: EricCrosson/retry@<checksum> # ? awkward

With the EricCrosson/retry@<checksum> syntax, the checksum could be mistaken for a sha. I would suggest using another parameter for the checksum. This would also make it explicit which sha algorithm is expected. For example:
- uses: EricCrosson/install-github-release-binary@f8eb4478eab436937f635434489bb7c7a2893fee
  with:
    targets<EMAIL_ADDRESS>    sha256: 1ddfb769eb0b8876bc570e25580e6a53afcf973362ee1ee4b54a807da2e5eed7

I am leaning towards option 1, because targets already takes a list:
- uses: EricCrosson/install-github-release-binary@f8eb4478eab436937f635434489bb7c7a2893fee
  with:
    targets: |
      DeepBlue/master-mind@v42
      EricCrosson/retry@<sha>

I don't want to go down the route of embedding strings-of-yaml or other structured input

Turns out pinning a release to a specific sha is not truly reproducible, because the release's artifacts can be edited at any time.
The only way I know to ensure reproducibility is with a content-based checksum. I'll re-open this issue and will consider reverting e9c333130ebad0fe7b5ca58162c7444a51b91731 to keep the API surface-area low

^ This is the commit that backs out support for specifying a target with a commit sha, since that was ineffective.

I'm exploring two different syntax (TIL that "syntax" can be plural!) to specify both a checksum and a version target.
First, embedding a structured input format in a string:
- uses: EricCrosson/install-github-release-binary@v2
  with:
    targets: |
      {
        "target"<EMAIL_ADDRESS>        "checksum": "xxxxxxxxxxxxxxxxxxxxxxxxx",
      }

I dislike the projection of this structured language into a string, which may present a poor user experience (in terms of syntax highlighting, verbosity). Also, can I beat targets for the input name and a redundant target in the data format?
Second, what about environment variables to specify the optional checksum?
- uses: EricCrosson/install-github-release-binary@v2
  with:
    targets: |
<EMAIL_ADDRESS>  env:
    SHA256_ERICCROSSON_FLUX_CAPACITOR: xxxxxxxxxxxxxxxxxxxxxxxxx

Third (just came to me) what about overloading the single-string syntax?
- uses: EricCrosson/install-github-release-binary@v2
  with:
    targets: |
<EMAIL_ADDRESS>
If you have input or suggestions, I'd love to hear it!

I think the third suggestion makes sense. This is what I was thinking about before reading your comment. The # character feels like a good choice IMO.

Would the # be misinterpreted as a comment in yaml? Do you have a preference for a backup character? _ came to mind which I don't love.
Dang, yaml has a lot of control characters

Another suggestion:
targets: EricCrosson/flux-capacitor@v3.1.1:sha256-xxxxxxxxxxxxxxxxxxxxxxxxx

I kind of like that! I wish we could keep the phrase sha256:xxxxxxxxxxxxxxxxxxxxxxxxx, that's what Nix and docker use. What about:
targets: EricCrosson/flux-capacitor@v3.1.1-sha256:xxxxxxxxxxxxxxxxxxxxxxxxx

? Hmm it's not quite as nice as your suggestion