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: catch on correct exception type if downloading with no outputs #278

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

marofke
Copy link
Contributor

@marofke marofke commented Apr 2, 2024

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

We were still seeing a cryptic error message when trying to download outputs for a job that has no outputs (either because the job hasn't completed or there are no expected outputs).

Turns out we were catching on all exceptions and raising an AssetSyncError, when the function we were catching on raised a JobAttachmentsError if no outputs were found.

What was the solution? (How)

Catch on the JobAttachmentsError and raise it since we expect that error and handle it up the chain.

What is the impact of this change?

It's clearer to customers that there are no outputs for their job

How was this change tested?

Before fix:

deadline job download-output
Downloading output from Job 'Test'
Failed to download output from job group:

After fix:

deadline job download-output
Downloading output from Job 'Test'
There are no output files available for download at this moment. Please verify that the Job/Step/Task you are trying to download output from has completed successfully.

Was this change documented?

N/A

Is this a breaking change?

No


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Signed-off-by: Caden Marofke <marofke@amazon.com>
@marofke marofke requested a review from a team as a code owner April 2, 2024 02:29
@marofke marofke enabled auto-merge (squash) April 2, 2024 02:31
@marofke marofke merged commit dafa5a8 into mainline Apr 2, 2024
15 checks passed
@marofke marofke deleted the marofke/no-outputs-message branch April 2, 2024 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants