DataDog / datadog-ci

Use Datadog from your CI.
https://datadoghq.com
Apache License 2.0
127 stars 54 forks source link

Fix parsing of unexpected format of role ARN for Step Functions #1436

Closed kimi-p closed 3 weeks ago

kimi-p commented 3 weeks ago

What and why?

There are two formats of role ARN for Step Functions if create the role by default on the AWS SF UI:

  1. express: arn:aws:iam::425362996713:role/prodnext-statemachine-prodnextstatemachineuninstrum-htJ0SB47b7yh
  2. standard: arn:aws:iam::425362996713:role/service-role/StepFunctions-L2TTest-NestedStepFunctions-role-qye91on3g (/service-role/ has an additional /)

We didn't noticed that there are the second format before. This PR fix the parsing by fetching the last element from the list after splitting.

Review checklist

datadog-datadog-prod-us1[bot] commented 3 weeks ago

Datadog Report

Branch report: kimi/fix-roleArn-split Commit report: 7e7fcbb Test service: datadog-ci-tests

:white_check_mark: 0 Failed, 48 Passed, 0 Skipped, 22.4s Total duration (3m 4.49s time saved)