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

Add option to download runner task file #649

Merged
merged 19 commits into from
Apr 24, 2024
Merged

Conversation

BMurri
Copy link
Collaborator

@BMurri BMurri commented Mar 16, 2024

fixes #628

When the new url global option is specified, its argument is downloaded (to the location specified by the file option) before the command proceeds. This is accomplished by intercepting all commands and checking for the new option. If found, a subprocess is created to download the json and the file option is refreshed. Then the selected command's handler is called. This redirection is facilitated by the use of hidden "shadow" commands. If url is not specified the net-net is no observable (from the outside) change in behavior.

Only for the json download, an environment variable is used to obtain the runtime options and transformation selection for the json download. This enables the runner to use its existing code to obtain SAS tokens for the download without any additional arguments or prepositioned files needed. That environment variable is NOT used for any subsequent operations. This will facilitate using this feature in both the start task and in the work tasks without interference.

@BMurri
Copy link
Collaborator Author

BMurri commented Mar 16, 2024

Note to reviewers: I did some drive-by cleanup while I was in some of the code files.

@BMurri BMurri requested a review from giventocode April 16, 2024 07:46
Copy link
Contributor

@giventocode giventocode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@giventocode giventocode self-requested a review April 23, 2024 01:14
@BMurri BMurri merged commit 342ccbf into main Apr 24, 2024
5 checks passed
@BMurri BMurri deleted the bmurri/runner-task-json branch April 24, 2024 20:37
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.

[#627 expired SAS tokens] Runner downloads task JSON from URL
2 participants