Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use the proper entity key variable #15

Merged
merged 1 commit into from
Sep 1, 2023
Merged

Conversation

epmog
Copy link
Contributor

@epmog epmog commented Sep 1, 2023

What was the problem/requirement? (What/Why)

We were using a wrong and uninitialized variable when there were no successful entities

[session-8f546ac52c3e4b978b46ca5240e67d35] Entity {'jobDetails': {'jobId': 'job-685679cbca4a4bc39c6244304992058a'}} failed in an unrecoverable way: local variable 'entity_key' referenced before assignment

What was the solution? (How)

use the right one...

What is the impact of this change?

BatchGetJobEntity errors properly get reported by the worker agent

How was this change tested?

Tested in gamma and got the actual underlying error message

{'sessionaction-a4fd90b02c9d457fa528d44c7df6b182-0': {'startedAt': datetime.datetime(2023, 9, 1, 23, 9, 13, 96713, tzinfo=datetime.timezone.utc), 'completedStatus': 'FAILED', 'progressMessage': "Entity {'jobDetails': {'jobId': 'job-92b1831b602447bdbd58704df51f5691'}} failed with: ConflictException Storage profiles and file systems not found", 'endedAt': datetime.datetime(2023, 9, 1, 23, 9, 13, 96713, tzinfo=datetime.timezone.utc)}, 'sessionaction-a4fd90b02c9d457fa528d44c7df6b182-1': {'startedAt': datetime.datetime(2023, 9, 1, 23, 9, 13, 96713, tzinfo=datetime.timezone.utc), 'completedStatus': 'FAILED', 'progressMessage': "Entity {'jobDetails': {'jobId': 'job-92b1831b602447bdbd58704df51f5691'}} failed with: ConflictException Storage profiles and file systems not found", 'endedAt': datetime.datetime(2023, 9, 1, 23, 9, 13, 96713, tzinfo=datetime.timezone.utc)}}

ran

hatch run fmt
hatch run lint
hatch build
hatch run test

Was this change documented?

N/A

Is this a breaking change?

Fixing!

@epmog epmog requested a review from a team as a code owner September 1, 2023 23:20
Signed-off-by: Morgan Epp <morgane@amazon.com>
@mwiebe mwiebe merged commit 8f6f9b4 into mainline Sep 1, 2023
5 checks passed
@mwiebe mwiebe deleted the wrong_entity_key branch September 1, 2023 23:33
@jusiskin jusiskin added the bug Something isn't working label Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants