Skip to content

Add --copy-file for remote-run #4071

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

Merged
merged 2 commits into from
May 29, 2025
Merged

Add --copy-file for remote-run #4071

merged 2 commits into from
May 29, 2025

Conversation

Qmando
Copy link
Member

@Qmando Qmando commented May 23, 2025

Add the ability to copy individual files into remote-run pods into /tmp. This covers a lot of use cases while still making it hard to modify code or copy whole directories.

$ paasta remote-run start -c norcal-devc -s redshift_credentials -i main --interactive --copy-file ~/test1 --copy-file ~/test2
Triggered remote-run job for redshift_credentials. Waiting for pod to come online...
Status: Pod not ready
Pod ready, establishing interactive session...
INFO: You are using an Okta authenticated kubectl wrapper
nobody@remote-run-qlo-redshift--credentials-main-d67jb:/code$ cat /tmp/test1
test
nobody@remote-run-qlo-redshift--credentials-main-d67jb:/code$ cat /tmp/test2
foo

$ paasta remote-run start -c norcal-devc -s redshift_credentials -i main --interactive --copy-file ~/test27657
Triggered remote-run job for redshift_credentials. Waiting for pod to come online...

Pod ready, establishing interactive session...
Error copying file to remote-run pod:
INFO: You are using an Okta authenticated kubectl wrapper
error: /nail/home/qlo/test27657 doesn't exist in local filesystem

@Qmando Qmando requested review from nemacysts and piax93 May 23, 2025 23:16
@Qmando Qmando requested a review from a team as a code owner May 23, 2025 23:16
filename=filename,
token=token_response.token,
)
run_interactive_cli(cp_command)
Copy link
Contributor

@piax93 piax93 May 26, 2025

Choose a reason for hiding this comment

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

This can probably be just a simple execution via subprocess since it does not involve an interactive CLI, and that will also give better error handling compared to the pseudo-terminal contraption I implemented in run_interactive_cli

@Qmando Qmando merged commit 2238f22 into master May 29, 2025
10 checks passed
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