Skip to content

ci(windows): only generate hash for files in prepare-deploy.ps1 - #5072

Merged
rami3l merged 1 commit into
rust-lang:mainfrom
rami3l:ci/early-exit-prepare-pwsh
Sep 12, 2026
Merged

rami3l merged 1 commit into
rust-lang:mainfrom
rami3l:ci/early-exit-prepare-pwsh

Conversation

@rami3l

@rami3l rami3l commented Sep 12, 2026

Copy link
Copy Markdown
Member

There is a loophole that has been exposed by #5070 when switching to short-circuiting pwsh for all powershell/pwsh scripts, as suggested by @ChrisDenton in #5070 (comment).

Originally, the filtering logic for *.sha256 generation in prepare-deploy.ps1 didn't consider the fact that only files can be hashed. However, since the hashing of directories (which always fails) was silently skipped, the issue never became a CI error until today.

This patch fixes that by mirroring prepare-deploy.bash's find ... -type f more closely so that we only generate hashes for files.

cc @Cloud0310 for review.

@rami3l

rami3l commented Sep 12, 2026

Copy link
Copy Markdown
Member Author

Fix verified by the before/after comparison from:

Before

Run .\ci\prepare-deploy.ps1


    Directory: D:\a\rustup\rustup\dist


Mode                 LastWriteTime         Length Name                                                                 
----                 -------------         ------ ----                                                                 
d-----         9/10/2026  11:13 AM                x86_64-pc-windows-msvc                                               


    Directory: D:\a\rustup\rustup\dist\x86_64-pc-windows-msvc


Mode                 LastWriteTime         Length Name                                                                 
----                 -------------         ------ ----                                                                 
-a----         9/10/2026  11:13 AM       12339712 rustup-init.exe                                                      
-a----         9/10/2026  11:13 AM             65 rustup-init.exe.sha256                                               
-a----         9/10/2026  11:13 AM       12339712 rustup-setup.exe                                                     
-a----         9/10/2026  11:13 AM             65 rustup-setup.exe.sha256                                              

https://github.com/rust-lang/rustup/actions/runs/34469571059/job/102846049919

After

Run .\ci\prepare-deploy.ps1

    Directory: D:\a\rustup\rustup\dist

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d----           9/12/2026  8:06 AM                x86_64-pc-windows-msvc

    Directory: D:\a\rustup\rustup\dist\x86_64-pc-windows-msvc

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---           9/12/2026  8:06 AM       12339712 rustup-init.exe
-a---           9/12/2026  8:06 AM             65 rustup-init.exe.sha256
-a---           9/12/2026  8:06 AM       12339712 rustup-setup.exe
-a---           9/12/2026  8:06 AM             65 rustup-setup.exe.sha256

https://github.com/rust-lang/rustup/actions/runs/34682121072/job/103522556812?pr=5072

@rami3l
rami3l requested a review from ChrisDenton September 12, 2026 08:28
@rami3l
rami3l force-pushed the ci/early-exit-prepare-pwsh branch from 1b1e57c to 848da40 Compare September 12, 2026 08:28
@rami3l
rami3l requested a review from djc September 12, 2026 08:28
@rami3l
rami3l marked this pull request as ready for review September 12, 2026 08:29
@Cloud0310

Copy link
Copy Markdown
Contributor

LGTM

@rami3l
rami3l added this pull request to the merge queue Sep 12, 2026
Merged via the queue into rust-lang:main with commit 9f09356 Sep 12, 2026
32 checks passed
@rami3l
rami3l deleted the ci/early-exit-prepare-pwsh branch September 12, 2026 11:27
@ChrisDenton

Copy link
Copy Markdown
Member

Thanks for following up on this!

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.

4 participants