Class ApprovalQueueDecisionHandler
- All Implemented Interfaces:
ExtensionPoint
Queue.QueueDecisionHandler, so approval-required jobs are controlled at one point.
Decision order:
- run control off or task not a job → pass;
- job not approval-required: a human submission (user, CLI, Replay, approved request) passes; anything else continues at the timer step (D-46a);
- approval marker present → validate and consume it (D-23), pass or refuse quietly;
- Pipeline Replay → refuse and record it; a person on the Replay page gets the refusal page and the CLI a one-line error (e2e-03 DEF-16, DEF-14), anything else is refused quietly;
- remote (build-token) cause → refuse and record the attempt (S-14); inside an HTTP request the caller gets a plain-text 403 (DEF-33/34), elsewhere the refusal is quiet;
- user-originated causes (UserIdCause, incl. the CLI subtype, and the deprecated
UserCause, #37) → throw
Failurewith guidance and a link to the request screen (no silent failure, PoC finding D-1); - automatic retry → judged by the retried build's causes; a retry of an approved or manual run is refused quietly;
- timer cause → pass unless
blockTimer, refused quietly (unattended) and recorded; what the setting lets through must also be activated (SPEC item 6a); - upstream cause → D-16 policy: pass unless
blockUpstream; withblockUpstreamonly allow-listed upstream jobs pass, an empty/unset list blocks all; refused quietly (unattended, the upstream build surfaces the failure) and recorded; what the setting lets through must also be activated (SPEC item 6a); - SCM causes and anything unknown/empty → pass only if activated (D-46b).
Steps from the timer step on apply to every job, with or without the job property and
whatever approvalRequired says; a computed child's activation is carried by its
computed-folder ancestor (D-46).
D-82: a job's sub-item (a matrix configuration, a Maven module) is judged by its parent job's approval property and activation; a run of it started by the parent's run in progress passes (step 1b), since the parent's run passed this gate itself.
A quiet refusal of a timer, upstream, SCM, unclassified or Replay submission writes a
ChangeType.TRIGGER_BLOCKED record, coalesced per job and cause kind to one per
TRIGGER_AUDIT_INTERVAL through BlockedAttemptAudit. The append is the only
store I/O on this path and it touches one file under that file's own lock stripe, so it
never waits behind retention or any other bulk work.
D-72: a refused submission never reaches the queue, so no queue listener deletes the
temporary files of its file parameter values. When a person's own submission (step 4, the D-60
path) or a build-token submission (step 3) is refused, those files are disposed of before the
refusal is thrown (disposeOwnValues(hudson.model.Job<?, ?>, java.util.List<hudson.model.Cause>, java.util.List<hudson.model.Action>)); re-runs, marker and unattended submissions are
left alone, since their values may belong to another build.
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class hudson.model.Queue.QueueDecisionHandler
all
-
Constructor Details
-
ApprovalQueueDecisionHandler
public ApprovalQueueDecisionHandler()
-
-
Method Details
-
shouldSchedule
- Specified by:
shouldSchedulein classQueue.QueueDecisionHandler
-