refactor(release-pipeline): Ignore permissions from pipeline & better modifications - #6246
Conversation
…& build via pipeline
Greptile SummaryThis PR threads an
Confidence Score: 4/5Two P1 gaps mean the permissions bypass is incomplete — the most common runtime path and a separate pipeline task both still insert DeployCandidateBuild with full permission checks. The refactor correctly wires ignore_permissions_check through most of the chain, but the immediate build_and_deploy() path (the normal production path when not suspended) and the initiate_pre_build_validations task both miss the flag. These are present defects on the hot path, not theoretical risks. press/press/doctype/deploy_candidate/deploy_candidate.py (build_and_deploy helper) and press/press/doctype/release_pipeline/release_pipeline.py (initiate_pre_build_validations task). Important Files Changed
Sequence DiagramsequenceDiagram
participant RP as ReleasePipeline
participant BU as BenchUpdate
participant RG as ReleaseGroup
participant DC as DeployCandidate
participant DCB as DeployCandidateBuild
RP->>BU: get_bench_update(..., ignore_permissions_check=True)
BU->>BU: insert(ignore_permissions=True)
RP->>BU: deploy(..., ignore_permissions_check=True)
BU->>RG: create_deploy_candidate(..., ignore_permissions_check=True)
RG->>DC: new_dc.insert(ignore_permissions=True) ✅
BU->>DC: schedule_build_and_deploy(ignore_permissions_check=True)
alt run_now=True AND not suspended (hot path)
DC->>DCB: build_and_deploy() → insert() ❌ NO ignore_permissions
else scheduled / suspended
DC->>DCB: insert(ignore_permissions=True) ✅
end
RP->>DC: initiate_pre_build_validations()
DC->>DCB: schedule_build_and_deploy() ❌ NO ignore_permissions_check
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6246 +/- ##
============================================
- Coverage 90.75% 55.93% -34.82%
============================================
Files 109 910 +801
Lines 17369 75837 +58468
Branches 525 525
============================================
+ Hits 15763 42422 +26659
- Misses 1578 33387 +31809
Partials 28 28
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ouch the doc mid executionl
refactor(release-pipeline): Ignore permissions from pipeline & better modifications (backport #6246)
|
🎉 This PR is included in version 0.20.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Deploy Candidate