-
Notifications
You must be signed in to change notification settings - Fork 840
feature: alternate approach to environment force-rebuild #2443
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
base: master
Are you sure you want to change the base?
Conversation
metaflow/cli.py
Outdated
@@ -242,6 +243,14 @@ def version(obj): | |||
type=click.Choice(["local"] + [m.TYPE for m in ENVIRONMENTS]), | |||
help="Execution environment type", | |||
) | |||
@click.option( | |||
"--force-rebuild-environment/--no-force-rebuild-environment", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we change this to --rebuild-environments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, nvm. let's keep the force, otherwise --no-rebuild-environments
takes a different meaning altogether. tiny nit - --force-rebuild-environments
since there can be more than one.
metaflow/cli.py
Outdated
default=False, | ||
hidden=True, | ||
type=bool, | ||
help="Force rebuild the environment", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
explicitly rebuild the execution environments
metaflow/cli.py
Outdated
@@ -432,6 +442,9 @@ def start( | |||
|
|||
ctx.obj.graph = ctx.obj.flow._graph | |||
|
|||
# carry the force rebuild as an internal env var for generic environments to use | |||
if force_rebuild_environment: | |||
os.environ["_MFENV_FORCE_REBUILD"] = "1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_METAFLOW_ENVIRONMENT_FORCE_REBUILD? MFENV
will very soon have different connotations
adds a top-level option to toggle force-rebuilding the environment
the introduction of the new option is not mandatory. we could simply proceed with an internal envvar to enable the functionality for now.