Skip to content

Support "Exclusive" Mode to execute a task without dependencies #250

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

Closed
nlowe opened this issue Jun 23, 2019 · 2 comments
Closed

Support "Exclusive" Mode to execute a task without dependencies #250

nlowe opened this issue Jun 23, 2019 · 2 comments

Comments

@nlowe
Copy link

nlowe commented Jun 23, 2019

Cake (a similar tool for writing build scripts in C#) supports a flag called --exclusive. This lets Cake execute a specific task without executing its dependencies. This allows you to quickly re-test a specific task (for example, re-build a Docker container without re-running tests if you just changed the dockerfile) and is particularly well suited for build environments like Jenkins where you can separate tasks for visibility.

In most of the Cake projects we use, we wire up dependencies normally, so if a developer runs the Docker test, they restore packages, build code, and run tests. In our Jenkins file, we split each task to a separate stage (called with --exclusive) in Jenkins so you get nice timing information and better visibility in Blue Ocean.

Is this something Mage could potentially support? I'd be happy to look into sending a PR.

@natefinch
Copy link
Member

This is a very interesting idea. I actually just unwired some dependencies at work because they're a little too slow to rerun every time.

I think this could be useful for non-critical dependencies.

I think I would call it -nodeps.

Go ahead and make a PR.

@natefinch
Copy link
Member

ok, so like..... I know I said to do it, but I have thought about it sense then, and I think it's actually easy enough to do with existing tools (i.e. use an environment variable), that I don't think it's worth adding another whole flag for it.

Sorry to flip flop on this.

@nlowe nlowe closed this as completed Sep 19, 2019
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 a pull request may close this issue.

2 participants