fix: prevent automation from producing broken PRs #2354
+14
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes issues in the automatic update workflow that caused broken PRs with
YARN_VERSION=0.0.0and empty PR titles.Changes:
update.sh: Preserve existingYARN_VERSIONfrom current Dockerfile whenSKIP=trueinstead of leaving template placeholderbuild-automation.mjs: Skip versions without musl builds instead of exiting early; only exit after loop if no versions were updatedautomatic-updates.yml: Add condition to skip PR creation when result is emptyMotivation and Context
The automatic update workflow was producing broken PRs:
YARN_VERSION=0.0.0 bug: When running
update.sh -s(security update), the template placeholder0.0.0was written to Dockerfiles instead of preserving the existing yarn version. This was a regression from commit 61380fa.Partial updates / empty PR titles:
build-automation.mjswouldprocess.exit(0)when encountering a version without musl builds, leaving partial changes and causing empty PR titles.Related issues seen in PRs #2341, #2347, #2350.
Testing Details
./update.sh -s 24 bookworm- verified YARN_VERSION preserved (not 0.0.0)node --check build-automation.mjs- syntax validshellcheck update.sh- no errorsshfmt -d -sr -i 2 -ci update.sh- formatting check passedTypes of changes
Checklist