-
Notifications
You must be signed in to change notification settings - Fork 300
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
ImageConfig should contain the image from sandbox.config #1106
Conversation
Signed-off-by: Kevin Su <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #1106 +/- ##
===========================================
- Coverage 86.67% 68.13% -18.55%
===========================================
Files 269 287 +18
Lines 25074 25762 +688
Branches 2826 2882 +56
===========================================
- Hits 21734 17553 -4181
- Misses 2871 7733 +4862
- Partials 469 476 +7
Continue to review full report at Codecov.
|
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.
This is not quite right yet. IIUC, this PR makes it so that the --config
flag (which applies at the top level) becomes a required parameter.
Also, the images
config section has no equivalent in the yaml config, right?
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
sorry, updated it.
|
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.
LGTM.
@@ -512,12 +512,19 @@ def _run(*args, **kwargs): | |||
return | |||
|
|||
remote = ctx.obj[FLYTE_REMOTE_INSTANCE_KEY] | |||
config_file = ctx.obj.get(CTX_CONFIG_FILE) |
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.
just for own understanding, what's the level that config is applied? As in, can you pass the --config
flag to the run
subcommand (e.g. pyflyte run --config <file.yaml> --remote ...
)? Or it has to come before the run
subcommand?
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.
We still have to use --config
before the run
. like pyflyte --config flyte.yaml run ....
Convert it to draft, need further discussion with Yee |
@@ -11,3 +11,6 @@ storage: | |||
access-key: minio | |||
endpoint: http://localhost:30084 | |||
secret-key: miniostorage | |||
images: |
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.
I don't think this is supported at all on the flytectl side (and might never be since it's mostly responsible for registration time settings) but that's ok. We can still support this.
@@ -512,12 +512,19 @@ def _run(*args, **kwargs): | |||
return | |||
|
|||
remote = ctx.obj[FLYTE_REMOTE_INSTANCE_KEY] | |||
config_file = ctx.obj.get(CTX_CONFIG_FILE) | |||
|
|||
image_config = run_level_params.get("image_config", None) |
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.
so image_config
is never going to be None because of the default and because of the validate_image
callback. So the ImageConfig.auto
will never be called.
if image_config: | ||
image_config.images.extend(ImageConfig.auto(config_file).images) | ||
else: | ||
image_config = ImageConfig.auto(config_file) |
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.
if this is called actually, this will fail if config_file is None because ImageConfig.auto(config_file=None)
will return a
for k, v in _internal.Images.get_specified_images(config_file).items()
E AttributeError: 'NoneType' object has no attribute 'items'
error
flytekit/configuration/internal.py
Outdated
images[str(i)] = cfg.legacy_config.get("images", i) | ||
return images | ||
if cfg.yaml_config: | ||
return cfg.yaml_config.get("images") |
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.
this needs to return {} in case it doesn't exist.
|
||
image_config = run_level_params.get("image_config", None) | ||
if image_config: | ||
image_config.images.extend(ImageConfig.auto(config_file).images) |
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.
also how does this work? weird. isn't ImageConfig supposed to be frozen??
* ImageConfig should contain the image from sandbox.config Signed-off-by: Kevin Su <[email protected]> * Updated Signed-off-by: Kevin Su <[email protected]> * lint Signed-off-by: Kevin Su <[email protected]> * pr into #1106 (#1113) Signed-off-by: Yee Hing Tong <[email protected]> Co-authored-by: Yee Hing Tong <[email protected]>
* ImageConfig should contain the image from sandbox.config Signed-off-by: Kevin Su <[email protected]> * Updated Signed-off-by: Kevin Su <[email protected]> * lint Signed-off-by: Kevin Su <[email protected]> * pr into #1106 (#1113) Signed-off-by: Yee Hing Tong <[email protected]> Co-authored-by: Yee Hing Tong <[email protected]>
Signed-off-by: Kevin Su [email protected]
TL;DR
Failed to run this example because
ImageConfig
doesn't contain the image from sandbox.configType
Are all requirements met?
Complete description
How did you fix the bug, make the feature etc. Link to any design docs etc
Tracking Issue
https://github.com/flyteorg/flyte/issues/
Follow-up issue
NA
OR
https://github.com/flyteorg/flyte/issues/