-
Notifications
You must be signed in to change notification settings - Fork 151
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
DSCI CRD: allow default as a value for logmode #1271
DSCI CRD: allow default as a value for logmode #1271
Conversation
default is a separate mode in the sources, not just selection of one of the others, so allow it explicitly. There is no difference if it is set to "" explicitly or not set since "" is a string default value. In the current code as soon as devFlags are present, the mode is taken in use, so it is reset to default even if it is not set which does not look right (I would expect leave it untouched if is not set). If it is fixed, then it will be impossible to reset logging mode to default from devel or prod: if "" is considered as "not set explicitly", then there is no value for default, the object checker rejects values not in list. Signed-off-by: Yauheni Kaliuta <[email protected]>
/cc @zdtsw |
i am fine with this change.
is the same as
because "" is the default value for string but since we do not use manifestsUri
not
(as this will remove the whole devFlags) is this the concern for the PR? |
May be not exactly. The point is as soon as devFlags present, logmode is considered to be set to "" even if it is not. I actually had in mind scenario where a "user" sets just manifests (ok, deprecated now, but anyway) and automatically resets the logmode. |
And if it fixed (I can only fix it with ignoring of ""), there is no way to force default anymore |
yep, so if the user want to set logmode to $value or "" i dont think it could be a case that we have devFlags without logmode there. |
Yep. That is the hypothetical case I'm addressing |
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.
would like to have 2nd eyes on this as well
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: zdtsw The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
eb6ba18
into
opendatahub-io:incubation
default is a separate mode in the sources, not just selection of one of the others, so allow it explicitly.
There is no difference if it is set to "" explicitly or not set since "" is a string default value.
In the current code as soon as devFlags are present, the mode is taken in use, so it is reset to default even if it is not set which does not look right (I would expect leave it untouched if is not set). If it is fixed, then it will be impossible to reset logging mode to default from devel or prod: if "" is considered as "not set explicitly", then there is no value for default, the object checker rejects values not in list.
Description
How Has This Been Tested?
Screenshot or short clip
Merge criteria