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

feat(cli): add log message for no output in download-output command #99

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

gahyusuh
Copy link
Contributor

@gahyusuh gahyusuh commented Nov 7, 2023

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

Currently, if we run download-output command on a job that has no output (for whatever reason), we see the below logs:

Outputs will be downloaded to the following root paths:

> Please enter a number of root path to edit, y to proceed, or n to cancel the download: (y, n) [y]: 1
Error: '1' is not one of 'y', 'n'.
> Please enter a number of root path to edit, y to proceed, or n to cancel the download: (y, n) [y]: y
Outputs will be downloaded to the following root paths:

Downloading Outputs  [------------------------------------]    0%
Download Summary:
    Downloaded 0 files totaling 0.0 B.
    Total download time of 5e-05 seconds at 0.0 B/s.
    Download locations (file counts):

which does not make sense.

What was the solution? (How)

Display an informative message when the download-output command is executed but no output files are available for download.

  • In a --output verbose form:
Downloading output from Job "Gahyun's Test Job"
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.
  • In a --output json form:
{"messageType": "title", "value": "Gahyun's Test Job"}
{"messageType": "summary", "value": "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."}

What is the impact of this change?

improves user experience by providing a clear message

How was this change tested?

  • Added a unit test
  • Ran hatch run lint && hatch run test and made sure all tests passed.
  • Manual end-to-end test a scenario where the output files are not available. Verified that new message displayed correctly.

Was this change documented?

No.

Is this a breaking change?

No.

@gahyusuh gahyusuh requested a review from a team as a code owner November 7, 2023 15:43
@gahyusuh gahyusuh force-pushed the gahyusuh/download-output-no-results-log branch from e5bfec5 to 0a52944 Compare November 8, 2023 01:20
@gahyusuh gahyusuh force-pushed the gahyusuh/download-output-no-results-log branch from 0a52944 to 8370c55 Compare January 31, 2024 20:35
Signed-off-by: Gahyun Suh <gahyusuh@dev-dsk-gahyusuh-2a-387e0b51.us-west-2.amazon.com>
@gahyusuh gahyusuh force-pushed the gahyusuh/download-output-no-results-log branch from 8370c55 to f59c1d3 Compare January 31, 2024 21:00
@epmog epmog merged commit 4269e11 into mainline Jan 31, 2024
18 checks passed
@epmog epmog deleted the gahyusuh/download-output-no-results-log branch January 31, 2024 21:55
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