-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GitHub Actions Windows: Invalid --only='""' (fixed in 2.16.5) #1740
Comments
The upgrade to PowerShell 7.4.x actions/runner-images#9115 might be the cause here. The older version is 7.2.x and PowerShell 7.4 changed how arguments are escaped. In particularly how double quotes are treated in an argument value has changed. For example the first example was run with pwsh 7.2.18 while the second example with 7.4.1. PS C:\Users\vagrant-domain\Downloads\PowerShell-7.2.18-win-x64> C:\temp\print_argv.exe --option '""'
"C:\temp\print_argv.exe" --option ""
[0] --option
[1]
PS C:\Users\vagrant-domain\Downloads\PowerShell-7.4.1-win-x64> C:\temp\print_argv.exe --option '""'
"C:\temp\print_argv.exe" --option "\"\""
[0] --option
[1] "" There are three things you can do to go back to the old behaviour:
PS C:\Users\vagrant-domain\Downloads\PowerShell-7.4.1-win-x64> $PSNativeCommandArgumentPassing
Windows
PS C:\Users\vagrant-domain\Downloads\PowerShell-7.4.1-win-x64> C:\temp\print_argv.exe --option '""'
"C:\temp\print_argv.exe" --option "\"\""
[0] --option
[1] ""
PS C:\Users\vagrant-domain\Downloads\PowerShell-7.4.1-win-x64> C:\temp\print_argv.exe --option ''
"C:\temp\print_argv.exe" --option ""
[0] --option
[1]
PS C:\Users\vagrant-domain\Downloads\PowerShell-7.4.1-win-x64> $PSNativeCommandArgumentPassing = 'Legacy'
PS C:\Users\vagrant-domain\Downloads\PowerShell-7.4.1-win-x64> C:\temp\print_argv.exe --option '""'
"C:\temp\print_argv.exe" --option ""
[0] --option
[1] Adding further fuel to that suggestion I can see the runner version of a working build is Image: windows-2022
Version: 20240122.1.0
Included Software: https://github.com/actions/runner-images/blob/win22/20240122.1/images/windows/Windows2022-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/win22%2F20240122.1 Image: windows-2022
Version: 20240128.1.0
Included Software: https://github.com/actions/runner-images/blob/win22/20240128.1/images/windows/Windows2022-Readme.md
Image Release: https://github.com/actions/runner-images/releases/tag/win22%2F20240128.1 |
Does anyone remember/know why we double quote on powershell in the first place? I added it in #1346 but not sure it's needed, at least for non-paths. I think it might have been needed for paths with spaces? |
The problem with |
Yep see my 3 workarounds in #1740 (comment). Essentially the new quoting rules will pass through the actual value that was bound in the pwsh binder and an empty string value will be quoted. You either need to change the code (and break 7.2 compatbility), revert back to the old argument quoting rules, or handle a double quote literal value in the Python argparse code. I went with option 2 in my PR because it is the simplest one available. |
According to the docs, we could just use Python as a shell instead...? Though I can't remember the issue with Meson that's mentioned in the comment here. |
You need cmd or powershell to get MSVC properly configured. If you run from other places, you get GCC instead. This affects other build systems too unless they look up MSVC via the registry. |
Related pypa/cibuildwheel#1740 Co-authored-by: Aleksei Stepanov <alekseis@nvidia.com>
Bump to the latest cibuildwheel to fix Windows builds. See more about the issue: pypa/cibuildwheel#1740 ## Checklist - [x] Change(s) are motivated and described in the PR description - [x] Testing strategy is described if automated tests are not included in the PR - [x] Risks are described (performance impact, potential for breakage, maintainability) - [x] Change is maintainable (easy to change, telemetry, documentation) - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed or label `changelog/no-changelog` is set - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)) - [x] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) - [x] If this PR changes the public interface, I've notified `@DataDog/apm-tees`. - [x] If change touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from `@DataDog/security-design-and-guidance`. ## Reviewer Checklist - [x] Title is accurate - [x] All changes are related to the pull request's stated goal - [x] Description motivates each change - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - [x] Testing strategy adequately addresses listed risks - [x] Change is maintainable (easy to change, telemetry, documentation) - [x] Release note makes sense to a user of the library - [x] Author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
Bump to the latest cibuildwheel to fix Windows builds. See more about the issue: pypa/cibuildwheel#1740 ## Checklist - [x] Change(s) are motivated and described in the PR description - [x] Testing strategy is described if automated tests are not included in the PR - [x] Risks are described (performance impact, potential for breakage, maintainability) - [x] Change is maintainable (easy to change, telemetry, documentation) - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed or label `changelog/no-changelog` is set - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)) - [x] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) - [x] If this PR changes the public interface, I've notified `@DataDog/apm-tees`. - [x] If change touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from `@DataDog/security-design-and-guidance`. ## Reviewer Checklist - [x] Title is accurate - [x] All changes are related to the pull request's stated goal - [x] Description motivates each change - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - [x] Testing strategy adequately addresses listed risks - [x] Change is maintainable (easy to change, telemetry, documentation) - [x] Release note makes sense to a user of the library - [x] Author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) (cherry picked from commit f2dc31f)
Bump to the latest cibuildwheel to fix Windows builds. See more about the issue: pypa/cibuildwheel#1740 ## Checklist - [x] Change(s) are motivated and described in the PR description - [x] Testing strategy is described if automated tests are not included in the PR - [x] Risks are described (performance impact, potential for breakage, maintainability) - [x] Change is maintainable (easy to change, telemetry, documentation) - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed or label `changelog/no-changelog` is set - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)) - [x] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) - [x] If this PR changes the public interface, I've notified `@DataDog/apm-tees`. - [x] If change touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from `@DataDog/security-design-and-guidance`. ## Reviewer Checklist - [x] Title is accurate - [x] All changes are related to the pull request's stated goal - [x] Description motivates each change - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - [x] Testing strategy adequately addresses listed risks - [x] Change is maintainable (easy to change, telemetry, documentation) - [x] Release note makes sense to a user of the library - [x] Author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) (cherry picked from commit f2dc31f)
Bump to the latest cibuildwheel to fix Windows builds. See more about the issue: pypa/cibuildwheel#1740 ## Checklist - [x] Change(s) are motivated and described in the PR description - [x] Testing strategy is described if automated tests are not included in the PR - [x] Risks are described (performance impact, potential for breakage, maintainability) - [x] Change is maintainable (easy to change, telemetry, documentation) - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed or label `changelog/no-changelog` is set - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)) - [x] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) - [x] If this PR changes the public interface, I've notified `@DataDog/apm-tees`. - [x] If change touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from `@DataDog/security-design-and-guidance`. ## Reviewer Checklist - [x] Title is accurate - [x] All changes are related to the pull request's stated goal - [x] Description motivates each change - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - [x] Testing strategy adequately addresses listed risks - [x] Change is maintainable (easy to change, telemetry, documentation) - [x] Release note makes sense to a user of the library - [x] Author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) (cherry picked from commit f2dc31f)
cibuildwheel 2.12.0 -> 2.16.5 As per pypa/cibuildwheel#1740
cibuildwheel 2.12.0 -> 2.16.5 As per pypa/cibuildwheel#1740
cibuildwheel had issues with newer versions of power shell. Full details: pypa/cibuildwheel#1740
cibuildwheel had issues with newer versions of power shell. Full details: pypa/cibuildwheel#1740
cibuildwheel had issues with newer versions of power shell. Full details: pypa/cibuildwheel#1740
See pypa/cibuildwheel#1740 for details
* Run CD also on push to main * Fix a small concurrency issue in workflow execution * Fix CD on Windows by bumping to CIBW v2.16.5 See pypa/cibuildwheel#1740 for details * Work around macOS's problem with std::optional::value, use macos-14 * Fix uploading and downloading artifacts See actions/upload-artifact#478 (comment) for details * Bump to v0.8.1
… failure Upstream problem reported at pypa/cibuildwheel#1740 .
Fixes Windows wheels not building (see pypa/cibuildwheel#1740).
… failure Upstream problem reported at pypa/cibuildwheel#1740 .
… failure Upstream problem reported at pypa/cibuildwheel#1740 .
2.16.2 had a bug: pypa/cibuildwheel#1740
Description
I've getting random errors when attempting to build Windows wheels using the
pypa/cibuildwheel@2.16.4
action.On a build that works I can see the same command is being run with the
--only='""'
parameter.The weird thing is that this only happens sometimes, other times the build works just fine. I know the
2.15.0
version is also affected. I only started seeing this in the last day. For example here is an older build that failed 2 times while on the 3rd it worked again https://github.com/pythongssapi/python-gssapi/actions/runs/7697806880I'm unsure whether it's my code or something else but this has worked for me for the past year or so whereas now it seems to be popping up. At a guess it might be
Build log
https://github.com/pythongssapi/python-gssapi/actions/runs/7703392610/job/20993685914?pr=341
CI config
https://github.com/pythongssapi/python-gssapi/blob/18f3e2bc5119a3621c7bc14e307ab70ce011e34f/.github/workflows/ci.yml#L123-L129
The text was updated successfully, but these errors were encountered: