Skip to content

Conversation

@nirinchev
Copy link
Collaborator

This is related to MONGOSH-2059 where we published a homebrew formula with the incorrect sha. There doesn't seem to be anything wrong with the way we're doing these sha updates, so my best guess is that it's a case of incomplete/corrupted download from npm that caused us to compute the wrong sha256. This PR changes it so we use the shasum field from the npm API to validate the tarball integrity before publishing the formula to homebrew, as well as adds a retry mechanism to attempt to recover in case we download the wrong thing.


# Get-AuthenticodeSignature just outputs text, it doesn't exit with a non-zero
# code if the file is not signed
if grep -q NotSigned "$TMP_FILE"; then
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unrelated to MONGOSH-2059, but I noticed we don't correctly validate the signature of the package on windows, so figured I'll fix it as a drive by. Happy to move to a different PR if folks prefer a cleaner separation of changes.

@nirinchev nirinchev requested review from addaleax, Copilot and gagik March 13, 2025 15:13
@nirinchev nirinchev merged commit 3531018 into main Mar 26, 2025
128 of 134 checks passed
@nirinchev nirinchev deleted the ni/homebrew-shasum branch March 26, 2025 15:58
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.

5 participants