Skip to content

Conversation

Qmando
Copy link
Member

@Qmando Qmando commented Sep 9, 2025

this is unfinished, seeking early feedback

Experiment to see what it would take to use Tron jobs with remote-run. To implement this fully in paasta, I updated TronActionConfig with functions get format_as_kubernetes_job working like it does for long running jobs. These were mostly copied from kubernetes_tools with modifications and removals of things that seem unnecessary in this context. If we go with this approach, there's lots of opportunity for refactoring.

There's several TODOs of stuff that I skipped for now like volumes.

This works, but I want feedback before cleaning it up. The main alternative to this is to import task_processing/tron and try to make use of the relevant code there which does something similar.

$ paasta remote-run start -c eksstage -s compute-infra-test-service -i test_load_foo1.foo --interactive
Triggered remote-run job for compute-infra-test-service. Waiting for pod to come online...

Pod ready, establishing interactive session...
INFO: You are using an Okta authenticated kubectl wrapper
www-data@remote-run-qlo-foo-bwtz9:/$

@Qmando Qmando requested review from nemacysts and piax93 September 9, 2025 00:42
Copy link
Contributor

@piax93 piax93 left a comment

Choose a reason for hiding this comment

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

lgtm in general

Comment on lines 156 to 164
try:
# Load the service deployment settings
deployment_config = load_eks_or_adhoc_deployment_config(
service, instance, cluster, is_toolbox, user
)
except:
# tron
tron = True
deployment_config = load_tron_config(service, instance, cluster)
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's abstract this to a function too, so it a bit cleaner

deployment_config, is_tron = load_any_deployment_config(...)

)
return projected_volumes if projected_volumes else None

def get_kubernetes_service_account_name(self) -> Optional[str]:
Copy link
Contributor

Choose a reason for hiding this comment

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

This is definitely a whole lot of repetition, but there's probably no other way for it without some huge refactor, so as long as CI is fine with it, I'm fine.

Copy link
Member

@nemacysts nemacysts left a comment

Choose a reason for hiding this comment

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

(we chatted a bit internally in the project channel - just leaving a review here so that GH stops pinging me about this PR)

Comment on lines +172 to +174
else:
# Tron dicts use "command" instead of "cmd" and expects an array
deployment_config.config_dict["command"] = ["/usr/bin/sleep", str(max_duration)]
Copy link
Member

Choose a reason for hiding this comment

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

unfortunate 😭

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