Skip to content

Commit

Permalink
fix sfn execution retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
ircwaves committed Oct 30, 2023
1 parent 9fffe74 commit 01a21de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Fixed
- CLI `run-workflow` dropped an `s` from `json.loads`, and the help text on the
timout argument was
incorrect. ([#5](https://github.com/cirrus-geo/cirrus-mgmt/pull/5)
incorrect. ([#5](https://github.com/cirrus-geo/cirrus-mgmt/pull/5))
- Return correct execution(`[-1]`), as new Step Function executions are
appended to the `executions` list, from the StateDB
Item. ([#6](https://github.com/cirrus-geo/cirrus-mgmt/pull/6))

## [v0.1.0] - 2023-08-01

Expand Down
2 changes: 1 addition & 1 deletion src/cirrus/plugins/management/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def get_execution(self, arn):
def get_execution_by_payload_id(self, payload_id):
execs = self.get_payload_state(payload_id).get("executions", [])
try:
exec_arn = execs[0]
exec_arn = execs[-1]

Check warning on line 305 in src/cirrus/plugins/management/deployment.py

View check run for this annotation

Codecov / codecov/patch

src/cirrus/plugins/management/deployment.py#L305

Added line #L305 was not covered by tests
except IndexError:
raise exceptions.NoExecutionsError(payload_id)

Expand Down

0 comments on commit 01a21de

Please sign in to comment.