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(cli): download-output command handles UNC paths #148

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

gahyusuh
Copy link
Contributor

@gahyusuh gahyusuh commented Jan 3, 2024

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

The download-output CLI command failed to download job outputs with UNC root paths, resulting in error that looks like below.

Download failed: Path \10.7.1.50\TestOutputShare\work is not an absolute path.

The current logic for checking if a path format is Posix or Windows cannot handle UNC path format. It is just doing a naive string check on the root paths.

What was the solution? (How)

  • Updated to properly handle UNC paths. Instead of the existing naive string check, it is now relying on the rootPathFormat property in job's manifests (the value is either "windows" or "posix") to determine the submitting OS of the job.
  • Fixed or added unit tests to align with the changes, ensuring all tests pass.

What is the impact of this change?

The download-output command can now support jobs with UNC root paths.

How was this change tested?

  • All unit tests, including modified and newly added ones, passed successfully.
  • Done some manual end-to-end tests including cross-platform scenarios, confirming that it worked as expected.
    • Downloading Linux-submitted job outputs on Windows: prompted users for an alternative root path to download to.
    • Downloading outputs from job with UNC format root paths on Windows: no errors, downloading files to the right location.
    • Downloading Windows-submitted job outputs on Linux: prompted users for an alternative root path to download to.
    • Downloading outputs from jobs with UNC format root paths on Linux: prompted users for an alternative root path to download to.

Was this change documented?

No.

Is this a breaking change?

No.

@gahyusuh gahyusuh marked this pull request as ready for review January 3, 2024 04:00
@gahyusuh gahyusuh requested a review from a team as a code owner January 3, 2024 04:00
@gahyusuh gahyusuh force-pushed the gahyusuh/download_unc_path branch from 393c206 to aa08491 Compare January 4, 2024 15:39
@epmog
Copy link
Contributor

epmog commented Jan 4, 2024

LGTM. Ship it

@epmog epmog merged commit ea40165 into mainline Jan 4, 2024
18 checks passed
@epmog epmog deleted the gahyusuh/download_unc_path branch January 4, 2024 16:28
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.

3 participants