[BUG]: Problem using UsePythonVersion@0

New issue checklist

[X] I searched for existing GitHub issues
[X] I read pipeline troubleshooting guide
[X] I checked how to collect logs

Task name
UsePythonVersion@0
Task version
0.235.1
Issue Description
UsePythonVersion@0 fails intermittently (fails roughly 50% of the times) on MacOS-13 with a cryptic error (please see logs below).
Environment type (Please select at least one enviroment where you face this issue)

[ ] Self-Hosted
[X] Microsoft Hosted
[ ] VMSS Pool
[ ] Container

Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
MacOS-13
Relevant log output
2024-03-12T01:55:29.6773840Z ##[debug]Evaluating condition for step: 'Use Python'
2024-03-12T01:55:29.6798990Z ##[debug]Evaluating: SucceededNode()
2024-03-12T01:55:29.6799820Z ##[debug]Evaluating SucceededNode:
2024-03-12T01:55:29.6801040Z ##[debug]=> True
2024-03-12T01:55:29.6802190Z ##[debug]Result: True
2024-03-12T01:55:29.6803110Z ##[section]Starting: Use Python
2024-03-12T01:55:29.6815760Z ==============================================================================
2024-03-12T01:55:29.6816490Z Task         : Use Python version
2024-03-12T01:55:29.6816810Z Description  : Use the specified version of Python from the tool cache, optionally adding it to the PATH
2024-03-12T01:55:29.6817190Z Version      : 0.235.1
2024-03-12T01:55:29.6817550Z Author       : Microsoft Corporation
2024-03-12T01:55:29.6817810Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/tool/use-python-version
2024-03-12T01:55:29.6818290Z ==============================================================================
2024-03-12T01:55:29.7387620Z ##[debug]Using node path: /Users/runner/runners/3.236.1/externals/node20_1/bin/node
2024-03-12T01:55:30.2726110Z ##[debug]agent.TempDirectory=/Users/runner/work/_temp
2024-03-12T01:55:30.2768840Z ##[debug]loading inputs and endpoints
2024-03-12T01:55:30.2826960Z ##[debug]loading INPUT_VERSIONSPEC
2024-03-12T01:55:30.2941930Z ##[debug]loading INPUT_DISABLEDOWNLOADFROMREGISTRY
2024-03-12T01:55:30.3004610Z ##[debug]loading INPUT_ALLOWUNSTABLE
2024-03-12T01:55:30.3039540Z ##[debug]loading INPUT_ADDTOPATH
2024-03-12T01:55:30.3072550Z ##[debug]loading INPUT_ARCHITECTURE
2024-03-12T01:55:30.3104720Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2024-03-12T01:55:30.3135000Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2024-03-12T01:55:30.3232820Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2024-03-12T01:55:30.3234780Z ##[debug]loading SECRET_TELEMETRYGUID
2024-03-12T01:55:30.3268720Z ##[debug]loading SECRET_SYSTEM_ACCESSTOKEN
2024-03-12T01:55:30.3366740Z ##[debug]loaded 10
2024-03-12T01:55:30.3377720Z ##[debug]Agent.ProxyUrl=undefined
2024-03-12T01:55:30.3391250Z ##[debug]Agent.CAInfo=undefined
2024-03-12T01:55:30.3395450Z ##[debug]Agent.ClientCert=undefined
2024-03-12T01:55:30.3400390Z ##[debug]Agent.SkipCertValidation=undefined
2024-03-12T01:55:30.3611860Z ##[debug]Agent.ProxyUrl=undefined
2024-03-12T01:55:30.3713980Z ##[debug]Agent.CAInfo=undefined
2024-03-12T01:55:30.3755650Z ##[debug]Agent.ClientCert=undefined
2024-03-12T01:55:30.3860470Z ##[debug]check path : /Users/runner/work/_tasks/UsePythonVersion_33c63b11-352b-45a2-ba1b-54cb568a29ca/0.235.1/node_modules/azure-pipelines-tool-lib/lib.json
2024-03-12T01:55:30.3867920Z ##[debug]Agent environment resources - Disk: / Available 151728.00 MB out of 306871.00 MB, Memory: Used 9578.00 MB out of 14332.00 MB, CPU: Usage 9.13%
2024-03-12T01:55:30.3897450Z ##[debug]adding resource file: /Users/runner/work/_tasks/UsePythonVersion_33c63b11-352b-45a2-ba1b-54cb568a29ca/0.235.1/node_modules/azure-pipelines-tool-lib/lib.json
2024-03-12T01:55:30.3970220Z ##[debug]system.culture=en-US
2024-03-12T01:55:30.4630230Z dyld[7462]: terminating because inserted dylib ' �	' could not be loaded: tried: ' �	' (no such file), '/System/Volumes/Preboot/Cryptexes/OS �	' (no such file), ' �	' (no such file), '/Users/runner/work/1/s/ �	' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/runner/work/1/s/ �	' (no such file), '/Users/runner/work/1/s/ �	' (no such file)
2024-03-12T01:55:30.4649880Z ##[debug]task result: Failed
2024-03-12T01:55:30.4664100Z dyld[7462]: tried: ' �	' (no such file), '/System/Volumes/Preboot/Cryptexes/OS �	' (no such file), ' �	' (no such file), '/Users/runner/work/1/s/ �	' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/runner/work/1/s/ �	' (no such file), '/Users/runner/work/1/s/ �	' (no such file)
2024-03-12T01:55:30.4723160Z ##[error]Unhandled: Command failed: sw_vers -productVersion
dyld[7462]: terminating because inserted dylib ' �	' could not be loaded: tried: ' �	' (no such file), '/System/Volumes/Preboot/Cryptexes/OS �	' (no such file), ' �	' (no such file), '/Users/runner/work/1/s/ �	' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/runner/work/1/s/ �	' (no such file), '/Users/runner/work/1/s/ �	' (no such file)
dyld[7462]: tried: ' �	' (no such file), '/System/Volumes/Preboot/Cryptexes/OS �	' (no such file), ' �	' (no such file), '/Users/runner/work/1/s/ �	' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/runner/work/1/s/ �	' (no such file), '/Users/runner/work/1/s/ �	' (no such file)

2024-03-12T01:55:30.4736870Z ##[debug]Processed: ##vso[task.issue type=error;]Unhandled: Command failed: sw_vers -productVersion
dyld[7462]: terminating because inserted dylib ' �	' could not be loaded: tried: ' �	' (no such file), '/System/Volumes/Preboot/Cryptexes/OS �	' (no such file), ' �	' (no such file), '/Users/runner/work/1/s/ �	' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/runner/work/1/s/ �	' (no such file), '/Users/runner/work/1/s/ �	' (no such file)
dyld[7462]: tried: ' �	' (no such file), '/System/Volumes/Preboot/Cryptexes/OS �	' (no such file), ' �	' (no such file), '/Users/runner/work/1/s/ �	' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/runner/work/1/s/ �	' (no such file), '/Users/runner/work/1/s/ �	' (no such file)

2024-03-12T01:55:30.4740950Z ##[debug]Processed: ##vso[task.complete result=Failed;]Unhandled: Command failed: sw_vers -productVersion
dyld[7462]: terminating because inserted dylib ' �	' could not be loaded: tried: ' �	' (no such file), '/System/Volumes/Preboot/Cryptexes/OS �	' (no such file), ' �	' (no such file), '/Users/runner/work/1/s/ �	' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/runner/work/1/s/ �	' (no such file), '/Users/runner/work/1/s/ �	' (no such file)
dyld[7462]: tried: ' �	' (no such file), '/System/Volumes/Preboot/Cryptexes/OS �	' (no such file), ' �	' (no such file), '/Users/runner/work/1/s/ �	' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/runner/work/1/s/ �	' (no such file), '/Users/runner/work/1/s/ �	' (no such file)

2024-03-12T01:55:30.4822290Z ##[error]Error: Command failed: sw_vers -productVersion
dyld[7462]: terminating because inserted dylib ' �	' could not be loaded: tried: ' �	' (no such file), '/System/Volumes/Preboot/Cryptexes/OS �	' (no such file), ' �	' (no such file), '/Users/runner/work/1/s/ �	' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/runner/work/1/s/ �	' (no such file), '/Users/runner/work/1/s/ �	' (no such file)
dyld[7462]: tried: ' �	' (no such file), '/System/Volumes/Preboot/Cryptexes/OS �	' (no such file), ' �	' (no such file), '/Users/runner/work/1/s/ �	' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/runner/work/1/s/ �	' (no such file), '/Users/runner/work/1/s/ �	' (no such file)

    at checkExecSyncError (node:child_process:890:11)
    at Object.execSync (node:child_process:962:15)
    at Object._getOsVersion (/Users/runner/work/_tasks/UsePythonVersion_33c63b11-352b-45a2-ba1b-54cb568a29ca/0.235.1/osutil.js:14:22)
    at Object.<anonymous> (/Users/runner/work/_tasks/UsePythonVersion_33c63b11-352b-45a2-ba1b-54cb568a29ca/0.235.1/installpythonversion.js:21:27)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
2024-03-12T01:55:30.4832650Z ##[debug]Processed: ##vso[task.issue type=error;]Error: Command failed: sw_vers -productVersion
dyld[7462]: terminating because inserted dylib ' �	' could not be loaded: tried: ' �	' (no such file), '/System/Volumes/Preboot/Cryptexes/OS �	' (no such file), ' �	' (no such file), '/Users/runner/work/1/s/ �	' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/runner/work/1/s/ �	' (no such file), '/Users/runner/work/1/s/ �	' (no such file)
dyld[7462]: tried: ' �	' (no such file), '/System/Volumes/Preboot/Cryptexes/OS �	' (no such file), ' �	' (no such file), '/Users/runner/work/1/s/ �	' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/runner/work/1/s/ �	' (no such file), '/Users/runner/work/1/s/ �	' (no such file)

    at checkExecSyncError (node:child_process:890:11)
    at Object.execSync (node:child_process:962:15)
    at Object._getOsVersion (/Users/runner/work/_tasks/UsePythonVersion_33c63b11-352b-45a2-ba1b-54cb568a29ca/0.235.1/osutil.js:14:22)
    at Object.<anonymous> (/Users/runner/work/_tasks/UsePythonVersion_33c63b11-352b-45a2-ba1b-54cb568a29ca/0.235.1/installpythonversion.js:21:27)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
2024-03-12T01:55:30.5320600Z ##[section]Finishing: Use Python

Full task logs with system.debug enabled
No response
Repro steps
- task: UsePythonVersion@0
    displayName: Use Python 3.11
    inputs:
      versionSpec: 3.11

Hi @hariharans29, thanks for the feedback, quickly checked the issue and couldn't reproduce it.
To make sure that the problem is exactly in the UsePythonVersion, could you please comment other steps in the yml and run only UsePythonVersion task?

+1
Saw the same issue in our pipeline several times as well. Also saw this with script running pip3 install pymsteams. It is a flaky issue and is not reproducible all the time.


Added signal.checkMsgs()

:tada: This PR is included in version 1.2.2 :tada:
The release is available on npm package (@latest dist-tag)
Your semantic-release bot :package::rocket:


[Azure DevOps] Windows-2016 environment removal postponed until June 30, 2022

Breaking changes
Windows 2016 hosted runners were scheduled for full removal on April 1, 2022. However, we are still seeing significant usage from customers and we want to give them more time to migrate to the new runners. In order to give customers another chance to move to either windows-2019 or windows-2022 we will delay the removal of windows-2016 until June 30, 2022.
To raise awareness of the removal, we will have rolling 24-hour periods where the image will be unavailable for customers. During these "brownout" periods, customers will see an error message indicating that the image is slated for removal on June 30, 2022. The schedule for those brownout periods is as follows for Azure DevOps:

Monday April 18, 00:00 UTC to April 19, 00:00 UTC
Tuesday April 26, 00:00 UTC to April 27, 00:00 UTC
Wednesday May 4, 00:00 UTC to May 5, 00:00 UTC
Thursday May 12, 00:00 UTC to May 13, 00:00 UTC
Friday May 20, 00:00 UTC to May 21, 00:00 UTC
Monday May 23, 00:00 UTC to May 24, 00:00 UTC
Tuesday May 31, 00:00 UTC to June 1, 00:00 UTC
Wednesday June 8, 00:00 UTC to June 9, 00:00 UTC
Thursday June 16, 00:00 UTC to June 17, 00:00 UTC
Friday June 24, 00:00 UTC to June 25, 00:00 UTC
Monday June 27, 00:00 UTC to June 28, 00:00 UTC
Full removal - June 30, 15:00 UTC

See the original announcement at https://github.com/actions/virtual-environments/issues/4312
Target date
June 30, 2022
The motivation for the changes
Windows Server 2016 Active support ends on 11 Jan 2022 and Windows Server 2022 VM image is going out of beta later this year.
As part of our ongoing efforts to keep GitHub and Azure Devops hosted runners updated and secure, the Windows 2016 virtual environment will be removed from GitHub Actions and Azure DevOps.
Possible impact
Workflows targeting the Windows 2016 image will fail.
Virtual environments affected

[ ] Ubuntu 18.04
[ ] Ubuntu 20.04
[ ] macOS 10.15
[ ] macOS 11
[ ] macOS 12
[x] Windows Server 2016
[ ] Windows Server 2019
[ ] Windows Server 2022

Mitigation ways
Change your workflows to use windows-latest, windows-2022, or windows-2019

Noob here, our yml config is already using vmImage: 'windows-latest' but we're still seeing the error. What should we do?

@kningyi please remove everything below the
pool:
    vmImage: 'windows-latest'

and you should be good to go

I have a release pipeline (the one in the Releases tab) that gets triggered after a pipeline from the Pipelines Tab that I use for deployment to azure.  This deployment keeps failing because of the 2016 error.
In the normal build pipeline I was able to set the vmImage but I don't see any way to access the yaml or change the image in the release pipeline edit page. How can this be done? I have tried searching this up plenty of times with no luck.
Also when you make a release pipeline why does it default to 2016? My guess would be the reason you are seeing so many people still using 2016 is because its still the default when you make a new pipeline and not so much that people are targeting it.

As part of our ongoing efforts to keep GitHub and Azure Devops hosted runners updated and secure

Isn't Windows Server 2016 going to get security updates until 2027 and this "motivation" is simply misleading?

As discussed in #5238

During these "brownout" periods, customers will see an error message indicating that the image is slated for removal on June 30, 2022.

The brownout error message still says April 1 and points to an old ticket with out-of-date information.

As part of our ongoing efforts to keep GitHub and Azure Devops hosted runners updated and secure

Isn't Windows Server 2016 going to get security updates until 2027 and this "motivation" is simply misleading?

I agree 100% with this. According to Microsoft's own documentation, Windows Server 2016 will continue to get security updates until Jan 12, 2027 when it will finally stop receiving it which would justify for Microsoft to remove support for it on pipelines or start these brownouts.

I keep getting this error in my release pipelines and cannot figure out where to go to fix it.  I am not using YAML but CLI.

I get this message the whole day. Could you move your maintenance window out of work-hours next time? We'd appreciate it.

Additionally our systems are not using any windows-2016 related element, so the error itself makes no sense...

@mohitook if the systems don't use then you won't see the message. Maybe some of you jobs are using windows-2016 as it was the default image some time ago?

Hello.
Is this affecting also self hosted runners ? It is not clear to me

@carvido1 no, it is not

@mohitook if the systems don't use then you won't see the message. Maybe some of your jobs are using windows-2016 as it was the default image some time ago?

Yep, for me it was a copy of an older pipeline. I thought the error was just for the pipeline being run, but it seems to be caused by any other 2016 agent setting you have.

how do i fix this issue [](url

)

@mohitook if the systems don't use then you won't see the message. Maybe some of your jobs are using windows-2016 as it was the default image some time ago?

please how  do i fix this

One of our build steps is getting this brownout error, however I can't find what's still using WIN2016. I've looked at all the YAMLs. @miketimofeev
https://skype.visualstudio.com/SCC/_releaseProgress?_a=release-environment-logs&releaseId=567067&environmentId=6245439

Hey, I was just hit by the brownout in a pipeline working flawlessly for years 😭.
I'm not sure but, it seems that there are missing some UWP SDKs?
##[warning]C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\WindowsXaml\v17.0\8.2\Microsoft.Windows.UI.Xaml.Common.targets(676,5): Warning : Could not find target platform winmds for the SDK specified by [Windows, 10.0, UAP, 10.0.10240.0, 10.0.15063.0]
##[debug]Processed: ##vso[task.logissue type=Warning;sourcepath=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\WindowsXaml\v17.0\8.2\Microsoft.Windows.UI.Xaml.Common.targets;linenumber=676;columnnumber=5;code=;]Could not find target platform winmds for the SDK specified by [Windows, 10.0, UAP, 10.0.10240.0, 10.0.15063.0]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\WindowsXaml\v17.0\8.2\Microsoft.Windows.UI.Xaml.Common.targets(676,5): warning : Could not find target platform winmds for the SDK specified by [Windows, 10.0, UAP, 10.0.10240.0, 10.0.15063.0]
[...]
##[error]MuralSketch.Core\Components\InkAnalyzerComponent\InkAnalyzerComponentModel.cs(7,31): Error CS0234: The type or namespace name 'Analysis' does not exist in the namespace 'Windows.UI.Input.Inking' (are you missing an assembly reference?)

I selected windows2022 instead of vs2017-win2016 then It fixed.

I made a post in stack where I explaned how I fixed this issue. If you're interested
https://stackoverflow.com/questions/71493785/error-deploying-release-pipeline-windows-2016-deprecated-azure-devops/72779265#72779265

Does this means after 30th June 2022  we wont be able to create VM even for window server sku- "2016-Datacenter-Server-Core" using images from Microsoft market place ?
pls clarify. Thanks in advance. Kapil

is there a way to install missing UWP SDKs in newer images? or are te images going to be updated with the missing ones?

@megamingus what SDKs do you mean?

Hello, in our organization we still see jobs being run on Microsoft Hosted vs2017-win2016 Agents. I thought these would no longer be available as of 30 June? When can we expect these to be offline permanently?

@melchiorbc we are a bit delayed with some changes to default hosted images. Most likely the image will be fully deprecated in 1-2 weeks.

What other agent can build .NET Framework projects? I've tried windows-latest, windows-2022, and windows-2019 but the solution fails to build on all with an error about not being able to locate the .NET Framework assemblies.

@rushfrisby what error do you have? Windows-2019, for example, has a reduced set of installed .Net frameworks:
4.7.2 & 4.8 vs 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 on windows-2016

@rushfrisby, Could you bump .Net version to 4.6.2?

@rushfrisby  I ran against this issue.

Try to point your project to .NET v4.8.
Re-publish now with the v4.8 project. (if it doesn't fix it, go to step 3).
In your .yaml pipeline check for the pool tag. and change the vmImage: 'windows-2016' to 'windows-2019' or 'windows-latest'
Re-run your pipeline.

Those were my steps to correct the issue.

We have a project that started experiencing CI errors in the new image, even when we installed older Visual Studio Build Tools with Chocolatey. So newer Visual Studio isn't the culprit. https://github.com/atom-community/atom/issues/428
Does anyone have any idea what else is different about the new CI image environment that would have caused this? (Other than Visual Studio being newer?) Any hints of where to zero in our troubleshooting? Thank you.

The new retirement date is set — July, 22

The retirement date is shifted to July, 31

LOL, can you guys please, please, please stop shifting the retirement date :) every time we need to tell our developers to stop using Win2016 as Agent type, and each time you guys postpone the deadline slowly people start using it again (I know their own fault), and we need to start warning them again, but we (and also Microsoft) are loosing our credibility on when they are actually decommissioned.

@melchiorbc sorry for the inconvenience, hopefully, this is the last one 🤞

Two more brownout dates are set:

Friday July 22, 00:00 UTC to July 23, 00:00 UTC
Wednesday July 27, 00:00 UTC to July 28, 00:00 UTC

Windows 2016 environment is finally deprecated in ADO.

I already updated the agent spec but still encountering the error of 2016 deprecation.

Windows 2016 hosted runners were scheduled for full removal on April 1, 2022. However, we are still seeing significant usage from customers and we want to give them more time to migrate to the new runners. In order to give customers another chance to move to either windows-2019 or windows-2022 we will delay the removal of windows-2016 until July 31, 2022.

same error. I use windows-2019

Windows 2016 environment is finally deprecated in ADO.

Hi Mike, are you sure of this? Up to today we still see jobs using the "vs2017-win2016" Microsoft Hosted Agent image.

@melchiorbc could you share a few links, please? I don't need access to pipelines, will take a look at telemetry by those urls

@miketimofeev I checked and I do see now the jobs trying to use 'vs2017-win2016' do get cancelled by Microsoft stating this is a deprecated environment, only people are still able to pick the 'vs2017-win2016' in their pipelines from the dropdown with VM types (which is confusing).

@melchiorbc this is fixed now, sorry for the inconvenience


Investigate NLP analysis

e.g. https://github.com/golastmile/rasa_nlu

Sounds great, what about supporting French?. All the similar (decent) services I know are paid. This could work well since the universe of things is small enough and well defined (names, rooms...)
Ideally we can integrate this to the inline search, that can propose autocompleted commands based on search terms e.g. for "co21" the command "/room CO021"  is proposed.

Might actually be useful: https://github.com/shadaj/scalapy

Another option: https://api.ai just has a free plan (they joined Google).

It definitely has the wow effect, conversational and context aware.

There's no time budget for this feature and I doubt it will be that useful beyond the wow effect, it's something more like test-once-and-forget.


Script update-yaml.py fails to re-create base configuration file with overrides

What version (commit) do you encounter this issue on?
r12.0.0
What type of issue is this (bug, feature, documentation, regression)?
Bug
What is the expected behavior?
Merging of base configuration file /etc/openstack_deploy/user_variables.yml with overrides file /opt/rpc-openstack/rpcd/etc/openstack_deploy/user_variables.yml using python script /opt/rpc-openstack/scripts/update-yaml.py into a new file /etc/openstack_deploy/user_variables.yml which contains the content of both the base configuration and the overrides file.
What is actually happening?
An error occurs:
root@infra01:/opt/rpc-openstack# /opt/rpc-openstack/scripts/update-yaml.py /etc/openstack_deploy/user_variables.yml /opt/rpc-openstack/rpcd/etc/openstack_deploy/user_variables.yml
Traceback (most recent call last):
File "/opt/rpc-openstack/scripts/update-yaml.py", line 52, in
config = dict(base.items() + overrides.items())
AttributeError: 'NoneType' object has no attribute 'items'
How can we reproduce this issue?
SSH into deployment host
cd /opt
git clone -b r12.0.0 --recursive http://github.com/rcbops/rpc-openstack
cd rpc-openstack/openstack-ansible
cp -r etc/openstack_deploy /etc/
scripts/bootstrap-ansible.sh
cd /opt/rpc-openstack
scripts/update-yaml.py /etc/openstack_deploy/user_variables.yml /opt/rpc-openstack/rpcd/etc/openstack_deploy/user_variables.yml
How can we verify your issue is addressed?
Without modifying the base configuration file /etc/openstack_deploy/user_variables.yml the file /opt/rpc-openstack/scripts/update-yaml.py successfully creates /etc/openstack_deploy/user_variables.yml with the base configuration and overrides in a new /etc/openstack_deploy/user_variables.yml file
If this is a large issue, what can be done immediately to alleviate the issue while working on a longer-term solution?
diff --git a/scripts/update-yaml.py b/scripts/update-yaml.py
index ad47d50..19eb17c 100755
--- a/scripts/update-yaml.py
+++ b/scripts/update-yaml.py
@@ -32,6 +32,7 @@ def get_config(path):
     try:
         with open(path) as f:
             data = f.read()
+            data = yaml.safe_load(data)
     except IOError as e:
         if e.errno == errno.ENOENT:
             data = None
@@ -42,7 +43,7 @@ def get_config(path):
         return {}
     else:
         # assume config is a dict
-        return yaml.safe_load(data)
+        return data

What is your evaluation on the importance of this issue, and why?
I would say it is high importance as this issue requires modifying the base configuration and the provided overrides file is not sufficient to resolve.
What branches / milestones do you believe this issue should target?
The list below is what is currently supported for backports, remove branches you do not wish to target.

[ ] Master
[ ] liberty-12.0

@codebauss can you provide us with examples of your user_variables files?  I think you may be missing something in one of them.

@d34dh0r53 In attempting to install r12.0.0 today, I've also run into the same error as @codebauss with the scripts/update-yaml.py. The user_variables.yml file, /etc/openstack_deploy/user_variables.yml, is completely commented out.
Here are examples of my user_variables files:
/etc/openstack_deploy/user_variables.yml:
https://gist.github.rackspace.com/jaime-gutierrez/38603ec140111e00b335
/opt/rpc-openstack/rpcd/etc/openstack_deploy/user_variables.yml:
https://gist.github.rackspace.com/jaime-gutierrez/bb67be6f3ba9bc02f2eb

I think the problem is the following commit
https://github.com/openstack/openstack-ansible/commit/4dadec6178de3392d51366b960ecdfb1b60bdbb5#diff-3b3a638ddf7c68bc4ff9470d533980a0
We can work around this easily if nothing in the OSA version of user_variables.yml is really needed.

Hey @d34dh0r53
I am using the default files without any modifications to them. The 'steps to reproduce' will get you to the error straightway. I have since deleted the lab environment but can spin up another quite easily if needed.

@d34dh0r53 @prometheanfire is there any additional information I can provide outside of the steps to replicate being that no changes were made to the code?
Is this a better option to fix?
diff --git a/scripts/update-yaml.py b/scripts/update-yaml.py
index ad47d50..d1d60fb 100755
--- a/scripts/update-yaml.py
+++ b/scripts/update-yaml.py
@@ -48,6 +48,8 @@ def get_config(path):
if name == 'main':
args = parse_args()
base = get_config(args.base)

if base is None:

   base = {}

overrides = get_config(args.overrides)
config = dict(base.items() + overrides.items())
if config:

Just ran into this too on a virgin Liberty r12.1.0 install. No files were modified before running the script, and this is on Step 2 of the install docs in the 'Deployment Configuration' section under 'Prerequisites'.
Would be good to know if mrhillsman's fix is valid and how to implement it.

Hi @mrhillsman - I'm going to put a PR in using your fix (the first one), unless you'd like to do so yourself? Because I think that's a valid bug in the script.
On a separate note, can you point me to the documentation that shows the steps you laid out above? I think we maybe need to tweak the docs because that update_yaml script was never intended to be used in greenfield deployments.

Backported to liberty-12.2 in #1203

Would appreciate a liberty-12.1 backport...

Added to the list @byronmccollum
Will send the PR soon

@byronmccollum #1206 is a 12.1 backport for you.

@byronmccollum and @git-harry just closed #1206 and deleted liberty-12.1.


distilabel tutorials

What does this PR do?

Remove outdated distilabel tutorial
Add two new tutorials showcasing usual workflows for distilabel

Who can review?
Thanks in advance @merveenoyan and @stevhliu

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@stevhliu Thanks for the feedback! I've applied the changes.


IPsec Create Phase2 failed - missing Buttons

It is not possible to add Phase2 entries to a given or new Phase1 entry of an IPsec-Connection.
Steps to reproduce the behavior:

Go to VPN -> IPsec -> create new Phase1 and then try to create Phase2 for this previsious created Phase1
Same on already created Phase1, you can't create new Phase2. But you can edit already existend Phase2 entries.

Software version used and hardware type if relevant, e.g.:
OPNsense 22.1.6 (amd64, OpenSSL).

Maybe you missed the new + sign in P1 row?

Yes you're right. I missed it. Sorry for that.


Implementation of Attention module in Transformer

Thank you for sharing your work, it has actually been helping me a lot.
I have a problem with your code relating Attention module of Transformer. May I be wrong that the Attention module should have dropout layer after softmax function (link). For example, link or link, they used dropout layer in Attention module.

What you mentioned is indeed a common practice


Modifying manifests

Is there any way to modifying K8s manifest files during execute pipeline? For example, I want to override LoadBalancerIP of a K8s Service or replicas of a K8s deployment manifest according to environment?
This is my sample scenario:
Manifest files in the source repo:
manifests/deploy.yaml
manifests/service.yaml
For the Test environment:
Change LoadBalancerIp to 'x.x.x.x' in manifests/service.yaml
Change replicas to '1' in manifests/deploy.yaml
For the QA environment:
Change LoadBalancerIp to 'y.y.y.y' in manifests/service.yaml
Change replicas to '3' in manifests/deploy.yaml

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

ID: dcbb25d1-a706-e8fc-61e4-d5b86aa54f47
Version Independent ID: 5634d9dd-fd92-761c-24b8-5e32ed6c6c35
Content: Deploy to Kubernetes task - Azure Pipelines & TFS
Content Source: docs/pipelines/tasks/deploy/kubernetes.md
Product: devops
Technology: devops-cicd
GitHub Login: @shashankbarsin
Microsoft Alias: shasb

Thanks for your question. It looks like you're working through an issue with your scenario or implementation, rather than an issue with the documentation. Here are a couple of options where you might consider asking your question:

Azure DevOps on Stack Overflow
Azure DevOps Support Bot


Test case MPC5748G flash ... GDB not starting issue

Hello Jed !
Thanks for this nice tool, but can you help with this issue?
Precondition:
SW:

Latest S32DS PPC
Using MSYS2 (can recommend, no big installations like cygwin)
Installed python with pacman, then pip and setuptools with the following command curl https://bootstrap.pypa.io/get-pip.py | python
Cloned the repo, installed the script

HW:

MPC5748G-DEVKIT

Test case:
$ osf --config mpc5748g.ini flash /c/dev/bin/z4_demo1_Z4_0.elf
(Also tested $ osf --config mpc5748g.ini flash C:/NXP/workspaceS32DS.Power12/z4_demo1_Z4_0.elf)
with MPC5748G adapted *.ini
Expected result:
Launch of GDB and automatic flash, LED on.
Actual result:
GDB not starting, not flashed
$ osf --config mpc5748g.ini flash /c/dev/bin/z4_demo1_Z4_0.elf
Waiting for GDB servers to complete startup ...... Done
DEBUG: /tmp/gdb_abql6b0s.txt
Waiting for GDB client to flash ...... Done
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/pexpect-4.2.1-py3.6.egg/pexpect/expect.py", line 97, in expect_loop
    return self.timeout()
  File "/usr/lib/python3.6/site-packages/pexpect-4.2.1-py3.6.egg/pexpect/expect.py", line 70, in timeout
    raise TIMEOUT(msg)
pexpect.exceptions.TIMEOUT: <pexpect.popen_spawn.PopenSpawn object at 0x6fffe362358>
searcher: searcher_re:
    0: EOF

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/osf", line 11, in <module>
    load_entry_point('opensda-flasher==0.2.0', 'console_scripts', 'osf')()
  File "/usr/lib/python3.6/site-packages/click-6.7-py3.6.egg/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/click-6.7-py3.6.egg/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.6/site-packages/click-6.7-py3.6.egg/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.6/site-packages/click-6.7-py3.6.egg/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.6/site-packages/click-6.7-py3.6.egg/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/click-6.7-py3.6.egg/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/opensda_flasher-0.2.0-py3.6.egg/opensda_flasher/cli.py", line 76, in flash
    c.flash(elfs)
  File "/usr/lib/python3.6/site-packages/opensda_flasher-0.2.0-py3.6.egg/opensda_flasher/client.py", line 95, in flash
    print(self.process.err)
  File "/usr/lib/python3.6/site-packages/delegator.py-0.0.13-py3.6.egg/delegator.py", line 110, in err
  File "/usr/lib/python3.6/site-packages/delegator.py-0.0.13-py3.6.egg/delegator.py", line 80, in _pexpect_out
  File "/usr/lib/python3.6/site-packages/pexpect-4.2.1-py3.6.egg/pexpect/spawnbase.py", line 413, in read
    self.expect(self.delimiter)
  File "/usr/lib/python3.6/site-packages/pexpect-4.2.1-py3.6.egg/pexpect/spawnbase.py", line 321, in expect
    timeout, searchwindowsize, async)
  File "/usr/lib/python3.6/site-packages/pexpect-4.2.1-py3.6.egg/pexpect/spawnbase.py", line 345, in expect_list
    return exp.expect_loop(timeout)
  File "/usr/lib/python3.6/site-packages/pexpect-4.2.1-py3.6.egg/pexpect/expect.py", line 107, in expect_loop
    return self.timeout(e)
  File "/usr/lib/python3.6/site-packages/pexpect-4.2.1-py3.6.egg/pexpect/expect.py", line 70, in timeout
    raise TIMEOUT(msg)
pexpect.exceptions.TIMEOUT: <pexpect.popen_spawn.PopenSpawn object at 0x6fffe362358>
searcher: searcher_re:
    0: EOF
<pexpect.popen_spawn.PopenSpawn object at 0x6fffe362358>
searcher: searcher_re:
    0: EOF

Init:
; MPC5748G init.

; S32 Settings.
[S32]
root = C:\NXP\S32DS_Power_v1.2

; Debug Server Settings.
[SERVER]
plugin = com.pemicro.debug.gdbjtag.ppc_<IP_ADDRESS>706282002
exe = pegdbserver_power_console.exe
device = MPC5748G
port = USB3
speed = 5000
serverport = 7224
platform = win32

; GDB CLient Settings.
[CLIENT]
platform = powerpc-eabivle-4_9
exe = powerpc-eabivle-gdb.exe

Comments
How do you identify the USB port? I'm used to the COM ports with regards to OpenSDA. Board is connected to COM3 (btw, I found connecting to USB3.0 ports fires the board much quicker than 2.0)
Tested port = USB1 and port = USB3, output same.
"Waiting for GDB client to flash ...... Done" There is a timeout of circa 5 seconds.
$ osf --config mpc5748g.ini flash
Traceback (most recent call last):
  File "/usr/bin/osf", line 11, in <module>
    load_entry_point('opensda-flasher==0.2.0', 'console_scripts', 'osf')()
  File "/usr/lib/python3.6/site-packages/click-6.7-py3.6.egg/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/click-6.7-py3.6.egg/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.6/site-packages/click-6.7-py3.6.egg/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.6/site-packages/click-6.7-py3.6.egg/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.6/site-packages/click-6.7-py3.6.egg/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/click-6.7-py3.6.egg/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/opensda_flasher-0.2.0-py3.6.egg/opensda_flasher/cli.py", line 55, in flash
    raise(Exception("No elf(s) specified in call or config file"))
Exception: No elf(s) specified in call or config file

The 48G, on account of having more cores, takes longer to reset. It was reaching the internal default timeout. Try updating from master and trying again.
I also added a folder with 'Golden Binaries' from the ADC Example demos. I tested all 3 on both of my development boards. If your binaries don't work try them.
The 'port' is PE Debugger's own internal numbering/naming. I added an osf command to show which boards are connected:
> osf ports
Command line arguments: -showhardware
-INTERFACE=OPENSDA        -PORT=9CD0CE70                 ; USB1 : OpenSDA (9CD0CE70)[PortNum=181]
-INTERFACE=OPENSDA        -PORT=USB1                     ; USB1 : OpenSDA (9CD0CE70)[PortNum=181][DUPLICATE]

The USB# change depending on order. The other one is based on serial(?).

Jed, I re-installed, but similar issue persists. Also, ports command shows empty output. Could you include -v for version to the app?
(Assumption: Reinstalled with initial installation command: python setup.py install)
`$ osf ports
`

It'll probably be next week before I can properly dig into this.

Can you post you post the contents of build_version.txt from your pegdbserver_power_console.exe folder?

These are all the versions I have:
S32_Power_v1.1\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_<IP_ADDRESS>605241936\win32\pegdbserver_power_console.exe
S32DS_Power_v1.2\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_<IP_ADDRESS>706090048\win32\pegdbserver_power_console.exe
S32DS_Power_v1.2\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_<IP_ADDRESS>706282002\win32\pegdbserver_power_console.exe

Find the version that matches the version in the .ini:
For example plugin = com.pemicro.debug.gdbjtag.ppc_<IP_ADDRESS>706282002:
Has this build_version:
P&E DLL Version: v644
P&E Build Date: 170628

Can you open a cmd console in that directory and post the output of pegdbserver_power_console.exe -showhardware

This is the output of my two devboards.

First let us diagnose if pegdbserver_power_console is seeing everything. The Python is just a wrapper on top of that.

Could you include -v for version to the app?

I will work on the UI a bit more and add some more intermediate debugging steps.

Thanks for quick feedback.
C:\NXP\S32DS_Power_v1.2\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_<IP_ADDRESS>706282002
build_version.txt
P&E DLL Version: v644
P&E Build Date: 170628
$ ./pegdbserver_power_console.exe -showhardware

P&E GDB Server for Power devices, Version <IP_ADDRESS>
Copyright 2014, P&E Microcomputer Systems Inc, All rights reserved

Loading library C:\NXP\S32DS_Power_v1.2\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_<IP_ADDRESS>706282002\win32\gdi\unit_ngs_ppcnexus_internal.dll ... Done.

Command line arguments: -showhardware
-INTERFACE=OPENSDA        -PORT=41401E08                 ; USB1 : OpenSDA (41401E08)[PortNum=181]
-INTERFACE=OPENSDA        -PORT=USB1                     ; USB1 : OpenSDA (41401E08)[PortNum=181][DUPLICATE]

Cheers

Just a status update:
I haven't gotten any time to work on it and some co-workers decided to set some things on fire at work so it'll probably be at least another week.

Update from my side:
Switched shell from MSYS2 to STL's MinGW and this looks truly good now:
C:\dev\github\opensda_flasher\Golden_Binaries>osf -c=mpc5748g.ini flash ./z4_demo1_Z4_0.elf
Waiting for GDB servers to complete startup ...... Done
DEBUG: C:\Users\ludwi\AppData\Local\Temp\gdb_nae9umin.txt
Waiting for GDB client to flash ...... Done
GNU gdb (GDB) 7.8.2
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-mingw32 --target=powerpc-eabivle".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
0x01000000 in ?? ()
Command Executed successfully: preserve1 0
The target architecture is assumed to be powerpc:vle
Loading section .startup, size 0x246 lma 0x40000000
Loading section .core_exceptions_table, size 0xf4 lma 0x40001000
Loading section .intc_vector_table, size 0xbc8 lma 0x40002000
Loading section .text, size 0x230 lma 0x40002bd0
Start address 0x40000000, load size 4402
Transfer rate: 2 KB/sec, 733 bytes/write.
Command Executed successfully: _reset
A debugging session is active.

        Inferior 1 [Remote target] will be detached.

Quit anyway? (y or n) [answered Y; input not from terminal]

C:\dev\github\opensda_flasher\Golden_Binaries>

LED is ON.

Excellent. That's definitely one that would have taken a while to find.


🚢 update viceroy package name and README

This PR addresses a couple remaining issues for release and publication to crates.io: updating the cli package name to viceroy, and updating the README to reflect the current state of play.
Fixes #31.

I've pushed another commit, refining the text to push people more toward the Fastly CLI, and to be more clear that the CLI descriptions in the README are about Viceroy's standalone interface.


graphicsLayer render resolution slower towards bottom of screen

Describe the bug
When using graphicsLayer (or clip, which uses graphicsLayer) the shape is rendered with a lower resolution as it moves down the screen. In other words, if you have a column of the same shape drawn the same way from the top to the bottom of the screen, the shape is rendered perfectly smooth at the top of the screen and very pixelated at the bottom.
Affected platforms
Desktop (macOS)
Versions

Libraries:

Compose Multiplatform version: 1.6.11

Kotlin version:  2.0.0-RC1
OS version(s) (required for Desktop and iOS issues): MacOS 14.5
OS architecture (x86 or arm64): arm64
JDK (for desktop issues):  20

To Reproduce
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.GenericShape
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Window
import androidx.compose.ui.window.application

fun main() {
    val triangle =
        GenericShape { size, _ ->
            moveTo(
                x = 0f,
                y = 0f
            )
            lineTo(
                x = size.width,
                y = size.height / 2
            )
            lineTo(
                x = 0f,
                y = size.height
            )
            close()
        }
    application {
        Window(onCloseRequest = ::exitApplication) {
            Row {
                Column {
                    repeat(100) {
                        Box(
                            modifier =
                                Modifier
                                    .clip(triangle)
                                    .background(Color.Black)
                                    .size(25.dp)
                        )
                    }
                }
            }
        }
    }
}

Expected behavior
Resolution should not change relative to the y value within a single screen.
Screenshots
This image was taken on a vertical 4k monitor. The code is above, in the reproduction section.

The cause of the issue is not clear, it requires more detailed investigation.
For the moving to YT - it's kind of in progress (script issues + delays because of vacations), all the issues will be moved

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.


Difference between emitting and saving?

Hi there, this library makes AST magic much easier to understand :-) But for beginners like me there are still some blind spots in the documentation.
For example after reading the docs I can't see the difference between saving and emitting? Both seem to commit current node tree to the file system/memory?
Cheers

Saving saves the changes you made to the source TypeScript files you made. For example, you can create a new TypeScript file foo.ts and write some text in it. When you hit project.save() (and the promise resolves), a new file will be create on your disk with the contents you specified in your manipulation code. Before you hit .save(), the new "file" only exists in the memory of the currently running (it's not persisted on the disk).
Emitting is much like compiling an exiting TypeScript project to JavaScript when you run tsc from the command line. It will look at the current state of the TypeScript project and create necessary .js and/or .d.ts (depending on the options).
So yes, in a sense, they both write to the disk (by default), but they write different files for different purposes. Hope this clears things up!

So, saving is updating/creating .ts files, and emitting is creating compiled .js files? Got it, thanx

Yup! Thanks for answering this @lazarljubenovic!
Also, sorry this wasn't clear @mi5ha. I just did a commit to update the docs for this and I will merge that to master soon. I need to spend a lot more time updating the documentation.


[FlyteClient][FlyteDeck] Get Downloaded Deck Signed URL via Data Proxy

Why are the changes needed?
This is a new API for Flyte to get the signed URL for the deck artifact.
What changes were proposed in this pull request?
add a method called get_download_deck_signed_url using the IDL CreateDownloadLinkRequest and CreateDownloadLinkResponse.
How was this patch tested?

flyte sandbox

from flytekit.clients.friendly import SynchronousFlyteClient as _SynchronousFlyteClient
from flytekit.configuration import PlatformConfig, AuthType

client = _SynchronousFlyteClient(PlatformConfig.for_endpoint("localhost:30080", True))
signed_url = client.get_download_deck_signed_url(
    node_id="n1",
    project="flytesnacks",
    domain="development",
    execution_id="awzmsq9jbjfz8p6jksdg",
)
print(signed_url.signed_url)

Screenshots

sandbox

Check all the applicable boxes

[ ] I updated the documentation accordingly.
[ ] All new and existing tests passed.
[x] All commits are signed-off.

Related PRs
Docs link

Update, please review it for the final check, thank you all!
cc @pingsutw @eapolinario


Implement one-electron move in VMC

We should have the possiblity to move only one electron at a time in VMC. This supposedly improve convergence criteria by increasing the acceptance rate

also implemented a walker class that takes care of the electronc


Calibrating camera using chessboard pattern

Summary of your issue
Hi! First of all sorry if this is not the proper question to ask through an issue. Let me know if there was a better place to ask this and sorry for any inconvenience this might cause!
I've been trying to archieve camera calibration using a chessboard pattern. I've seen you have some samples on how to perform calibrations in older versions of the wrapper but I cannot find any updated version of an exaple to use as reference (it should be similar but I haven't managed to make it work).
Is there any working code example avaliable?
Environment
Right now I'm using latest NuGet release (<IP_ADDRESS>10404) for .NET framework 4.6.1

Some test code may help you. https://github.com/shimat/opencvsharp/blob/ac7299590071e71a5c3bb040024fee657e2105db/test/OpenCvSharp.Tests/calib3d/Calib3dTest.cs#L141


[BUG] No on-screen keyboard with On-Screen Numpad disabled

As the On-Screen Numpad is deactivated by default, I was wondering how I should be able to type with nothing to work with:

I had to enable the BETA feature of the on-screen Numpad to make it finally appear:

Google Pixel 7
Android 14
Latest app version 28.0

Well, the configuration out-of-the-box is meant to work on phones like this:

and not phones like this:

In order to type on the former, the virtual keypad is not needed, so it is disabled by default.
I don't know how to put it any other way. :slightly_smiling_face:


Max ack extension

Inadvertently (and my because my lack of knowledge of github PRs) I reset a change in PR #1869 and that caused it to drop it.
@pongad @garrettjonesgoogle

Changes Unknown when pulling 4883e6fa8c8e1ab8002ad95f47fb7b0b892a4506 on davidtorres:max-ack-ext into ** on GoogleCloudPlatform:master**.

LGTM after tests pass

@davidtorres I have a concern that the new test might be flaky - could you check the Travis failures?

Yes I'm pushing a change now to address the issue, the tests should/might have been flaky before as well (or the expectations too lax), this is an old bug in the tests because of thread scheduling and the latest changes to the tests just exposed the bug.

Changes Unknown when pulling 09172a61c763921fe6796313afb9fe759a2b8f2f on davidtorres:max-ack-ext into ** on GoogleCloudPlatform:master**.

Changes Unknown when pulling 6a21a54ebf0ae4f3d8ab8ab00767c889c30b3ccd on davidtorres:max-ack-ext into ** on GoogleCloudPlatform:master**.

Tests are now passing PTAL

Aside from @garrettjonesgoogle's comments, I'm good with this. Thank you for the PR!

Changes Unknown when pulling 204438ca8171fc09bbd42493029a132765262a0b on davidtorres:max-ack-ext into ** on GoogleCloudPlatform:master**.


How I can create stream?

I try
through2.obj(function(file, encoding, callback) {
    this.emit('data', '...');
    this.emit('end');

   callback()
})
but it is not work with pipes

F.e. I generate new file with config or some module (without loading any resources) and I want to work with it as with a stream (use it in gulp).
Now I use
var myStream = require('event-stream').readable(function (count, callback) {
    this.emit('data', 'some data');
    this.emit('end');

    callback();
});

myStream
  .pipe(process)
  .pipe(save)

just do this:
var Readable = require('stream').Readable;

var myStream = Readable();
myStream.push('some data');
myStream.push(null); // will cause an `end` event

myStream.pipe(...)

if I use require('stream').Readable, I will have problems with using stream 3? I will need to rewrite code?

you can use the readable-stream module if you want to be sure :)

Thank!
P.S. stream and readable-stream doesn't work if I run stream.push(null) asynchronously (Error: not implemented)

@tamtakoe this is because you must implement a ._read method on the readable stream. e.g.
var Readable = require('stream').Readable;
var myStream = new Readable();

myStream._read = function (n) { };
myStream.push('some data');

// or even
myStream._read = function (n) {
  this.push('some data');
};

myStream.push(null); // will cause an `end` event
myStream.pipe(...)

or inherit:
var Readable = require('stream').Readable;
var inherits = require('util').inherits;

function MyStream(options) {
  Readable.call(this, options);
}
MyStream.prototype._read = function (n) {
  this.push('some data');
  this.push(null);
};

var myStream = new MyStream();
myStream.pipe(...)

It is worth mentioning that a Writable stream needs a _write() method in the same way.
var Writable = require('stream').Writable;
var w = new Writable();
w._write = function (data, encoding, next) {
  // do something with data chunk
  next(/* error if any */);
};

A Duplex stream needs  _read and _write methods.
And a Transform stream needs only a _transform method:
var Transform = require('stream').Transform;
var t = new Transform();
t._transform = function (data, encoding, next) {
  // do something with data chunk
  next(/* error or.. */, data); // push chunk on to readable side
};

fyi from2 is a pretty sweet module to create readable streams and avoid all the subclassing noise

@tamtakoe streams3 are my preferred option and can be installed by npm install<EMAIL_ADDRESS>Streams2 are mainly an issue if you are trying to listen to both readable and data events on a single stream.

yeah it would be cool, and not too much of a change to do:
var readable = new Readable({
  read: (n) => {
    this.push('data')
    this.push(null)
  }
});

Many thanks to the proposed solutions! It is very useful to me!
Why not add a wrapper methods for creating streams in through2?

Through2 is more about making a Through / Transform stream.
You could certainly make one for a Readable, and I actually wrote one for Writable using much of the same Ideas from this module.
But as mentioned above there are other options for readables. My thoughts are more towards io.js streams directly, to make them more user friendly.

doesn't work...
var Readable = require('stream').Readable;
var generalStream = new Readable();

generalStream._read = function (n) { };

...

modules.forEach(function(module) {)
    gulp.src(modules.files)
        ....
        .pipe(through.obj(function(file, enc, callback) {
            generalStream.push(file);
            //From this point the code doesn't run (why?)

            callback(null, file);

            if (isLastModule) {
                generalStream.push(null);
            }
        }));
})

return generalStream;

new Readable({ objectMode: true });

Alas! the one thing i wondered if i needed to include in my example but didn't

It works!
myStream._read = function (n) { } looks strange. Why node.js developers didn't implement noop function as default value of _read?

I try from2
function read(n) {
    console.log(n);

    //var modulesInCounter = 0;
    //var modulesOutCounter = 0;
    var generalStream = this;

    for (var key in modules) {
       //modulesInCounter++;

       compileModule(key, modules[key], base)
            .pipe(through.obj(function (file, enc, callback) {
                //modulesOutCounter++;
                generalStream.push(file);

                callback(null, file);

                //if (modulesOutCounter >= modulesInCounter) {
                //    generalStream.push(null);
                //}
            }));
    }
}

return from.obj(read);

Why the n (argument of read) is always 16
Why it works without generalStream.push(null)?

@tamtakoe
a1) I have never used from2, but I imagine 16 is the default (hughsk/from2/index.js#L83). I wouldn't worry about that too much, in objectMode it is usually void anyway, since usually only one object is passed through at a time.
It is specific usually to the amount of bytes to read from the internal buffer on .read()
a2) I have a feeling this might be because _read() gets called only when a stream is consuming generalStream, if nothing is waiting for data from it via readable or data event then this will be waiting to be consumed before it tries to _read again.
(Obviously I can't see the rest of your code so I am making some assumptions here)
The result of what you have there is completely different to what you had before, this is the equivalent of:
var Readable = require('stream').Readable;
var generalStream = new Readable();

generalStream._read = function (n) {
    console.log(n);

    //var modulesInCounter = 0;
    //var modulesOutCounter = 0;
    var generalStream = this;

    for (var key in modules) {
       //modulesInCounter++;

       compileModule(key, modules[key], base)
            .pipe(through.obj(function (file, enc, callback) {
                //modulesOutCounter++;
                generalStream.push(file);

                callback(null, file);

                //if (modulesOutCounter >= modulesInCounter) {
                //    generalStream.push(null);
                //    next();
                //}
            }));
    }
};
...
return generalStream;

It is not equivalent. If you leave comments, _read works in an infinite loop. If uncomment code _read works several times.
My code. I use new Readable two times: for generalStream and for headStream and I have a problem with a stream that was created by me.
compileProject(config.project1.modules)
    .pipe(gulp.dest(buildPath)));

function compileProject(modules) {
    var Readable = require('stream').Readable;
    var generalStream = new Readable({ objectMode: true });

    generalStream._read = function (n) {
        var modulesInCounter = 0;
        var modulesOutCounter = 0;
        var generalStream = this;

        for (var key in modules) {
            modulesInCounter++;
            console.log('-', key, '-');

            compileModule(key, modules[key])
                .pipe(through.obj(function (file, enc, callback) {
                    modulesOutCounter++;
                    generalStream.push(file);

                    callback(null, file);

                    if (modulesOutCounter >= modulesInCounter) {
                        generalStream.push(null);
                    }
                }));
        }
    };

    return generalStream;
}

function compileModule(name, params) {
    var Readable = require('stream').Readable;
    var headStream = new Readable({ objectMode: true });

    headStream._read = function (n) {
        var dependencies = params.deps.length ? '"' + params.deps.join('", "') + '"' : '';
        var content = 'angular.module("' + params.moduleName + '", [' + dependencies + ']);';

        var file = new File({
            path: 'head.js',
            contents: new Buffer(content)
        });
        this.push(file);
        this.push(null);
    };

    var scriptsStream   = gulp.src(params.scripts)
        .pipe(g.uglify({
            mangle: false
        }))

    var templatesStream = gulp.src(params.templates)
        .pipe(g.angularTemplatecache(name + '/templates.js', {
            module: params.moduleName,
            base: path.join(base, params.root, '/'),
            templateHeader: TEMPLATE_HEADER,
            templateFooter: TEMPLATE_FOOTER
        }))

    var moduleStream = series(headStream, scriptsStream, templatesStream)
        .pipe(g.concat(name + '.js'))

    return moduleStream;
}

When you pass the function to from2 this is what happens:
Class.prototype._from = read
Class.prototype._read = function(size) {
  var self = this

  if (this._reading || this.destroyed) return
  this._reading = true
  this._from(size, check)
  function check(err, data) {
    if (self.destroyed) return
    if (err) return self.destroy(err)
    if (data === null) return self.push(null)
    self._reading = false
    if (self.push(data)) self._read()
  }
}

https://github.com/hughsk/from2/blob/master/index.js#L45-L59
So actually rather than calling push you could use the second argument since you are pass ._read(<number>, <Function>) and the Function takes an error and data, similar to the callback in a Transform stream (although in streams3 it can be undefined, it doesn't have to be null).
The issue with the above is that ._read() will only happen once, because after you call push(null) it signifies the end of the stream. Is that the desired effect?

I think the issue is with your counting, and stuff happening async over the next ticks.
through2 also takes a second argument. This is a _flush function, which happens right at the end of the stream, after the last chunk has passed through. This is when you want to call .push(null).
Try this:
compileProject(config.project1.modules)
    .pipe(gulp.dest(buildPath)));

function compileProject(modules) {
    var Readable = require('stream').Readable;
    var generalStream = new Readable({ objectMode: true });

    generalStream._read = function (n) {};

    function oncomplete() {
      generalStream.push(null);
    }

    Object.keys(modules).forEach(key, i) {
      var flush;

      if ((i + 1) === modules.length) {
        flush = oncomplete;
      }

      compileModule(key, modules[key])
        .pipe(through.obj(function (file, enc, callback) {
            generalStream.push(file);

            callback(null, file);
        }, flush));
    });

    return generalStream;
}

or even:
compileProject(config.project1.modules)
    .pipe(gulp.dest(buildPath)));

function compileProject(modules) {
    var Readable = require('stream').Readable;
    var generalStream = new Readable({ objectMode: true });

    var moduleKeys = Object.keys(modules);
    var count = 0;
    var total = moduleKeys.length;

    function compileModule_(key, index) {
      compileModule(key, modules[key])
        .on('data', function (file) {
          generalStream.push(file);

          if ((index + 1) === total) {
            generalStream.push(null);
          }
        });
    }

    generalStream._read = function (n) {
      compileModule_(moduleKeys[count], count);
      count++;
    };

    return generalStream;
}

It work correct! There is just one more little problem... It is very difficult (this code is at a lower level of abstraction than that used in the program).
I found how gulp.src creates stream using only through2 https://github.com/wearefractal/glob-stream/blob/master/index.js#L27-L41
I have successfully used it for headStream
var headStream = through.obj();
headStream.write(file);
headStream.end();

But it does not work for generalStream (works if you replace a string on the comments)
var generalStream = through.obj();

generalStream._read = function (n) {};

function oncomplete() {
    generalStream.end(); //generalStream.push(null);
}

var moduleKeys = Object.keys(modules);
var count = 0;
var total = moduleKeys.length;

for (var key in modules) {
    var flush;
    count++;

    if (count >= total) {
        flush = oncomplete;
    }

    compileModule(key, modules[key], base)
        .pipe(through.obj(function (file, enc, callback) {
            generalStream.write(file); //generalStream.push(file);

            callback(null, file);
        }, flush));
}

return generalStream;

if you are using through.obj you do not want to set ._read remove that line as it will mess with the Transform stream internals.

it is really up to you they kind of do the same thing, except that the through stream is adding writable stream functionality to the generalStream rather than it only being readable.
It's kinda of like using through streams as a hammer to solve all problems, but if it is simpler for you to understand your code it's probably more important, and since it looks like it is build code rather than production deployed application code.
It just means generalStream could be piped into, although i don't suggest that as it would make your code even more complicated.

Clear code is very important for me. I'm writing a build script, so performance and accuracy does not matter. Ideally, you do not even know about the internal implementation of stream, and perform only simple actions with streams (create, merge, fork, save, ...).
It remains to find out why it works without flush/generalStream.end()/generalStream.push(null)/etc. :-)
//It works! why?!
var generalStream = through.obj();

for (var key in modules) {
    compileModule(key, modules[key], base)
        .pipe(through.obj(function (file, enc, callback) {
            generalStream.write(file);

            callback(null, file);
        }));
}

return generalStream;

Probably because all the files have been handled, the script just ends, nothing is waiting in the event loop.
But by never ending the stream you would never clear up the stream internals. So this would not be great for code running on a server.

How I can create chain of through2 streams?
I try
//there is
stream
    .pipe(throughStream1)
    .pipe(throughStream2)

//must be
throughStream = throughStream1.pipe(throughStream2)

stream
    .pipe(throughStream)

But it doesn't work

I am confused
throughStream = throughStream1.pipe(throughStream2)
// will yield => throughStream === throughStream2

So by doing this you are actually doing:
stream
    .pipe(throughStream2)

although throughStream1 is still set up to pipe into throughStream2 as well
It is not like a promise where the following would create 4 promises and give you the result of them all:
return new Promise(() => {
  return new Promise(resolve => resolve({ data: true })
})
.then(result => {
  return new Promise(resolve => resolve(result.data)
});

pipe returns the stream that is being piped too:
readable.pipe(throughStream) // => throughStream

Hmm... Other way. Can I set stream data? Not chunk, but data as stream param?
stream
    .pipe(through.noop, function(callback) {
        this.data = {foo:bar};

        callback();
    }))
    .pipe(through.noop, function(callback) {
        console.log(this.data); //{foo:bar};

        callback();
    }))

this.data doesn't work. It may be possible in another way?

No not in that way.
I'm not sure what you are trying to do here, because the second argument to .pipe is an object not a function:
stream.pipe(writable, { end: true|false })

so the function will not even be called.
It depends on how you are using this data object, couldn't you do something like:
;(function () {
  var data = {};

  stream
      .pipe(through2.obj(function(data, encoding, callback) {
          data[foo] = bar;

          callback(null, data);
      }))
      .pipe(through2.obj(function(data, encoding, callback) {
          console.log(data); // { foo:bar } ;

          callback(null, data);
      }));
}());

I thought about this method, but came up with a other way, it will not have make logic out of the stream.
//storage.js
var data = {};

module.export = function(key, value){
    return throught.obj(function(file, enc, callback) {
        if (value) {
            data[key] = value;
        } else {
            file.contents = new Buffer(data[key]);
        }
        callback(null, file)
    })
}

//gulpfile.js
var storage = require('storage')

stream
    .pipe(storage('foo','bar'))
    .pipe(storage('foo'))

New case with new stream
Windows, node.js v 0.12.2
File structure:

test1
|- script1.js
|- script2.js
|- ...
test2
...
test5

gulpfile.js:
gulp.task('test', function() {
    var streamsArr = [];

    for (var stream, i = 1; i < 5; i++) {
        stream = gulp.src(path.join(__dirname, 'test' + i, '**/*'))
            .pipe(through.obj(function(file, enc, callback) {
                setTimeout(function() {
                    callback(null, file);

                }, Math.ceil(Math.random()*100));
            }))
            .pipe(require('gulp-concat')('script.js'))
            .on('end', (function(i) {
                console.log('end of the stream ' + i);
            }).bind(null, i));

        streamsArr.push(stream);
    }

    require('gulp-merge')(streamsArr) //or stream-series, or merge-stream, etc. — all make new stream
        .pipe(through.obj(function(file, enc, callback){
            console.log('merged stream transform:', path.relative(__dirname, file.path));

            callback(null, file);

        }, function(callback) {
            console.log('merged stream flush');

            callback();
        }))
        .on('end', function() {
            console.log('end of the merged stream');
        });
});

console:

end of the stream 4
end of the stream 3
merged stream transform: test1\script.js
end of the stream 1
merged stream transform: test2\script.js
end of the stream 2

Somehow, part of a stream is lost. Also did not work flush and end event of merged stream.

You have to drain the stream in your gulp-merge function since you are pushing data to the readable part of the stream (callback(null, file)). You can do this by piping it somewhere or calling .resume()
  require('gulp-merge')(streamsArr) //or stream-series, or merge-stream, etc. — all make new stream
        .pipe(through.obj(function(file, enc, callback){
            console.log('merged stream transform:', path.relative(__dirname, file.path));

            callback(null, file);

        }, function(callback) {
            console.log('merged stream flush');

            callback();
        }))
        .on('end', function() {
            console.log('end of the merged stream');
        })
        .resume() // add this

@mafintosh it doesn't work. I get something like that in console:

end of the stream 2
end of the stream 4
merged stream transform: test1\script.js
end of the stream 1
end of the stream 3

I did something like this, but it is too complicated and verbose
var through = require('through2');
var files = [];

for (var stream, i = 1; i < 5; i++) {
    stream = gulp.src(path.join(__dirname, 'test' + i, '**/*'))
        .pipe(through.obj(function(file, enc, callback) {
            setTimeout(function() {
                callback(null, file);

            }, Math.ceil(Math.random()*100));
        }))
        .pipe(through.obj(function(file, enc, callback) {
            files.push(file);

            if (i === 4) {
                createStream(files);
            }
        }))
}

function createStream(files) {
    var stream = through.obj();
    stream.pipe(through.obj(function(file, enc, callback) {

        callback();
    }, function(callback) {
        this.push.apply(this, files);

        callback();
    }))
    stream.end();
}

@tamtakoe you aren't calling resume in that example?

I copy your example in my example
...
require('gulp-merge')(streamsArr)
    ...
    .resume() // add this
...

but it is not work correct. Maybe I did something wrong?

@mafintosh There was a problem in the gulp-concat. I used v. 2.4.3, but in 2.5.2 it was fixed


How to load plugin?

Thanks for this great plugin!
I'm having some trouble loading it in my serverless.yml, I think due to to the package's namespace.
Do you have any recommendations for how to get this loaded? I'd be happy to update the README if I could figure it out 😆

Hi @nason I just updated the README to make it more clear, you need to reference it like this:
plugins:
  - "@totallymoney/serverless-sns-to-sqs-events"

also, we had a bug in v1.1.0 where the package.json was pointing at the wrong entry module, it should be fixed in v1.1.1 now

Thank you! I'm able to load this plugin now


Any plans to add typescript declarations?

It would really help using / learning this library. The type declaration can be added without having to turn the whole project to typescript. Interestingly the Actions on google SDK is already developed in typescript.

Oops, wrong repo


Performance counters do not compile

Expected Behavior
HPX master should compile with armclang on A64fx.
Actual Behavior

/lustre/projects/diehl-group/nan/OctoTigerBuildChain-clang/src/hpx/libs/full/performance_counters/src/threadmanager_counter_types.cpp:476:36: error: use of undeclared identifier 'counter_average_count'
            {"/threads/idle-rate", counter_average_count,
                                   ^
/lustre/projects/diehl-group/nan/OctoTigerBuildChain-clang/src/hpx/libs/full/performance_counters/src/threadmanager_counter_types.cpp:787:34: error: invalid application of 'sizeof' to an incomplete type 'hpx::performance_counters::generic_counter_type_data []'
            counter_types, sizeof(counter_types) / sizeof(counter_types[0]));
                                 ^~~~~~~~~~~~~~~
2 errors generated.

Steps to Reproduce the Problem
... Please be as specific as possible while describing how to reproduce your problem.

Compile HPX master with armclang

Specifications
... Please describe your environment

HPX Version: master
Platform (compiler, OS): armclang++

This will be fixed by #5854

Apologies for that Patrick! I modernized certain names and I missed a couple. #5854 should be ready by tomorrow.


[iOS] Add toggle play pause

This solves a few issues with lined EarPods and AirPods.
Especially that both EarPods and AirPods now can toggle play/pause. (Which they couldn't before)

Any progress @anderslemke?

I think we should automatically set this capability based on whether CAPABILITY_PLAY and CAPABILITY_PAUSE are both set, we can also trigger remote-play or remote-pause based on the player state instead of adding a new event.

We are using this in production at Zetland now.
To answer your questions @Guichaguri :

I can't really tell if automagically adding the toggle capability based on play/pause is a good idea. I can't think if a situation where you wouldn't want that, but on the other hand, I don't understand why Apple would make it a separate capability in the first place.

The code that emitted a new event in now removed, so we use remote-pause and remote-play now.

Thanks @anderslemke for your work! 👌
@Guichaguri mergeable?

@anderslemke I'm still not sure if we should expose those kind of API decisions to our API, but I'll leave that to @dcvz to decide.

what are we doing on Android @Guichaguri ? My intuition would be to just enable playpause when play and pause are enabled. That's what I tried to do the first time around.

Android does have a PLAY_PAUSE capability, but it doesn't have anything different over enabling PLAY and PAUSE separately. I think we should go with automatically enabling PLAY_PAUSE when PLAY and PAUSE are both enabled, and then splitting the event into remote-play and remote-pause depending on the state.
My guess is that the device uses the PLAY_PAUSE when it doesn't know (or is not sure about) the state of the player, like a smartwatch that doesn't have a stable connection to the phone due to battery saving reasons. And that's probably the same thing that happens with AirPods/EarPods, they may not know the current player state, so PLAY_PAUSE is triggered instead.

This feature would be greatly appreciated :) the ability to toggle play/pause with the headphone control is very convenient.

This feature would be greatly appreciated :) the ability to toggle play/pause with the headphone control is very convenient.

Same here, we encountered the exact same problem and would love to have the feature.

We need that feature too, would be certainly great if someone make a the review and merge the changes. I wouldn't  like to Fork this module just for that feature.

This would be a great addition :)
@Guichaguri , If I understand correctly the only thing left here is to add the logic to automatically enable the CAPABILITY_TOGGLE_PLAY_PAUSE  capability if both CAPABILITY_PLAY and CAPABILITY_PAUSE are provided?

@curiousdustin Yes, remove the CAPABILITY_TOGGLE_PLAY_PAUSE, automatically set it when both CAPABILITY_PLAY and CAPABILITY_PAUSE are set, add logic to trigger the remote-play or remote-pause events when the play-pause button is pressed. No need for breaking changes or new API

I made a PR here that automatically deduces togglePlayPause from play and pause capabilities: https://github.com/react-native-kit/react-native-track-player/pull/957

Merged https://github.com/react-native-kit/react-native-track-player/pull/957


[Proposal] Implement replace/split APIs in the lang.string class

Description:
Replace and split are one of the most commonly used APIs on String objects, almost all other languages(regardless of old or modern) implement their replace and split APIs in their String class itself, so propose to have those two functions in the lang.string class, obviously for more complex stuff we can use regex, but for a very simple replace or split,  we should have a much simpler replace/split APIs in the lang.string class.
Problem
split/replace functions are one of the most commonly used functions, and all-most all the languages implement this in the string class itself, so developers naturally expected to have these functions in the string class, It is more convenient and intuitive to have replace/split functions in the lang.string class itself.
Solution
Implement replace/split functions in the lang.string class.

Design discussions regarding the language is done in the ballerina-spec repo. There's an open issue for this: https://github.com/ballerina-platform/ballerina-spec/issues/174. Please feel free to add your thoughts and suggestions to the discussion there.


os.sched_getaffinity(0) not available on macOS, others

distiller/apputils/execution_env.py logs the number of CPUs using os.sched_getaffinity(0). This call is not available on macOS (and probably others, such as Windows). Since this is only a log file entry, functionality is unaffected without it.
Perhaps this could fall back to multiprocessing.cpu_count() on platforms that don't have it (even though this is not exactly the same), or just not print at all.

This is a small change which I don't mind making. But please note that we only support and test Distiller on Ubuntu. So even with this fix, you may encounter other issues on macOS, which we may not be able to help with and/or fix in the code.

Pushed the fix.


Removal of the preloader

@sanjay-kv sir can we add skeleton loading instead of that?

i think we can remove the pre loading, as I analysed the page load time is 99% faster comparing to other pages

i think we can remove the pre loading, as I analysed the page load time is 99% faster comparing to other pages

okay sir


fix color-no-hex Rule Incorrectly Identifying Non-Color Strings as Hex Values

Description
We have identified an issue with the eslint-plugin-design-tokens package, specifically with the color-no-hex rule. This rule is intended to prevent the use of static hex color values in favor of design tokens. However, it is currently flagging strings that resemble hex values but are not intended as colors (e.g., name: 'Captainz #8680',). This false positive can lead to unnecessary confusion and hinder the development process. The task is to refine the rule's logic to accurately distinguish between actual hex color values and similar-looking strings used in different contexts.
Technical Details

Issue: The color-no-hex rule within the eslint-plugin-design-tokens package incorrectly flags strings that contain '#' followed by alphanumeric characters, mistaking them for hex color values.
Objective: Update the rule's logic to ensure it only flags genuine hex color values used within CSS-in-JS or similar styling contexts, excluding strings used for other purposes (e.g., names, identifiers).
Implementation Steps:

Review the current regex or logic used by the color-no-hex rule to identify hex values.
Refine the pattern or implement additional checks to exclude strings that are not used as color definitions.
Test the updated rule against various cases to ensure it accurately identifies hex color values while ignoring unrelated strings.

Dependencies: This task requires access to the eslint-plugin-design-tokens package's source code and an understanding of its rule validation mechanisms.

Acceptance Criteria

The color-no-hex rule no longer flags strings that resemble hex values but are not used as colors.
Genuine hex color values continue to be accurately identified and flagged by the rule, promoting the use of design tokens.
Developers can use strings containing '#' followed by alphanumeric characters without triggering false positives from the color-no-hex rule.
Documentation or comments within the eslint-plugin-design-tokens package are updated to reflect the refined logic of the color-no-hex rule.

Additional Notes
This issue highlights the importance of precise rule logic in linting tools to avoid false positives that can disrupt the development workflow. Addressing this issue will enhance the developer experience and ensure that the color-no-hex rule effectively contributes to maintaining code quality and consistency with our design system.

Unfortunately, we need to continue recognizing hex values in strings and template literals, and the provided example #8680 is indeed a valid hex value. Therefore, it will be challenging to address this issue .I've conducted a check for false positives across mobile, extension, and portfolio components, and found very few instances. I am closing this for now.

Mobile

No false positives were found outside of ignored test and storybook files.

Extension

No false positives were found outside of ignored test and storybook files.

Portfolio

There was one instance of a false positive, which can be reviewed here.


Py3 support?

Hey mate!
Really awesome little tool, actually trying to use it for a HackTheBox right now, however, it is python2.
Might it make sense to port to py3 at some point considering py2 is almost EOL?
Thanks!

Tbh I didn't think anyone uses it so thats cool to see... will take a look its a good suggestion.


Editor is very laggy using Intel integrated card

Godot version:
3.1 alpha 1 to beta 1
OS/device including version:
Windows 7 64 bits
Intel HD 3000 lastest driver from page, versión <IP_ADDRESS>29 (<IP_ADDRESS>29)
Issue description:
When the editor is redrawing the cpu goes from 0 to 25-30% and the whole editor is laggy but testing the game work fine so only the editor is affected
Steps to reproduce:
Just start godot and open/create new empty project

Fixed with the lastest 3.1.1 stable.


AzCopy writes files to container, but if I drop and recreate the container it fails (using devops)

I am using AzureFileCopy@5 in a yaml file in devops to copy files from a repo folder to a storage account .
I am running the agent on windows-latest
The devops agent has run this
"AzCopy\AzCopy.exe" copy "D:\a\1\sourcejson" "https://bhft111xxxmy.blob.core.windows.net/schemajson"  --log-level=INFO --recursive
The error comes up as
##[error]Upload to container: 'schemajson' in storage account: 'bhft111stdgrsuksdummy' with blob prefix: '' failed with error: 'AzCopy.exe exited with non-zero exit code while uploading files to blob storage.'
INFO: Authentication failed, it is either not correct, or expired, or does not have the correct permission ->
" Code: AuthorizationPermissionMismatch"
The service connection in DevOps has ACL permissions on the container. Its an Owner of the subscription.
When I first ran this, it worked. Then when the container got deleted and I recreated it, and gave the relevant permissions again, it fails.

Permissions can take a bit to propagate and actually apply in Azure. Unfortunately, this is not something we have control over. It would be recommended in this case to not delete the container if there is no need to.


Add label following PipelineDescriptorRef for CommandBufferRef to improve debug experience

It's useful to find out every command buffers, command encoders and pipelines with label set properly for each draw call when capturing GPU frame of XCode.

Let's consider this a part of https://github.com/gfx-rs/gfx/issues/1508


fmt(cstyle): cstyle fixes in istgt_integration.h

Fix #2018

@prateekpandey14 @ashishranjan738 If someone's able to review this for https://github.com/openebs/openebs/issues/2018 that'd be great.  👍


ArgumentError: Invalid argument(s): Cannot find executable for ~/flutter/bin/cache/artifacts/usbmuxd/iproxy.

Today, I  found that my project could not be debugged in my iPhone8(iOS 13.3.1). But, it's work in
Xcode iPhone8(iOS 13.5) simulator. I open my flutter project by Android Studio, and then attach my iPhone8 device, the IDE Console log like blow:
Sending crash report to Google.

I copy the crash report log content and paste here, hope useful.
command
flutter attach --app-id com.myApp.identifier --verbose
exception
ArgumentError: Invalid argument(s): Cannot find executable for  /Users/byAlex/flutter/bin/cache/artifacts/usbmuxd/iproxy.
#0      _getExecutable (package:process/src/interface/local_process_manager.dart:127:5)
#1      LocalProcessManager.start (package:process/src/interface/local_process_manager.dart:43:30)
#2      _DefaultProcessUtils.start (package:flutter_tools/src/base/process.dart:413:27)
#3      IOSDevicePortForwarder.forward (package:flutter_tools/src/ios/devices.dart:703:36)
#4      buildObservatoryUri (package:flutter_tools/src/mdns_discovery.dart:189:20)
#5      MDnsObservatoryDiscovery.getObservatoryUri (package:flutter_tools/src/mdns_discovery.dart:154:30)
<asynchronous suspension>
#6      AttachCommand._attachToDevice (package:flutter_tools/src/commands/attach.dart:237:51)
<asynchronous suspension>
#7      AttachCommand.runCommand.<anonymous closure> (package:flutter_tools/src/commands/attach.dart:177:19)
#8      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:146:29)
#9      _rootRun (dart:async/zone.dart:1126:13)
#10     _CustomZone.run (dart:async/zone.dart:1023:19)
#11     _runZoned (dart:async/zone.dart:1518:10)
#12     runZoned (dart:async/zone.dart:1465:12)
#13     AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
#14     AttachCommand.runCommand (package:flutter_tools/src/commands/attach.dart:176:19)
<asynchronous suspension>
#15     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:615:18)
#16     _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:73:64)
#17     _rootRunUnary (dart:async/zone.dart:1134:38)
#18     _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#19     _FutureListener.handleValue (dart:async/future_impl.dart:139:18)
#20     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:680:45)
#21     Future._propagateToListeners (dart:async/future_impl.dart:709:32)
#22     Future._completeWithValue (dart:async/future_impl.dart:524:5)
#23     Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:554:7)
#24     _rootRun (dart:async/zone.dart:1126:13)
#25     _CustomZone.run (dart:async/zone.dart:1023:19)
#26     _CustomZone.runGuarded (dart:async/zone.dart:925:7)
#27     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:965:23)
#28     _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#29     _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#30     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#31     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:175:5)

flutter doctor
[✓] Flutter (Channel stable, v1.12.13+hotfix.9, on Mac OS X 10.15.3 19D76, locale zh-Hans-CN)
    • Flutter version 1.12.13+hotfix.9 at  /Users/byAlex/flutter
    • Framework revision f139b11009 (3 个月前), 2020-03-30 13:57:30 -0700
    • Engine revision af51afceb8
    • Dart version 2.7.2

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at  /Users/byAlex/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.5, Build version 11E608c
    • CocoaPods version 1.7.3

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 46.0.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[!] IntelliJ IDEA Ultimate Edition (version 2018.1.6)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.dev/intellij-setup/#installing-the-plugins

[!] VS Code (version 1.39.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    ✗ Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (1 available)
    • iPhone (3) • 6011cdaca0d4c69e1c97fdc605f9298970a97824 • ios • iOS 13.5

! Doctor found issues in 2 categories.

After I clean the cache in " /Users/byAlex/flutter/bin/cache/artifacts/engine", and rebuild my project, everything is ok!


[stable/] + [incubator/] Add app description

Note this is dependent on https://github.com/kubernetes/website/pull/7695, so these PRs are on hold until that is resolved. Once this is resolved, all charts in this repo should have PRs to add this.
Here are the open PRs thus far:

#2786
#2787
#2788
#2789
#2790
#2791
#2792
#2793
#2794
#2795
#2796
#2797
#2798

Also see https://github.com/kubernetes/dashboard/issues/2891

cc @zouyee


support for zsh

The default script requires bash4 which enforce to have separate bash installation. Would be great if we can support zsh as well.

I agree. I want to drop this requirement. =)
Might be simplifying/refactoring the wrapper script to accommodate that. Thanks for speaking up!

@rohit-zabbed we've restored compatibility with bash 3, so it's no longer necessary to install bash4

@rohit-zabbed can you elaborate on the zsh support you want?

Bash for the foreseeable future will remain the primary language for scripting integrations between all the various tools.


Q: Does this sink offer a size limit?

Hiya,
I'm currently using the file sink from serilog, but in production the log files are not accesible.
I thought of pushing logs to an MSSQL database since we've already got that up an running.
The problem is that there is only limited space on the server.
I've set my file sink to log till 1gb.
Does this MSSQL sink have this kind of feature, where i can limit the rows or the overal table size?
Are there plans for this feature?
Since i hadn't seens anything in the readme i though about running periodic checks and remove older entries,
Would you have any recommendations regarding that?

Hi @sommmen!
Thank you for your question. The answer is no. The SQL sink does not have any function to limit the size of log data written to the db. It does not even keep track of the ammount of data written to the db.
For file logging it makes sense to limit the size and number of the files to keep them in workable size which can be handles by tools like editors and also it prevents the logger from filling up a drive completely which could cause other programs to fail.
For the SQL sink a correct and usable implementation would be harder and some questions arise. Should logging just silently stop (not a good idea) or overwrite/delete old logs (also not perfect and harder to do)? How and when to determine how much space is already allocated/used in the db? How to deal with multiple processes/machines logging into the same db?
Because of these unclear points and increased complexity I believe a size limit should not be implemented in the SQL sink. Instead I recommend an external periodic job which moves out older logs from the db (possibly to an archive db).

Hi @sommmen!
Thank you for your question. The answer is no. The SQL sink does not have any function to limit the size of log data written to the db. It does not even keep track of the ammount of data written to the db.
For file logging it makes sense to limit the size and number of the files to keep them in workable size which can be handles by tools like editors and also it prevents the logger from filling up a drive completely which could cause other programs to fail.
For the SQL sink a correct and usable implementation would be harder and some questions arise. Should logging just silently stop (not a good idea) or overwrite/delete old logs (also not perfect and harder to do)? How and when to determine how much space is already allocated/used in the db? How to deal with multiple processes/machines logging into the same db?
Because of these unclear points and increased complexity I believe a size limit should not be implemented in the SQL sink. Instead I recommend an external periodic job which moves out older logs from the db (possibly to an archive db).
But of course if someone has a clever idea for this and sends a PR, we are always happy to add good improvements to the sink.

Hello - thanks for answering my question.
I think i understand and agree with what you're saying here after reading it twice :).
It does still feel a bit weird - i'd love to log to MSSQL, but i don't want to write logic in another concern to keep the database from becoming to large - the same way it'd be weird if i had to clean up older log files in the file sink.
Just some points/braindump:

Should logging just silently stop (not a good idea) or overwrite/delete old logs (also not perfect and harder to do)? How and when to determine how much space is already allocated/used in the db?

Agreed - however if the consumers would be fine with an approximation this gets easier.
Also i can think of the following steps in a single transaction:

Insert rows
Grab the table size (Permissions? performance?)
Loop rows in DESC order on the timestamp until table size is below the limit (performance?)

Btw: there's a way to get the data size of a column: https://docs.microsoft.com/en-us/sql/t-sql/functions/datalength-transact-sql?view=sql-server-ver15
A row limit would be easier/ faster, and the consumer could make do with a little calculation to approximate database size (based on their log size per day for example).

How to deal with multiple processes/machines logging into the same db?

Welp the same way we'd handle normal tables and multiple processes, with transactions i suppose, drop old logs an insert new ones in a single transaction would do i think.
Anyhow - i know enough, thanks again for taking some time to answer me and i'll go ahead and close the issue.


GPS location tracking on pages other than MapCtrl

Go over all the controllers individually, see if any of them use the GPS tick of getCurrentPosition() followed by a watchPosition()
This would be appropriate for the MapCtrl to mark your own position, and for CacheNearbyCtrl to cache near your position, but likely not anybody else.

Didn't need anything, all good here.


fix(lib): Reduced merge check strictness

The merge message check is too strict. It fails auto merge commit messages because they don't
include the word into

Current coverage is 100.00%

Merging #34 into master will not affect coverage as of 5892048

@@            master     #34   diff @@
======================================
  Files            1       1
  Stmts           88      88
  Branches         0       0
  Methods          0       0
======================================
  Hit             88      88
  Partial          0       0
  Missed           0       0

Review entire Coverage Diff as of 5892048

Powered by Codecov. Updated on successful CI builds.

:+1:


All tables should have consistent output / layout.

/kind feature

Which functionality do you think we should add?
For output such as this:
~/odo-quickstart/backend  main ✗                                                                                119d ◒
▶ odo url list
Found the following URLs for component java
NAME     STATE          URL                      PORT     SECURE     KIND
java     Not Pushed     http://java.k8s.land     8080     false      ingress
There are local changes. Please run 'odo push'.

Is not consistent throughout odo with other tables.
There should be a consistent LAYOUT that is used for all tables.
For example:
NAME     STATE          URL                      PORT     SECURE     KIND

The first table row should be BOLDED to make output easier to read.
The output of:
There are local changes. Please run 'odo push'.

Should also be ITALIC.
So the layout of all outputs for data tables in odo should be:
~/odo-quickstart/backend  main ✗                                                                                119d ◒
▶ odo url list
Found the following URLs for component java: (BLURB ENDING WITH A COLON)

NAME     STATE          URL                      PORT     SECURE     KIND (BOLD)
java     Not Pushed     http://java.k8s.land     8080     false      ingress

There are local changes. Please run 'odo push'. (ITALIC)

Why is this needed?
More UI / UX consistency throughout odo

not valid for v3 anymore, we are reworking all outputs
/close


Vulnerability roundup 84: nginx-1.18.0: 1 advisory

search, files

[ ] CVE-2020-12440 CVSSv3=6.5 (nixos-unstable)

Scanned versions: nixos-unstable: 0f5ce2fac0c. May contain false positives.

The linked CVE page reads:

REJECTED
This vulnerability has been rejected by the source.


Goodwe inverter status shows values related to different inverter

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
In v3.8.0 the new Goodwe inverter status was introduced. However, It now returns strings based on Sunsynk codes. the code 0 returns string 'Standby' instead of 'Wait mode'.  Example:

Steps To Reproduce

change to inverter model to Goodwe
set inverter_status_59 to sensor.work_mode_code

Expected behaviour
the code 0 returns string 'Wait mode'
Card Version
v3.8.0
Home Assistant Version
11.1
Configuration
# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes
  extra_module_url:
    - /hacsfiles/lovelace-card-mod/card-mod.js

lovelace:
  resources:
    - url: /hacsfiles/lovelace-multiple-entity-row/multiple-entity-row.js
      type: module

# Text to speech
tts:
  - platform: google_translate

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
rest: !include rest.yaml

homeassistant:
  name: Home
  unit_system: metric
  customize:
    sensor.brandt_washer_energy:
      device_class: energy
      unit_of_measurement: kWh
sensor:
  - platform: time_date
    display_options:
      - 'time'
      - 'date'
      - 'date_time'
      - 'date_time_utc'
      - 'date_time_iso'
      - 'time_date'
      - 'time_utc'
      - 'beat'
  - platform: average
    name: 'inverter power avg'
    duration: 10
    precision: 0
    entities:
      - sensor.goodwe_consumption

Relevant log output
No response

Is standby not equivalent to wait-mode?

Is standby not equivalent to wait-mode?

yes, it is equivalent. just that your doc says ´wait-mode' for goodwe, which is does not match the current state

I think the confusion there is the expected sensor input i.e. 0,1,2,3,4,5 or Wait mode, Normal (On-Grid), Normal (Off-Grid), Fault Mode, Flash Mode, Check Mode vs how it is displayed no the card. For simplicity I mapped the sensor states to display:
states: ['0', 'Wait Mode'] --> Standby
states: ['1', '2', 'Normal (On-Grid)', 'Normal (Off-Grid)'] --> Normal
states: ['3', 'Fault Mode'] --> Fault
states: ['4', 'Flash Mode'] --> Flash
states: ['5', 'Check Mode'] --> Check
I think this is a good representation. I'll try make the docs clearer

it makes sense. thanks for creating this excellent card !!