Use pure markdown templates as default output format

This is a proposal which I'd like to submit for feedback. Without significant objections, I plan to go forward.
Summary
Make the pure_markdown templates introduced in https://github.com/bazelbuild/skydoc/commit/33e81298ffc1af67cdb4085b1ea678be26b322cc the new default, and deprecate the old default template format.
As a tie-in to https://github.com/bazelbuild/skydoc/issues/183, also always recommend that users use markdown formatting constructs to format their docstrings.
Reasoning
There are a number of related bugs to reconciling formatting compatible with the HTML tables in Stardoc's default output: https://github.com/bazelbuild/skydoc/issues/69,
https://github.com/bazelbuild/skydoc/issues/216.
In short summary, HTML table cells (used to show parameter/attribute docstrings) do not respect typical markdown formatting constructs. Attempting to bold a word using **bold**, for example, would display:

my_arg

        required.

          an arg with **formatted** docstring.

There are ways around this, but none are ideal (for example, using html tags, but this should be discouraged. See https://github.com/bazelbuild/skydoc/issues/183)
By using pure markdown tables (with some minor tricks to support multi-line table cells, see https://github.com/bazelbuild/skydoc/issues/69#issuecomment-518786516) we can universally recommend that users use markdown-formatting for their docstrings, and institute HTML-tag escaping on docstrings.
Caveats

Changing default output templates means we may break some users, though they can always retain backward compatibility by forking the old default templates and using them as "custom" templates.

Users who are still using old HTML-style formatting tags such as  will need to migrate.

The new output format is a bit different (and thus may appeal less to some users) in some ways, though I'd argue the formats are comparable. See https://github.com/bazelbuild/skydoc/issues/69#issuecomment-441771439 for a discussion of table display.

LGTM. Let's use markdown in docstrings and no HTML.

Changing default output templates means we may break some users, though they can always retain backward compatibility by forking the old default templates and using them as "custom" templates.

Let's roll a new major version (1.0.0?) and indicate this change in the release notes.
The proposal SGTM, we should converge on markdown docs everywhere.

Let's roll a new major version (1.0.0?) and indicate this change in the release notes.

I agree. I think this is an important change to gate on a major version.

As I understand from offline discussion with Chris:

The new ("pure") template has uniform escaping behavior across all kinds of documentation fields. That is, a < b and emphasis render the same no matter where they occur.

This behavior is to always do escaping, so a < b renders literally (as desired), and emphasis also renders literally (as not desired).

Because
 renders literally, it can no longer be used to embed newlines in table cells. This means an existing use case is broken by making the pure template the new default. The workaround for users is to opt back into the old template and continue to write
 in their docstrings. The longer term solution is for us to add special newline-to-
 processing behavior in the renderer, so that users would not need to use
 at all in their strings.

So the upside of this change is that we can make the uniform recommendation that Starlark documentation be written in Markdown, sans inline HTML. This is a win and IMO worth the immediate breakage for some users.

Let's roll a new major version (1.0.0?) and indicate this change in the release notes.

I agree. I think this is an important change to gate on a major version.

Let's not roll 1.0.0 until at least the repo is renamed to "bazelbuild/stardoc". There's no requirement to associate important changes with major version bumps (or any version bumps) prior to 1.0.0 anyway.
I'd be cautious about the 1.0.0 bump, since every breaking change from that point on will require further bumps, which implies either a slow release schedule, a slow rate of changes, or a large number of major versions.

Let's not roll 1.0.0 until at least the repo is renamed to "bazelbuild/stardoc". There's no requirement to associate important changes with major version bumps (or any version bumps) prior to 1.0.0 anyway.

Let's do that - @c-parsons, would you like me to help with repo renaming? I've done this once with gmaven_rules -> rules_jvm_external and broke some things along the way, and can help prevent them for this repo.

I'd be cautious about the 1.0.0 bump, since every breaking change from that point on will require further bumps, which implies either a slow release schedule, a slow rate of changes, or a large number of major versions.

Ensuring that we bump the major version every time we make a breaking change keeps us honest and communicates change management to our users implicitly.
It may actually be a good thing that major versions are rolled out slowly, because we shouldn't be releasing breaking changes to our software all the time. We have to be careful about such changes.
I also don't see a problem with a large number of major versions - it just means that the software has evolved quickly, but one can ensure a stable use case within each major version.

Let's do that - @c-parsons, would you like me to help with repo renaming? I've done this once with gmaven_rules -> rules_jvm_external and broke some things along the way, and can help prevent them for this repo.

That would be excellent :) https://github.com/bazelbuild/skydoc/issues/187 for tracking.

Let's not roll 1.0.0 until at least the repo is renamed to "bazelbuild/stardoc". There's no requirement to associate important changes with major version bumps (or any version bumps) prior to 1.0.0 anyway.

I would agree this is necessary but not sufficient for the 1.0.0 tag.

Another milestone for blocking 1.0 should be the removal of skydoc, I suppose.


add rc 200 and 0 to touchstone config for router-perf

Getting the number of response code is useful to evaluate if the test load is too big for a cluster, for example when the total connection number is bigger than the cluster's capacity, more '0' response code is seen. This is useful when testing with connection related features, like https://docs.google.com/spreadsheets/d/1AvpLioEZB-HigjaKMNRa_GYiffVBiyP8arqvlm0BAZg/edit#gid=313345561.  I used to manually collect those data from output of the router-perf test. This PR is to add a touchstone config file to generate results for the 200 and 0 rc codes. I didn't include all kinds of rc code, because other rc codes are rarely seen, getting all of them can make the results sheet not easy to read.
Test job with COMPARISON_CONFIG=mb-touchstone-rc.json, output google sheet https://docs.google.com/spreadsheets/d/1E_UrUI-LZg8c03xzqLE80b6PzNcubmNaT7XDt-F7e-o/edit#gid=1569524172

Can one of the admins verify this patch?

Test result in this result sheet https://docs.google.com/spreadsheets/d/118stkJ5uzEhYCo8k9F6J0CfkEmepoE1EvCzVxmlhuxM/edit#gid=831215729

Hey @qiliRedHat , rather than adding another config file, why don't you add the new comparisons to the original?

@rsevilla87 If adding to the origin don't impact others, I'm more than happy to do that.

@rsevilla87  Please help to review again.


⚠ Bofrost.de has degraded performance

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

HTTP code: 200
Response time: 1803 ms

Resolved: Bofrost.de performance has improved in e1242b8 after 18 minutes.


Add Trio-Specific App Group for Isolated Data Storage

This pull request addresses the issue of shared app group data conflicts (addresses and solves #313).
It introduced a Trio-specific app group: group.org.nightscout.YOUR-TEAMID.trio.trio-app-group.
Changes:

Add new user-defined build setting APP_GROUP_ID with value group.$(BUNDLE_IDENTIFIER).trio-app-group to Trio scheme.
Update the xcconfig file to removeAPP_GROUP_ID as its now set via build settings.
Modify testflight.md to document the new Trio app group setup.

Benefits:

Enhanced data integrity and security.
Clear separation of app data, reducing risks of conflicts.

Implications:

Users will not lose a pod or other paired devices.
No impact on Xcode builders for fresh downloads.
For Xcode builders with existing downloads, users may need to click on their build targets (will show a provisioning profile error) to trigger a refresh of app group profiles
New Browser builders need to create and use the new Trio-specific app group instead of LoopGroup.
Existing Browser builders need to create a new app group, use that instead of LoopGroup and subsequently run the 3. Create Certificate and 4. Build Trio actions.
Xcode builders transitioning to Browser build may want to follow the instructions in the new section Optional: Description Modification in testflight.md to rename the display name of the app group on Apple Developer for more clarity.

Breaking Changes:

Adopting this change will break current compatibility of Trio with xDrip4iOS and GlucoseDirect as CGM sources
This PR will stay in draft mode for the time being until the maintainers of xDrip4iOS have had the chance to make small changes to accommodate the changed app group and give users the functionality to choose between apps (i.e. app groups) to share data with
xDrip4iOS will add a new "Loop Share" workflow with its upcoming v5.3 release. There's a pending staging PR (see xdripswift#551) opened now.
GlucoseDirect seems to no longer be maintained; the project could be forked and slightly adapted if the need arises.

See testing done with xDrip4iOS at this comment:

https://github.com/JohanDegraeve/xdripswift/pull/551#issuecomment-2201231956
That testing was with the pbxproj change - not with this PR

I will test this PR after the inadvertent CGMBLEKit change is removed.

Summary

Successful test
Trio reads glucose from xDrip4iOS with group set to Trio group

Test Details
xDrip4iOS Configuration
xDrip4iOS version 5.3.1 was released today.
User can choose between Loop or Trio app group for the shared app groups feature.

build xDrip4iOS 5.3.1 on test phone
selected Trio app group for sharing CGM data (under Developer Settings on the Settings screen)
configure xDrip4iOS to read from personal Nightscout site (because readings are very different from the test NS site Trio is currently using)

Trio Configuration

iPhone SE, running iOS 17.5.1, attached to rPi DASH simulator
updated to most recent version of dev (commit bd566014)
applied the patch from this PR to the code

Please see update notes below

selected xDrip4iOS as CGM source
wait for glucose to update from new source (xDrip4iOS)
observed that green loop continues both unlocked and locke.

Update notes:

when building using Mac-Xcode, after this code change, this procedure should make your life easier
internet connection is required
clean the build folder, close and reopen the workspace
tap on the FreeAPS target and select Signing & Capabilities
If you need to log into to Apple to update your group, do so
Even if you don't need to log into Apple, you might need to tap on each target one at a time and let it automatically update the App Groups that is listed from Loop to Trio app group.

If you then return to dev without this PR, you need to repeat the steps under Update notes to restore the app group to Loop.

This PR cannot be tested using the patch method. (I think this is a case where git push --force-with-lease . . .  is warranted. Then adding .patch to the PR would probably allow a git apply to work.
However, the dnzxy:trip-app-group branch is now fully update wrt dev, so I can switch to that branch and test that way.
I will test the Build Action following along in the modified testflight.md and report back.

Still many issues with testflight.md. Sent information to @dnzxy via PM.  Tested the Browser Build and that works. It's just the direction that need to be updated.

Still many issues with testflight.md. Sent information to @dnzxy via PM. Tested the Browser Build and that works. It's just the direction that need to be updated.

Updated now again.

I wonder if we should add a comment to this section indicating it is required moving from before and after Trio App Group was merged to Trio. We can remove all beta-tester info a month or two after the release.

I've addressed the other points and have added a hint around app group and beta testing
> If you have previously built Trio as a beta tester (between May 15th, 2024, and today), you will already have an app group (`Loop App Group`) created and configured for your bundle identifiers. In this case, please *do not* skip this section; you are required to create the `Trio App Group` and configure it for your identifiers, as described below.

Let me know what you think. Admittedly, I'd rather not spend much more time on updating testflight.md but invest it in getting the docs to be the go-to place for instructions.

For whoever gives the final ✅  and merges this: I'd suggest to merge this with squash+merge; no need to bloat up commit history with merging of upstream alpha and dev and updated to a single markdown file.

I just submitted an Issue report to xDrip4iOS after doing some testing for this PR. I'll poke at it some more tonight to hopefully figure out a solution that allows both Trio & Loop/iAPS to use xDrip4iOS as a heartbeat.


[BUG] k3d create SIGENV fail using --agents=2 with Calico

What did you do

How was the cluster created?
Followed the guide for basic Ingress at: https://k3d.io/usage/guides/calico/#2-create-the-cluster-without-flannel-and-with-calico
Fixed the calico.yaml manifest to include the proper config-map,
https://github.com/rancher/k3d/blob/eb35667705ab4371b3577aa40b7b822256e5bfd4/docs/usage/guides/calico.yaml
and then:

$ k3d cluster create --api-port 6550  -p "8081:80@loadbalancer" --agents 2 --k3s-server-arg '--flannel-backend=none' --volume "$(pwd):/var/lib/rancher/k3s/server/manifests"
WARN[0000] No node filter specified
INFO[0000] Created network 'k3d-k3s-default'
INFO[0000] Created volume 'k3d-k3s-default-images'
INFO[0001] Creating node 'k3d-k3s-default-server-0'
INFO[0012] Creating node 'k3d-k3s-default-agent-0'
INFO[0012] Creating node 'k3d-k3s-default-agent-1'
INFO[0013] Creating LoadBalancer 'k3d-k3s-default-serverlb'
INFO[0014] (Optional) Trying to get IP of the docker host and inject it into the cluster as 'host.k3d.internal' for easy access
ERRO[0014] Failed to create exec config for node 'k3d-k3s-default-server-0'
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x47d6e79]

goroutine 1 [running]:
github.com/rancher/k3d/v3/pkg/runtimes/docker.Docker.ExecInNodeGetLogs(0x4d155e0, 0xc00003c190, 0xc0003d5e00, 0xc000ea34a0, 0x3, 0x3, 0x4a64240, 0xc000c15c01, 0xc000ea34a0)
   github.com/rancher/k3d/v3/pkg/runtimes/docker/node.go:311 +0x79
github.com/rancher/k3d/v3/pkg/cluster.resolveHostnameFromInside(0x4d155e0, 0xc00003c190, 0x4d25380, 0x52ff700, 0xc0003d5e00, 0x4bde2f7, 0x14, 0x41f9305, 0xc0000bc040, 0x4bc1040, ...)
   github.com/rancher/k3d/v3/pkg/cluster/host.go:79 +0x17a
github.com/rancher/k3d/v3/pkg/cluster.GetHostIP(0x4d155e0, 0xc00003c190, 0x4d25380, 0x52ff700, 0xc000428900, 0x0, 0x0, 0x0, 0x0, 0x0)
   github.com/rancher/k3d/v3/pkg/cluster/host.go:60 +0x17e
github.com/rancher/k3d/v3/pkg/cluster.ClusterCreate(0x4d155e0, 0xc00003c190, 0x4d25380, 0x52ff700, 0xc000428900, 0x0, 0x0)
   github.com/rancher/k3d/v3/pkg/cluster/cluster.go:360 +0x1935
github.com/rancher/k3d/v3/cmd/cluster.NewCmdClusterCreate.func1(0xc000414b00, 0xc0003d8b00, 0x0, 0x8)
   github.com/rancher/k3d/v3/cmd/cluster/clusterCreate.go:83 +0x14c
github.com/spf13/cobra.(*Command).execute(0xc000414b00, 0xc0003d8a80, 0x8, 0x8, 0xc000414b00, 0xc0003d8a80)
   github.com/spf13/cobra@v1.0.1-0.20200629195214-2c5a0d300f8b/command.go:846 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0x52bfd40, 0xc0000320c0, 0xa, 0xa)
   github.com/spf13/cobra@v1.0.1-0.20200629195214-2c5a0d300f8b/command.go:950 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
   github.com/spf13/cobra@v1.0.1-0.20200629195214-2c5a0d300f8b/command.go:887
github.com/rancher/k3d/v3/cmd.Execute()
   github.com/rancher/k3d/v3/cmd/root.go:91 +0x5a
main.main()
   github.com/rancher/k3d/v3/main.go:27 +0x25

What did you do afterwards?

I confirmed that it would work with no agents created and then I discussed this with @iwilltry42 and he suggested that I open this issue.
What did you expect to happen
I expected:
This works (builds server-0 and serverlb containers, with Calico and Traefik 1.8)
$ k3d cluster create --api-port 6550 -p "8081:80@loadbalancer" --k3s-server-arg '--flannel-backend=none' --volume "$(pwd):/var/lib/rancher/k3s/server/manifests"
WARN[0000] No node filter specified
INFO[0000] Created network 'k3d-k3s-default'
INFO[0000] Created volume 'k3d-k3s-default-images'
INFO[0001] Creating node 'k3d-k3s-default-server-0'
INFO[0012] Creating LoadBalancer 'k3d-k3s-default-serverlb'
INFO[0013] (Optional) Trying to get IP of the docker host and inject it into the cluster as 'host.k3d.internal' for easy access
INFO[0017] Successfully added host record to /etc/hosts in 2/2 nodes and to the CoreDNS ConfigMap
INFO[0017] Cluster 'k3s-default' created successfully!

Screenshots or terminal output
see above...
Which OS & Architecture
Darwin bpabon 19.6.0 Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64 x86_64
Which version of k3d
k3d version v3.1.3
k3s version latest (default)
Which version of docker
Client:
Debug Mode: false
Server:
Containers: 7
Running: 2
Paused: 0
Stopped: 5
Images: 384
Server Version: 19.03.13
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 8fba4e9a7d01810a393d5d25a3621dc101981175
runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 4.19.76-linuxkit
Operating System: Docker Desktop
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 5.811GiB
Name: docker-desktop
ID: P6EF:ED7L:DZQH:2D33:KVU7:VV5B:ZZI2:HEAV:FES3:YLKQ:7H3A:CZJJ
Docker Root Dir: /var/lib/docker
Debug Mode: true
File Descriptors: 56
Goroutines: 59
System Time: 2020-10-24T18:25:24.675013Z
EventsListeners: 3
HTTP Proxy: gateway.docker.internal:3128
HTTPS Proxy: gateway.docker.internal:3129
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
<IP_ADDRESS>/8
Live Restore Enabled: false
Product License: Community Engine

Hi @blaisep-vgs , thanks for opening this issue! :)
Follow-Up question: what do you have at $(pwd) that you mount to the manifests folder?
Since you're mounting a whole folder, you're overwriting everything that k3s usually deploys (like CoreDNS, etc.).
You may want to mount to a subfolder instead, e.g. --volume "$(pwd):/var/lib/rancher/k3s/server/manifests/mystuff".

Also, for debugging purposes, can you please do a docker ps -a and a docker logs k3d-k3s-default-server-0 and post the output here?

The nil pointer exception will probably already be fixed by b5eeda7 .. can you build from main branch and try again?
If you want, I can also build it for you and link you to the executable for download.

Hi @iwilltry42 , thanks for the suggestions, I will build from main  and follow the new instructions re logs and volume mounts.

@iwilltry42 I think you can close this issue now. It works, using the instructions in the docs. :
 $ k3d cluster create --agents 2 --api-port 6550 -p "8081:80@loadbalancer" --k3s-server-arg '--flannel-backend=none' --volume "$(pwd)/docs/usage/guides/calico.yaml:/var/lib/rancher/k3s/server/manifests/calico.yaml"

WARN[0000] No node filter specified
INFO[0000] Created network 'k3d-k3s-default'
INFO[0000] Created volume 'k3d-k3s-default-images'
INFO[0001] Creating node 'k3d-k3s-default-server-0'
INFO[0002] Pulling image 'docker.io/rancher/k3s:v1.18.9-k3s1'
INFO[0022] Creating node 'k3d-k3s-default-agent-0'
INFO[0022] Creating node 'k3d-k3s-default-agent-1'
INFO[0022] Creating LoadBalancer 'k3d-k3s-default-serverlb'
INFO[0024] Pulling image 'docker.io/rancher/k3d-proxy:v3.1.5'
INFO[0027] (Optional) Trying to get IP of the docker host and inject it into the cluster as 'host.k3d.internal' for easy access
INFO[0034] Successfully added host record to /etc/hosts in 4/4 nodes and to the CoreDNS ConfigMap
INFO[0034] Cluster 'k3s-default' created successfully!

That's great 🙂
I guess it also works without the custom build?
Still nice that you found that edge case we could fix now 👍

@iwilltry42 , yes, it also works with the standard build using install.sh
I tried both methods.


[9.x] Adds Arr::filter

I've been using Arr heavily and felt that it was missing a filter method.
Turns out it has been there all along, but is named Arr::where.
Almost every programming language as the concept of map and filter,
so I think it would be more intuitive to call it Arr::filter.
To avoid a breaking change I've moved the logic to the new filter method, but kept where as a simple alias.

Think I'll just leave things as is.


On Python 2.6

The README says:

Python 2.7 or greater is required for parsedatetime version 1.0 or greater.

I've seen a few recent commits adding support or fixing errors specific to 2.6.
Should we keep supporting 2.6?

I've wanted to keep supporting 2.6 as a few larger projects have that as a requirement.
But yea, we should make sure that the docs are accurate.

Keeping the docs up to date would be nice.
More importantly I think is to run tests on python 2.6.
I'm not familiar with with the CI tools currently being used on this repo.
I don't see travis-ci checks. Last build on travis is 5 months old. So I'm not sure where to look.

If you have the spots where the docs are wrong fresh in your brain please do make a PR or I'll take a look later.
The CI tool used is CircleCI, which I switched to because I now work for them :)
I left the .travis.yml in by mistake, i'll remove it after updating circle.yml for 2.6

k, updating the CircleCI environment to run tests using tox so we are testing under 2.6, 2.7, 3.5 and pypy now
Also updated README with new information about tox and versions being tested


Non interactive setup

Refer to https://github.com/awslabs/collectd-cloudwatch/pull/47
Author claimed that it is under MIT license control.


White one-pixel border on right and bottom

I remember that I have seen some discussion related to this, but haven't found the issue/PR. So maybe this is a regression or a duplicate.
Anyways:
nico@triton:~/src/contour $ uname -onr; freebsd-version; git log --oneline | sed 1q;
FreeBSD triton.herrhotzenplotz.de 13.0-RELEASE-p6
13.0-RELEASE-p6
f6d6375a [contour] contour.yml: Fixes default for on_mouse_select.
nico@triton:~/src/contour $

I think the screenshot shows the white border pretty well:

This is with i3 (thus X11).
Also, I looked into the problem with gammaray and see the issue being that the contour::opengl::TerminalWidget has a width that is off by one pixel compared to its parent contour::ScrollableDisplay.

Looking into this after some gdb work and then turning on some logging I can see the following weirdness:
[2022-03-11 18:08:57.431594] [gui.display] called with 654x450 in main
[2022-03-11 18:08:57.431606] [gui.display] Scrollbar Pos: Hidden
[2022-03-11 18:08:57.431824] [gui.display] contentScale: 1
[2022-03-11 18:08:57.431841] [gui.display] resizeGL: 653x449 (653x449)
[2022-03-11 18:08:57.431850] [gui.display] setRenderSize: 653x449
[2022-03-11 18:08:57.435884] [gui.display] execute: 653x449
[2022-03-11 18:08:57.435930] [gui.display] TW 0x0+653x449, SB invisible, 0x0+14x450, value: 0/0
[2022-03-11 18:08:57.435963] [gui.display] TerminalWindow.resizeEvent: size 654x450 (654x450)
[2022-03-11 18:08:57.438414] [gui.display] contentScale: 1
[2022-03-11 18:08:57.438432] [gui.display] sizeHint: 640x450 (640x450)

In contour::ScrollableDisplay::resizeEvent with a hidden scrollbar, the Widget's height() and width() return e.g. 654x450. However, the call to contentsRect(); (ScrollableDisplay.cpp:126) returns a rectangle that is exactly one pixel off. I have no clue why.
To confirm that this is indeed the issue, I made the following changes:
diff --git a/src/contour/ScrollableDisplay.cpp b/src/contour/ScrollableDisplay.cpp
index b0445774..5a810f3f 100644
--- a/src/contour/ScrollableDisplay.cpp
+++ b/src/contour/ScrollableDisplay.cpp
@@ -123,8 +123,7 @@ void ScrollableDisplay::updatePosition()
             break;
         case config::ScrollBarPosition::Hidden: {
             scrollBar_->hide();
-            auto const cr = contentsRect();
-            mainWidget_->resize(cr.right(), cr.bottom());
+            mainWidget_->resize(width(), height());
             mainWidget_->move(0, 0);
             break;
         }

And it fixes the issue. I don't know whether this is a hack or it is wrong or if it breaks hidpi things. Feedback would be appreciated :-)

Hey @herrhotzenplotz. Sorry for the huge delay. I didn't mean to. I'll ... oh, wow. you even provided a fix already. You've been quicker. Many thanks. :-)


Use ClassCellNode for class so that it's available in methods

Closes #2912
Per the comment on the issue, this turns NameNodes for __class__ into ClassCellNodes, so that you can call __class__ inside methods without qualifying with self. I believe that this fix is effectively just replacing __class__ with <name of class> in these expressions, EG, no __class__ local ends up created.
This is quite a minimal fix. There are a few remaining differences in __class__ behaviour but I wasn't sure how to proceed with them, so I thought I'd raise a PR for comment.
Basically, in non-Cythonized Python it appears that __class__ is a bit of a "magic" local. If it appears anywhere in a method body, then locals() will contain __class__ pointing to the containing class, anywhere in the function, but if it doesn't, then it won't. So:
class A:
    def b(self):
        print(locals())
        __class__

A().b() will print ['self', '__class__']. As would
class A:
    def b(self):
        __class__
        print(locals())

But:
class A:
    def b(self):
        print(locals())

would print only ['self']
This behaviour is hard to achieve with the current PR, because instead of creating a local called __class__ we are just replacing the NameNode with a ClassCellNode. As a result, when cythonized, in all the above examples locals() just prints ['self'].
Off the top of my head, some approaches that might be better:

Instead of replacing the NameNode, inject an entry into the current scope called __class__ pointing to the containing __class__ object. This requires rewriting FuncLocalsExprNode so that it iterates over the keys in entries rather than calling .name on each one. I tried this and it sort of worked but it was a bit messy manually updating the entries dictionary, maybe there's a better way?

From a higher level in the tree (the DefNode?) iterating through all of the statements in the body checking to see if any of them contain __class__ and, if so, injecting it as a local.

Without bothering to see if it's in the body or not, just always injecting __class__ into the method scope (it's harmless if unused and I don't think it's unreasonable to interpret PEP3135 as implying it should always be in the locals() symbol table. However, I am far from an expert and there is potentially a good reason why Python doesn't put it into locals() for methods not containing __class__.)

Eager to get any and all feedback on the above! This is my first time touching the Cython codebase so I might have missed some things, but it's been really fun to dig into.

There is a dedicated locals() implementation in Cython, which literally just builds a dict of local variables and their current values. I'd suggest to simply implement __class__ in there as a special case variable that appears when the DefNode uses it. See _inject_locals() in ParseTreeTransforms.py.

I've modified this to extract some common functionality from _inject_super and _inject_class as helper methods. Also, now instead of replacing the NameNode with a ClassCellNode, if there's a NameNode called __class__ we just inject __class__ into the local environment for the method.

(BTW, I fixed the travis test problems, merging master should resolve them for this branch.)

it fails with local variable class referenced before assignment

Lovely. What strikes here is the control flow analysis in FlowControl.py, which correctly detects an unbound local variable.
Here's something I tried in Py3.6:
>>> class C:
...   def meth(self, x):
...     if x: __class__ = x
...     print(__class__)
...
>>> C().meth(1)
1
>>> C().meth(0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 4, in meth
UnboundLocalError: local variable '__class__' referenced before assignment

This suggests that there is no assignment to __class__ happening if it's already defined, so we need to take care that we don't just declare it if it's already there, or unconditionally fake an assignment to it. That test should be added, BTW. Another test to add is this:
>>> class C:
...    def meth(self):
...       def inner(): return __class__
...       return inner
>>> C().meth()()
<class '__main__.C'>

suggesting that the name must exist as an actual Entry to make it available in closures. Finally, declaring a class inside of a closure function (or, even better, inside of a method of another class) is also worth testing.
What about this: we interpret __class__ not as a local variable but as a pure reference to the class itself. Meaning, we use the original class Entry for the NameNode, but do not put it into the local variable entries (because it's not a local variable entry). We then implement something in locals() that explicitly injects it there if the def-node needs it but the local scope does not provide it.
Could you try that?

Hmm, hang on, there's another test case that might fail here:
class C(object):
    def meth(): return __class__
OldC = C
C = None
print(OldC().meth())

I guess I have to think this through a bit more…

I've included a few more test cases for some nested and edge cases. The approach is what you recommended:
(1) Inject a NameNode for __class__ references
(2) Add an attribute has_class_reference to DefNodes to keep track of which ones refer to __class__
(3) In _inject_locals(), if the relevant DefNode's has_class_reference attribute is True, inject an Entry called __class__ pointing at the relevant ClassNode.

You could also try injecting the __class__ only in LocalsExprNode, but that might break closures.

Using the NameNode to refer to the class does not work since it might be overwritten, e.g. via class decorators or simply name assignments.

Yes, that makes sense. I've added a couple of test cases for this and updated to use an AttributeNode pointing to self.__class__, which I think gets past that problem.

Another strange test case:
`class R(object):
def method(self):
return 1
class S(R):
"""
>>> S().method()
...
RuntimeError: super(): class cell not found
"""
def method(self):
class = None
return super().method()
`

Since gh-2912 is marked as blocking it would be good to finish this. @MisterKeefe would you like some help?

@mattip Yes, thank you -- I kind of stalled out on this one, sorry. It might be worth reverting to 1ede6da on this branch as a starting-point; while that didn't have perfect semantics for class it covered several of the test cases.
Where I got to with thinking about it was that for classes with an internal __class__ reference, there should be two variable declarations in the generated code with the second pointing to the first. EG for this case:
class A:
    def method():
        print(__class__)

class B(A):
    pass

A = None

B().method()

Resolving __class__ as the same NameNode as A doesn't work because that disappears after A is assigned to None. But if a duplicate declaration was emitted for __class__ which didn't get removed by the None, that might cover this case.

This may be stating what's already known, but Python handles this by putting the class in the __closure__
class A:
   def f(self):
      return __class__
print(A.f.__closure__)  # prints (<cell at 0x7faba5bd31c0: type object at 0x564d21dedaa0>,)

I think Cython basically has to do the same thing (since as you point out, any attempt to look it up at runtime can end up with stuff overridden).
It's possible that this will turn out to be more complicated than I'm imagining (because class-scopes aren't normally looked at for closures), but the first thing I'd try is to set up the entry for __class__ with .from_closure (or similar) and see if it can resolve to the correct thing

This may be stating what's already known, but Python handles this by putting the class in the __closure__
class A:
   def f(self):
      return __class__
print(A.f.__closure__)  # prints (<cell at 0x7faba5bd31c0: type object at 0x564d21dedaa0>,)

I think Cython basically has to do the same thing (since as you point out, any attempt to look it up at runtime can end up with stuff overridden).
It's possible that this will turn out to be more complicated than I'm imagining (because class-scopes aren't normally looked at for closures), but the first thing I'd try is to set up the entry for __class__ with .from_closure (or similar) and see if it can resolve to the correct thing

Looking at this again, it's ClassCellNode (as suggested) does something very similar although using a C-level mechanism, so that's the better advice.

I've tried to finish this is https://github.com/cython/cython/pull/4094. It turns out to be a little more complicated than it looked.


concatenation extension support

Hello @Acconut,
First of all, I'm a big fan o tus.io. Nice work, congrats!
Secondly, this is not an issue -- it's more a comment/question.
What I want to know is: tus-js-client supports the concatenation extension?
I'm asking that because it would enhance the upload speed a lot if the client is able to upload several chunks in parallel.
If it's not implemented, what are the challenges or portions of code to be adapted/extended?
Cheers,
Guil.

As the README says, the Concatentation extension is not supported: https://github.com/tus/tus-js-client#extension-support. The reason is that in the common browser environment one HTTP request is enough to fully utilize the uplink speed and using multiple requests would not increase the overall uploading stream. Of course, this may be different when you are using a local network or just have a good internet connection but, besides not needing this extension for now, there is no real reason why tus-js-client does not support it yet.
 One especially tricky part would be how to handle Concatenation when you are uploading from a streaming source.

I do think Concatenation implementation could dramatically improve certain use cases of Tus. I have several examples of people uploading with fiber connections over High Latency network who aren't able to maximize their upload speed using one stream. The benefits of parallel uploads and thus, of Concatenation extension would be tremendous in their case.
This would hence be awesome to have support for it ;-)

@tgouverneur I see that there are use cases where the Concatenation extension would bring a lot of benefits. Pull requests are always appreciated, so if you are eager add this feature, I am happy to assist you with it :) My personal time for this project is limited, so I sadly cannot do it by myself.

This feature will be implemented in tus-js-client v2: https://github.com/tus/tus-js-client/issues/167

This feature will be implemented in tus-js-client v2: https://github.com/tus/tus-js-client/issues/167


Release tmt-1.9.0

We're ready for the next release!

Fedora pull request: https://src.fedoraproject.org/rpms/tmt/pull-request/31


Simulation arrival animation does not happen on a restart

Location: Simulation -> Arrival
The first time you run a simulation the arrival stage presents the current packet buffer, and then buy clicking on step forward a packet arrival animation plays.
View after 'first play'

However, if you click: stop, play, step ... the packet arrival animation does play. The final resulting view just appears.
View after stopping an animation and hitting 'play' again

You can stop the simulation at any stage, hit play again, and repeat the same odd behavior.
If you stop the simulation and then click on a different page (packet, profile, switch), then click back to simulation and hit 'play' .. the arrival animation works as expected.

Fixed in extraction branch.

So the animation bug seems to be fixed. But there are some other issues that seem to be introduced in this branch. The instructions are not being displaying in the instruction set.
Switch->Table(0) Configuration

Switch->Table(1) Configuration

Simulation->Execution View (on entry)

The packet and profile are just default instances, no special configuration.
I tested this in the master branch without issue. There is something in the extraction branch that causes this issue.
One quick point to note when you are working in the branch, make sure you rebase with master before you test your changes. Assuming you are on the extraction branch you can do this by:
git merge master
It is possible this will introduce a merge conflict. These are easy to solve, its just a diff of theirs/yours, edit out what you dont want including the <<<<, ====, >>>>. You will then have to add the file of the merge conflict using: git add . You can check the status of a merge (conflict free, issues, etc.) with: git status.


silently clamp MSAA sample count to maximum allowed

It's an error to ask for a higher MSAA sample count than supported by
the gl driver, and results in corrupted rendering.
We now always clamp the requested sample count to the maximum allowed
but the gl driver.
includes some minor refactoring.

@prideout @bejado I think we need something similar for the vk and mtl backends.


feat(typeahead): add ng-model-options debounce support

Adds support for ng-model-options debounce option

Partly implements #4981

Docs pls and perhaps add it to a demo (not really needed)

LGTM


Default value of field pulled from object via destructuring isn't being checked if it's of proper type.

TypeScript Version:  2.1.6
Code

interface ITest {
    example?: string;
}

const foo = ({example = 123}: ITest) => console.log(example) // No error

function bar({example = 123}: ITest) { // No error
    console.log(example);
}

const { example = 123 }: ITest = { };  // No error

foo({});
bar({});

Expected behavior:
TypeScript showing an error saying that 123 isn't of type string.
Actual behavior:
TypeScript shows no error.

The type of the initializer is unioned with that of the destructed property. so the type here is string | 123.


Add missing CSS resets for links

Need to add minimal and common css reset style to ensure the look and feel works fine in each web integration.
Currently we are not adding this style:
text-decoration: none;
border: 0;

Probably a better approach to handle that extracts all the reset in a file and call it when it is necessary, instead of polute the current implementation.all the code,


Write load tests for devhub submission and editing

I took a look at the access logs for a period when we're getting deadlocks (see https://github.com/mozilla/olympia/issues/1140) and I think it's worth writing a load test to see if we could reproduce it on stage. I was looking at access on 2015-12-23 (because of deadlock spikes) and we had 6522 add-on uploads (not simultaneous). This would be possible to recreate in a load test. It may not reveal the problem but it's worth a try.

tests are being written here: https://github.com/mozilla/amo-loadtest

Tracker #1244

Load tests are up and running. Thanks @mstriemer !


Pulling ght (google health trend) data by county

Hey there!
So I can use Python library to pull the ght data by state:
delphi_epidata.Epidata.covidcast('ght', 'smoothed_search', 'day', 'state', [delphi_epidata.Epidata.range(int(start_date), int(end_date))], 'CA')
However, pulling by county doesn't return any result:
delphi_epidata.Epidata.covidcast('ght', 'smoothed_search', 'day', 'county', [delphi_epidata.Epidata.range(int(start_date), int(end_date))], '08013')
// Previously i tried '*' to pull all county data from the fb signal, which doesn't work here either.
Could you please help on what is the correct API call? Thanks!

oh my bad. didn't realized that the information is not available on county level, from the dashboard.


Update to docsite

Addresses conversation in #633

Enable copy button in code blocks.
Add "ShellSession" to lexer that extends "console" lexer.

Examples pulled from examples/gce.md
Copy button behavior as defined by this PR:

"$ " defined as global prompt.

If prompt appears at the beginning of any line in any code block, only lines with the prompt will be copied by the button. Here only "kubectl get pv" will be copied (line 272 in gce.md).
   ```console
   $ kubectl get pv
   NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                       STORAGECLASS       REASON   AGE
   pvc-0c2ebc68-cd77-4c08-9fbb-f8a5d33440b9   4Gi        RWO            Delete           Bound    default/pmem-csi-pvc-ext4   pmem-csi-sc-ext4            2m52s
   pvc-c04c27a9-4b9e-4a28-9374-e9e6c5cbf18c   4Gi        RWO            Delete           Bound    default/pmem-csi-pvc-xfs    pmem-csi-sc-xfs             2m52s
   ```

$ kubectl get pv
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                       STORAGECLASS       REASON   AGE
pvc-0c2ebc68-cd77-4c08-9fbb-f8a5d33440b9   4Gi        RWO            Delete           Bound    default/pmem-csi-pvc-ext4   pmem-csi-sc-ext4            2m52s
pvc-c04c27a9-4b9e-4a28-9374-e9e6c5cbf18c   4Gi        RWO            Delete           Bound    default/pmem-csi-pvc-xfs    pmem-csi-sc-xfs             2m52s

If no prompt line appears the entire contents of the block will be copied. Everything gets copied because there are no prompt characters (line 255 in gce.md).
   ```sh
   kubectl create -f https://raw.githubusercontent.com/intel/pmem-csi/v0.5.0/deploy/kubernetes-1.14/pmem-csi-lvm.yaml
   kubectl create -f https://raw.githubusercontent.com/intel/pmem-csi/v0.5.0/deploy/common/pmem-storageclass-ext4.yaml
   ```

kubectl create -f https://raw.githubusercontent.com/intel/pmem-csi/v0.5.0/deploy/kubernetes-1.14/pmem-csi-lvm.yaml
kubectl create -f https://raw.githubusercontent.com/intel/pmem-csi/v0.5.0/deploy/common/pmem-storageclass-ext4.yaml

If the code block uses the "ShellSession" lexer alias, the entire contents of the block will be copied when the button is clicked except for the prompt. In this case everything except "$ " at the beginning of the first two line will be copied (line 42 in gce.md).
   ```ShellSession
   $ cd src/overlays
   $ patch -p1 <<EOF
   commit 148e1095ba56fcf626d184fd2c427bd192e53a28
   Author: Patrick Ohly<EMAIL_ADDRESS>   Date:   Fri Aug 2 10:46:30 2019 +0200

       lakitu: kernel: enable PMEM support

       Some alpha machine types in GCE support persistent memory (aka
       nvdimm). These kernel changes are necessary to use that hardware
       and/or experiment with PMEM on normal machine types.

       Change-Id: I1682e6293f492128994ed7635bcc44368009db59
   ```

$ cd src/overlays
$ patch -p1 <<EOF
commit 148e1095ba56fcf626d184fd2c427bd192e53a28
Author: Patrick Ohly<EMAIL_ADDRESS>Date:   Fri Aug 2 10:46:30 2019 +0200

    lakitu: kernel: enable PMEM support

    Some alpha machine types in GCE support persistent memory (aka
    nvdimm). These kernel changes are necessary to use that hardware
    and/or experiment with PMEM on normal machine types.

    Change-Id: I1682e6293f492128994ed7635bcc44368009db59

Signed-off-by: Kevin Putnam<EMAIL_ADDRESS>

@pohly It looks like none of the javascript is loading when accessing the site on the staging server, as the search box isn't working either.

@pohly Yes, I can update code blocks to use the $ sign and add the console or ShellSession alias where needed.

@pohly I did miss adding the ShellSession alias to 2 blocks in that document. That happens to be one of them. Note that you have to use the copy button that hovers over the top right of the block for this to work. This feature does not override select/copy with mouse or keyboard.

It's definitely a super power. :smile:

It looks like none of the javascript is loading when accessing the site on the staging server, as the search box isn't working either.

This is because of the Jenkins content security policy: https://wiki.jenkins.io/display/JENKINS/Configuring+Content+Security+Policy
I'd rather not relax that, even if it is a bit inconvenient for the docsite.


Game stats

Get a player's game stats.
Query the monthly archives for any number of months and return the number of games for every given event type/time control/result.

Only look at daily games
Only need matches and tournament events. Friendly games do not need to be counted
Draw results can be condensed to a value of "Draw"
Wins and resignations should
Losses should not be grouped together.

Not every club member needs to be checked. The user will be responsible for passing the user ID they want this information for. The use case for this feature is to check players who may meet the criteria for removal from a match but need investigation.
The decision to leave all results in the return was made in case a user wants that information. The most common use case will be to investigate timeouts which can be done as follows:
results %>%   filter(result == "timeout")

Consider grouping getting removals, getting game stats for the removals, and transforming into a helper function that will do it in one call.
The functions alone are helpful, but it would save time if only one call for everything needs to be made.
Steps

Get players to remove on given criteria
Get the game history stats for those players
Summarize the game history stats
Join with the data from the removals table

Structure:
username             daily_rating    total_games     total_timeouts     three_plus_dpm_timeout


WebSocket connection failed

When I run app in console appears the log:
signalr-client.js?91ce:620 WebSocket connection to 'ws://localhost:49614/chat?formatType=json&format=text&id=6a9780c7-fe56-4990-a53a-4a8f896c2f7e' failed: Error during WebSocket handshake: Unexpected response code: 200
I do everysing as in ChatSample.
I suspect that I do not install Microsoft.AspNetCore.SignalR.Http, which is no exist in NuGet and https://dotnet.myget.org/f/aspnetcore-ci-dev/api/v3/index.json

So, it it working with Kestrel, but not with IIS


Back To Top in search results not working

Back To Top in search results not working

Changed anchor from #search-close to #search-box
#search-close has been removed since the separation from the Docusaurus code


Options missing from design configuration in backend

Hi,
I followed the instructions and got the store up and running. The problem I'm having is that the only option showing up in the design configuration area is for 'Search Engine Robots', everything else is missing and so I have no way of changing the theme. Any ideas?
Thanks

Hi @aaronallen8455 . You should follow instructions provided in http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/themes/theme-apply.html . The only issue that I can see is that theme configuration was moved to Content => Design => Configuration.
I will reach out documentation team about this inconsistency.


make with_items compatible with Ansible 2.2+

Updates main.yml inline with Ansible 2.2 syntax:
https://github.com/ansible/ansible-modules-core/issues/5509
TASK [ANXS.generic-directories : generic-directories | Make sure all directories are present] ***
task path: /my/path/to/roles/ANXS.generic-directories/tasks/main.yml:3
fatal: [rancher-test4.localdomain]: FAILED! => {
    "failed": true,
    "msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'ansible.vars.unsafe_proxy.AnsibleUnsafeText object' has no attribute 'path'\n\nThe error appears to have been in '/my/path/to/roles/ANXS.generic-directories/tasks/main.yml': line 3, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: \"generic-directories | Make sure all directories are present\"\n  ^ here\n"
}

thanks for this role by the way, just saved me a job :)

seems this is backwards incompatible with Ansible 1.5 :( np if you wish to reject, I will fork for my own use

Oh didn't know this was getting use! Let me update the tests for 2.2 and we can merge this !

It's been a while. Like 3 years, now. 2 PRs are open proposing the same exact patch ( #6 ) to work with up-to-date Ansible versions but no movement has been observed in this repo whatsoever.
Should this be considered deadware? It's a pity, I love simple concise roles soft-wrapping Ansible modules, they save a lot of writing. But I don't like being bound to old Ansible versions!
How can the community help you to move on?
Did anyone manage to publish their fork in Ansible Galaxy?

For what it is worth: @initlabopen published a fork with this fix https://galaxy.ansible.com/initlabopen/generic_directories

Always willing to have more contributors on this repo. If anyone wants in let me know. I've been holding off getting more PR's merged until I finished swapping from travis to circle but work keeps getting in the way....


SARIF: add support for relative paths with uriBaseId

Examples:
A relative URI holding a relative path
"artifactLocation": {
                  "uri": "examples/Xss.js",
                  "uriBaseId": "%SRCROOT%",
                  "index": 0
                }

An absolute file: URI holding a relative path
"artifactLocation": {
                  "uri": "file:examples/Xss.js",
                  "uriBaseId": "%SRCROOT%",
                  "index": 0
                }

Resolving of uriBaseId already supported in sarif-utils by resolveUriBaseId method. It also covered by tests
What about file protocol file://, such logic also considered in sarif-utils by  applying dropFileProtocol method, in curse of work of calculation the uri, probably some cases didn't considered by tests in SarifUtilsTest.kt from sarif-utils

What about %20 it's definitely is not directly supported in sarif-utils. But may be it covered by okio in toPath() methods? Anyway, such cases should be tested

Since uriBaseId is already supported, closing as implemented by @kgevorkyan.


Add Navigation bar . It will enhance the overall visual harmony and consistency of the design.

Is your proposal related to a problem?

(Write your answer here.)
Describe the solution you'd like

(Describe your proposed solution here.)
Describe alternatives you've considered

(Write your answer here.)
Additional context

(Write your answer here.)
Requirement/Document

(Share it here.)

I want to fix this issue. Please assign this issue to me under gssoc-extd and hacktoberfest.

i want to fix thish issue

I would like to fix this issue, please assign this to me under gssoc-extd and hacktoberfest


change provider logic

accept providers:

I didn't change the sum contract. The deployment error display: "Error: Invalid params".  I created an Issue

Still not working:

The front is saying that there is no provider, but massa station is return an http 200 (ok)

Still not working:  The front is saying that there is no provider, but massa station is return an http 200 (ok)

@gregLibert
It's working for me with the new version of the provider and some argument

On failure, the div containing loading provider and wallet should be updated to something like no provider detected.

I also have an uncatch error when massa station is installed, but not massa wallet:

Can you add a  meaninful animation around loading provider and wallet to show that something is ongoing ?

i fyou also can remove the red everywhere and keep it only for error. This will improve readibility

i fyou also can remove the red everywhere and keep it only for error. This will improve readability

I remove the red and put another color? or no color?

Ci fixed !

Nothing happens when I click on the sum button. Aren't we supposed to call the smart contract ?

The functionality for the caller has not been implemented yet. However, once the massa-proto-cli is ready, I'll make sure to update it accordingly.


Question about pyhumod vs E1550

What steps will reproduce the problem?
1. Connecting an E1550 Huawei modem
2. Trying to see the version/send messages/read messages
3.

What is the expected output? What do you see instead?
I can't see any action, it sort of freezes.

What version of the product are you using? On what operating system?
I'm using the latest version on Ubuntu 11.04

Please provide any additional information below.

I've used pyhumod with my E220 modem and it allways worked perfectly, but
recently i've bought a new modem, a Huawei E1550 and the program i've been
using with the E220, simply just won't work. Does any one knows why?

Original issue reported on code.google.com by<EMAIL_ADDRESS>on 12 May 2011 at 10:16

See this post: http://pyhumod.ooz.ie/2015/03/huawei-e1752-modem-support-on-ubuntu.html


fix: incorrect "description_localizations" key's value build in CommandOptionBuilder

Description
Fixes a bug with slash command localization (particularly in sub-commands).
When both localization name & description are set, the localization description uses the value of localization name which leads the slash command to have same localization name & description values.
Example
final command = ChatGroup(
  'name',
  '.',
  localizedNames: { Locale.hi: 'नेम' },
  children: [
    ChatCommand(
      'sub_name',
      'sub_description',
      localizedNames: { Locale.hi: 'सब_नेम' },
      localizedDescriptions: { Locale.hi: 'सब_डिस्क्रिप्शन' },
      id('sub_name', (ChatContext ctx) async {
        await ctx.respond(MessageBuilder(content: 'Meow!'));
      })
    )
  ]
);

 Preview output

Type of change

[x] Bug fix (non-breaking change which fixes an issue)

Checklist:

[x] Ran dart analyze or make analyze and fixed all issues
[x] Ran dart format --set-exit-if-changed -l 160 ./lib or make format and fixed all issues
[x] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works

Thanks!


[deliver] add tests for submit_for_review spec

Motivation and Context
Just adding back in the tests for deliver/spec/submit_for_review_spec.rb
Description
Just test stuff 😊

شكرا شكرا شكرا لكم


trying different versions of node

the build are failing repeatedly, I think bc of the node version

Hello @mbernier,Thanks again for the PR! It's HACKTOBERFEST! We want to show our appreciation by sending                                              you some special Hacktoberfest swag. If you have not already, could you please fill out                                              this form so we can send it to you? Thanks!                                             Team SendGrid DX


Argument order for adopt()

This continues a discussion from #102 regarding the argument order of adopt(), the outcome of which is a condition for Stage 3 advancement.
As I understand it, it is @ljharb's position that the argument order should be adopt(onDispose [, value]), which would potentially make defer(onDispose) unnecessary due to overlap. The precedent for this would be the existence of the optional thisArg in existing APIs like Array.prototype.map, .filter, .forEach, and the optional initialValue argument to Array.prototype.reduce and .reduceRight.
It is the champion's position that adopt(value, onDispose) is the correct argument order, with the precedent being existing APIs such as JSON.parse, JSON.stringify, and Array.from, and that there are inherent differences in how .adopt is intended to be used vs. .defer that indicate these should be separate methods.
Rather than go into more detail for each argument in the issue description, I'll post specifics related to my rationale in the comments below.
@ljharb: If you have any further details you'd like to provide, please let me know in the comments as well. If I have misrepresented your position in any way, let me know and I can update the issue description to more accurately summarize your position.

The precedent for "the optional thing being last" is also "virtually every modern userland API with optional arguments - even in node, where initially the convention was to always put the options bag last but to have optional arguments before it (that were optional even in the presence of the options bag), the ecosystem largely decided that was a brittle pattern and moved to the pattern we use in defaulting, where any argument that's omitted must also omit every argument that comes after it.
Can you elaborate on Array.from? JSON.parse and JSON.stringify are both very old APIs, and also being forced to write JSON.stringify(obj, null, 2) is widely regarded as a wart, so I don't think they're useful examples.

The precedent for "the optional thing being last" is also "virtually every modern userland API with optional arguments - even in node, where initially the convention was to always put the options bag last but to have optional arguments before it (that were optional even in the presence of the options bag), the ecosystem largely decided that was a brittle pattern and moved to the pattern we use in defaulting, where any argument that's omitted must also omit every argument that comes after it.

This argument presupposes that the value is optional, however I contend that the value is vital. To explain this, let me start with a summary of the use() method and using declarations in general:
The using declaration is intended to represent an RAII-style declaration (Resource Acquisition is Initialization). One of the key tenets of this approach is that acquisition of the resource is as close as possible to its initialization so that any necessary cleanup steps can be recorded without the possibility of user code intervening that could result in an exception that would prevent cleanup:
{
  using x = new Resource();
  ...
}

You want as little user code as possible between new Resource() and runtime recording its Symbol.dispose method in the environment. If an exception could occur in between these two operations, it would increase the possibility of a leak or race condition since the cleanup step would not execute.
The use() method of a DisposableStack is intended to be used in the same way:
{
  using stack = new DisposableStack();
  const x = stack.use(new Resource());
  ...
}

As little user-code as possible should run between resource acquisition (i.e., new Resource()) and initialization (i.e., const x = ). Here, the only exceptions that might be thrown are the same that you would see with a using declaration (i.e., the object doesn't have a callable Symbol.dispose method).
This is especially important if the return value of use() is passed as an argument:
f(stack.use(new Resource1()), stack.use(new Resource2()));

Here, we ensure resources are added to the stack in the order they are acquired, so that cleanup can occur in the correct order later.
The purpose of the adopt() method is to model the same behavior as using and the use() method, except with non-disposable values. Again, this means that there should be little to no user-code between resource acquisition and initialization:
{
  using stack = new DisposableStack();
  const x = stack.adopt(new Resource(), res => res.close());
  ...
}

The adopt() method also performs the same checks as using and use(), and in the same order:

The resource is acquired (i.e., new Resource()).
The disposal function is read (in this case, as an argument).
The disposal function is verified to be callable.
The resource and disposal function are recorded.
The resource is returned (or the binding initialized, in the case of using).

Changing the order of arguments for adopt() would break that ordering, and would not align with the intent to emulate RAII behavior as closely as possible.
While there are obvious overlaps, defer() is intended for a completely different use case than use() or adopt(). While both use() and adopt() are intended for resource acquisition, defer() is primarily intended for non-resource cleanup and is primarily a convenience mechanism. It does not take a resource as input, and it does not return a value.

Can you elaborate on Array.from? JSON.parse and JSON.stringify are both very old APIs [...]

JSON.parse and JSON.stringify are no older than Array.prototype.filter or many other APIs that accept an optional, trailing thisArg. Since the introduction of arrow functions to JS, the thisArg argument is used less and less frequently, to the point where it has been completely elided from the new methods in the Iterator helpers proposal, so a suggestion to emulate thisArg-like behavior is unconvincing.
In Array.from, the argument order is (items, mapfn), placing the subject (items) first and the callback second. In JSON.parse and JSON.stringify, again the subject comes first and the callback comes second. This is generally the same in userland libraries such as underscore, lodash, and JQuery, and in other platform APIs including the DOM, NodeJS, Electron, etc. It's also very frequently the case that a parameter that is intended to be returned, unchanged, from a function be the first parameter of that function.

[...] being forced to write JSON.stringify(obj, null, 2) is widely regarded as a wart, so I don't think they're useful examples.

This isn't an argument against the subject-first ordering, but an argument that the callback should potentially be further to the right of the subject.

I'm strictly for the current behavior since .adopt(onDispose, value) is absolutely unintuitive.

const foo = stack.use(new Foo());
const bar = stack.adopt(new Bar(), it => {
  somehowClean(it, 42);
});

vs
const foo = stack.use(new Foo());
const bar = stack.adopt(it => {
  somehowClean(it, 42);
}, new Bar());

In the second case, I don't immediately see what bar is.

Ron and I got on a call and we were able to get on the same page about the mental models and concepts, and I'm content with the proposal as-is, so we can consider this resolved, and the stage 3 condition met.


Issue #601 Adjust expected output in integration tests to match output of setup cmd

Did what it says on the tin, plus changed virtualbox hyperviser to hyperkit when passed as -d option to crc start in basic tests.

retest this please

For completeness: the Scenario about setup on Windows is being addressed in #543 .


Queue in python 3.5 asserts/hangs with low queue size

I've been attempting to update to python 3.5 today, but it has been causing some of our unit tests to fail with an assert error.
I've reproduced in the repl with this code:
import asyncio

@asyncio.coroutine
def consumer(queue, num_expected):
    for _ in range(num_expected):
        yield from queue.get()

@asyncio.coroutine
def producer(queue, num_items):
    for i in range(num_items):
        yield from queue.put(i)

queue_size = 1
producer_num_items = 5
q = asyncio.Queue(queue_size)

results = asyncio.get_event_loop().run_until_complete(
    asyncio.gather(producer(q, producer_num_items),
                   consumer(q, producer_num_items)),
)

This code causes AssertionError: queue non-empty, why are getters waiting? to be thrown.  Strangely, if I increase queue_size to 3 or 4, this causes the code to hang.  5 seems to be the magic queue_size that makes problems go away.

I'll take a look at this before Monday.

Looks like a dupe of #265 right?

It's certainly very similar to #256, though in this case the assert is being thrown inside put rather than get/get_nowait.  Possibly just the same issue manifesting in different ways though.

Suppose there is one item in the queue, and one pending putter waiting for a free slot. Queue.get in consumer awakes the pending putter, which will put an item into the queue at the next step of the event loop. Then Queue.get return the item in the queue to the consumer. After that the consumer call Queue.get again. Since the queue is empty, Queue.get becomes a pending getter.
In the next step of the event loop:
The awoken putter put an item into the queue. The pending getter have no idea that the queue is not empty anymore. When producer calls Queue.put again, there is one pending getter and there is one item (from the awoken putter) in the queue, so the assertion
assert not self._queue, ('queue non-empty, why are getters waiting?')

fails.

It's sad to see how hard it is to maintain a simple invariant in this code. :-( There are only three coroutines, and each only has one yield. Anyone up for a complete clean-room rewrite?

There is a pending pr I wanted to merge. Perhaps it will address some of these assert bugs. If not, I'll do my best to fix the bugs.

Thank you for all your assistance.
I will try it as well.

The more the merrier. I have an idea for a fix as well.

Here are tests reproducing both issues.
tests.diff.txt

Apologies if I broke this code.  But the problem I fixed was much worse than this one.  At least this error is explicit, the other bug caused queue items to get silently lost into the ether...
I will also take another look at this, I just have been busy with work (even today).  I think what @obmarg writes in code should be supported.
I have a PR to refactor Queue a bit, but I already tested my PR and it doesn't fix the problem, unfortunately.  OTOH, I think my refactor PR is a cleaner and simpler code on which to work on a possible bug fix for these issues.

@gjcarneiro Please do check out my PR! https://github.com/python/asyncio/pull/269

Closed by 872597ba12953849cc6893042fd044073b87f870

@gvanrossum Thanks a lot for figuring this all out and fixes! (Sorry, I'm swamped with work and couldn't make time for this).


⚠ Bofrost.fr has degraded performance

In 847344f, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 1920 ms

Resolved: Bofrost.fr performance has improved in 7516b6d.


constexpr std::string

ISO paper for this feature: P0980R1
First implemented in: (tbd)
code reviewed Feb 2021

moved to quest


Something to use or inspire from .  socketcluster.io

http://socketcluster.io has a good idea and implementation. Please take a look, may help Apollo designers.

@babnik63 I think most MDG developers will be aware of socket-cluster, deepstream, etc. But do they have GraphQL integration (what apollo is all about), can you elaborate on their approach and why it is good?

Meatier (a somewhat competing clone of Meteor using a completely different tech stack) is using GraphQL Socketcluster, as well as Webpack, Redux etc.

Yes, socketcluster is definitely interesting. At this early stage we're still just looking to HTTP for the transport layer, but when start implementing reactivity, websockets will be part of the picture somehow and using socketcluster seems like a reasonable thing to do in that case.


[Add] Add Official Docs for Laravel

Site URL
https://laravel.com/
Description of the above provided site
Laravel is a web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.
Category
Backend
Sub Category
official backend
Checklist

[X] I have checked the existing issues
[X] I have read the Contributing Guidelines
[X] I am willing to work on this issue (optional)
[X] I am a GSSoC'23 contributor

@Nishitbaria you can work on this too, as the gssoc'23 endline is close, but please make sure that commits remains spareted


[Event Request] Table 14 Location - OnBeforeIsBinBWReceiveOrShip

We would like to change the IsBinBWReceiveOrShip return value, since we allow to specify multiple receipts bins on a same location.
(Use case is one warehouse / location that has separate zones, of which one is used for dealing with goods received under suspension of excise duty. In that case, the suggested receipt bin code should be different from the default receipt bin code. PS: Using 2 separate locations is also an option, but adds more complexity in other areas of the application).
Can you please adjust IsBinBWReceiveOrShip to

Have a named return parameter?
Have a OnBefore event publisher with IsHandled pattern and option to overwrite the functions return value?

As-is
procedure IsBinBWReceiveOrShip(BinCode: Code[20]): Boolean
    begin
        exit(("Receipt Bin Code" <> '') and (BinCode = "Receipt Bin Code") or
          ("Shipment Bin Code" <> '') and (BinCode = "Shipment Bin Code"));
    end;

Suggested code
procedure IsBinBWReceiveOrShip(BinCode: Code[20]) BinBWReceiveOrShip: Boolean
    var
        IsHandled: Boolean;
    begin
        OnBeforeIsBinBWReceiveOrShip(Rec, BinCode, BinBWReceiveOrShip, IsHandled);
        if IsHandled then
            exit;

        BinBWReceiveOrShip :=
         (("Receipt Bin Code" <> '') and (BinCode = "Receipt Bin Code") or
          ("Shipment Bin Code" <> '') and (BinCode = "Shipment Bin Code"));
    end;

    [IntegrationEvent(false, false)]
    local procedure OnBeforeIsBinBWReceiveOrShip(Rec: Record Location; BinCode: Code[20]; var BinBWReceiveOrShip: Boolean; var IsHandled: Boolean)
    begin
    end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 10644.


Add release automation

Once a tag is pushed to github, it will:

create a "release archive"
create the release with the release archive

The release will be a "pre-release draft", so a human will need to go and make it "latest and greatest".
Example what happened in my fork when I pushed the tag: https://github.com/motiejus/inotify-info/actions/runs/8833871736/job/24254232221 https://github.com/motiejus/inotify-info/releases/tag/untagged-821f6dd9487d26fa828c
Fixes #23

Gentle ping @mikesart

I don't know anything about the release yaml stuff, but the rest of it looks great to me, so... 👍 Thanks!

After landing this PR I tagged v0.0.1, pushed it to your repo, and https://github.com/mikesart/inotify-info/releases/tag/v0.0.1 got automatically created.
Thanks. :)


Remove obsolete Azure Quantum articles

Redirect in place at https://github.com/MicrosoftDocs/azure-reference-other-pr/pull/711.

Apologies that must have been a misclick. Thanks for catching it!


Allow clerks to change status from clerk to open

Fixes #38 Add option for clerks to mark the case as open after clerk request

This change adds "Mark as open" as a option in "Change case status" only if the current status is 'clerk'.

Looks good, thanks for the pull request!


pre 、code  css problem   white-space

Do you need help or have a question? Please come chat in our forum: https://forum.ghost.org 👫.
If you're filing a bug 🐛, please include the following information:
Screenshot

Steps to Reproduce

This is the first step
The user interface of  tag eg. pre 、code，didn`t work well .
This may be the post content used to cause an issue...
white-space : pre-wrap  looks better

Technical details

Casper Version: 1.2.2
Ghost Version: latest
Browser Version: chrome safari
OS Version: mac android  ios

Hey @yanka1
I am not able if I understand what the issue is that you're reporting. The CSS you're referring to in your screenshot is the user agent style sheet. Just from the screenshots above and without further description, I don't really know what this

The user interface of tag eg. pre 、code，didn`t work well .

exactly means. Maybe it's just a language issue. Would you mind swinging over to our Ghost forum so we can look into this together?
I will close this issue for now, as I don't think it is one, but we can always reopen it.


Forgot instructions for deleting cert-manager namespace

In the section on cleaning up resources, there is no mention of the deleting the cert-manager namespace
# Ex
kubectl delete namespace cert-manager

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

ID: ada58160-dc50-b977-d3bc-65f92406e16d
Version Independent ID: 5c596e04-fddb-effe-3b72-575f4df42d4e
Content: Create an HTTPS ingress with Azure Kubernetes Service (AKS) cluster
Content Source: articles/aks/ingress-tls.md
Service: container-service
GitHub Login: @mlearned
Microsoft Alias: mlearned

Thanks for the feedback! We are currently investigating and will update you shortly.

The changes have been merged with this PR : https://github.com/MicrosoftDocs/azure-docs-pr/pull/84577


make DBI a singleton object (part 3)

The DBI object should in a normal spring app be autowired. Since we are currently using Spark, this object must be made a static singleton. However by doing this we make it easier to port the application to Spring Boot at a later time, because what we will do then is to convert classes that use this singleton directly to @Component or @Service, or convert the parents and pass the DBI object down. The good thing now is that we no longer have any DBI object stored in SessionData object or HttpRequestResponseData class. Or anywhere else. It is always accessed statically.

ready for review

Most of changes are only changes of passing DBI object. Plus for changing class names from Util, to normal names :D


Add preciseTopicPublishRateLimiterEnable to broker.conf

Motivation
PR #7078 introduced preciseTopicPublishRateLimiterEnable setting, but this setting is missing from broker.conf. The impact of this is that it is required to use PULSAR_PREFIX_preciseTopicPublishRateLimiterEnable: "true" in values.yaml to enable the setting. It would be more consistent with other settings if preciseTopicPublishRateLimiterEnable: "true" could be used.
Modifications
Add preciseTopicPublishRateLimiterEnable=false to broker.conf.

/pulsarbot run-failure-checks

/pulsarbot run-failure-checks

Can you check if we also need to add it to standalone.conf?

@sijie I checked now. It would be needed. I'll add it.
There's a lot of other configuration parameters missing from standalone.conf .


io.finch.Error.NoValid => io.finch.Error.NotValid

Docs listed incorrect error type (io.finch.Error.NoValid). Also fixed 'should has' typo.

Current coverage is 74.08%

Merging #588 into master will not affect coverage as of 4971cc3

Powered by Codecov. Updated on successful CI builds.

Thanks a lot @jimschubert!


deps: many packages need pooch to test

See for example https://github.com/scipp/esssans/actions/runs/10509106139/job/29114507114
Can we do something to make sure this is always in sync with basetest.in?

Or is it better to add this in each individual repo that needs it?


import.meta.env.DEV and PROD are incorrect if a custom mode is provided programmatically

Describe the bug
Ordinarily, building a Vite app results in import.meta.env.DEV === false and import.meta.env.PROD === true regardless of the mode configuration.
If you set mode when calling vite.build(...) programmatically, however, DEV and PROD are true and false unless the mode happens to be production.
Reproduction
https://github.com/Rich-Harris/vite-mode-repro
System Info
System:
    OS: macOS 12.0.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 779.03 MB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.15.1 - ~/.nvm/versions/node/v16.15.1/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v16.15.1/bin/yarn
    npm: 8.11.0 - ~/.nvm/versions/node/v16.15.1/bin/npm
  Browsers:
    Chrome: 103.0.5060.114
    Chrome Canary: 105.0.5187.0
    Firefox: 102.0.1
    Safari: 15.1
  npmPackages:
    vite: ^3.0.2 => 3.0.2

Used Package Manager
npm
Logs
No response
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue 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 instead.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

I think this is expected behaviour per the docs. You'd need to set NODE_ENV=production in .env.[mode] to bring back the prod behaviour. Maybe it make sense to default to production for builds but it would be a breaking change.

We hace the same issue here. The NODE_ENV=production doesn't set import.meta.env.PROD to true, unlike with Vite 2.

@cedeber can you provide a repro for that? Using the repro in this issue, adding .env.custom-programmatic with NODE_ENV=production fixed it for me.

I'll go ahead and close this since I agree with @bluwy that it's working as intended

Hang on a sec @benmccann — it's not working as intended. Either dev should be true in both cases where a custom mode is provided, or in neither. That's a matter for debate — personally I think it's bizarre that DEV is basically an alias for MODE !== 'production', and that it should instead reflect command — but either way there's a bug here.

I agree it's nonsensical that import.meta.env.DEV === import.meta.env.MODE !== 'production

Here's the logic as implemented, which looks at a few different variables to figure out if it's production:
https://github.com/vitejs/vite/blob/60721ac53a1bf326d1cac097f23642faede234ff/packages/vite/src/node/config.ts#L450

I'm not sure it should reflect command. E.g. I think you should be able to test serving in production mode. If you want to know what command was run then you can just look at command.
But it does sounds like there's a bug here if passing the mode programatically and via vite.config.js are not behaving the same.

Wow, it was not clear for me that vite build --mode production would switch to PROD without the .env file.
I always found weird that vite build switched to DEV by default because a --mode is set. I always consider mode to be a way to manipulate a bit the config but never that it will switch the PROD/END env vars.
What happens then if you use it the other way, with --mode development and set a .env with NODE_ENV=production?
I believe the mode should stay a string and don't change the behavior with some hidden keywords. And I understand better that a build is always production except if you force it via the NODE_ENV=development, disregarding the meaning of the mode string.

So vite dev gives COMMAND == "serve". That's how to make it even more confusing, imho.

Either dev should be true in both cases where a custom mode is provided, or in neither. That's a matter for debate — personally I think it's bizarre that DEV is basically an alias for MODE !== 'production', and that it should instead reflect command — but either way there's a bug here.

DEV isn't an alias for MODE !== 'production', it's more of an alias for process.env.NODE_ENV !== 'production', but only using MODE if process.env.NODE_ENV is not defined, since we need a value as a fallback (which IIUC this issue proposes to fallback with command === 'serve' or command === 'build' instead).
And according to https://vitejs.dev/guide/env-and-mode.html#modes:

However, it is important to understand that mode is a wider concept than just development vs. production. A typical example is you may want to have a "staging" mode where it should have production-like behavior, but with slightly different env variables from production.

It further explains that mode isn't something that affects dev / prod, it's just another "mode" your app is in, you have to configure what the "environment" is to affect dev / prod. Just that production "mode" gets special treatment as a prod "environment" by default.
So I think this isn't a bug. Maybe we could improve the docs, or implement a good fallback as proposed (which I think make sense, but for Vite 4), but it is still working as intended.

Thanks for the illuminating discussion. The only way I'm able to get import.meta.env.PROD to be true was with vite build.
Assuming the logic mentioned above:
https://github.com/vitejs/vite/blob/60721ac53a1bf326d1cac097f23642faede234ff/packages/vite/src/node/config.ts#L450-L452
I tried running my code in production mode using vite dev, but none of the following worked for me:

NODE_ENV=production vite dev
vite dev --mode production
Contents of .env includes NODE_ENV=production and VITE_USER_NODE_ENV=production then I run vite dev

Is it safe to say that configuring production mode is only possible with vite build? I propose the current behaviour should be documented so it's clearer how to use Vite in production mode. I'm happy to contribute to the docs once I have a solid understanding of current config behaviour.

Is it safe to say that configuring production mode is only possible with vite build? I propose the current behaviour should be documented so it's clearer how to use Vite in production mode. I'm happy to contribute to the docs once I have a solid understanding of current config behaviour.

Yes, you can't set production in dev as some integrations only apply HMR for non-prod environments. This behaviour is set at:
https://github.com/vitejs/vite/blob/1983cf43d4da92d40b1f96dff0a44def044f9130/packages/vite/src/node/config.ts#L363-L365
I agree that we could probably mention this somewhere in the docs.

Discussion here: https://github.com/vitejs/vite/discussions/9274

I believe this is fixed in https://github.com/vitejs/vite/pull/10996. Vite build will always default to prod by default, unless specifically changed with NODE_ENV=development in the env file, or in process.env.


Error: "clusterregistrationtokens.management.cattle.io is forbidden: " is seen when a user with no edit access to cluster navigates to cluster details page

On 2.6-head commit id: b43e4d9

Disable RKE2 feature.
Deploy an RKE1 custom cluster
Assign user1 as Cluster member of this cluster
Login as user1
Navigate to cluster management --> Cluster details page
error seen { "baseType": "error", "code": "Forbidden", "message": "clusterregistrationtokens.management.cattle.io is forbidden: User \"u-z8t2z\" cannot create resource \"clusterregistrationtokens\" in API group \"management.cattle.io\" in the namespace \"c-gw5fn\"", "status": 403, "type": "error", "statusCode": 403 }

Expected:
The call to clusterregistrationtokens should not be made when navigating to cluster details page
Similar issue: https://github.com/rancher/dashboard/issues/3852

The previous fix for #3852 disabled attempting to create a token if you don't have write access to  cluster, which you shouldn't have for cluster member.. (/v1/provisioning.cattle.io.clusters/fleet-default/c-gw5fn should not have the update link present).
And that works for me with a new cluster; Are you sure you didn't give it a different role?  If there's a role that has write to cluster but not clusterRegistrationTokens that would be a problem, but I don't think there's any more granular info for the UI to go to to know if it's going to work or not.

On 2.6.1

Disable RKE2 feature.
Deploy an RKE1 custom cluster
Assign user1 as Cluster member of this cluster
Login as user1
Navigate to cluster management --> Cluster details page
No error is seen in the page


false variable is assigned but never used recommendation

Issue Type: Bug
I'm getting "The variable 'results' is assigned but never used.", but I'm actually using the variable. (recommendation appears on line with "$results = $content ..."
      If ($_ -match "#Fields:\s*(.*)"){
        $fields  = $matches[1].split(",") | ForEach-Object{$_.trim()}
        $results = $content | Where-Object{$_ -notmatch "^#"} | ConvertFrom-Csv -Header $fields
      }
    }
    If (-not $results){
      Write-Verbose "Import-CsvFieldsHeader found no valid content in the file, string or array specified."
    }
    $results

[for my reference - line 304 in autopilot.psm1]
Extension version: 2019.9.0
VS Code version: Code 1.39.2 (6ab598523be7a800d7f3eb4d92d7ab9a66069390, 2019-10-15T15:35:18.241Z)
OS version: Windows_NT x64 10.0.17763

I'm seeing the same thing, but in my case it is in the Begin section of Foreach-Object.
1 | ForEach-Object -Begin { $Test=$true } -Process { $Test }
Shows the message "The variable 'Test' is assigned but never used." on the first part where I assign $Test.

file content
0..5 | ForEach-Object -Begin { $n = 100 } -Process { $n++ }

❯ Invoke-ScriptAnalyzer .
RuleName : PSUseDeclaredVarsMoreThanAssignments
Severity : Warning
Line     : 1
Column   : 32
Message  : The variable 'n' is assigned but never used.

❯ $PSVersionTable
Name                           Value
----                           -----
PSVersion                      7.0.0
PSEdition                      Core
GitCommitId                    7.0.0
OS                             Darwin 19.3.0 Darwin Kernel Version 19.3.0: Thu Jan  9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

❯  Get-Module PSScriptAnalyzer
Name              : PSScriptAnalyzer
Path              : /Users/jason.chester/.local/share/powershell/Modules/PSScriptAnalyzer/1.18.3/PSScriptAnalyzer.psm1
Description       : PSScriptAnalyzer provides script analysis and checks for potential code defects in the scripts by applying a group of built-in or customized rules on the
                    scripts being analyzed.
Guid              : d6245802-193d-4068-a631-8863a4342a18
Version           : 1.18.3
ModuleBase        : /Users/jason.chester/.local/share/powershell/Modules/PSScriptAnalyzer/1.18.3
ModuleType        : Script
PrivateData       : {PSData}
AccessMode        : ReadWrite
ExportedAliases   : {}
ExportedCmdlets   : {[Get-ScriptAnalyzerRule, Get-ScriptAnalyzerRule], [Invoke-Formatter, Invoke-Formatter], [Invoke-ScriptAnalyzer, Invoke-ScriptAnalyzer]}
ExportedFunctions : {}
ExportedVariables : {}
NestedModules     : {Microsoft.Windows.PowerShell.ScriptAnalyzer}

@FireInWinter @jasonchester Your use cases is already reported in issues #1031
The rule is unfortunately limited to the scope of one script block, therefore this might stay an issue for a while

@bergmeister If it is limited to one script block, I would say the rule is fairly useless and should be removed until a solution is found.  I see so many false positives on this rule, that it makes using PSScriptAnalyzer annoying to use.  Is there at least an easy way to disable the rule without editing files in the mod?  If I could set something up in my profile to ignore the rule that would at least make PSScriptAnalyzer useful until this is solved.

@FireInWinter We've had this discussion over and over again. Yes, there are some false positives but the rule is still very useful in flagging unused variables. It's just up to you to suppress when you know it is a false positive. If you do not want to keep up with that, use the -ExcludeRule switch on Invoke-ScriptAnalyzer or the equivalent of it in a PSSA settings file, to which you can point the vs-code extension

How would I disable the rule for some specific variables in a PS script that I know trigger a false positive, rather than disabling the rule globally?

@sba923 The Readme has a section describing how to suppress them for individual functions or scripts: https://github.com/powershell/psscriptanalyzer#suppressing-rules
For a function, this is how you can suppress for a specific variable (for a script you just put a param() block at the top in order to place the suppression attribute)
function foo {
    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments', 'unused',
        Justification = 'Reason why it is a false positive')]
    param()

    $unused = $null
}

Thanks a bunch for sharing this!

@sba923 The Readme has a section describing how to suppress them for individual functions or scripts: https://github.com/powershell/psscriptanalyzer#suppressing-rules
For a function, this is how you can suppress for a specific variable (for a script you just put a param() block at the top in order to place the suppression attribute)
function foo {
    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments', 'unused',
        Justification = 'Reason why it is a false positive')]
    param()

    $unused = $null
}

How do you suppress it in a [ScriptBlock]?  I'm seeing it a lot in my Pester unit tests, which are made of lots of script blocks but no functions.

@sba923 The Readme has a section describing how to suppress them for individual functions or scripts: https://github.com/powershell/psscriptanalyzer#suppressing-rules
For a function, this is how you can suppress for a specific variable (for a script you just put a param() block at the top in order to place the suppression attribute)
function foo {
    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments', 'unused',
        Justification = 'Reason why it is a false positive')]
    param()

    $unused = $null
}

How do you suppress it in a [ScriptBlock]?  I'm seeing it a lot in my Pester unit tests, which are made of lots of script blocks but no functions.

@joeskeen You could put a Param() at the top of the Pester file and put the suppression attributes on top of that. I know, not great terms of scoping, but it works at least

@joeskeen You could put a Param() at the top of the Pester file and put the suppression attributes on top of that. I know, not great terms of scoping, but it works at least

Duplicate of https://github.com/PowerShell/PSScriptAnalyzer/issues/1163


[BUG] Reference to the not existing Complete_Example.ttl

In the README.md of the RDF schema, there is a reference to a non-existent Complete_Example.ttl file.
The text should be updated to remove or clarify this reference, or alternatively, the missing example file should be created and added.
https://github.com/admin-shell-io/aas-specs/blob/7214123f9ab55fc99375150ed61f346a4c5ca139/schemas/rdf/README.md?plain=1#L81

thanks for the hint, @s-heppner please check: probably not generated (any longer). Please remove if this is the case.

According to my research, the file was removed in #242 when we switched from the manually written Complete_Example.ttl to the generated ones.
Since I do know very little about RDF, I cannot judge the way this paragraph in the README.md is out of date. Should it be removed completely?
@sebbader could you maybe have a look?


Broken Link

'docs examples' tests is broken
https://github.com/koto-lang/koto/blob/main/docs/language/_index.md

Thanks for the report!


Outdated EXL2 -  oobabooga's Text Generation WebUI

Just so you know, oobabooga's Text Generation WebUI currently still uses a by now quite outdated exl2 version. (0.0.20 vs the latest 0.1.5)
He's in the process of updating it though.

Thank you! I updated to exllamav2-0.1.5+cu121.torch2.3.1 and indeed it got a significant speedup for long prompts with no Flash Attention, but I did not see a speedup with Flash Attention used. So it does not really change any conclusions, as it's still faster with FA and I'm still not aware of any downside of FA.
I updated the .csv results and the plots. Github caches images, so it will take ~10 minutes for the article to update. You can see the data changes in the commit and the new plots by directly clicking on them.


Added Akka.Streams.Kafka

Implementation of Reactive.Kafka on .NET
What have been implemented

[x] KafkaProducer.PlainSink
[x] KafkaProducer.PlainFlow
[ ] KafkaProducer.CommitableSink
[x] Sharing IProducer
[x] KafkaConsumer.PlainSource
[x] KafkaConsumer.CommittableSource
[ ] Sharing IConsumer (PlainExternalSource and CommittableExternalSource)
[ ] AtMostOnceSource
[ ] PlainPartitionedSource
[ ] PlainPartitionedManualOffsetSource
[ ] CommittablePartitionedSource
[ ] Control flow (stop, shutdown, isShutdown)

@alexvaluyskiy are you working on it? It works ok, but I need plainPartitionedManualOffsetSource. I've started to port it. Maybe you started to do the same, but did not commit? If so, please do it.

@vasily-kirichenko it is done, someone should merge it

@alexvaluyskiy @vasily-kirichenko I'll resolve the merge conflict here and bring this in. Adding it to my to-do list for this week.

Resolved the merge conflict - waiting for AppVeyor to pass and then we'll merge this in.

Done! Merged into dev - @vasily-kirichenko @alexvaluyskiy so, do I need to merge this into master in order to push out a NuGet package?

I dunno, but please, push all the packages, it seems the old Amqp has not been pushed for 6 months.

Nice! Amqp (0.9) is still using Akka 1.3.6 nuget references, will that be an issue?

@AndreSteenbergen yeah, we should probably send in a PR to update all of those to the latest. I don't think we've made any changes to Akka.Streams that will impact those per-say, but for the sake of "package management hygiene" we should get everything up to date. Do you want to submit a PR for that or should I do it?


nineoldandroids dependency should be optional.

Since many applications don't support the oldest versions of android, many of them doesn't depend on nineoldandroids library.
This dependency can be optional for applications targeting greater Android API levels.

I agree, this library is not always necessary.

Any word on this?


python311Packages.ibm-cloud-sdk-core: 3.20.0 -> 3.20.1

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python311Packages.ibm-cloud-sdk-core is: Client library for the IBM Cloud services
meta.homepage for python311Packages.ibm-cloud-sdk-core is: https://github.com/IBM/python-sdk-core
meta.changelog for python311Packages.ibm-cloud-sdk-core is: https://github.com/IBM/python-sdk-core/blob/v3.20.1/CHANGELOG.md
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 3.20.1 with grep in /nix/store/qj792wn1815i4z71dygrq30v0yc20jz3-python3.11-ibm-cloud-sdk-core-3.20.1
found 3.20.1 in filename of file in /nix/store/qj792wn1815i4z71dygrq30v0yc20jz3-python3.11-ibm-cloud-sdk-core-3.20.1

Rebuild report (if merged into master) (click to expand)

6 total rebuild path(s)

6 package rebuild(s)

First fifty rebuilds by attrpath

opsdroid
python311Packages.ibm-cloud-sdk-core
python311Packages.ibm-watson
python312Packages.ibm-cloud-sdk-core
python312Packages.ibm-watson

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/qj792wn1815i4z71dygrq30v0yc20jz3-python3.11-ibm-cloud-sdk-core-3.20.1 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python311Packages.ibm-cloud-sdk-core https://github.com/r-ryantm/nixpkgs/archive/1a4f95c75b72ec7aae1ec92f390aeaa881150c9d.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/1a4f95c75b72ec7aae1ec92f390aeaa881150c9d#python311Packages.ibm-cloud-sdk-core

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/qj792wn1815i4z71dygrq30v0yc20jz3-python3.11-ibm-cloud-sdk-core-3.20.1
ls -la /nix/store/qj792wn1815i4z71dygrq30v0yc20jz3-python3.11-ibm-cloud-sdk-core-3.20.1/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review --extra-nixpkgs-config '{ allowInsecurePredicate = x: true; }' run on x86_64-linux 1

10 packages built:

opsdroid
opsdroid.dist
python311Packages.ibm-cloud-sdk-core
python311Packages.ibm-cloud-sdk-core.dist
python311Packages.ibm-watson
python311Packages.ibm-watson.dist
python312Packages.ibm-cloud-sdk-core
python312Packages.ibm-cloud-sdk-core.dist
python312Packages.ibm-watson
python312Packages.ibm-watson.dist

Maintainer pings
cc @globin for testing.

Done in https://github.com/NixOS/nixpkgs/commit/a0b435821291250fcf5105749f825b39081a7d45.


Import error - pyarrow.parquet

After upgrading to version 0.9.0 of pyarrow, I get an error when importing pq from pyarrow.parquet. With version 0.8 this was no problem.
import pyarrow.parquet as pq
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-5caa20dd15e1> in <module>()
----> 1 from pyarrow.parquet import pq

~/Documents/Environments/python361/lib/python3.6/site-packages/pyarrow/__init__.py in <module>()
     45
     46
---> 47 from pyarrow.lib import cpu_count, set_cpu_count
     48 from pyarrow.lib import (null, bool_,
     49                          int8, int16, int32, int64,

ImportError: dlopen(~/Documents/Environments/python361/lib/python3.6/site-packages/pyarrow/lib.cpython-36m-darwin.so, 2): Library not loaded: libarrow_boost_system.dylib
  Referenced from: ~/Documents/Environments/python361/lib/python3.6/site-packages/pyarrow/libarrow.0.dylib
  Reason: image not found`

OS: Mac OSX High Sierra
Python: 3.6.1

The 0.9.0 macOS wheels are broken; we are working on fixing it. @xhochy or @cpcloud can you delete the 0.9.0 wheels from PyPI since they are broken?

Deleted.