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

introduce --dry-run run mode #1881

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

introduce --dry-run run mode #1881

wants to merge 2 commits into from

Conversation

savingoyal
Copy link
Collaborator

@savingoyal savingoyal commented Jun 5, 2024

the rationale for this PR is to make it easier for folks to run tests through Metaflow without reporting anything on the progress to the UI or storing any artifacts.

also includes cosmetic changes for decorator handling in cli.py which can be safely ignored (or omitted or pulled out in a separate PR)

@savingoyal savingoyal changed the title Cosmetic changes for decorator handling in cli.py introduce --dry-run run mode Jun 5, 2024
@@ -901,6 +899,12 @@ def version(obj):
type=click.Choice(MONITOR_SIDECARS),
help="Monitoring backend type",
)
@click.option(
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not a fan of having options cause other options to be ignored with no warning. I would add a check to see if there are conflicting options. dry-run is also a bit misleading (it's not dry run and things may happen, for example conda package caching, anything the code does as well, etc).

)
if all_decospecs:
decorators._attach_decorators(ctx.obj.flow, all_decospecs)
decospecs = list(decospecs or []) + list(ctx.obj.environment.decospecs() or [])
Copy link
Contributor

Choose a reason for hiding this comment

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

nit, use ctx.obj.decospecs (no point redoing the same computation and conversion)

# words, for the same decorator, we want `myflow.py run --with foo` to
# take precedence over any other `foo` decospec
ctx.obj.tl_decospecs = list(decospecs or [])
# run/resume can add more decorators with --with, which take precedence
Copy link
Contributor

Choose a reason for hiding this comment

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

am fine with this (and associated change) but would re-add the comment about how precedence is determined by order right now (first one wins) so we need to save to apply in before_run. (ie: this comment is correct but doesn't say why we do it this way).

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.

None yet

2 participants