You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
46: add confidence checks to mitigate race conditions [semver:minor] r=eddiewebb a=eddiewebb
### Checklist
<!--
thank you for contributing to CircleCI Concurrency Control Orb!
before submitting your request, please go through the following
items and place an x in the [ ] if they have been completed
-->
- [x] All new jobs, commands, executors, parameters have descriptions
- [ ] Examples have been added for any significant new features
- [ ] README has been updated, if necessary
### Motivation, issues
this helps mitigate the issue in #26 by adding redundant checks before allowing job to proceed
### Description
add confidence threshold to repeat running job check.
Co-authored-by: Eddie Webb <[email protected]>
Copy file name to clipboardExpand all lines: src/commands/until_front_of_line.yml
+16-9Lines changed: 16 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,6 @@ parameters:
3
3
type: boolean
4
4
default: true
5
5
description: "Should we only consider jobs running on the same branch?"
6
-
consider-job:
7
-
type: boolean
8
-
# deprecated, do not use
9
-
description: "Deprecated. Please see block-workflow."
10
-
default: true
11
6
block-workflow:
12
7
type: boolean
13
8
# this is false at COMMAND level as intention is to only block CURRENT job.
@@ -29,6 +24,10 @@ parameters:
29
24
type: string
30
25
default: "github"
31
26
description: "Override VCS to 'bitbucket' if needed."
27
+
confidence:
28
+
type: string
29
+
default: "1"
30
+
description: "Due to scarce API, we need to requery the recent jobs list to ensure we're not just in a pending state for previous jobs. This number indicates the threhold for API returning no previous pending jobs. Default is a single confirmation."
32
31
steps:
33
32
- run:
34
33
name: Queue Until Front of Line
@@ -101,7 +100,7 @@ steps:
101
100
load_current_workflow_values
102
101
103
102
# falsey parameters are empty strings, so always compare against 'true'
Copy file name to clipboardExpand all lines: src/jobs/block_workflow.yml
+7-8Lines changed: 7 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,6 @@ parameters:
3
3
type: boolean
4
4
default: true
5
5
description: "Should we only consider jobs running on the same branch?"
6
-
consider-job:
7
-
type: boolean
8
-
# deprecated, do not use.
9
-
default: false
10
-
description: "Deprecated. Please see block-workflow."
11
6
block-workflow:
12
7
type: boolean
13
8
# this is true at JOB level as intention is to block workflow
@@ -24,20 +19,24 @@ parameters:
24
19
only-on-branch:
25
20
type: string
26
21
default: "*"
27
-
description: "Only queue on specified branch"
22
+
description: "Only queue on specified branch. Default is to enforce serialization on all branches."
28
23
vcs-type:
29
24
type: string
30
25
default: "github"
31
26
description: "Override VCS to 'bitbucket' if needed."
27
+
confidence:
28
+
type: string
29
+
default: "1"
30
+
description: "Due to scarce API, we need to requery the recent jobs list to ensure we're not just in a pending state for previous jobs. This number indicates the threhold for API returning no previous pending jobs. Default is a single confirmation."
32
31
33
32
docker:
34
-
- image: circleci/node:10 #its just really popular, and therefore fast (cached)
0 commit comments