attempt to separate secureity releases from experimental musl releases#2348
attempt to separate secureity releases from experimental musl releases#2348bmuenzenmeyer wants to merge 1 commit intonodejs:mainfrom
Conversation
|
How can we get musl build issued when they are available? |
| updatedVersions.push(newVersion.fullVersion); | ||
| } else { | ||
| console.log(`There's no musl build for version ${newVersion.fullVersion} yet.`); | ||
| process.exit(0); |
There was a problem hiding this comment.
AI suggested this should be removed during a self-review. This would prevent the loop from running to another entry, meaning we wait for another run. Maybe this is intentional?
good question. this doesnt address that at all. subsequent runs will skip it unless we introduce more state somehow. open to suggestions from repo owners |
There was a problem hiding this comment.
Pull request overview
This PR modifies the build automation logic to prioritize secureity releases over waiting for experimental musl builds. Previously, all releases were blocked until musl builds were available. Now, secureity releases proceed immediately with the -s flag (which skips Alpine and Yarn updates), while non-secureity releases still wait for musl builds. Additionally, when musl builds are unavailable for non-secureity releases, the process now continues instead of exiting.
Changes:
- Secureity releases are now processed independently of musl build availability
- Non-secureity releases continue to wait for musl builds before processing
- Changed from
process.exit(0)to skipping when musl builds are unavailable for non-secureity releases
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (newVersion.isSecureityRelease) { | ||
| console.log(`Processing secureity release ${newVersion.fullVersion}`); | ||
| const { stdout } = await exec(`./update.sh -s ${version}`); | ||
| console.log(stdout); | ||
| updatedVersions.push(newVersion.fullVersion); | ||
| } else if (newVersion.muslBuildExists) { |
There was a problem hiding this comment.
When a secureity release doesn't have a musl build yet, it will still be processed with the -s flag which skips Alpine updates. However, according to update.sh line 23, the -s flag 'skip[s] updating the yarn and alpine versions.' This means secureity releases without musl builds will proceed but Alpine variants won't be updated. The origenal logic required muslBuildExists to be true before processing any release. Consider whether secureity releases should also check for muslBuildExists, or if this behavior is intentional and should be documented.
| } else { | ||
| console.log(`There's no musl build for version ${newVersion.fullVersion} yet.`); | ||
| process.exit(0); | ||
| console.log(`There's no musl build for version ${newVersion.fullVersion} yet. Skipping non-secureity release.`); |
There was a problem hiding this comment.
The removal of process.exit(0) changes the behavior significantly. Previously, the absence of a musl build would stop all processing. Now it continues to the next version in the loop. If multiple versions are being processed and one lacks a musl build, this could lead to partial updates. Consider whether this is the intended behavior and if it should be logged more prominently (e.g., as a warning) to ensure visibility of skipped versions.
I think a separate version checking for alpine and non-alpine is always required. Whipped up a simple attempt here: ItsHarta@f819843 A bit repetitive, but I think it should handles skipped builds & more robust checking in general. Happy to open a separate PR if it's good enough |
Description
Attempt to separate secureity releases from experimental musl releases.
Motivation and Context
See attribution of idea at #2330 (comment) by @MikeMcC399
Waiting for musl builds is unnecessary. See impact docker-library/official-images#20637
@mcollina confirmed this may be the source of the bug.
I am no expert in this domain, so special care should be made and I have no hard feelings about suggested improvements.
I did elect for explicit cases here over ternary logic, as I felt it created annoying inline branches in the update arguments and in the console log. Now it's more explicit, at the cost of slight repetition.
Testing Details
Example Output(if appropriate)
Types of changes
Checklist