Skip to content

Commit 9d179e8

Browse files
author
awstools
committed
feat(client-codepipeline): Add retryMode ALL_ACTIONS to RetryStageExecution API that retries a failed stage starting from first action in the stage
1 parent 51f316e commit 9d179e8

File tree

4 files changed

+58
-50
lines changed

4 files changed

+58
-50
lines changed

clients/client-codepipeline/src/commands/RetryStageExecutionCommand.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ export interface RetryStageExecutionCommandOutput extends RetryStageExecutionOut
3737

3838
/**
3939
* @public
40-
* <p>Resumes the pipeline execution by retrying the last failed actions in a stage. You
41-
* can retry a stage immediately if any of the actions in the stage fail. When you retry,
40+
* <p>You can retry a stage that has failed without having to run a pipeline again from the beginning. You do
41+
* this by either retrying the failed actions in a stage or by retrying all actions in the stage starting from the first action in the stage. When you retry the failed actions in a stage,
4242
* all actions that are still in progress continue working, and failed actions are
43-
* triggered again.</p>
43+
* triggered again. When you retry a failed stage from the first action in the stage, the stage cannot have any actions in progress. Before a stage can be retried, it must either have all actions failed or some actions failed and some succeeded.</p>
4444
* @example
4545
* Use a bare-bones client and the command you need to make an API call.
4646
* ```javascript
@@ -51,7 +51,7 @@ export interface RetryStageExecutionCommandOutput extends RetryStageExecutionOut
5151
* pipelineName: "STRING_VALUE", // required
5252
* stageName: "STRING_VALUE", // required
5353
* pipelineExecutionId: "STRING_VALUE", // required
54-
* retryMode: "FAILED_ACTIONS", // required
54+
* retryMode: "FAILED_ACTIONS" || "ALL_ACTIONS", // required
5555
* };
5656
* const command = new RetryStageExecutionCommand(input);
5757
* const response = await client.send(command);

clients/client-codepipeline/src/endpoint/ruleset.ts

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,27 @@ import { RuleSetObject } from "@smithy/types";
66
or see "smithy.rules#endpointRuleSet"
77
in codegen/sdk-codegen/aws-models/codepipeline.json */
88

9-
const q="required",
10-
r="fn",
11-
s="argv",
12-
t="ref";
13-
const a="isSet",
14-
b="tree",
15-
c="error",
16-
d="endpoint",
17-
e="PartitionResult",
18-
f={[q]:false,"type":"String"},
19-
g={[q]:true,"default":false,"type":"Boolean"},
20-
h={[t]:"Endpoint"},
21-
i={[r]:"booleanEquals",[s]:[{[t]:"UseFIPS"},true]},
22-
j={[r]:"booleanEquals",[s]:[{[t]:"UseDualStack"},true]},
23-
k={},
24-
l={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsFIPS"]}]},
25-
m={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsDualStack"]}]},
26-
n=[i],
27-
o=[j],
28-
p=[{[t]:"Region"}];
29-
const _data={version:"1.0",parameters:{Region:f,UseDualStack:g,UseFIPS:g,Endpoint:f},rules:[{conditions:[{[r]:a,[s]:[h]}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:h,properties:k,headers:k},type:d}]},{conditions:[{[r]:a,[s]:p}],type:b,rules:[{conditions:[{[r]:"aws.partition",[s]:p,assign:e}],type:b,rules:[{conditions:[i,j],type:b,rules:[{conditions:[l,m],type:b,rules:[{endpoint:{url:"https://codepipeline-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[l],type:b,rules:[{endpoint:{url:"https://codepipeline-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[m],type:b,rules:[{endpoint:{url:"https://codepipeline.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{endpoint:{url:"https://codepipeline.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"Invalid Configuration: Missing Region",type:c}]};
9+
const s="required",
10+
t="fn",
11+
u="argv",
12+
v="ref";
13+
const a=true,
14+
b="isSet",
15+
c="booleanEquals",
16+
d="error",
17+
e="endpoint",
18+
f="tree",
19+
g="PartitionResult",
20+
h={[s]:false,"type":"String"},
21+
i={[s]:true,"default":false,"type":"Boolean"},
22+
j={[v]:"Endpoint"},
23+
k={[t]:c,[u]:[{[v]:"UseFIPS"},true]},
24+
l={[t]:c,[u]:[{[v]:"UseDualStack"},true]},
25+
m={},
26+
n={[t]:"getAttr",[u]:[{[v]:g},"supportsFIPS"]},
27+
o={[t]:c,[u]:[true,{[t]:"getAttr",[u]:[{[v]:g},"supportsDualStack"]}]},
28+
p=[k],
29+
q=[l],
30+
r=[{[v]:"Region"}];
31+
const _data={version:"1.0",parameters:{Region:h,UseDualStack:i,UseFIPS:i,Endpoint:h},rules:[{conditions:[{[t]:b,[u]:[j]}],rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:j,properties:m,headers:m},type:e}],type:f},{conditions:[{[t]:b,[u]:r}],rules:[{conditions:[{[t]:"aws.partition",[u]:r,assign:g}],rules:[{conditions:[k,l],rules:[{conditions:[{[t]:c,[u]:[a,n]},o],rules:[{endpoint:{url:"https://codepipeline-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:p,rules:[{conditions:[{[t]:c,[u]:[n,a]}],rules:[{endpoint:{url:"https://codepipeline-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:q,rules:[{conditions:[o],rules:[{endpoint:{url:"https://codepipeline.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{endpoint:{url:"https://codepipeline.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}]};
3032
export const ruleSet: RuleSetObject = _data;

clients/client-codepipeline/src/models/models_0.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4481,6 +4481,7 @@ export class NotLatestPipelineExecutionException extends __BaseException {
44814481
* @enum
44824482
*/
44834483
export const StageRetryMode = {
4484+
ALL_ACTIONS: "ALL_ACTIONS",
44844485
FAILED_ACTIONS: "FAILED_ACTIONS",
44854486
} as const;
44864487

@@ -4515,8 +4516,7 @@ export interface RetryStageExecutionInput {
45154516

45164517
/**
45174518
* @public
4518-
* <p>The scope of the retry attempt. Currently, the only supported value is
4519-
* FAILED_ACTIONS.</p>
4519+
* <p>The scope of the retry attempt.</p>
45204520
*/
45214521
retryMode: StageRetryMode | undefined;
45224522
}

codegen/sdk-codegen/aws-models/codepipeline.json

Lines changed: 29 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1906,7 +1906,6 @@
19061906
]
19071907
}
19081908
],
1909-
"type": "tree",
19101909
"rules": [
19111910
{
19121911
"conditions": [
@@ -1949,7 +1948,8 @@
19491948
},
19501949
"type": "endpoint"
19511950
}
1952-
]
1951+
],
1952+
"type": "tree"
19531953
},
19541954
{
19551955
"conditions": [
@@ -1962,7 +1962,6 @@
19621962
]
19631963
}
19641964
],
1965-
"type": "tree",
19661965
"rules": [
19671966
{
19681967
"conditions": [
@@ -1976,7 +1975,6 @@
19761975
"assign": "PartitionResult"
19771976
}
19781977
],
1979-
"type": "tree",
19801978
"rules": [
19811979
{
19821980
"conditions": [
@@ -1999,7 +1997,6 @@
19991997
]
20001998
}
20011999
],
2002-
"type": "tree",
20032000
"rules": [
20042001
{
20052002
"conditions": [
@@ -2034,7 +2031,6 @@
20342031
]
20352032
}
20362033
],
2037-
"type": "tree",
20382034
"rules": [
20392035
{
20402036
"conditions": [],
@@ -2045,14 +2041,16 @@
20452041
},
20462042
"type": "endpoint"
20472043
}
2048-
]
2044+
],
2045+
"type": "tree"
20492046
},
20502047
{
20512048
"conditions": [],
20522049
"error": "FIPS and DualStack are enabled, but this partition does not support one or both",
20532050
"type": "error"
20542051
}
2055-
]
2052+
],
2053+
"type": "tree"
20562054
},
20572055
{
20582056
"conditions": [
@@ -2066,14 +2064,12 @@
20662064
]
20672065
}
20682066
],
2069-
"type": "tree",
20702067
"rules": [
20712068
{
20722069
"conditions": [
20732070
{
20742071
"fn": "booleanEquals",
20752072
"argv": [
2076-
true,
20772073
{
20782074
"fn": "getAttr",
20792075
"argv": [
@@ -2082,11 +2078,11 @@
20822078
},
20832079
"supportsFIPS"
20842080
]
2085-
}
2081+
},
2082+
true
20862083
]
20872084
}
20882085
],
2089-
"type": "tree",
20902086
"rules": [
20912087
{
20922088
"conditions": [],
@@ -2097,14 +2093,16 @@
20972093
},
20982094
"type": "endpoint"
20992095
}
2100-
]
2096+
],
2097+
"type": "tree"
21012098
},
21022099
{
21032100
"conditions": [],
21042101
"error": "FIPS is enabled but this partition does not support FIPS",
21052102
"type": "error"
21062103
}
2107-
]
2104+
],
2105+
"type": "tree"
21082106
},
21092107
{
21102108
"conditions": [
@@ -2118,7 +2116,6 @@
21182116
]
21192117
}
21202118
],
2121-
"type": "tree",
21222119
"rules": [
21232120
{
21242121
"conditions": [
@@ -2138,7 +2135,6 @@
21382135
]
21392136
}
21402137
],
2141-
"type": "tree",
21422138
"rules": [
21432139
{
21442140
"conditions": [],
@@ -2149,14 +2145,16 @@
21492145
},
21502146
"type": "endpoint"
21512147
}
2152-
]
2148+
],
2149+
"type": "tree"
21532150
},
21542151
{
21552152
"conditions": [],
21562153
"error": "DualStack is enabled but this partition does not support DualStack",
21572154
"type": "error"
21582155
}
2159-
]
2156+
],
2157+
"type": "tree"
21602158
},
21612159
{
21622160
"conditions": [],
@@ -2167,9 +2165,11 @@
21672165
},
21682166
"type": "endpoint"
21692167
}
2170-
]
2168+
],
2169+
"type": "tree"
21712170
}
2172-
]
2171+
],
2172+
"type": "tree"
21732173
},
21742174
{
21752175
"conditions": [],
@@ -6383,7 +6383,7 @@
63836383
}
63846384
],
63856385
"traits": {
6386-
"smithy.api#documentation": "<p>Resumes the pipeline execution by retrying the last failed actions in a stage. You\n can retry a stage immediately if any of the actions in the stage fail. When you retry,\n all actions that are still in progress continue working, and failed actions are\n triggered again.</p>"
6386+
"smithy.api#documentation": "<p>You can retry a stage that has failed without having to run a pipeline again from the beginning. You do\n this by either retrying the failed actions in a stage or by retrying all actions in the stage starting from the first action in the stage. When you retry the failed actions in a stage,\n all actions that are still in progress continue working, and failed actions are\n triggered again. When you retry a failed stage from the first action in the stage, the stage cannot have any actions in progress. Before a stage can be retried, it must either have all actions failed or some actions failed and some succeeded.</p>"
63876387
}
63886388
},
63896389
"com.amazonaws.codepipeline#RetryStageExecutionInput": {
@@ -6413,7 +6413,7 @@
64136413
"retryMode": {
64146414
"target": "com.amazonaws.codepipeline#StageRetryMode",
64156415
"traits": {
6416-
"smithy.api#documentation": "<p>The scope of the retry attempt. Currently, the only supported value is\n FAILED_ACTIONS.</p>",
6416+
"smithy.api#documentation": "<p>The scope of the retry attempt.</p>",
64176417
"smithy.api#required": {}
64186418
}
64196419
}
@@ -6766,6 +6766,12 @@
67666766
"traits": {
67676767
"smithy.api#enumValue": "FAILED_ACTIONS"
67686768
}
6769+
},
6770+
"ALL_ACTIONS": {
6771+
"target": "smithy.api#Unit",
6772+
"traits": {
6773+
"smithy.api#enumValue": "ALL_ACTIONS"
6774+
}
67696775
}
67706776
}
67716777
},
@@ -7715,4 +7721,4 @@
77157721
}
77167722
}
77177723
}
7718-
}
7724+
}

0 commit comments

Comments
 (0)