Skip to content

Conversation

@PeterDaveHello
Copy link
Member

Description

Fixes issues in the automatic update workflow that caused broken PRs with YARN_VERSION=0.0.0 and empty PR titles.

Changes:

  1. update.sh: Preserve existing YARN_VERSION from current Dockerfile when SKIP=true instead of leaving template placeholder
  2. build-automation.mjs: Skip versions without musl builds instead of exiting early; only exit after loop if no versions were updated
  3. automatic-updates.yml: Add condition to skip PR creation when result is empty

Motivation 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 placeholder 0.0.0 was written to Dockerfiles instead of preserving the existing yarn version. This was a regression from commit 61380fa.

  • Partial updates / empty PR titles: build-automation.mjs would process.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

  • Ran ./update.sh -s 24 bookworm - verified YARN_VERSION preserved (not 0.0.0)
  • node --check build-automation.mjs - syntax valid
  • shellcheck update.sh - no errors
  • shfmt -d -sr -i 2 -ci update.sh - formatting check passed

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING.md document.
  • All new and existing tests passed.

- Preserve existing YARN_VERSION when running update.sh with -s flag
  instead of leaving template placeholder (0.0.0) in Dockerfiles
- Change build-automation.mjs to skip versions without musl builds
  instead of exiting early, preventing partial updates
- Add condition to workflow to skip PR creation when no versions
  were updated, preventing empty PR titles

Fixes issues seen in PRs #2341, #2347, #2350 where automation produced
Dockerfiles with YARN_VERSION=0.0.0 and/or empty PR titles.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request fixes critical issues in the automatic update workflow that were causing broken PRs with incorrect YARN_VERSION values and empty PR titles. The changes ensure that security updates preserve existing Yarn versions, the automation script processes all available Node.js versions even when some lack musl builds, and PR creation is skipped when no updates are available.

Changes:

  • Fixed update.sh to preserve existing YARN_VERSION from Dockerfiles during security updates (SKIP=true mode) instead of leaving the template placeholder 0.0.0
  • Updated build-automation.mjs to continue processing all versions when musl builds are unavailable, only exiting if no versions were successfully updated
  • Added workflow condition to prevent creating PRs with empty titles when no updates are produced

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
update.sh Preserves existing YARN_VERSION when SKIP=true by extracting it from the current Dockerfile before replacement
build-automation.mjs Changes early exit on missing musl builds to continue loop; only exits after processing all versions if none were updated
.github/workflows/automatic-updates.yml Adds condition to skip PR creation when automation script returns empty result

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants