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
Bug 1876440: Cloud init section of common-templates is ignored #6543
Conversation
glekner
commented
Sep 7, 2020
@glekner: This pull request references Bugzilla bug 1876440, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@@ -115,6 +126,40 @@ const osUpdater = ({ id, prevState, dispatch, getState }: UpdateOptions) => { | |||
{ isHidden: asHidden(!isWindows, VMSettingsField.OPERATING_SYSTEM), value: isWindows }, | |||
), | |||
); | |||
|
|||
const relevantOptions = iGetRelevantTemplateSelectors(state, id); |
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.
relevant template can change on relevenatOptions, not just os. IMO this needs its own updater and possibly new file called eg commonTemplatesPrefil
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.
as mentioned here https://bugzilla.redhat.com/show_bug.cgi?id=1874074.
We are going to need a generic approach to common template prefill soon.
const [data, isBase64] = CloudInitDataHelper.getUserData( | ||
toShallowJS(iCloudInitVolume)?.cloudInitNoCloud, | ||
); | ||
|
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.
please take an inspiration from prefill-vm-template-state-update.ts
false, | ||
), | ||
); | ||
dispatch( |
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.
you need to take into account cloudinit from other templates.
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 please test this with a userTemplate
@@ -97,3 +98,8 @@ export const iGetRelevantTemplates = ( | |||
export const iGetRelevantTemplate = ( | |||
...args: Parameters<typeof iGetRelevantTemplates> | |||
): ITemplate => iGetRelevantTemplates(...args).first(); | |||
|
|||
export const iGetCommonTemplateCloudInit = (tmp: ITemplate) => |
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.
please make an immutable version of selectVM
. Specifying an index is unreliable.
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.
created
Note: |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: glekner, yaacov 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 |
you need to listen to changes in the user template, currently you only listen to common template fields. |
@glekner: All pull requests linked via external trackers have merged: Bugzilla bug 1876440 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |