fix(pipeline): scope canonical nodes to configured repos, group fallback for others#1189
Conversation
…ack for others The canonical Build/Tests/Quality catalog is Artemis-shaped and global, so other repos (e.g. ls1intum/Helios) showed an all-pending skeleton and lost their workflow-group view. Gate the canonical catalog to helios.pipeline.repositories (default: ls1intum/Artemis); every other repository falls back to its WorkflowGroup-based pipeline (built into the same PipelineDto), preserving prior behaviour. No repo context -> empty pipeline. Guarded by PipelineIT (canonical repo, non-canonical fallback, no-context empty). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | ✅ 18 (≤ 20 complexity) |
🟢 Coverage 75.47% diff coverage · +0.10% coverage variation
Metric Results Coverage variation ✅ +0.10% coverage variation (-1.00%) Diff coverage ✅ 75.47% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (db66dc8) 15605 8263 52.95% Head commit (32a5daa) 15656 (+51) 8305 (+42) 53.05% (+0.10%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#1189) 53 40 75.47% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Pull request overview
This PR prevents non-Artemis repositories from being forced into the global “canonical” Build/Tests/Quality pipeline skeleton by scoping that catalog to an allow-list of repositories, and falling back to the previous workflow-group/run-based pipeline for all other repos.
Changes:
- Added
helios.pipeline.repositories(nameWithOwner allow-list) to decide whether a repository renders the canonical node catalog. - Updated
PipelineServiceto route between canonical node aggregation and a workflow-group/run fallback pipeline for non-canonical repositories. - Extended
PipelineITto cover canonical, non-canonical fallback, and no-repository-context behaviors; updated default config accordingly.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| server/application-server/src/main/java/de/tum/cit/aet/helios/workflow/pipeline/PipelineService.java | Routes pipeline building between canonical aggregation and workflow-group/run fallback based on repo allow-list. |
| server/application-server/src/main/java/de/tum/cit/aet/helios/workflow/pipeline/PipelineProperties.java | Adds repositories allow-list to the pipeline configuration properties. |
| server/application-server/src/main/resources/application.yml | Introduces default helios.pipeline.repositories: ["ls1intum/Artemis"]. |
| server/application-server/src/test/java/de/tum/cit/aet/helios/workflow/pipeline/PipelineIT.java | Updates integration test coverage for canonical vs fallback behavior and empty pipeline without repo context. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| public PipelineDto getPipelineForBranch(String branchName) { | ||
| return build(workflowRunService.getLatestWorkflowRunsByBranchAndHeadCommitSha(branchName)); | ||
| return buildFor(workflowRunService.getLatestWorkflowRunsByBranchAndHeadCommitSha(branchName)); | ||
| } |
| public PipelineDto getPipelineForPullRequest(Long pullRequestId) { | ||
| return build( | ||
| return buildFor( | ||
| workflowRunService.getLatestWorkflowRunsByPullRequestIdAndHeadCommit(pullRequestId)); | ||
| } |
| @ConfigurationProperties(prefix = "helios.pipeline") | ||
| public record PipelineProperties(List<Category> categories) { | ||
| public record PipelineProperties(List<String> repositories, List<Category> categories) { | ||
|
|
Why
The canonical Build/Tests/Quality catalog (#1187) is global and Artemis-shaped. Helios is multi-tenant (staging tracks
ls1intum/Artemisandls1intum/Helios), so any repo whose CI job names don't match — e.g. Helios's ownLinting Server (Java),server-tests,Validate OpenAPI Spec— would show all 7 nodes stuck PENDING and lose its previous workflow-group view. This is Option A: stop that regression before the prod release.What
helios.pipeline.repositories(nameWithOwner allow-list; default[ls1intum/Artemis]). Only listed repos render the canonical catalog.WorkflowGroup-based pipeline — groups as categories, workflow runs as nodes, plus the "Ungrouped" bucket — built into the samePipelineDto, so the client is unchanged.The API contract and client are unchanged; this is server-internal routing + one config key.
Tests
PipelineIT: canonical repo aggregates jobs into Build/Tests/Quality; non-canonical repo falls back to its runs (not the catalog); no-context → empty. Full pipeline + context-boot suite green.Follow-up
The longer-term design (default Build→Test→Quality for all repos with per-repo DB config + auto-detection) is planned separately; this PR is the interim non-regression fix.
🤖 Generated with Claude Code