-
Notifications
You must be signed in to change notification settings - Fork 991
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
Fixes #37714 - inherit overrides deploy on in hostgroup #10265
Conversation
:id, | ||
:to_label, | ||
{ | ||
:disable_button_enabled => hostgroup_inherited_by_default?(:compute_resource_id, @hostgroup), |
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.
Do we need to hide this for parent hostgroups?
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.
No since they can also be children
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.
What about for top-level host groups which don't have a parent?
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 could hide it, but it isn't hidden in hosts if they have no host group
303a0d9
to
36cd3ca
Compare
That didnt work, so I added an event listener |
The child hostgroup doesn't seem to be able to inherit the parent hostgroup. The compute resource gets set to empty/bare metal even when the form is set to inherit and populated with parent's compute resource. |
36cd3ca
to
9d2aa45
Compare
Changed the pr so now on submit hostgroup makes sure that the compute resource is included. |
Works now for setting compute resource id in the form. The inherit button is a bit confusing as when you click inherit on a child group, it populates the form as Bare Metal and disables the form which is not the inherited value.. |
9d2aa45
to
1722aa2
Compare
Thanks! added a fix that sets the inherit value on load, and not only on hostgroup change |
Clicking on inherit should populate the deploy on with a the parent value, |
1722aa2
to
bc47f1b
Compare
removed an unused function |
It works fine for me - after clicking the button for the second time the compute resource stays there. |
Maybe emptying cache will resolve it? @sjha4 |
I cleared my cache and opened a new incognito and this is what I see upon 2 clicks on inherit button on a nested create form. |
I managed to reproduce this error, but then I needed to restart the server (for something else) and the error was gone, so maybe thats the issue? sorry for this reproduction hunt @sjha4 |
bc47f1b
to
75fcad5
Compare
Rebase fixed the failing tests |
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.
Ack 🎉
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.
ACK based on @sjha4 👍
if the hostgroup parent has a compute resource, the child hostgroup cant be set to have "bare metal", since empty value ("bare metal") = inherit.
In this pr I managed to make it work similarly to the host page, which is not perfect.
I added on top of
submit_with_all_params
to just reuse existing logic and not building new one.