Select node version failed on custom deployment

So I have fought through endless bugs and problems to get to a point were the first deployment of our nodejs application works to see that it is broken again without even touching anything. No idea what is wrong this time, maybe you guys have an idea.
Command: bash deploy.sh
Handling YDM deployment!
Using start-up script dist/server from package.json.
Generated web.config.
Node.js versions available on the platform are: 0.6.20, 0.8.2, 0.8.19, 0.8.26, 0.8.27, 0.8.28, 0.10.5, 0.10.18, 0.10.21, 0.10.24, 0.10.26, 0.10.28, 0.10.29, 0.10.31, 0.10.32, 0.10.40, 0.12.0, 0.12.2, 0.12.3, 0.12.6, 4.0.0, 4.1.0, 4.1.2, 4.2.1, 4.2.2, 4.2.3, 4.2.4, 4.3.0, 4.3.2, 4.4.0, 4.4.1, 4.4.6, 4.4.7, 5.0.0, 5.1.1, 5.3.0, 5.4.0, 5.5.0, 5.6.0, 5.7.0, 5.7.1, 5.8.0, 5.9.1, 6.0.0, 6.1.0, 6.2.2, 6.3.0.
Selected node.js version 6.2.2. Use package.json file to choose a different version.
Selected npm version 3.9.5
ENOENT: no such file or directory, open 'D:\home\site\wwwroot\dist\iisnode.yml'
Updating iisnode.yml at D:\home\site\wwwroot\dist\iisnode.yml
An error has occurred during web site deployment.
select node version failed
ENOENT: no such file or directory, open 'D:\home\site\wwwroot\dist\iisnode.yml'\r\nC:\Program Files (x86)\SiteExtensions\Kudu\56.50706.2317\bin\Scripts\starter.cmd bash deploy.sh

And the deploy.sh
#!/bin/bash

# ----------------------
# KUDU Deployment Script
# Version: 1.0.6
# ----------------------

# Helpers
# -------

exitWithMessageOnError () {
  if [ ! $? -eq 0 ]; then
    echo "An error has occurred during web site deployment."
    echo $1
    exit 1
  fi
}

# Prerequisites
# -------------

# Verify node.js installed
hash node 2>/dev/null
exitWithMessageOnError "Missing node.js executable, please install node.js, if already installed make sure it can be reached from current environment."

# Setup
# -----

SCRIPT_DIR="${BASH_SOURCE[0]%\\*}"
SCRIPT_DIR="${SCRIPT_DIR%/*}"
ARTIFACTS=$SCRIPT_DIR/../artifacts
KUDU_SYNC_CMD=${KUDU_SYNC_CMD//\"}

if [[ ! -n "$DEPLOYMENT_SOURCE" ]]; then
  DEPLOYMENT_SOURCE=$SCRIPT_DIR
fi

if [[ ! -n "$NEXT_MANIFEST_PATH" ]]; then
  NEXT_MANIFEST_PATH=$ARTIFACTS/manifest

  if [[ ! -n "$PREVIOUS_MANIFEST_PATH" ]]; then
    PREVIOUS_MANIFEST_PATH=$NEXT_MANIFEST_PATH
  fi
fi

if [[ ! -n "$DEPLOYMENT_TARGET" ]]; then
  DEPLOYMENT_TARGET=$ARTIFACTS/wwwroot
else
  KUDU_SERVICE=true
fi

if [[ ! -n "$KUDU_SYNC_CMD" ]]; then
  # Install kudu sync
  echo Installing Kudu Sync
  npm install kudusync -g --silent
  exitWithMessageOnError "npm failed"

  if [[ ! -n "$KUDU_SERVICE" ]]; then
    # In case we are running locally this is the correct location of kuduSync
    KUDU_SYNC_CMD=kuduSync
  else
    # In case we are running on kudu service this is the correct location of kuduSync
    KUDU_SYNC_CMD=$APPDATA/npm/node_modules/kuduSync/bin/kuduSync
  fi
fi

# Node Helpers
# ------------

selectNodeVersion () {
  if [[ -n "$KUDU_SELECT_NODE_VERSION_CMD" ]]; then
    SELECT_NODE_VERSION="$KUDU_SELECT_NODE_VERSION_CMD \"$DEPLOYMENT_SOURCE\" \"$DEPLOYMENT_TARGET\" \"$DEPLOYMENT_TEMP\""
    eval $SELECT_NODE_VERSION
    exitWithMessageOnError "select node version failed"

    if [[ -e "$DEPLOYMENT_TEMP/__nodeVersion.tmp" ]]; then
      NODE_EXE=`cat "$DEPLOYMENT_TEMP/__nodeVersion.tmp"`
      exitWithMessageOnError "getting node version failed"
    fi

    if [[ -e "$DEPLOYMENT_TEMP/__npmVersion.tmp" ]]; then
      NPM_JS_PATH=`cat "$DEPLOYMENT_TEMP/__npmVersion.tmp"`
      exitWithMessageOnError "getting npm version failed"
    fi

    if [[ ! -n "$NODE_EXE" ]]; then
      NODE_EXE=node
    fi

    NPM_CMD="\"$NODE_EXE\" \"$NPM_JS_PATH\""
  else
    NPM_CMD=npm
    NODE_EXE=node
  fi
}

##################################################################################################################################
# Deployment
# ----------

echo Handling YDM deployment!

# 1. Select node version
selectNodeVersion

# 2. Install npm packages
if [ -e "$DEPLOYMENT_SOURCE/package.json" ]; then
  eval $NPM_CMD install --dev
  exitWithMessageOnError "npm failed"
fi

# 3. Install bower packages
if [ -e "$DEPLOYMENT_SOURCE/bower.json" ]; then
  eval $NPM_CMD install bower
  exitWithMessageOnError "installing bower failed"
  ./node_modules/.bin/bower install
  exitWithMessageOnError "bower failed"
fi

# 4. Run grunt
if [ -e "$DEPLOYMENT_SOURCE/Gruntfile.js" ]; then
  eval $NPM_CMD install grunt-cli
  exitWithMessageOnError "installing grunt failed"
  ./node_modules/.bin/grunt --no-color build:production
  exitWithMessageOnError "grunt failed"
fi

# 5. KuduSync to Target
"$KUDU_SYNC_CMD" -v 500 -f "$DEPLOYMENT_SOURCE/dist" -t "$DEPLOYMENT_TARGET" -n "$NEXT_MANIFEST_PATH" -p "$PREVIOUS_MANIFEST_PATH" -i ".git;.hg;.deployment;deploy.sh"
exitWithMessageOnError "Kudu Sync to Target failed"

##################################################################################################################################

# Post deployment stub
if [[ -n "$POST_DEPLOYMENT_ACTION" ]]; then
  POST_DEPLOYMENT_ACTION=${POST_DEPLOYMENT_ACTION//\"}
  cd "${POST_DEPLOYMENT_ACTION_DIR%\\*}"
  "$POST_DEPLOYMENT_ACTION"
  exitWithMessageOnError "post deployment action failed"
fi

echo "Finished successfully."

Is the error random, or does it always happen? If always, can you share a test repo that we can use to repro the issue? Thanks!

If you wish you can use the production repo (it's just a project for my bachelor thesis) https://github.com/chillyistkult/ydm. The deploy.sh is generated by the azure cli and only modified to run a grunt build:production task after bower install. As of now the error always happens but it worked in the past on a few commits. I haven't changed anything related to the deployment since then and it's also suspicious that Kudo fails to select a node version, because that looks like a rather basic task I can't really influence much.
The related Azure repository is http://ydm.azurewebsites.net/

I tried pushing your repo to a new site, and I did not see the error:
Handling YDM deployment!
Start script "dist/server" from package.json is not found.
Looking for app.js/server.js under site root.
Missing server.js/app.js files, web.config is not generated
Node.js versions available on the platform are: 0.6.20, 0.8.2, 0.8.19, 0.8.26, 0.8.27, 0.8.28, 0.10.5, 0.10.18, 0.10.21, 0.10.24, 0.10.26, 0.10.28, 0.10.29, 0.10.31, 0.10.32, 0.10.40, 0.12.0, 0.12.2, 0.12.3, 0.12.6, 4.0.0, 4.1.0, 4.1.2, 4.2.1, 4.2.2, 4.2.3, 4.2.4, 4.3.0, 4.3.2, 4.4.0, 4.4.1, 4.4.6, 4.4.7, 5.0.0, 5.1.1, 5.3.0, 5.4.0, 5.5.0, 5.6.0, 5.7.0, 5.7.1, 5.8.0, 5.9.1, 6.0.0, 6.1.0, 6.2.2, 6.3.0.
Selected node.js version 6.2.2. Use package.json file to choose a different version.
Selected npm version 3.9.5
Updating iisnode.yml at D:\home\site\wwwroot\iisnode.yml

What's interesting is that your error has "D:\home\site\wwwroot\dist\iisnode.yml", with the dist segment in there, while mine doesn't. Does that ring any bell about where it might be coming from?

I think it happens after you push the repo a second time after the first succesful deployment. Don't ask my why, I hoped you could tell me. Kudo sync is configured to only copy the /dist directory which is fine and as I mentioned it also worked for me the first time on a fresh app environment. Then some error kicks him (like this or Thread aborted) and I revert the app environment because it doesn't look like the problems are app related.
So as I didn't changed anything in the generated deploy.sh (beside the grunt task) I am a little bit lost here.

I think I sort of see what's going on:

We have logic in SelectNodeVersion.js (here) that looks at the start script in package.json and tried to make sense of it. In your case, you have "start": "node dist/server".
The code then checks if it can find that script. In your case, the dist folder is not in the repo (i.e. in D:\home\site\repository), so in the initial deployment, we end up ignoring the start script. Hence the output (first deployment): Start script "dist/server" from package.json is not found.
But then later in the deployment something creates dist/server.js in the repo.
On the next deployment, it does find dist/server.js under D:\home\site\repository, so it chooses to make use of the start script. But because the dist folder never makes it to the wwwroot folder, it blows up.

So I'd say the root of the issue is that there is a bit of a clash between having "start": "node dist/server", and the fact that you don't actually have the dist folder is DEPLOYMENT_TARGET (based on how you run kudusync).

What I don't understand is why is SelectNodeVersion.js trying to start my server.js before the build process is finished and the output /dist folder is copied to wwwroot? I mean even if I change the path in "start" to  "node server" it will fail when it tries to boot up the script in D:\home\site\repository.
So as far as I understand Azure/Kudo actually tries to run the script described in package.json "start" before AND after the deployment process?
So I need a solution to either have the directory path of repository and wwwroot to my server.js the same (e.g. DEPLOYMENT_TARGET is not wwwroot but wwwroot/dist - which is awkward) or I somehow tell Azure to only boot up server.js after deployment.
Can I ask you what you would do in such a situation?

SelectNodeVersion does not try to run anything. It tries to parse out the start script so it can correctly generate iisnode.yml with nodeProcessCommandLine set to the right value.
But it may be that this logic needs to be adapted to cover scenarios like yours.
Is this a correct summary of your scenario:

At build time, you create a dist folder under the repo root.
You want the content of that folder (but not the folder itself) to end up in your wwwroot

Yeah that's exactly how it should work. The dist folder contains a client and a server directory after the application is build in repo root (the grunt build:production task does that) , Kudo needs to sync the content of the dist folder to wwwroot (which is already working) and then I just need to run the app.js within my server directory to boot up the application.
So if I change "start": "node dist/server" in my package,json to "start": "node server" it should work.

Hi @chillyistkult  @davidebbo , I've similaire error , if you can help please,
here my log error
http://paste.ofcode.org/VVGYBc5yAJRRty5VYFH2Xs
http://paste.ofcode.org/7NTuffRHHTDKZgGqxMFw2a
http://paste.ofcode.org/hdRTHsfJQYWCzvN6nHCExn
Thank's

@nwabdou85 after weeks of investigations, I moved my infrastructure to Amazon AWS.
Azure is just not made to use (or abuse) as a build instance at the moment. As there are no meaningful integrations with third party continuous integration providers like circleci or travis right now I would suggest save your time on that, because even if you resolve this error I can ensure that there are plenty of other problems you will run into (like sporadic timeouts during build and copy tasks).

@chillyistkult  thank's


Warn if defer calls a function returning a closure if there is no trailing ()

For example
package main

import (
	"fmt"
)

func GetClosure() func() {
	fmt.Println("0")
	return func() {
		fmt.Println("1")
	}
}

func main() {
	defer GetClosure() // Oops: should be defer GetClosure()()
	fmt.Println("2")
}

https://play.golang.org/p/XPiGZaUPNh8
I tried https://github.com/kisielk/errcheck/ - it does not  warn either.

This seems more appropriate for vet rather than lint.


Refactor to calculate this.data at render time

It seems like we are going through some contortions to keep this.data up to date, which seems unnecessary given we can now call this.queryObservable.currentResult() in the render function to get the current data.
So I would suggest something like:
render() {
  let data;
  if (/*skipping*/) {
    data = { loading: true };
  } else {
    data = assign({}, this.queryObservable.currentResult());
    // copy fields over from queryObservable
  }

  // now render wrappedComponent with data
}

@tmeasday YES!! I love this idea!


 When I connect to candy I have the usual, FAQ-like grey screen. Here all the infos I can think of
jabber server is ejabberd. http-bind is enabled at localhost:5280/http-bind (when I go to the page I have a ejabberd mod_http_bind messagge). All good.
Here the relevante parts of ejabberd.yml
port: 5280
ip: "::"
module: ejabberd_http
web_admin: true
http_poll: true
http_bind: true
register: true
captcha: false

  mod_muc:
    host: "conference.@HOST@"
    access: muc
    access_create: muc_create
    access_persistent: muc_create
    access_admin: muc_admin

The room was created with android app (conversations). Name<EMAIL_ADDRESS>It works and messages are sent and received.
my /etc/hosts
<IP_ADDRESS>       localhost
<IP_ADDRESS>       cuoredoro.homenet.telecomitalia.it      cuoredoro
<IP_ADDRESS>       conference.localhost
# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

content server is nginx. No error, it has been restarted. Here the jabber.conf in sites-enabled

server {
        listen 8009 default_server;
        listen [::]:8009 default_server;

        root /var/www/html/jabber/;
        index index.html;

        server_name default_server;

        location /http-bind/ {
                # you need to change it to your http-bind port
                proxy_pass https://<IP_ADDRESS>:5280/http-bind/;
                proxy_buffering off;
                tcp_nodelay on;
                error_page  405 =200 $uri;
        }
}

then, for candy, here is /example/.htaccess

AddDefaultCharset UTF-8
Options +MultiViews
RewriteEngine On
RewriteRule http-bind/ http://localhost:5280/http-bind/ [P]

here the relevant part of index.html. I just added the debug and room name
Candy.init('http-bind/', {
                                core: {
                                        debug: true,
                                        autojoin<EMAIL_ADDRESS>}}

this is the console output when I connect to <IP_ADDRESS>:8009/example/index.html
GET
http://<IP_ADDRESS>:8009/libs.min.css [HTTP/1.1 404 Not Found 1ms]
GET
http://<IP_ADDRESS>:8009/libs.min.js [HTTP/1.1 404 Not Found 15ms]
GET
http://<IP_ADDRESS>:8009/candy.min.js [HTTP/1.1 404 Not Found 24ms]
Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead jquery.min.js:1:0
GET
http://<IP_ADDRESS>:8009/libs.min.js [HTTP/1.1 404 Not Found 6ms]
GET
http://<IP_ADDRESS>:8009/candy.min.js [HTTP/1.1 404 Not Found 1ms]
ReferenceError: Candy is not defined

Any idea of what it may be?
It is probably something silly, but for the life of me I can't figure it out.
Thanks!

From the last log, your web server is not serving the candy source code contained in libs.min.js and Candy.min.js. Are these files present in the defined virtual server root directory?

hello benlangfeld, thanks for your answer.
Those files are actually nowhere to be found. I doubled-checked the source tar file, and even there I can't find those libs.min.js and candy.min.js. Where should I look for them?

You have to download the compiled zip release or compile the project
yourself.
Em dom, 27 de nov de 2016 às 02:45, papermate<EMAIL_ADDRESS>escreveu:

hello benlangfeld, thanks for your answer.
Those files are actually nowhere to be found. I doubled-checked the source
tar file, and even there I can't find those libs.min.js and candy.min.js.
Where should I look for them?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/candy-chat/candy/issues/488#issuecomment-263102177,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAM1LbZWvsB5h23O25KIRwO99jqzh3WUks5rCQrUgaJpZM4K8NVl
.

You have to download the compiled zip release or compile the project yourself.

hello,
yes, I just noted that, I download the zip and files were here.


[TFLM] Added handling of tensors used as outputs for ops but then never used

Discussed in https://github.com/tensorflow/tensorflow/issues/43380
A long term fix would probably eliminate the need for this, but at least in my tests it solves the issue for now.

This failed some of my tests now, converting to draft, needs some work.

@yair-ehrenwald This PR is in draft, any update on this? Please. Thanks!

@yair-ehrenwald This PR is in draft, any update on this? Please. Thanks!

@yair-ehrenwald This PR is in draft, any update on this? Please. Thanks!

@yair-ehrenwald This PR is in draft, any update on this? Please. Thanks!

Closing this, going with @advaitjain 's suggestion in https://github.com/tensorflow/tensorflow/issues/43380

Closing this, going with @advaitjain 's suggestion in https://github.com/tensorflow/tensorflow/issues/43380


Code for Armo on Reward Bench

Hello, i am curious if you plan to add code in https://github.com/RLHFlow/RLHF-Reward-Modeling/tree/main/useful_code for how you run the ARMO model for Reward Bench.

@Haoxiang-Wang hi haoxiang, could you look into this?

Hi @philschmid
For ArmoRM evaluation on RewardBench, I directly pushed an eval code to RewardBench, and you can check out the evaluation command at this PR: https://github.com/allenai/reward-bench/pull/135

Hey thank you for sharing i opened a PR on your model card to make the usage for non expert a bit easier based on your Reward Bench PR, which uses  the preference score for the response, aggregated from the  multi-objective rewards with the gating layer.
https://huggingface.co/RLHFlow/ArmoRM-Llama3-8B-v0.1/discussions/3

Thank you @philschmid for the new usage demo code!
I just updated the READMEs of our HuggingFace page and this repo (see https://github.com/RLHFlow/RLHF-Reward-Modeling/commit/15226e9090d8d941b4b324fabfe5d6a780406290)


Add Supported Python versions badge.

Summary of the changes / Why this is an improvement
Checklist

[ ] CLA is signed

Thanks Hasan.
This patch apparently has to be rebased in order to integrate it. While being at it: Can you also add badges for the number of downloads from PyPI and for the license?
.. image:: https://img.shields.io/pypi/dm/crash.svg
    :target: https://pypi.org/project/crash/

.. image:: https://img.shields.io/github/license/crate/crash
    :target: https://github.com/crate/crash/blob/master/LICENSE

... and also update the badge for the version number on PyPI to use img.shields.io instead of badge.fury.io just for the sake of consistency?
.. image:: https://img.shields.io/pypi/v/crash.svg
    :target: https://pypi.org/project/crash/

Thanks already and with kind regards,
Andreas.

Thanks Hasan.
This patch apparently has to be rebased in order to integrate it. While being at it: Can you also add badges for the number of downloads from PyPI and for the license?
.. image:: https://img.shields.io/pypi/dm/crash.svg
    :target: https://pypi.org/project/crash/

.. image:: https://img.shields.io/github/license/crate/crash
    :target: https://github.com/crate/crash/blob/master/LICENSE

... and also update the badge for the version number on PyPI to use img.shields.io instead of badge.fury.io just for the sake of consistency?
.. image:: https://img.shields.io/pypi/v/crash.svg
    :target: https://pypi.org/project/crash/

Thanks already and with kind regards,
Andreas.

Hi @hramezani,
I quickly went ahead and made the suggested changes to your branch. I hope you don't mind but appreciate it.
With kind regards,
Andreas.

Hi @hramezani,
I quickly went ahead and made the suggested changes to your branch. I hope you don't mind but appreciate it.
With kind regards,
Andreas.

The new version can be reviewed at https://github.com/crate/crash/blob/hasan/supported_python_version/README.rst.
cc @matthijskrul, @seut

The new version can be reviewed at https://github.com/crate/crash/blob/hasan/supported_python_version/README.rst.
cc @matthijskrul, @seut


Build of a project referencing AWSSDK.S3 fails with Error CS8032 after an update

Describe the bug
After updating AWSSDK.S3 from 3.7.107 to <IP_ADDRESS> the build suddenly fails.
Expected Behavior
The build should still work after the update.
Current Behavior
After updating AWSSDK.S3 from 3.7.107 to <IP_ADDRESS> the build suddenly fails with the following error message:
CSC : error CS8032: An instance of analyzer Amazon.S3.CodeAnalysis.PropertyValueAssignmentAnalyzer cannot be created from C:\Users\peter.benko\.nuget\packages\awssdk.s3\<IP_ADDRESS>\analyzers\dotnet\cs\AWSSDK.S3.CodeAnalysis.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Upon reverting to 3.7.107 the build works again.
The project in question is net48 class library, built for x86.
Reproduction Steps
Minimal repro solution -> all is fine if you downgrade to 3.7.107
Possible Solution
No response
Additional Information/Context

Surprisingly, this issues is present only when using 32bit SDK since the build works on CI with 64but SDK
Possibly caused by same root cause as https://github.com/aws/aws-sdk-net/issues/2989

AWS .NET SDK and/or Package version used
AWSSDK.S3 <IP_ADDRESS>
Targeted .NET Platform
.NET Framework 4.8
Operating System and version
Windows 10

Thanks for reporting @PeterBenko, it's the same problem as the other issue.
I'll close this one and continue the investigation / resolution there.

@PeterBenko I wanted to ask a follow-up question to this issue: What version of Visual Studio were you using for that reproduction repository (https://github.com/PeterBenko/aws-sdk-net-issues-2990)?

The IDE I used was Rider.
If you’re asking because of the .csproj structure - I’ve manually clobbered it together to mimic the project that was giving us troubles.
On 7 Jul 2023 at 16:25 +0200, Daniel Pinheiro @.***>, wrote:

@PeterBenko I wanted to ask a follow-up question to this issue: What version of Visual Studio were you using for that reproduction repository (https://github.com/PeterBenko/aws-sdk-net-issues-2990)?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.***>

Got it, thanks for the answer. We're thinking about changing the analyzer to target netstandard again, but will probably use a lower version of the Microsoft.CodeAnalysis package (as recommended on the other issue).
I haven't tested with Rider, will take a look.


Multiple chromecast

Hello.
I would like to cast to differente chromecast in my home.
If i have two chromecast on my network I would like to choose the chromecast to cast my film.
It's possible ?

Chromecast Scanner only returns the first chromecast found or the one from which you know the device name like this:
var scanner = require('chromecast-scanner');

scanner({ name: 'my second chromecast.local' }, function(err, service) {
  console.log('chromecast %s running on: %s',
    service.name,
    service.data);
});

It jumps into the callback as soon it finds the device.
However, I could think of implementing something like this (or would accept a PR):
scanner.all(function(err, devices) {
    // returns all found devices after a TTL
});


Issue with add_nat_traversal when dumping server config

Hi, now using the following scheme to work with currnet wg config when adding a new Peer:
    if temp_conf_exist(TEMP_FILENAME):
        server = load_server(TEMP_FILENAME)
    else:
        server = create_server(NET, ADDRESS, PUBLIC, PRIVATE, ENDPOINT, PORT)
    peer = server.peer(name)
    public_key = peer.config().public_key.split(' = ')[1]
    private_key = peer.config().private_key.split(' = ')[1]
    address = peer.config().address.split('=')[1].strip()
    server.config().write()
    save_server(server, TEMP_FILENAME)
    if is_up(IFACE):
        server.service.restart()
    else:
        server.service.start()
    return public_key, private_key, address

Create a new server object from scratch or from a pickle dump (temp) of previous configuration.
Create a new peer for this object.
Apply the configuration to create wg0.conf and wg0-peers.conf files
Save server_kwargs to a temp file.

So every time I perform any action on my working server I get the server object from temp file, perform the action and save the new object again.
Everything worked well until I tried add_nat_traversal method. If I have no temp file and create the server as server = Server() and the use server.add_nat_traversal - everything is OK and I get proper PostUp settings in wg0.conf:

But, adding one more user (after the cycle with temp file) I get the following:

So, my PostUp rules are interpreted as lists. Every new user adds a list layer:

Obviously, it is not interpreted properly by the wireguard.
So,
question 1:  Could you advise some walkaround for this situation?
question 2:  If I would like to hardcode the post_up rules to use them explicitly when creating the server: server = Server(..., post_up=**xxx**) what xxx format should be?
Regards

The problem with the PostUp rules getting nested on each subsequent import is actually a bug. I've corrected it in https://github.com/fictivekin/wireguard/commit/7ef9d169525ab6a166e40184f2db3a39a27efe1e (which also allows fixes #10). It can be released in the next few hours.
Also, wondering why you're using this:
 public_key = peer.config().public_key.split(' = ')[1]
 private_key = peer.config().private_key.split(' = ')[1]
 address = peer.config().address.split('=')[1].strip()

instead of directly using:
public_key = peer.public_key
private_key = peer.private_key
address = peer.address

...realizing that peer.address is actually a list, in case of the use of both IPv4/6, but peer.ipv4 or peer.ipv6 could be used instead.

Thanks for quick reponse and work on the issue!
About my code: for that moment I didn't dig enouph into the code. Thank for help!


Allow the user to set the minimum window size

Description of the new feature/enhancement
Create an option "disable window resizing" or "fixed minimum window size" in global settings.

Proposed technical implementation details (optional)
Window Resizing Settings
Property name: enableWindowResizing
Necessity: Optional
Accepts: true, false
Default value: true
_________________________ OR __________________________________
Fixed Minimum Window Size
Property name: minimumWindowSize
Necessity: Optional
Accepts: Dimensions - rows,columns
Default value: 30,120

... Why though? Since resizing is a user-initiated event, couldn't you just not resize the window?

... Why though? Since resizing is a user-initiated event, couldn't you just not resize the window?

For aesthetic and comercial reasons. If I create a console app and compose it with a background image, like my company logo, resizing the window will make the composition less interesting, since the backgroung image is static.

since the background image is static. For this reason it would be better if I could keep the user from doing that

I think the solution is make the background image dynamic instead. If I want to resize then I'm going to regardless if a background image is static. Attempting to force your users to do things your way is how you lose users. It's all about choice and Windows Terminal is great about doing that and is adding even more for that.

since the background image is static. For this reason it would be better if I could keep the user from doing that

I think the solution is make the background image dynamic instead. If I want to resize then I'm going to regardless if a background image is static. Attempting to force your users to do things your way is how you lose users. It's all about choice and Windows Terminal is great about doing that and is adding even more for that.

It would be nice to make the background image dynamic, but I think bitmap formats like png are not the best choice for this. If introducing an option to prevent resizing is such a big problem, an option for a minimum size would do the job.
I'm proposing something based on my needs and maybe somebody else's needs. My users are from an IT niche and Windows Terminal is giving me the oportunity improve apps that we already have and create even better ones. But, a "disable window resizing" option or a "minimum window size" option would really be helpful for what I pretend to do.

There's already a minimum window size set you can't go any smaller with though it could use a bit more work (I can make it so everything but the tab is visible, there should at least be one visible line you can type into).

There's already a minimum window size set you can't go any smaller with though it could use a bit more work (I can make it so everything but the tab is visible, there should at least be one visible line you can type into). I would be in favor of allowing a setting to be added for this instead of removing the ability to resize and defaulting it to true, something that would break more users than your niche crowd consists of.

A fixed minimum window size would be great. It would be really helpful.

Some mice have issues triggering excessive events after a scroll. Windows resizing gets triggered without the user meaning to. I prefer terminal resizing to be bound to keyboard shortcuts such as those used in browsers, and the ability to disable mouse-initiated resizing.

Some mice have issues triggering excessive events after a scroll. Windows resizing gets triggered without the user meaning to. I prefer terminal resizing to be bound to keyboard shortcuts such as those used in browsers, and the ability to disable mouse-initiated resizing.

I've opened an issue-feature about that, but the developers/contributors are aware and already working on it.

I'm okay with letting the user configure the minimum window size, so I'll re-purpose this thread accordingly. Thanks for the discussion all!

@zadjii-msft - once we merge https://github.com/microsoft/terminal/pull/8066 this might be quite straightforward. WDYT?

is this issue open ?

It appears to be!

Why was this never implemented? This is an extremely easy to build feature, and from what I can tell the only reason it was never implemented was because of a few people trying to wrongly claim it's "not necessary", even though there's numerous people saying they want this feature.

We'd be more than happy to accept a contribution of this extremely easy to build feature! As it stands there are more than 175 issues with more 👍's than this thread, so it's pretty far down our own backlog. But I agree, it would be fairly easy for someone passionate about this to add it ☺


#42 Fixes the invalid Helm chart API version

According to official Helm v3 documentation apiVersion: v3 is invalid. It must be either v1 or v2.

@nasundar could you please review?

Happy to help
it lints perfectly now
Pulling mcr.microsoft.com/azuremonitor/auth-proxy/prod/aad-auth-proxy/helmchart/aad-auth-proxy:0.1.0-main-01-10-2024-08b31473
Linting release=aad-auth-proxy, chart=/tmp/helmfile1011085495/observability/***/aad-auth-proxy/aad-auth-proxy/0.1.0-main-01-10-2024-08b31473/aad-auth-proxy
==> Linting /tmp/helmfile1011085495/observability/***/aad-auth-proxy/aad-auth-proxy/0.1.0-main-01-10-2024-08b31473/aad-auth-proxy
[INFO] Chart.yaml: icon is recommended

1 chart(s) linted, 0 chart(s) failed


perf: faster Nat.repr implementation in C

Nat.repr was implemented by generating a list of Chars, each created by a 10-way if-then-else. This can cause significant slow down in some particular use cases.
Now Nat.repr is implemented_by a faster implementation that uses C++’s std::to_string on small numbers (< USize.size) and maintains an array of pre-allocated strings for the first 128 numbers.
The handling of big numbers (≥ USize.size) remains as before.

!bench

!bench

!bench

!bench

!bench

!bench

!bench

!bench

Impact on mathlib: http://speed.lean-fro.org/mathlib4/compare/a93fa055-e732-498b-8c1f-fd5ab4f48b05/to/4457e6c3-ba82-4273-b390-de8345e68c5f

Don't know. Is that something we should look at now, or when it seems to become a problem?

The latter I think, it would only be an issue if we end up improving this even more.


No instructions for setup and execution

These should be written clearly in the README, especially because the Casablanca and Azure libraries must be set up first, as well as the azure key and endpoint.

I'll work on this!

Fixed in pull request #24


Fix eval.py with lora

Missed eval.py completely in the LoRA refactor. eval.py should work with lora weights from HF now.
eval run: lora-eval-5-14nbZM
training run (to make sure it still works): mpt-7b-lora-after-fsdp-21-ydBLUS

Will wait for @danbider to double check this works for him


[BUG] [HEADS UP] Cython build failure with Python 3.14.0a1

Describe the bug
I try to build Cython 3.0.11 with Python 3.14.0a1 in Fedora Linux and get the following errors:
  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      return op, pos

  def p_binop_expr(s, ops, p_sub_expr):
      n1 = p_sub_expr(s)
      while s.sy in ops:
          op, pos = p_binop_operator(s)
                                     ^
  ------------------------------------------------------------

  Cython/Compiler/Parsing.py:99:35: Compiler crash in AnalyseExpressionsTransform

  ModuleNode.body = StatListNode(Parsing.py:6:0)
  StatListNode.stats[25] = StatListNode(Parsing.py:96:0)
  StatListNode.stats[0] = CFuncDefNode(Parsing.py:96:0,
      args = [...]/3,
      modifiers = [...]/0,
      outer_attrs = [...]/2,
      visibility = 'private')
  File 'Nodes.py', line 397, in analyse_expressions: StatListNode(Parsing.py:97:4,
      is_terminator = True)
  File 'Nodes.py', line 7354, in analyse_expressions: WhileStatNode(Parsing.py:98:4)
  File 'Nodes.py', line 397, in analyse_expressions: StatListNode(Parsing.py:99:8)
  File 'Nodes.py', line 6056, in analyse_expressions: SingleAssignmentNode(Parsing.py:99:34)
  File 'Nodes.py', line 6189, in analyse_types: SingleAssignmentNode(Parsing.py:99:34)
  File 'ExprNodes.py', line 6139, in analyse_types: SimpleCallNode(Parsing.py:99:34,
      analysed = True,
      result_is_used = True,
      use_managed_ref = True)
  File 'ExprNodes.py', line 6257, in analyse_c_function_call: SimpleCallNode(Parsing.py:99:34,
      analysed = True,
      result_is_used = True,
      use_managed_ref = True)
  File 'ExprNodes.py', line 2076, in coerce_to: NameNode(Parsing.py:99:35,
      cf_state = [...]/1,
      is_name = True,
      name = 's',
      result_is_used = True,
      use_managed_ref = True)
  File 'ExprNodes.py', line 983, in coerce_to: NameNode(Parsing.py:99:35,
      cf_state = [...]/1,
      is_name = True,
      name = 's',
      result_is_used = True,
      use_managed_ref = True)

  Compiler crash traceback from this point on:
    File "/builddir/build/BUILD/Cython-3.0.11-build/cython-3.0.11/Cython/Compiler/ExprNodes.py", line 983, in coerce_to
      if src_type.is_cv_qualified:
         ^^^^^^^^^^^^^^^^^^^^^^^^
  AttributeError: 'NoneType' object has no attribute 'is_cv_qualified'
  Compiling /builddir/build/BUILD/Cython-3.0.11-build/cython-3.0.11/Cython/Compiler/Parsing.py because it changed.
  [1/1] Cythonizing /builddir/build/BUILD/Cython-3.0.11-build/cython-3.0.11/Cython/Compiler/Parsing.py
  Traceback (most recent call last):
    File "/usr/lib/python3.14/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
      ~~~~^^
    File "/usr/lib/python3.14/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.14/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                                          metadata_directory)
                                          ^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.14/site-packages/setuptools/build_meta.py", line 410, in build_wheel
      return self._build_with_temp_dir(
             ~~~~~~~~~~~~~~~~~~~~~~~~~^
          ['bdist_wheel'],
          ^^^^^^^^^^^^^^^^
      ...<3 lines>...
          self._arbitrary_args(config_settings),
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      )
      ^
    File "/usr/lib/python3.14/site-packages/setuptools/build_meta.py", line 395, in _build_with_temp_dir
      self.run_setup()
      ~~~~~~~~~~~~~~^^
    File "/usr/lib/python3.14/site-packages/setuptools/build_meta.py", line 487, in run_setup
      super().run_setup(setup_script=setup_script)
      ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.14/site-packages/setuptools/build_meta.py", line 311, in run_setup
      exec(code, locals())
      ~~~~^^^^^^^^^^^^^^^^
    File "<string>", line 319, in <module>
    File "<string>", line 245, in run_build
    File "/usr/lib/python3.14/site-packages/setuptools/__init__.py", line 104, in setup
      return distutils.core.setup(**attrs)
             ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
    File "/usr/lib/python3.14/site-packages/setuptools/_distutils/core.py", line 185, in setup
      return run_commands(dist)
    File "/usr/lib/python3.14/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
      dist.run_commands()
      ~~~~~~~~~~~~~~~~~^^
    File "/usr/lib/python3.14/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
      ~~~~~~~~~~~~~~~~^^^^^
    File "/usr/lib/python3.14/site-packages/setuptools/dist.py", line 967, in run_command
      super().run_command(command)
      ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
    File "/usr/lib/python3.14/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
      ~~~~~~~~~~~^^
    File "/usr/lib/python3.14/site-packages/wheel/bdist_wheel.py", line 368, in run
      self.run_command("build")
      ~~~~~~~~~~~~~~~~^^^^^^^^^
    File "/usr/lib/python3.14/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
    File "/usr/lib/python3.14/site-packages/setuptools/dist.py", line 967, in run_command
      super().run_command(command)
      ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
    File "/usr/lib/python3.14/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
      ~~~~~~~~~~~^^
    File "/usr/lib/python3.14/site-packages/setuptools/_distutils/command/build.py", line 131, in run
      self.run_command(cmd_name)
      ~~~~~~~~~~~~~~~~^^^^^^^^^^
    File "/usr/lib/python3.14/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
    File "/usr/lib/python3.14/site-packages/setuptools/dist.py", line 967, in run_command
      super().run_command(command)
      ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
    File "/usr/lib/python3.14/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
      ~~~~~~~~~~~^^
    File "/usr/lib/python3.14/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
      self.build_extensions()
      ~~~~~~~~~~~~~~~~~~~~~^^
    File "/usr/lib/python3.14/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
      self._build_extensions_serial()
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
    File "/usr/lib/python3.14/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
      self.build_extension(ext)
      ~~~~~~~~~~~~~~~~~~~~^^^^^
    File "/builddir/build/BUILD/Cython-3.0.11-build/cython-3.0.11/Cython/Distutils/build_ext.py", line 130, in build_extension
      new_ext = cythonize(
                ~~~~~~~~~^
          ext,force=self.force, quiet=self.verbose == 0, **options
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      )[0]
      ^
    File "/builddir/build/BUILD/Cython-3.0.11-build/cython-3.0.11/Cython/Build/Dependencies.py", line 1154, in cythonize
      cythonize_one(*args)
      ~~~~~~~~~~~~~^^^^^^^
    File "/builddir/build/BUILD/Cython-3.0.11-build/cython-3.0.11/Cython/Build/Dependencies.py", line 1321, in cythonize_one
      raise CompileError(None, pyx_file)
  Cython.Compiler.Errors.CompileError: /builddir/build/BUILD/Cython-3.0.11-build/cython-3.0.11/Cython/Compiler/Parsing.py
  Building wheel for Cython (pyproject.toml): finished with status 'error'

Code to reproduce the behaviour:
No response
Expected behaviour
No response
OS
Fedora Linux
Python version
Python 3.14.0a1
Cython version
3.0.11
Additional context
Build happened in our test build system. Happy to test fixes.

I can reproduce this at cython master branch @ a2b9f55670b765d9b482fd7d8533f2df914e7387 (also with Python 3.14.0a1).

Actually, my error is different, sorry:
[1/1] Cythonizing /home/churchyard/Dokumenty/RedHat/cython/Cython/Compiler/Parsing.py
warning: Cython/Compiler/Parsing.py:100:0: noexcept clause is ignored for function returning Python object
warning: Cython/Compiler/Parsing.py:197:0: noexcept clause is ignored for function returning Python object

Error compiling Cython file:
------------------------------------------------------------
...

@cython.ccall
def make_slice_node(pos, start, stop = None, step = None):
    if not start:
        start = ExprNodes.NoneNode(pos)
                                  ^
------------------------------------------------------------

Cython/Compiler/Parsing.py:750:34: Compiler crash in AnalyseExpressionsTransform

ModuleNode.body = StatListNode(Parsing.py:8:0)
StatListNode.stats[65] = StatListNode(Parsing.py:747:0)
StatListNode.stats[0] = CompilerDirectivesNode(Parsing.py:747:0)
CompilerDirectivesNode.body = StatListNode(Parsing.py:747:0)
StatListNode.stats[0] = CFuncDefNode(Parsing.py:747:0,
    args = [...]/4,
    modifiers = [...]/0,
    outer_attrs = [...]/2,
    overridable = True,
    visibility = 'private')
File 'Nodes.py', line 400, in analyse_expressions: StatListNode(Parsing.py:749:4,
    is_terminator = True)
File 'Nodes.py', line 344, in analyse_expressions: CompilerDirectivesNode(Parsing.py:749:4,
    is_terminator = True)
File 'Nodes.py', line 400, in analyse_expressions: StatListNode(Parsing.py:749:4,
    is_terminator = True)
File 'Nodes.py', line 7250, in analyse_expressions: IfStatNode(Parsing.py:749:4)
File 'Nodes.py', line 7297, in analyse_expressions: IfClauseNode(Parsing.py:749:7)
File 'Nodes.py', line 400, in analyse_expressions: StatListNode(Parsing.py:750:34)
File 'Nodes.py', line 6133, in analyse_expressions: SingleAssignmentNode(Parsing.py:750:34)
File 'Nodes.py', line 6266, in analyse_types: SingleAssignmentNode(Parsing.py:750:34)
File 'ExprNodes.py', line 6124, in analyse_types: SimpleCallNode(Parsing.py:750:34,
    analysed = True,
    result_is_used = True,
    use_managed_ref = True)
File 'ExprNodes.py', line 8643, in analyse_types: TupleNode(Parsing.py:750:34,
    is_sequence_constructor = 1,
    result_is_used = True,
    use_managed_ref = True)

Compiler crash traceback from this point on:
  File "/home/churchyard/Dokumenty/RedHat/cython/Cython/Compiler/ExprNodes.py", line 8643, in analyse_types
    if len(self.args) == 0:
       ~~~^^^^^^^^^^^
TypeError: object of type 'NoneType' has no len()
Traceback (most recent call last):
  File "/home/churchyard/Dokumenty/RedHat/cython/setup.py", line 356, in <module>
    run_build()
    ~~~~~~~~~^^
  File "/home/churchyard/Dokumenty/RedHat/cython/setup.py", line 278, in run_build
    setup(
    ~~~~~^
        name='Cython',
        ^^^^^^^^^^^^^^
    ...<71 lines>...
        **setup_args
        ^^^^^^^^^^^^
    )
    ^
  File "/home/churchyard/Dokumenty/RedHat/cython/venv/lib64/python3.14/site-packages/setuptools/__init__.py", line 117, in setup
    return distutils.core.setup(**attrs)
           ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/home/churchyard/Dokumenty/RedHat/cython/venv/lib64/python3.14/site-packages/setuptools/_distutils/core.py", line 183, in setup
    return run_commands(dist)
  File "/home/churchyard/Dokumenty/RedHat/cython/venv/lib64/python3.14/site-packages/setuptools/_distutils/core.py", line 199, in run_commands
    dist.run_commands()
    ~~~~~~~~~~~~~~~~~^^
  File "/home/churchyard/Dokumenty/RedHat/cython/venv/lib64/python3.14/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
    self.run_command(cmd)
    ~~~~~~~~~~~~~~~~^^^^^
  File "/home/churchyard/Dokumenty/RedHat/cython/venv/lib64/python3.14/site-packages/setuptools/dist.py", line 991, in run_command
    super().run_command(command)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/home/churchyard/Dokumenty/RedHat/cython/venv/lib64/python3.14/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
    cmd_obj.run()
    ~~~~~~~~~~~^^
  File "/home/churchyard/Dokumenty/RedHat/cython/venv/lib64/python3.14/site-packages/setuptools/_distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "/home/churchyard/Dokumenty/RedHat/cython/venv/lib64/python3.14/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
    self.distribution.run_command(command)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/home/churchyard/Dokumenty/RedHat/cython/venv/lib64/python3.14/site-packages/setuptools/dist.py", line 991, in run_command
    super().run_command(command)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/home/churchyard/Dokumenty/RedHat/cython/venv/lib64/python3.14/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
    cmd_obj.run()
    ~~~~~~~~~~~^^
  File "/home/churchyard/Dokumenty/RedHat/cython/venv/lib64/python3.14/site-packages/setuptools/command/build_ext.py", line 98, in run
    _build_ext.run(self)
    ~~~~~~~~~~~~~~^^^^^^
  File "/home/churchyard/Dokumenty/RedHat/cython/venv/lib64/python3.14/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
    self.build_extensions()
    ~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/churchyard/Dokumenty/RedHat/cython/venv/lib64/python3.14/site-packages/setuptools/_distutils/command/build_ext.py", line 476, in build_extensions
    self._build_extensions_serial()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/churchyard/Dokumenty/RedHat/cython/venv/lib64/python3.14/site-packages/setuptools/_distutils/command/build_ext.py", line 502, in _build_extensions_serial
    self.build_extension(ext)
    ~~~~~~~~~~~~~~~~~~~~^^^^^
  File "/home/churchyard/Dokumenty/RedHat/cython/venv/lib64/python3.14/site-packages/setuptools/command/build_ext.py", line 263, in build_extension
    _build_ext.build_extension(self, ext)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/churchyard/Dokumenty/RedHat/cython/Cython/Distutils/build_ext.py", line 129, in build_extension
    new_ext = cythonize(
              ~~~~~~~~~^
        ext,force=self.force, quiet=self.verbose == 0, **options
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )[0]
    ^
  File "/home/churchyard/Dokumenty/RedHat/cython/Cython/Build/Dependencies.py", line 1109, in cythonize
    cythonize_one(*args)
    ~~~~~~~~~~~~~^^^^^^^
  File "/home/churchyard/Dokumenty/RedHat/cython/Cython/Build/Dependencies.py", line 1256, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: /home/churchyard/Dokumenty/RedHat/cython/Cython/Compiler/Parsing.py

The crashes apparently happen while running Cython as pure Python code that translates a Python module in Cython itself. That suggests a bug in CPython rather than Cython. Recent work in CPython is strongly geared towards performance improvements, touching almost all parts of the implementation. While there is a certain chance that we're doing something special in Cython's Python code, I wouldn't be surprised to see further user code breakage in CPython, especially in an early alpha release. I still remember Victor's "break the world" move in Py3.13a1. This seems small in comparison.

I still remember Victor's "break the world" move in Py3.13a1.

See https://discuss.python.org/t/remove-again-private-apis-which-now-have-new-public-replacement/68081/1 about that for 3.14 (he's asking what to do so it's a chance to influence the course of action).

The "crash" seem to be this:
  Compiler crash traceback from this point on:
    File "/builddir/build/BUILD/Cython-3.0.11-build/cython-3.0.11/Cython/Compiler/ExprNodes.py", line 983, in coerce_to
      if src_type.is_cv_qualified:
         ^^^^^^^^^^^^^^^^^^^^^^^^
  AttributeError: 'NoneType' object has no attribute 'is_cv_qualified'

Compiler crash traceback from this point on:
  File ".../cython/Cython/Compiler/ExprNodes.py", line 8643, in analyse_types
    if len(self.args) == 0:
       ~~~^^^^^^^^^^^
TypeError: object of type 'NoneType' has no len()

This does not sound like "interpreter crush" to me, but honestly this is a bit too magical for me :)

I also see this with CPython main, I'm working on bisecting it.

@ git bisect log
# bad: [2e950e341930ea79549137d4d3771d5edb940e65] Add tests for time.strftime() with invalid format string (GH-125696)
# good: [8204014280fcb07c9321305a729716326e625c6e] [3.13] Add tests for time.strftime() with invalid format string (GH-125696) (GH-125702)
git bisect start 'main' '3.13'
# good: [2268289a47c6e3c9a220b53697f9480ec390466f] Python 3.13.0b1
git bisect good 2268289a47c6e3c9a220b53697f9480ec390466f
# good: [d52726ccd456833ea9f09cabb4b8aef09755e472] Document ``mimetypes.MimeTypes.add_type()`` (#122301)
git bisect good d52726ccd456833ea9f09cabb4b8aef09755e472
# good: [aba42c0b547e6395c9c268cf98a298d0494cb9df] gh-123969: refactor _PyErr_RaiseSyntaxError and _PyErr_EmitSyntaxWarning out of compiler (#123972)
git bisect good aba42c0b547e6395c9c268cf98a298d0494cb9df
# bad: [1d4e3e0585c1051ec182666668137fbb0fc1a4d2] gh-111178: Fix locale_free() signature (#124896)
git bisect bad 1d4e3e0585c1051ec182666668137fbb0fc1a4d2
# bad: [909c6f718913e713c990d69e6d8a74c05f81e2c2] gh-123884 Tee of tee was not producing n independent iterators (gh-124490)
git bisect bad 909c6f718913e713c990d69e6d8a74c05f81e2c2
# good: [c87b0e4a462f98c418f750c6c95d4d8715c38332] GH-124284: Add stats for refcount operations on immortal objects (GH-124288)
git bisect good c87b0e4a462f98c418f750c6c95d4d8715c38332
# bad: [4a5e4aade420c594c5b3fe0589e9e6b444bd6ee5] gh-59317: Improve parsing optional positional arguments in argparse (GH-124303)
git bisect bad 4a5e4aade420c594c5b3fe0589e9e6b444bd6ee5
# good: [38a887dc3ec52c4a7222279bf4b3ca2431b86de9] gh-119004: fix a crash in equality testing between `OrderedDict` (#121329)
git bisect good 38a887dc3ec52c4a7222279bf4b3ca2431b86de9
# bad: [9d344fafc4385cb2e17425b77b54660ca83c61ac] gh-124127: Make Py_REFCNT() opaque in limited C API 3.14 (#124128)
git bisect bad 9d344fafc4385cb2e17425b77b54660ca83c61ac
# bad: [d87482bc4ee9458d6ba16140e7bc008637dbbb16] gh-119333: Add C api to have contextvar enter/exit callbacks (#119335)
git bisect bad d87482bc4ee9458d6ba16140e7bc008637dbbb16
# bad: [be76e3f26e0b907f711497d006b8b83bff04c036] gh-100980: ctypes: Test, document, and fix finalizing _fields_ (GH-124292)
git bisect bad be76e3f26e0b907f711497d006b8b83bff04c036
# good: [e256a7590a0149feadfef161ed000991376dc0e8] Lint and format Tools/build/check-warnings.py (#124382)
git bisect good e256a7590a0149feadfef161ed000991376dc0e8
# first bad commit: [be76e3f26e0b907f711497d006b8b83bff04c036] gh-100980: ctypes: Test, document, and fix finalizing _fields_ (GH-124292)

via https://github.com/python/cpython/pull/124292
(git bisect run ... is super usful!)

python/cpython#124292

That's a change in ctypes, though. We don't use that anywhere. I don't see how that change could be related.

hmm, something went wrong with my bisect script as the log claims e256a7590a0149feadfef161ed000991376dc0e8 worked, but trying again does not...

A second attempt (I think starting from 3.13 as the "good" version confused git with the branch)
@ git bisect log
git bisect start
# status: waiting for both good and bad commits
# good: [5a1205b641df133932ed4c65b9a4ff5724e89963] gh-111499: Fix PYTHONMALLOCSTATS at Python exit (#120021)
git bisect good 5a1205b641df133932ed4c65b9a4ff5724e89963
# status: waiting for bad commit, 1 good commit known
# bad: [2e950e341930ea79549137d4d3771d5edb940e65] Add tests for time.strftime() with invalid format string (GH-125696)
git bisect bad 2e950e341930ea79549137d4d3771d5edb940e65
# bad: [7b8328b6b33939dfff4606d286b10069a09223dd] GH-121723: Skip test_config_queue_handler_multiprocessing_context in emulated JIT CI (#122969)
git bisect bad 7b8328b6b33939dfff4606d286b10069a09223dd
# good: [59be79ae60073f7b6bdf6ce921560c279937e4ab] gh-108297: Update crashers README for test_crashers removal (#121475)
git bisect good 59be79ae60073f7b6bdf6ce921560c279937e4ab
# good: [bb108580dec5d8655ccdfb6c8737b5f64e3366d0] gh-122087: Add tests for ismethoddescriptor() and isroutine() with partial objects (GH-122219)
git bisect good bb108580dec5d8655ccdfb6c8737b5f64e3366d0
# good: [06eb9701a182b4720dfa8766cb41cc5a3728a8b9] Doc: Grammar fix in ``library/ssl.rst``, 'Verifying certificates' (#122646)
git bisect good 06eb9701a182b4720dfa8766cb41cc5a3728a8b9
# bad: [57d7c3e78fb635a0c6ccce38ec3e2f4284d5fac7] gh-122247: Move instruction instrumentation sanity check after tracing check (#122251)
git bisect bad 57d7c3e78fb635a0c6ccce38ec3e2f4284d5fac7
# bad: [4b66b6b7d6e65f9eb2d61435b9b37ffeb7bb00fb] gh-120104: IDLE: Fix padding in config and search dialogs (#120107)
git bisect bad 4b66b6b7d6e65f9eb2d61435b9b37ffeb7bb00fb
# bad: [44659d392751f0161a0f958fec39ad013da45427] GH-118943: Handle races when moving jit_stencils.h (GH-120690)
git bisect bad 44659d392751f0161a0f958fec39ad013da45427
# good: [f5c39b3e9cc88d1eaa9229d610b0221305a83ad9] gh-122661: Remove GNU make-specific directive from Doc/Makefile (#122662)
git bisect good f5c39b3e9cc88d1eaa9229d610b0221305a83ad9
# good: [5207adf228547273b0e8d0253c23c69b95d7fe11] build(deps-dev): bump mypy from 1.10.1 to 1.11.1 in /Tools (#122550)
git bisect good 5207adf228547273b0e8d0253c23c69b95d7fe11
# good: [1bb955a2fe0237721c141fdfe520fd3ba46db11e] gh-122459: Optimize pickling by name objects without __module__ (GH-122460)
git bisect good 1bb955a2fe0237721c141fdfe520fd3ba46db11e
# bad: [5bd72912a1a85be96092de302608a4298741c6cd] GH-122616: Simplify LOAD_ATTR_WITH_HINT and STORE_ATTR_WITH_HINT (GH-122620)
git bisect bad 5bd72912a1a85be96092de302608a4298741c6cd
# first bad commit: [5bd72912a1a85be96092de302608a4298741c6cd] GH-122616: Simplify LOAD_ATTR_WITH_HINT and STORE_ATTR_WITH_HINT (GH-122620)

However, this produces a slightly different error:
      [1/1] Cythonizing /home/tcaswell/source/p/cython/cython/Cython/Compiler/Parsing.py
      warning: Cython/Compiler/Parsing.py:100:0: noexcept clause is ignored for function returning Python object
      warning: Cython/Compiler/Parsing.py:197:0: noexcept clause is ignored for function returning Python object

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
              if ctx.api:
                  s.error("'api' not allowed with this statement", fatal=False)
              elif s.sy == 'def':
                  # def statements aren't allowed in pxd files, except
                  # as part of a cdef class
                  if ('pxd' in ctx.level) and (ctx.level != 'c_class_pxd'):
                            ^
      ------------------------------------------------------------

      Cython/Compiler/Parsing.py:2598:22: Compiler crash in AnalyseExpressionsTransform

      ModuleNode.body = StatListNode(Parsing.py:8:0)
      StatListNode.stats[138] = StatListNode(Parsing.py:2530:0)
      StatListNode.stats[0] = CompilerDirectivesNode(Parsing.py:2530:0)
      CompilerDirectivesNode.body = StatListNode(Parsing.py:2530:0)
      StatListNode.stats[0] = CFuncDefNode(Parsing.py:2530:0,
          args = [...]/3,
          modifiers = [...]/0,
          outer_attrs = [...]/2,
          visibility = 'private')
      File 'Nodes.py', line 400, in analyse_expressions: StatListNode(Parsing.py:2532:4)
      File 'Nodes.py', line 344, in analyse_expressions: CompilerDirectivesNode(Parsing.py:2532:4)
      File 'Nodes.py', line 400, in analyse_expressions: StatListNode(Parsing.py:2532:4)
      File 'Nodes.py', line 7252, in analyse_expressions: IfStatNode(Parsing.py:2579:4)
      File 'Nodes.py', line 400, in analyse_expressions: StatListNode(Parsing.py:2593:8)
      File 'Nodes.py', line 7250, in analyse_expressions: IfStatNode(Parsing.py:2593:8)
      File 'Nodes.py', line 7297, in analyse_expressions: IfClauseNode(Parsing.py:2595:13,
          is_terminator = True)
      File 'Nodes.py', line 400, in analyse_expressions: StatListNode(Parsing.py:2598:12,
          is_terminator = True)
      File 'Nodes.py', line 7250, in analyse_expressions: IfStatNode(Parsing.py:2598:12)
      File 'Nodes.py', line 7296, in analyse_expressions: IfClauseNode(Parsing.py:2598:15)
      File 'ExprNodes.py', line 644, in analyse_temp_boolean_expression: BoolBinopNode(Parsing.py:2598:36,
          is_temp = True,
          operator = 'and',
          result_is_used = True,
          use_managed_ref = True)
      File 'ExprNodes.py', line 12937, in analyse_types: BoolBinopNode(Parsing.py:2598:36,
          is_temp = True,
          operator = 'and',
          result_is_used = True,
          use_managed_ref = True)
      File 'ExprNodes.py', line 13718, in analyse_types: PrimaryCmpNode(Parsing.py:2598:22,
          operator = 'in',
          result_is_used = True,
          use_managed_ref = True)
      File 'ExprNodes.py', line 13476, in is_ptr_contains: PrimaryCmpNode(Parsing.py:2598:22,
          operator = 'in',
          result_is_used = True,
          use_managed_ref = True)

      Compiler crash traceback from this point on:
        File "/home/tcaswell/source/p/cython/cython/Cython/Compiler/ExprNodes.py", line 13476, in is_ptr_contains
          return (container_type.is_ptr or container_type.is_array) \
                  ^^^^^^^^^^^^^^^^^^^^^
      AttributeError: 'NoneType' object has no attribute 'is_ptr'

so I also worry that it has been broken/fixed a couple of times which is also making the bisect hard.

If I had to take a wild guess I'd think it might be something going wrong with __hash__ or __eq__ for the contents of PyrexTypes.py. We were certainly caught be a change in the behaviour if you get an exception while evaluating __eq__ in 3.13 (which I think was concluded to be "our fault") so it's possible that something similar might be happening again.
That it a complete guess though, just based on the idea that we've seen something similar before and it does look like types aren't been found correctly.

Yeah, the symptoms hint at something like __hash__. Also that the error appears unstable – the hash variation across Python runs may well induce that. I'll try if setting PYTHONHASHSEED makes the bisect more stable.

I've reported the issue in the original CPython PR for now.

I've created the issue https://github.com/python/cpython/issues/125868. Definitely a Python bug not a Cython bug - I get some very weird output from pdb.

This is fixed on the current 3.13 branch.


Tie the data formats together

There is quite some code in run.js and chart.html and it uses similar but incompatible data formats.
Should tie those together!
Would Cambria be useful for that? Or maybe bring it all back to the HalfTrade class and improve that?

Following discussion at Federated Bookkeeping Weekly Call, I realised that the format/ontology in which personal finance data is stored in a user's pod, needs not be standardised at all. We can use a 'data lake approach' and store the raw messages/imports along with metadata about them, but not transforming the data before storing it to the user's pod.
The code then transforms the data on the fly, to produce the desired view to the end-user.
At most, there may be an intermediate data format to cache, but this could then be much closer to the view than you would normally do for a data(base) schema in a stand-alone software system.

Ha, thanks to @paul-french we discovered https://plaintextaccounting.org/ and https://hledger.org/ - will try out if we can switch to that!

Wow, this is very valuable already: https://github.com/simonmichael/hledger/tree/master/examples/csv

And more importers listed on https://plaintextaccounting.org/#data-importconversion


Add warning about async Webpack configs

See discussion in #1961

Coverage decreased (-2.2%) to 95.746% when pulling 6df551918199f314c10311918675966cfcd5920f on ogonkov:patch-1 into 8c1a65d0bdf446b03e513cc2b7377ca49232a6c3 on benmosher:master.

@ljharb can you look to this PR please?

@ljharb can you look to this PR please?


Codegen didn't return error if the schema file is not found

Description:
$subject
Suggested Labels:

Suggested Assignees:

Affected Product Version:
ballerina 2201.8.2
OS, DB, other environment details and versions:
Steps to reproduce:
When following the https://ballerina.io/learn/edi-tool/#code-generation-example and executing the following command by passing the wrong path for the schema file path, it runs without any error. But didn't generate the source.
bal edi codegen -s resources/edi-schema.json -o modules/hmartOrder/orderRecords.bal

Related Issues:

This is fixed in latest version
Error reading schema json file: no such file or directory: ~/edi_to_record/resources/edi-schema.json


Updated link Validation section

Signed-off-by: AbhishekReddy1127<EMAIL_ADDRESS>Description
Updated the links to the Opensearch website in the Links section.

Issues Resolved
#210
Check List

[ ] New functionality includes testing.
[ ] New functionality has been documented.
[x] All tests pass

[x] yarn lint
[x] yarn test-unit

[x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

One note - I am unable to link this to issue 210 using the "development" feature in github, not sure why - calling out to make sure we close the appropriate issue on merge.


LoadStrategy.SELECT_IN broken within transactions.

Describe the bug
I have 2 entities, Dashboard and Widget:
@Entity()
export class Dashboard extends BaseEntity<Dashboard, 'id'> {
  @PrimaryKey({ type: 'number', autoincrement: true })
  id!: number;

  @Property({ type: 'string' })
  name!: string;

  @OneToMany('Widget', 'dashboard', { cascade: [Cascade.ALL], strategy: LoadStrategy.JOINED })
  widgets = new Collection<Widget>(this);
}

@Entity()
export class Widget extends BaseEntity<Widget, 'id'> {
  @PrimaryKey({ type: 'number', autoincrement: true })
  id!: number;

  @Property({ type: 'string' })
  name!: string;

  @ManyToOne('Dashboard')
  dashboard!: Dashboard;
}

A test:
  it("populate", async ({ em }) => {
    em.begin()

    let dashboard = em.create(Dashboard, { name: "J" });
    let w1 = em.create(Widget, { name: "J", position: 0, dashboard: dashboard });
    let w2 = em.create(Widget, { name: "J", position: 1, dashboard: dashboard });
    em.persistAndFlush([dashboard, w1, w2]);

    let loadedDashboard = await em.findOneOrFail(Dashboard, { name: "J" }, { populate: ["widgets"] });
    expect(loadedDashboard.widgets.length).toBe(2);

    await em.rollback();
  });

Stack trace
...

To Reproduce
Steps to reproduce the behavior:
Change the LoadStrategy to SELECT_IN.
Observe that the test also passes if run outside a transaction.
Expected behavior
I expect to test to pass.
Additional context
For some reason, the select * from widget queries are not being fired when with a transaction context.
Versions

Dependency
Version

node
19.9.0

typescript
5.0.4

mikro-orm
5.7.8

This stems from the identity map not having knowledge of the collection's contents. Repro with fix (added .set).

The problem here is that you (or at least the repro from Spencer) is using target ES2022, so has useDefineForClassFields enabled, and that means there is no propagation on entity prototype. This is partially a wontfix (with useDefineForClassFields enabled there is no way to modify the prototype of those properties) and partially solved by #4434 in v6 - that PR makes sure propagation works when you use em.create (entity constructors will still fail).


Refactor loading of AdditionalStyles.xaml file

Description

This PR improves the way how the AdditionalStyles.xaml file for the scroller tests is being loaded. Instead of loading it based on a compiler setting, it now is being loaded and unloaded depending on the page we are visiting.
Motivation and Context

Closes #1043
How Has This Been Tested?

Ran tests to verify they still work.
Screenshots (if appropriate):

/azp run


Additional Ways to Pass Registry Auth Token to Cargo at Runtime

Problem
While testing out the RFC 3139 implementation for authenticated crate downloads (PR), I came across a small sticking point: it is currently (relatively) difficult to pass a registry auth token to cargo at runtime for commands other than publish.
As you may know, cargo publish provides a --token option for passing an auth token at runtime. Previously, this was the only subcommand where that made sense. Now that we are introducing authenticated crate downloads, the existing methods of providing an auth token at runtime for other commands could use improvement.
cargo login and credentials stored on local file system works great for terminal usage by a person, including for non-publish subcommands. But for containers, CI, sandboxed build environments, etc. there are often situations where you don't want to leave an auth token stored in a local file, which presents the need to pass the token to cargo at runtime.
My interest in this is, for example, for the purpose of auto-generating cargo doc output for crate versions published at a private registry that requires authentication, and wanting to avoid storing the registry auth token in a file (i.e. ~/.cargo/credentials) in the build environment.
The only option I have found for passing the token for a private registry for cargo fetch, etc. is the CARGO_REGISTRIES_<name>_TOKEN env var, which I was able to get to work.
However, it took some effort to discover how to format the <name> portion of the env var. In my case, I was testing using a private registry configured under the name "shipyard-rs". The hyphen/dash in the name made things difficult. My first attempt was CARGO_REGISTRIES_shipyard-rs_TOKEN=xxx and that did not work, as variable names with dashes don't work in shell. I tried using the env program (env "CARGO_REGISTRIES_shipyard-rs_TOKEN=xxx" cargo ... before realizing that formatting the registry  in screaming snake case would be converted and matched (i.e. CARGO_REGISTRIES_SHIPYARD_RS_TOKEN=xxx works).
I may have missed where it is, but when I was trying this out I didn't find any documentation about the formatting of the <name> portion of the env var.
For cargo fetch et al., there is no --token command line option, so that can't be used.
I was also unable to use --config to work around this, i.e.:
$ cargo fetch -Z registry-auth --config 'registries.shipyard-rs.token=xxx'

failed with error: registries.shipyard-rs.token cannot be set through --config for security reasons (is there some other way to pass this which would not trigger this error?)
To be clear, this situation was never a problem when publish was the only subcommand that needed auth tokens. But now that we are moving forward with fully authenticated cargo, I think the status quo on passing a token at runtime is not at the high level I would expect from Cargo.
Proposed Solution

provide a --token flag/option for subcommands other than publish
allow using --config for settingregistries.<name>.token
improve documentation about the CARGO_REGISTRIES_<name>_TOKEN to avoid possible confusion

Notes
This issue was initially raised in the issue for the RFC implementation PR, but @Eh2406 suggested creating a separate issue on the matter.

Providing a --token command line argument is problematic since it may be necessary to specify tokens for multiple registries.
Setting the token via --config has similar security implications as the existing --token option does, so I'm not sure why one is allowed but the other is not. Unless we're planning on deprecating --token.

Unless we're planning on deprecating --token.

We may consider deprecating --token in the far future. We are trying to move away from passing secrets on the command-line, due to the relatively high risk of leaking a secret.

I just had a chance to look at this again, now with the benefit of the -Z registry-auth feature. specifically, it was in the context of changing our rustdoc builder runner to use -Z registry-auth instead of our previous, hacky non-standard solution of passing the auth token via the user-agent header.
my primary purpose of writing this comment is to thank @arlosi for having the foresight to include this code, which warns the user if an alternative registry's name has been changed via env vars:
    // If the name doesn't match, leave a note to help the user understand
    // the potentially confusing situation.

that message saved me hours, I expect!
the context was building rustdocs for crate versions published by users for a private registry. like docs.rs this is done in a sandboxed environment (via rustwide crate) where network is not permitted during cargo doc execution (i.e. by the build.rs scripts).
it may sound somewhat absurd, but in this situation you don't necessarily know what the "name" of the alternative registry is, because the user could have used any name when configuring their registry in ~/.cargo/config.toml. Also, relying on name alone is somewhat problematic (in my mind, and this is more based on instinct) in creating surface area for name ambiguity errors/security bugs/etc. when compared to the url of a specific git repo/crate index - which 1) requires a ssh key to read, and 2) is fixed and under our control as server administrator.
due to the constraints, it's a bit challenging, and I did not have a good sense of how cargo maps registry name to the crate index url internally - whether it is many-to-one or one-to-one. I had read a while back about "canonical url" in a RFC so I knew there had been some thought about the issue.
one source of confusion/difficulty was that the mapping between a registry name and the screaming snake case version of it is lossy, so my initial attempts did not line up as I expected. for example, I think I expected a env var like CARGO_REGISTRIES_SHIPYARD_RS_INDEX to refer to a registry named "shipyard-rs" (with a hyphen), but it was converted to "shipyard_rs" (with an underscore instead).
the other thing that tripped me up (I was saved by another excellently-placed error message) was accidentally including lower case characters in the env var name.
I was using the account uuid for a temporary registry "name", and the lower-hex encoding resulted in an env var name that was not all uppercase, and thus rejected by cargo. i.e. an env var like CARGO_REGISTRIES_SHIPYARD_8ad420b85dbd4631be4da6b04da87250_INDEX is rejected by cargo due to lowercase characters.
once I figured out both the underscore/hyphen and casing issues I was able to override the registry name <=> index mapping (via CARGO_REGISTRIES_<name>_INDEX env var) and then provide an auth token for the (renamed) registry using the CARGO_REGISTRIES_<name>_TOKEN env var) and it worked as expected. by using those env vars, I was able to specify a temporary name to refer to a specific registry with a given index url (e.g<EMAIL_ADDRESS>and then provide an auth token for that registry specifically.
I will say, however, that the current method of using the name of the env var to specify the registry is less than ideal and prone to confusion and unexpected outcomes. also it's a bit messy that you use two separate env vars, but they are somewhat tied together -- e.g. you can't set the _TOKEN env var before the _INDEX env var or cargo won't know about a registry with that name yet.
the thing that I was really pining for as I was in the midst of this was something like
CARGO_SET_REGISTRY='{ name = "my-registry", index = "ssh://...", token = "abc..", ssh-key = "3Bln.." }'

where you could specify these things using a less error-prone "protocol", if you will. I'm not sure if there are any places that cargo does something along those lines, but if so, perhaps they could be used as a pattern of passing several fields of data in one env var without needing to wonder about how the env var name will be parsed.
I'm sure that the example above wouldn't work as is (might need to permit a list, for example), but hopefully it might help start a discussion about a better way to pass this data to cargo via env vars.

Thanks for the feedback @jonathanstrong. Dealing with the situation of not knowing the registry name was one of the most difficult aspects of the -Z registry-auth feature.
You did discover the solution I intended (using the _INDEX and _TOKEN pair of variables). However, I recognize that it's far from ideal.
Another direction I considered was using a different mechanism for injecting the registry information into Cargo's config. The environment variable system is problematic for a couple of reasons:

It's difficult to enumerate if you don't know the key name
The key names are lossy (everything converted to uppercase, . vs _ vs -, etc)

Other existing options include:

The --config command line option set cargo --config registries.my-registry.index=...
The --config command line option combined with -Zconfig-include to specify a file --config config.toml

We could also consider a system for injecting config via TOML in an environment variable (which is closer to what you suggested). This would probably need an RFC.
CARGO_CONFIG="[registries]
my-registry = { index = '...', token = '...' }"

The --config command line option combined with -Zconfig-include to specify a file --config config.toml

that would be really powerful! the only thing I wonder about is whether it's possible to use that approach to specify the token as well (vs. needing to use the env var for that). not sure how that works since tokens are normally in a separate credentials.toml file, also I previously ran into case where using config passed via command line flag does not allow credentials.
also, I feel like this discussion is even more pertinent with asymmetric tokens on the horizon -- which I expect will require specifying additional fields for the registry config.


feat(hooks): move ActionButton to hooks, fix #328

This fix is very important, I'm waiting for it to be released as soon as possible so I can use react-native-action-button in my project.

replaced by https://github.com/mastermoo/react-native-action-button/pull/333


Layers can be added with no name

You can add layers with no name

Not a problem anymore! :D (fixed by 378b53d)


find a transformation between coordinate sytems

find transform between coordinate systems/targets

Camera + UWB -> SLAM/AMCL

target mapping

Nico, wrote a Camera and UWB target mapping. (Since the Transformations is static and known, a nearest neighbor approach works very well).
But we need a learning approach to map AMCL to these two systems.
Input: Rotation, Translation
Minimize: Error

Translation works
on rotation we are testing


NestedScopeFunctions: Nesting functions with it variable

Expected Behavior of the rule
Add option, to allow nesting scope functions, that have different scope variable name. For example:
input?.let { in ->
    output?.let { out ->
        doSomething(in, out)
    }
}

Could be configurable with separate threshold maybe.
Context
Even tough it's a bad practice to nest scope functions, I think that providing different scope variable name is less problematic. It's harder to get confused what scope-variable is called, if they are named differently.

Is this a case of NoNameShadowing? I don't follow exactly what you're looking for (is the sample code snippet something you want to encourage or discourage?) but I would think that code like
input?.let { input -> ... }

should be warned for by NoNameShadowing.

No, just an extension for a rule, that was recently added #4780

While I think your are right about providing names explicitly make nesting scope function a bit better, I do not think we should add such a configuration option. This would essentially allow users to nest scope functions 5+ levels deep when they only define a name. This would defeat the purpose of this rule entirely.

Well, it's kind of already possible to do this by increasing the threshold.
Hm, maybe we should instead fix threshold for scopes like "apply" to fail at 2 and have only have "let" threshold configurable, but only if scope variable has been renamed.

I don't think we want to do that. Nesting scope functions is bad, their own documentation say that.

Documentation just says to avoid overusing them. Imho, what is considered overuse is debatable. It doesn't say you should never nest them.

You are totally right. I still do not know what this flag should accomplish. If you do not rename it in the scope, the NoNameShadowing rule will flag this. Therefore this rule will assume that the scope variables are properly named. If you believe that nesting scope functions is not that bad, you can increase the allowed depth or disable the rules entirely.

From the documentation:

Avoid nesting scope functions and be careful when chaining them

So I'm closing this, the alternatives noted by @chao2zhang feel on point to me.

+1 to this issue. I'm seeing it with the following code:
override fun delete(id: String): OrganizationModel =
  jdbi.transaction {
    featureService.listByOrganization(id).forEach { featureService.delete(it.id) }
    hostnameService.listByOrganization(id).forEach { hostnameService.delete(it.id) }
    authService.getByOrganization(id)?.let { authService.delete(it.id) }
    return@transaction organizationStore.delete(id)
  }

Can't you just remove that return?

transaction is not a scoped function. How is this rule reporting that code? Can you create a failing unit test with that code and open a new issue?


Support debug traces via HTTP header jaeger-debug-id

Coverage increased (+0.3%) to 87.951% when pulling 1a8a34f5e7ad6ffc53f830a95627c09c3b24a8f9 on jaeger-debug-id into c868e47af7d1498319876465cbf76006dc05c601 on master.

Coverage increased (+0.3%) to 87.951% when pulling a2af1da3645214811d1d42e2ffc871275eb1629e on jaeger-debug-id into c868e47af7d1498319876465cbf76006dc05c601 on master.


[Enhancement] 在Doris中实现角色与LDAP组之间的权限绑定,一直无法完成

Search before asking

[X] I had searched in the issues and found no similar issues.

Description
No response
Solution
No response
Are you willing to submit PR?

[X] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

1.这个是我配置的配置文件  我想要将LDAP中people组和Doris中的角色进行绑定

2.我在Doris中创建了people角色并赋予了权限

3.我用LDAP中people组下的uid用户进行登录,发现该用户无任何权限

could you check that your user dn is included in the member attribute of the group dn?

可以给一个完整的 ldap 例子吗？本人使用使用 ApacheDS


Replace assert statements

Asserts should be used to test conditions that should never happen. The purpose is to crash early in the case of a corrupt program state.
Exceptions should be used for errors that can conceivably happen, and you should almost always create your own Exception classes.
For example, if you're writing a function to read from a configuration file into a dict, improper formatting in the file should raise a ConfigurationSyntaxError, while you can assert that you're not about to return None.
In your example, if x is a value set via a user interface or from an external source, an exception is best.
If x is only set by your own code in the same program, go with an assertion.

This LGTM, I don't see any assert out of place, I would close this issue. All asserts I found were in the test suit where assert is ok.

ups yes, you are right.


Fixed typo

Signed-off-by: Prajwal Borkar<EMAIL_ADDRESS>Pre-Checklist
Note: please complete ALL items in the following checklist.

[x] I have read through the CONTRIBUTING.md documentation.
[ ] My code has the necessary comments and documentation (if needed).
[ ] I have added relevant tests

Description

Fixed typo in core-concepts.md file
Related Issues

Fixes #778
New Behavior (screenshots if needed)

Thank you for your second pr!  ✊
DevStream community follows the conventional commits specification. Please read our doc .
The right commit message could be : docs: fix typo.
You can choose to update this commit message and use git push -f to overide old commits. Or, do nothing and let us change commit messages when we merge it.

Could you please start a review? @hxcGit  Thanks a lot! (please pay attention to commit messages)

The "Code Owner" of this part is IronCore. He must approve pr before it can be merged, please be patient. @PrajwalBorkar


[wavelib] Update to 2021-08-10

Describe the pull request

What does your PR fix?

Add vcpkg.json
Modernize portfile.cmake
Update to 2021-08-10

Which triplets are supported/not supported? Have you updated the CI baseline?
All, Yes.

Does your PR follow the maintainer guide?
Yes.

If you have added/updated a port: Have you run ./vcpkg x-add-version --all and committed the result?
<Yes / I am still working on this PR>

If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/

Thanks for the update!


Install help please

Hi, sorry for the question.
Is it possible to install on cpanel server?
I did the installation but I can not open the camera in the browser, and I also can not get mobile.
Follow URL: https://cupom.idelhost.com.br/qr-code-scanner-master/app/

@gheeenrique Hey, sure. I check your URL.
Site is missing stylesheet as well main.bundle.js. Add this it will work. Hope this helps.


Question: How to import this?

What is the best way to import this library after installing with pods?
Do you use import Timepiece in every swift file that needs to use this? Is there a way to globally import it for everything?
Thanks

I have never use Timepiece in any iOS projects. But, if I use it, I will import it in every files. It looks like Java.

Are you using on tvOS? Doesn't it work in Xcode in either way?

I'm not using on any devices. Have you try tvOS branch?

No, I only tried it in an iOS project from the main branch. Actually my question is not specific to this library only, my question is kind of general on how to import libraries that are like this one.

If your question is not specific to this library, please ask it somewhere else.


Im not sure it only happen to me or its general

I know, to win drops the stream must have "volume"  (if anyone knows if it can be muted and still win can clear me of doubts) and you can mute the tabs from google chrome. Im not sure if RIOT has made a change, but now if you open a stream the stream automatically mutes, and now you must manually increase the volume.
Thankyou deepdeepdeep for your work

when you refresh de page, the stream from the page automatic mute the stream, and sometimes using the script, I get stream muteds

I'm pretty sure Riot/Twitch did that. I can't control the volume at all.

there its a shortcut that you can click the stream and then press M to unmute the volume:) maybe it can be a wait
maybe doing automatic click in the stream and automatic press M

I read that now the stream must have volumen, it can be 1% porcent of volumen, But whell maybe its me, I cant win drops if the stream its muted, thanks anyway its a good script

I read that now the stream must have volumen, it can be 1% porcent of volumen, But whell maybe its me, I cant win drops if the stream its muted, thanks anyway its a good script

I can confirm that you don't need to have volume for drops. if you aren't receiving drops, you are likely shadowbanned. Don't watch all the leagues, only watch the big ones or you will get shadowbanned for 7-14 days.


Copy services using questions_to_exclude list

https://trello.com/c/WBjRZd14/80-2-frameworks-repo-copyservices-list-exclude-rather-than-include-fields
Implements the changes in https://github.com/alphagov/digitalmarketplace-api/pull/1038.
If a questionsToExclude list is provided in the frameworks metadata, use that instead of the questionsToCopy list (which is to be deprecated).  For G12 we are still using the questionsToCopy list.
Notes to reviewers:

I tried splitting this into smaller commits, but without refactoring a bunch of stuff I couldn't get each commit in a state where the tests were passing.
The bulk-copy API endpoint expects a list of questions, not a set or tuple, so I've changed the test data returned from the mock metadata call to reflect this.

~Functional tests PR coming shortly!~ Functional tests now merged 😸

My review checklist
I've:

[ ] looked at the code
[ ] tested locally
[ ] run functional tests locally


resolveAccountNumber issues

Resolving account number now require a secret or public key.

Hello @akinyeleolat , i honestly do not understand the issue here can you give much more information about the issue

State what version of the package you are experiencing the issue on
Describe how you are trying to use the resolve account number paystack API

Thank 🙏🏾


Partial Solution: Accept host constraints in the cook json api

Soon this will be something we can extend once Fenzo is merged to work end-to-end.

@shamsimam Is this still active or can we close?

I think this PR is now outdated and not required since we have Fenzo integration already working.
Closing.


Added block WordPress editor to plugins list

A Plugin for the New WordPress Block Editor (Gutenberg)

Hi and thank you for your first contribution to this repository! :+1:


Add eventListener to reset CLS & INP metrics

This PR enables manual resetting of CLS & INP metrics through dispatching a reset-web-vital-metrics event. It allows single-page applications to trigger this event during page transitions and measure these long-running metric measurement for each page. While it differs from Google's use of the metrics, it greatly enhances the ability of SPAs to assess the performance of individual pages.
Currently, as a fallback, we've enabled reportAllChanges for these metrics, buffer the measurements and report the latest before a page transition. However, this approach skews the results of later pages in a user journey because the metric is only reported again when it's worse than before. This PR aims to provide a more accurate understanding of page performance in the context of SPA pages.
This is similar to the soft-navigate branch but can be used today already. It could also serve as a fallback method in case the soft-navigate heuristics don't work particularly well with certain applications.
Relevant issue: #119

@spetroll thank you very much for working on this and submitting this PR.
However, while we appreciate the potential usefulness of this change to allow SPAs to manually measure CLS and INP per route, we do have some concerns with accepting this into the web-vitals library:
First up, the intent of the library (as given in the Overview) is for:

measuring all the Web Vitals metrics on real users, in a way that accurately matches how they're measured by Chrome and reported to other Google tools (e.g. Chrome User Experience Report, Page Speed Insights, Search Console's Speed Report).

By reseting CLS and INP you will affect the overall "hard-nav" CLS and INP that can be reported.
This is also part of why the soft branch support has not been merged either.
Secondly, the "measuring all the Web Vitals metrics" is a key point. By only making CLS and INP available (which I agree is all that CAN be made available given Chrome itself will nor reset LCP or FCP), we think this will lead to confusion, or a certain expectation that they will be available.
So, given all that, we are unlikely to merge this PR, at least without a lot of further discussion. So wanted to let you know that, before you worked on it more.

@tunetheweb Thanks for the feedback. I assumed as much by myself and understand how our needs might differ.  Thanks for letting me know :)
We'll probably maintain our own fork in the foreseeable future, as many changes we have added on top to this library are much easier to implement from "within", but aren't relevant for most of the target audience or the original intent of this library.


Backmasking?

Does pixi v3 provide any way to backmask? I know it now allows sprite masking. Also, this is just a question not an issue, not used to Githubs forums - couldn't find out how to label it as a question

I, too, would like this feature.
To clarify what backmasking is to those that might not know what it means:
The current masking limits what you can see to the boundaries of the mask. Backmasking is basically the opposite.
A backmask would instead be a window through the sprite, in the shape of the mask.

Is sprite masking not good enough for this? I feel like you can do this effect with a sprite mask...
#1639

If I have a sprite that is a spotlight, and this spotlight is supposed to shine on a dude I think I need backmasking. I use a black overlay in order to give the rest of the scene darkness (I know I can use filters for this, but bare with me). If I want that spotlight to actually just be transparency in the black overlay, as far as I understand, I need backmasking. When I mask in this way, the opposite effect is achieved (i.e. the spotlight becomes a black overlay and the rest of the scene appears as normal.

@Shadowstep33 Correct, if you use a normal vector (Graphics) mask that is what will happen. With sprite masking the same effect would be to draw a white circle, and leave the rest of the sprite blank and use that as the mask.
To get a spotlight effect what you would do is draw the entire mask white, but leave the spotlight location transparent. That would mask the transparent part and draw all the outter things, creating the effect you want.
Get what I am saying?

Sprite Mask will work a treat in this situation!

Has something changed in regards to backmasking? Or was this closed as a cleanup?

Hello! This has been closed as we are confident sprite masking can be used to achieve effects like back masking.

I understand that the proposed solution was to basically create a sprite as large as the thing I'm masking and leave only the spot I want "see through" transparent. However, what if I want the "hole" to move?
I mocked up an example if what I'm talking about here https://youtu.be/foCL4GpYpWQ
It was done in Photoshop. Basically, the dark overlay would be one sprite and the "spotlight" would be a feathered circle mask that hides the portion of the dark overlay, wherever it is.
This is possible?
Thanks!

If the mask is a canvas, you can redraw it whenever you want.

so, use an off-screen rendered canvas to redraw a mask with updated positions, make a sprite out of it, and then apply it as a mask to my other sprite?
That sounds "expensive". Is it not?

You already created a canvas, and made it a mask. Just redraw that canvas you already have.

I don't follow.... When did I create a canvas?
There's some sort of disconnect between what you're saying and my understanding of the situation :)

I understand that the proposed solution was to basically create a sprite as large as the thing I'm masking and leave only the spot I want "see through" transparent.

var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d');
var spriteMask = new PIXI.Sprite(PIXI.Texture.fromCanvas(canvas));

myOtherSprite.mask = spriteMask;

// draw mask
// ....

// update texture

You can call the draw mask and update texture parts repeatedly, you don't create a new canvas/sprite everytime.

I gotcha. Cool thanks :)
It would be nice if there was something as simple as .mask, but I see how it can be done now.
Thanks!

I understand that the proposed solution was to basically create a sprite as large as the thing I'm masking and leave only the spot I want "see through" transparent.

var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d');
var spriteMask = new PIXI.Sprite(PIXI.Texture.fromCanvas(canvas));

myOtherSprite.mask = spriteMask;

// do the following whenever the hole moves:

// draw mask
// ....

// update texture
spriteMask.texture.update();

You can call the draw mask and update texture parts repeatedly, you don't create a new canvas/sprite everytime the hole moves.


Type module support

I have type: module in package.json
Now I am using
import safeStringify from 'fast-safe-stringify';

and
safeStringify.default(incident)

I would prefer to hide this .defaut in the library code so it should be built as esm and cjs version.

Would you like to send a PR to add a module.exports.stringify = safeStringify?


jsdeminifier nor working in firefox64-bit firebug 2.0.13

I installed it in firefox 64-bit 43.0.3 with firebug 2.0.13.
It's not minifying the script

downloaded firefox64 from https://www.mozilla.org/en-US/firefox/all/?q=engli


Translate: Optimizing Performance

Translate: Optimizing Performance #4

We're closing this issue to reduce the noise in the repo. The place to claim an issue is #4
Thanks! 👍