feat!: throw error in case of stale remote for CI mode by andrew-demb · Pull Request #4369 · lerna/lerna · GitHub
Skip to content

feat!: throw error in case of stale remote for CI mode#4369

Open
andrew-demb wants to merge 1 commit into
lerna:mainfrom
andrew-demb:3530--fail-behind-ci
Open

feat!: throw error in case of stale remote for CI mode#4369
andrew-demb wants to merge 1 commit into
lerna:mainfrom
andrew-demb:3530--fail-behind-ci

Conversation

@andrew-demb

@andrew-demb andrew-demb commented Jun 10, 2026

Copy link
Copy Markdown

Description

  • Make the upstream-behind validation consistently throw ValidationError("EBEHIND") for both interactive and CI execution paths
  • Update the VersionCommand unit tests so --ci now rejects with the same behind-upstream error as --no-ci
  • Update the publish validation integration test so CI publish rejects with EBEHIND instead of warning and exiting successfully. ​

Motivation and Context

CI runs should not silently pass when the local branch is behind its configured upstream remote. Previously, lerna version/lerna publish treated EBEHIND differently in CI mode by logging a warning and exiting successfully, which could mask stale release branches and allow pipelines to continue unexpectedly.

Fixes #3530

How Has This Been Tested?

Via running the test suite.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (change that has absolutely no effect on users)

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 document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

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.

EBEHIND should always be an error with non-zero exit code

1 participant