Skip to content

Commit

Permalink
feat(client-omics): This change enables customers to retrieve failure…
Browse files Browse the repository at this point in the history
… reasons with detailed status messages for their failed runs
  • Loading branch information
awstools committed Oct 19, 2023
1 parent f21fd7a commit 8092cfa
Show file tree
Hide file tree
Showing 6 changed files with 187 additions and 56 deletions.
5 changes: 5 additions & 0 deletions clients/client-omics/src/commands/GetRunCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ export interface GetRunCommandOutput extends GetRunResponse, __MetadataBearer {}
* // },
* // accelerators: "STRING_VALUE",
* // retentionMode: "STRING_VALUE",
* // failureReason: "STRING_VALUE",
* // logLocation: { // RunLogLocation
* // engineLogStream: "STRING_VALUE",
* // runLogStream: "STRING_VALUE",
* // },
* // };
*
* ```
Expand Down
1 change: 1 addition & 0 deletions clients/client-omics/src/commands/GetRunTaskCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export interface GetRunTaskCommandOutput extends GetRunTaskResponse, __MetadataB
* // logStream: "STRING_VALUE",
* // gpus: Number("int"),
* // instanceType: "STRING_VALUE",
* // failureReason: "STRING_VALUE",
* // };
*
* ```
Expand Down
44 changes: 23 additions & 21 deletions clients/client-omics/src/endpoint/ruleset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,27 @@ import { RuleSetObject } from "@smithy/types";
or see "smithy.rules#endpointRuleSet"
in codegen/sdk-codegen/aws-models/omics.json */

const q="required",
r="fn",
s="argv",
t="ref";
const a="isSet",
b="tree",
c="error",
d="endpoint",
e="PartitionResult",
f={[q]:false,"type":"String"},
g={[q]:true,"default":false,"type":"Boolean"},
h={[t]:"Endpoint"},
i={[r]:"booleanEquals",[s]:[{[t]:"UseFIPS"},true]},
j={[r]:"booleanEquals",[s]:[{[t]:"UseDualStack"},true]},
k={},
l={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsFIPS"]}]},
m={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsDualStack"]}]},
n=[i],
o=[j],
p=[{[t]:"Region"}];
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},{type:b,rules:[{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:h,properties:k,headers:k},type:d}]}]},{type:b,rules:[{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:[{type:b,rules:[{endpoint:{url:"https://omics-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:[{type:b,rules:[{endpoint:{url:"https://omics-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:[{type:b,rules:[{endpoint:{url:"https://omics.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{type:b,rules:[{endpoint:{url:"https://omics.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}]};
const s="required",
t="fn",
u="argv",
v="ref";
const a=true,
b="isSet",
c="booleanEquals",
d="error",
e="endpoint",
f="tree",
g="PartitionResult",
h={[s]:false,"type":"String"},
i={[s]:true,"default":false,"type":"Boolean"},
j={[v]:"Endpoint"},
k={[t]:c,[u]:[{[v]:"UseFIPS"},true]},
l={[t]:c,[u]:[{[v]:"UseDualStack"},true]},
m={},
n={[t]:"getAttr",[u]:[{[v]:g},"supportsFIPS"]},
o={[t]:c,[u]:[true,{[t]:"getAttr",[u]:[{[v]:g},"supportsDualStack"]}]},
p=[k],
q=[l],
r=[{[v]:"Region"}];
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},{rules:[{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}],type:f},{rules:[{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:[{rules:[{endpoint:{url:"https://omics-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f}],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:[{rules:[{endpoint:{url:"https://omics-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:q,rules:[{conditions:[o],rules:[{rules:[{endpoint:{url:"https://omics.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{rules:[{endpoint:{url:"https://omics.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}],type:f}]};
export const ruleSet: RuleSetObject = _data;
50 changes: 49 additions & 1 deletion clients/client-omics/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4639,6 +4639,30 @@ export const RunLogLevel = {
*/
export type RunLogLevel = (typeof RunLogLevel)[keyof typeof RunLogLevel];

/**
* @public
* <p>
* The URI for the run log.
* </p>
*/
export interface RunLogLocation {
/**
* @public
* <p>
* The log stream ARN for the engine log.
* </p>
*/
engineLogStream?: string;

/**
* @public
* <p>
* The log stream ARN for the run log.
* </p>
*/
runLogStream?: string;
}

/**
* @public
* @enum
Expand Down Expand Up @@ -4842,6 +4866,22 @@ export interface GetRunResponse {
* <p>The run's retention mode.</p>
*/
retentionMode?: RunRetentionMode;

/**
* @public
* <p>
* The reason a run has failed.
* </p>
*/
failureReason?: string;

/**
* @public
* <p>
* The location of the run log.
* </p>
*/
logLocation?: RunLogLocation;
}

/**
Expand Down Expand Up @@ -4922,7 +4962,7 @@ export interface GetRunGroupResponse {
export interface GetRunTaskRequest {
/**
* @public
* <p>The task's ID.</p>
* <p>The workflow run ID.</p>
*/
id: string | undefined;

Expand Down Expand Up @@ -5031,6 +5071,14 @@ export interface GetRunTaskResponse {
* </p>
*/
instanceType?: string;

/**
* @public
* <p>
* The reason a task has failed.
* </p>
*/
failureReason?: string;
}

/**
Expand Down
5 changes: 5 additions & 0 deletions clients/client-omics/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6075,8 +6075,10 @@ export const de_GetRunCommand = async (
creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
definition: __expectString,
digest: __expectString,
failureReason: __expectString,
id: __expectString,
logLevel: __expectString,
logLocation: _json,
name: __expectString,
outputUri: __expectString,
parameters: (_) => de_RunParameters(_, context),
Expand Down Expand Up @@ -6237,6 +6239,7 @@ export const de_GetRunTaskCommand = async (
const doc = take(data, {
cpus: __expectInt32,
creationTime: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
failureReason: __expectString,
gpus: __expectInt32,
instanceType: __expectString,
logStream: __expectString,
Expand Down Expand Up @@ -9826,6 +9829,8 @@ const de_RunListItem = (output: any, context: __SerdeContext): RunListItem => {
}) as any;
};

// de_RunLogLocation omitted.

/**
* deserializeAws_restJson1RunParameters
*/
Expand Down

0 comments on commit 8092cfa

Please sign in to comment.