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

"Execute in place" support for cirrus-cli #637

Open
anarazel opened this issue Aug 1, 2023 · 2 comments
Open

"Execute in place" support for cirrus-cli #637

anarazel opened this issue Aug 1, 2023 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers question Further information is requested

Comments

@anarazel
Copy link

anarazel commented Aug 1, 2023

Hi,

Right now cirrus-cli can't, as far as I can tell, be used for VM based tasks, because it wants to start a container. Nor can it be used to manually start a task when already in the target environment, e.g. when debugging a hard to reproduce problem.

It'd be nice if cirrus-cli had a mode of running a task directly in the environment it's invoked in. That obviously won't be 100% faithful to the way tasks are normally executed, but it would still be very useful.

It's possible that that's already somehow possible, but I could not figure out how.

Regards,

Andres

@fkorotkov
Copy link
Contributor

Hey @anarazel,

It will be a bit hacky but you can specify a persistent_worker instance instead whatever you use right now:

task:
  persistent_worker:
  script: touch test.txt

In this case cirrus run --dirty will just shell out things.

In general, I think we can add an option to override instance types from command lines.

@fkorotkov fkorotkov added enhancement New feature or request good first issue Good for newcomers question Further information is requested labels Aug 1, 2023
@anarazel
Copy link
Author

anarazel commented Aug 2, 2023

It will be a bit hacky but you can specify a persistent_worker instance instead whatever you use right now:

Nice, that mostly does work.

One thing I noticed while playing with that is that cirrus run doesn't seem to deal with env: CIRRUS_WORKING_DIR: ... in the task? Is that expected? I'd have expected that cirrus run would copy the working directory there...

In general, I think we can add an option to override instance types from command lines.

That'd be very useful. An alternative could be a flag to indicate that cirrus-cli is already in the target environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants