fix(go-pr-analysis): expose normalize_to_filter for component path collapsing - #627
Conversation
…llapsing The changed-paths composite already supports normalize-to-filter, but go-pr-analysis never wired it up, so working_dir was always the path_level-trimmed directory of each changed file. A change deeper than path_level segments inside a filtered component spawned a matrix entry rooted at that subdirectory, where no Makefile and no testable package exist: the tests job produced no coverage.txt, the upload found no file, and the coverage job failed with "Artifact not found". Default to true, mirroring frontend-pr-analysis.yml, which already exposes the same input for the same failure mode. go-pr-validation forwards it so umbrella callers can opt out.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 13 minutes Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
🔍 PR Validation Summary✅ PR Mergeable — no blocking failures
|
🔍 Lint Analysis
|
🛡️ CodeQL Analysis ResultsLanguages analyzed: ✅ No security issues found. 🔍 View full scan logs | 🛡️ Security tab |
Description
go-pr-analysis.ymlcalls thechanged-pathscomposite, which already supportsnormalize-to-filter, but never wired the input up. As a resultmatrix.app.working_dirwas always thepath_level-trimmed directory of each changed file rather than thefilter_pathsentry that owns it.Consequence: a PR whose changes sit deeper than
path_levelsegments inside a filtered component — and that touches noshared_pathsentry — spawns one matrix entry per changed subdirectory, rooted at that subdirectory. There is noMakefileand no testable package there, so:No packages found after filtering /tests/ and /api/and writes nocoverage.txt;Upload coverage artifactwarnsNo files were found with the provided path: <subdir>/coverage.txt;Coverage (<app>)job then fails withUnable to download artifact(s): Artifact not found for name: coverage-<app>.Real occurrence in
plugin-br-pix-switch(failed run) — the detected matrix was:instead of the single
apps/dict/components/hub/apicomponent that is declared infilter_paths. Earlier PRs on the same repo were green only because they happened to touch ashared_pathsentry (Makefile), which makeschanged-pathsbuild the matrix straight fromfilter_paths.This PR:
normalize_to_filterinput togo-pr-analysis.ymland forwards it to the composite;go-pr-validation.ymlumbrella so callers can opt out;docs/go-pr-analysis-workflow.mdanddocs/go-pr-validation.md.Default is
true, matchingfrontend-pr-analysis.yml, which already exposes this exact input for this exact failure mode.Known adjacent issue, deliberately out of scope
The coverage artifact is keyed as
coverage-${{ matrix.app.name }}, and several components of the same app share onematrix.app.name(it is extracted from thepath_levelsegments). Their uploads therefore collide, and eachCoveragejob grades whichever component uploaded last. Keying the artifact per component is not part of this PR because it would surface a second latent problem at the same time: components with no unit-testable package produce nocoverage.txt, which yieldscoverage=0and tripsCheck coverage threshold— today masked by exactly that collision. Fixing it requires deciding whether "no coverage produced" is a skip or a failure, so it belongs in its own PR. A follow-up issue will be opened.Type of Change
feat: New workflow or new input/output/step in an existing workflowfix: Bug fix in a workflow (incorrect behavior, broken step, wrong condition)perf: Performance improvement (e.g. caching, parallelism, reduced steps)refactor: Internal restructuring with no behavior changedocs: Documentation only (README, docs/, inline comments)ci: Changes to self-CI (workflows under.github/workflows/that run on this repo)chore: Dependency bumps, config updates, maintenancetest: Adding or updating testsBREAKING CHANGE: Callers must update their configuration after this PRBreaking Changes
None for callers' configuration — the input is additive and every existing input keeps its default.
Behavior does change for monorepo callers that set
filter_paths:working_diris now thefilter_pathsentry instead of the deeper trimmed directory, and near-duplicate matrix entries for subdirectories of the same component collapse into one. That is the intended fix. A caller that depends on the previous behavior can restore it withnormalize_to_filter: false.Testing
yamllint -c .yamllint.yml, plus a full YAML parse of both workflows — only pre-existingline-length/commentswarnings)@this-branchor the beta tagfrontend-pr-analysis.ymlalready had this input; no other workflow reads the go matrix)Caller repo / workflow run: to be validated on
LerianStudio/plugin-br-pix-switchPR #341 once this branch is available as a ref/tag — that PR is the failing case above.Related Issues
N/A