Skip to content
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

Windows: tweak LTSC2022 nightly image creation #442

Merged
merged 1 commit into from
Feb 19, 2025

Conversation

compnerd
Copy link
Member

  • Use HTTPS for the latest download info.
  • Immediately convert from JSON to help make failures more understandable.
  • Perform the JSON conversion once to avoid repeated parsing.

- Use HTTPS for the latest download info.
- Immediately convert from JSON to help make failures more
  understandable.
- Perform the JSON conversion once to avoid repeated parsing.
@compnerd compnerd requested a review from shahmishal as a code owner February 19, 2025 18:50
@compnerd
Copy link
Member Author

@swift-ci please test

@shahmishal shahmishal merged commit 9b1eb12 into swiftlang:main Feb 19, 2025
1 of 2 checks passed
@compnerd compnerd deleted the url branch February 20, 2025 01:50
@weliveindetail
Copy link
Member

weliveindetail commented Feb 24, 2025

@compnerd Looks like this change broke the xInfrastructure docker bot:

 ConvertFrom-Json : Cannot bind argument to parameter 'InputObject' because it is null.
At line:1 char:221
  + ... org/development/windows10/$($($env:Release | ConvertFrom-JSON).dir)/$ ...
  +                                                  ~~~~~~~~~~~~~~~~
      + CategoryInfo          : InvalidData: (:) [ConvertFrom-Json], ParameterBindingValidationException
      + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.ConvertFromJsonCommand

Attaching the full log here: xInfrastructure-docker-41.log

@compnerd
Copy link
Member Author

@weliveindetail that seems odd - this change removes the referenced code 🤔

@weliveindetail
Copy link
Member

Oh right! Interesting, the checkout was fine and the subsequent commit didn't touch this code. And still, the build was running the old code?

It turns out that CI is running a different Dockerfile, which wasn't updated: /~https://github.com/compnerd/swift-docker/blob/ac4d1fe17ceedb2194ebcd5ac6beef5cbcda8245/nightly-main/windows/1809/Dockerfile#L132

But why does the old code fail now? I compared to the previous (successful) build. The same RUN line worked well there. There was no other change in the meantime. If the URL is not reachable, we should get a 404 as HTML code, and ConvertFrom-JSON would complain with Invalid JSON primitive.

Not sure what the issue is. Maybe an internal error in curl.exe? I can reproduce the error output locally like this, but we should see error output from curl.exe as well and we don't have that in the logs:

PS S:\> $env:Release = curl.exe -sL ${env:INVALID}
curl: (2) no URL specified
curl: try 'curl --help' for more information

PS S:\> $env:Release | ConvertFrom-JSON
ConvertFrom-Json : Cannot bind argument to parameter 'InputObject' because it is null.
At line:1 char:16
+ $env:Release | ConvertFrom-JSON
+                ~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [ConvertFrom-Json], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.ConvertFromJsonCommand      

Furthermore, the PR-test for this patch failed, but it seems unrelated: https://ci.swift.org/job/pr-swift-docker/156/

weliveindetail added a commit to weliveindetail/swift-docker that referenced this pull request Feb 25, 2025
@weliveindetail
Copy link
Member

The next build failed with the same error: xInfrastructure-docker-42.log Only difference is the checkout from /~https://github.com/apple/swift-continuous-integration-library, that I have no access to:

--- xInfrastructure-docker-41.log
+++ xInfrastructure-docker-42.log
@@ -14,4 +14,4 @@
  > git config core.sparsecheckout # timeout=10
- > git checkout -f a9bd1bcd3594200f230a5aa70dcb8d423ad7c4ae # timeout=10
-Commit message: "Update macOSNewXcodeJob.groovy"
+ > git checkout -f ff79c48990546dbbfdae5c96eecb60f3ed8cf2d4 # timeout=10
+Commit message: "Add support for build command"
 [Pipeline] Start of Pipeline

Assuming for now that the issue originates from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants