fix(cicd): fetch origin/main for Nx affected in Frontend Unit Tests - #37231
Merged
Conversation
Merge Group Test / Frontend Unit Tests runs nx affected lint-test (-Pvalidate), which diffs against origin/main (core-web/pom.xml git.origin.branch). The shallow fetch-depth:1 checkout added for #37178 has no origin/main ref, so the job fails: fatal: ambiguous argument 'origin/main': unknown revision which cancels every other job in the merge group. Fetch just that ref, shallow, before the lint-test step runs. Refs #37178
KevinDavilaDotCMS
approved these changes
Aug 26, 2026
Contributor
|
Claude finished @wezell's task in 1m 21s —— View job Code Review: fetch origin/main for Nx affectedTask list
The fix is correct and well-scoped. I traced the root cause through
The added step (lines 261–266) resolves this correctly:
New IssuesNo blocking issues. Notes (non-blocking)
The change matches the existing shallow-checkout rationale in the surrounding comments and needs no modification. · |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Merge Group Test / Frontend Unit Tests fails on every merge-group run:
nx affected(lint-test,-Pvalidate) diffs againstorigin/main(
core-web/pom.xmlgit.origin.branch), but the shallowfetch-depth: 1checkout landed for #37178 leaves no
origin/mainref, so Maven'sexec:exec@lint-testexits 1. That fails the job, which cancels everyother job in the merge group and blocks the queue.
Run: https://github.com/dotCMS/core/actions/runs/32915658690/job/98021660180
Fix
Fetch just
origin/main, shallow, before the lint-test step — only forthe suite that actually runs
nx affected(-Pvalidate).Fixes #37178
Test plan