Some checks are pending
Go Benchmark / Performance Regression Check (push) Waiting to run
Cerberus Integration / Cerberus Security Stack Integration (push) Waiting to run
Upload Coverage to Codecov / Backend Codecov Upload (push) Waiting to run
Upload Coverage to Codecov / Frontend Codecov Upload (push) Waiting to run
CodeQL - Analyze / CodeQL analysis (go) (push) Waiting to run
CodeQL - Analyze / CodeQL analysis (javascript-typescript) (push) Waiting to run
CrowdSec Integration / CrowdSec Bouncer Integration (push) Waiting to run
Docker Build, Publish & Test / build-and-push (push) Waiting to run
Docker Build, Publish & Test / Security Scan PR Image (push) Blocked by required conditions
Quality Checks / Auth Route Protection Contract (push) Waiting to run
Quality Checks / Codecov Trigger/Comment Parity Guard (push) Waiting to run
Quality Checks / Backend (Go) (push) Waiting to run
Quality Checks / Frontend (React) (push) Waiting to run
Rate Limit integration / Rate Limiting Integration (push) Waiting to run
Security Scan (PR) / Trivy Binary Scan (push) Waiting to run
Supply Chain Verification (PR) / Verify Supply Chain (push) Waiting to run
WAF integration / Coraza WAF Integration (push) Waiting to run
3.9 KiB
Executable File
3.9 KiB
Executable File
CI Pipeline Optimization Plan
1. Introduction
Overview:
This plan optimizes the CI pipeline dependency graph so the e2e job starts as early as possible, while preserving quality gates. The primary change is to decouple lint from build-image, allowing both to run in parallel after setup completes.
Objectives:
- Start
e2eas soon asbuild-imagefinishes. - Keep
lintas a required gate viapipeline-gate. - Preserve existing security scan behavior, especially early/parallel execution of
security-codeql.
2. Research Findings
Existing workflow file:
Current dependency graph (relevant):
setuphas no needs (fast input normalization).linthas no needs.build-imageneedslintandsetup.e2eneedsbuild-image.pipeline-gateneedslint,build-image,integration-gate,e2e-gate,coverage-gate,codecov-gate,security-gate.security-codeqlhas no needs and runs early/parallel.
Observation:
build-imageis unnecessarily serialized behindlint, delaying downstream jobs (e2e, integrations, security image scans).security-codeqlalready runs independently and should remain so.
3. Technical Specifications
3.1 Dependency Graph Changes
Target behavior:
lintruns in parallel withsetupandbuild-image.build-imagedepends only onsetup.e2econtinues to depend onbuild-image.pipeline-gatecontinues to enforcelintsuccess.security-codeqlremains withoutneeds.
Proposed change:
- Update
build-image.needsto only includesetup.
3.2 EARS Requirements
- WHEN the CI pipeline runs, THE SYSTEM SHALL start
build-imageaftersetupcompletes, without waiting forlint. - WHEN
build-imagecompletes successfully, THE SYSTEM SHALL starte2eas soon as it is scheduled. - WHEN
lintfails, THE SYSTEM SHALL block the pipeline viapipeline-gateeven ife2eorbuild-imagesucceed. - WHEN security scans are enabled, THE SYSTEM SHALL run
security-codeqlin parallel with other jobs without dependency onsetup,lint, orbuild-image.
3.3 Error Handling and Edge Cases
- If
setupfails,build-imageand its dependents must not run (existing behavior preserved). - If
lintfails butbuild-imageande2esucceed,pipeline-gatemust still fail. - If
security-codeqlis skipped (e.g., forked PR),security-gatemust continue to interpret skip correctly (no change).
3.4 Risks and Mitigations
| Risk | Impact | Mitigation |
|---|---|---|
build-image could start before lint detects issues |
Failing lint might occur after expensive build/test work | pipeline-gate still enforces lint success; cost is acceptable for speed |
Misconfigured needs graph causes unintended skips |
Downstream jobs might not run | Only remove lint from build-image.needs; do not change other gates |
4. Implementation Plan
Phase 1: Playwright Tests (Behavioral Expectations)
- No Playwright changes are required for this CI optimization. Confirm
e2eworkflow reuse remains unchanged.
Phase 2: Backend Implementation
- Not applicable.
Phase 3: Frontend Implementation
- Not applicable.
Phase 4: Integration and Testing
- Validate the dependency graph in
ci-pipeline.ymllocally by reasoning and optional dry-run (no CI execution in this plan). - Confirm
security-codeqlretains noneeds.
Phase 5: Documentation and Deployment
- Update this plan only (no documentation changes elsewhere).
5. Acceptance Criteria
- DoD: CI dependency graph reflects
build-imagedepending only onsetup. - DoD:
lintremains a required gate inpipeline-gate. - DoD:
security-codeqlcontinues to run early/parallel (noneeds). - DoD:
e2estill depends onbuild-imageonly.
6. Complexity and Impact
- Complexity: Low
- Impact: Moderate CI speed-up for E2E and integration jobs