-
Notifications
You must be signed in to change notification settings - Fork 243
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
[ui] Set AutoBuild and DeployByDefault #7051
[ui] Set AutoBuild and DeployByDefault #7051
Conversation
✅ Deploy Preview for odo-docusaurus-preview canceled.
|
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 overall, but I was wondering about the case of components loaded from the Devfile, without autoBuild
/deployByDefault
set and not referenced.
Currently, odo
automatically applies them at startup (per devfile/api#852 (comment)), but the UI shows them as not built/deployed at startup, which might sound confusing, I guess.
So shouldn't we at least show them in the UI as built/deployed at startup?
0cd1c1c
to
b78ff6d
Compare
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 overall, but I was wondering about the case of components loaded from the Devfile, without
autoBuild
/deployByDefault
set and not referenced. Currently,odo
automatically applies them at startup (per devfile/api#852 (comment)), but the UI shows them as not built/deployed at startup, which might sound confusing, I guess.So shouldn't we at least show them in the UI as built/deployed at startup?
Looks good on the UI with the latest changes, but I just noticed one slight side effect.
The YAML view currently loads the Devfile with all boolean fields set to their default values if they were not set in the source Devfile, which causes an issue here.
For example, if the Devfile contains an orphan Image component without autoBuild
set (so built on startup), the YAML view will have the field set to false
. And when persisting it back to the filesystem, this Image component will no longer be applied automatically (because autoBuild
is false
).
In the source Devfile:
- image:
imageName: my-image
dockerfile:
uri: Containerfile
name: my-image-cmp
I think we should tell the Devfile parser not to automatically set default boolean values when they are unset. See devfile/library#169
And I guess this would also fix some other boolean fields like dedicatedPod
, secure
, ... that get automatically added when saving the Devfile from the UI to the disk.
The definition of this
Or two-states?
|
Yes, to me, it is a 3-state value and is currently implemented as above (per devfile/api#852 (comment)). So if it is explicitly set to |
OK, so I will introduce a 3-states button for the user to be able to select one of them |
1e98b99
to
3606681
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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.
Works great with the latest changes - thanks!
/retest |
What type of PR is this:
/kind feature
What does this PR do / why we need it:
Which issue(s) this PR fixes:
Fixes #7021
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer: