✨ Add in-place update hooks to API#12343
Conversation
a180b63 to
9310ebd
Compare
fabriziopandini
left a comment
There was a problem hiding this comment.
Thanks for this PR
TBH, It is a little bit complex to think about all the implications without a deeper understanding of when/how those hooks are being called. e.g.
- is []string the best way to represent changes (e.g. how this will work when there changes to items in an array)
- do we need more than []string? e.g. reference to KCP/MD, corresponding templates, may be list or reference to controlled machines impacted by the change
- do we need something to link a set of proposed/accepted changes to in-place updates of the corresponding machines? (e.g. what will happen if the spec changes again in the meantime)
Considering I don't have a good answer to those questions yet, my gut feeling is that we should first look into where/how hooks are going to be called and then use learning to finalize & implement hooks, also because without the first part, hooks are not usable.
But no strong opinions, I'm also ok in merging a first release and then iterate, but this will probably require us to make exceptions e.g. if breaking changes will be required (probably not a blocker in this case, but I just want to bring this up).
9310ebd to
d9e88e3
Compare
|
@fabriziopandini Thank you for the great feedback, all your points are valid. We need to start somewhere with the implementation, and my intention is to split it into smaller PRs to make the review process much easier. The in-place update feature will be hidden behind a feature gate and won’t be announced as alpha until we all agree on it. I’ll start implementing a reference updater as soon as possible, and at the same time, we’re going to begin building an experimental updater in Rancher to battle-test the idea. Hopefully, this will help clarify some of the open questions as we go. Regarding the book, I completely agree that we need to create a dedicated page. I can open an issue to track it, but I’d prefer to wait a bit until we have some functional code to document. |
d9e88e3 to
526da98
Compare
Good call. It probably makes sense to stop at arrays and let the updater figure it out.
I think the updater implementation has to keep its specific "updating" state. If multiple updates are triggered, the updater should know that a previous update is already running and the new request has to wait. I think the alternative is to forbid updates on resources annotated with All good points anyway, I also have some doubts over corner cases at the moment and I'd like to see some different updaters implemented, so I'm all up to merge and iterate as frequent as possible. |
526da98 to
9cc10f9
Compare
9cc10f9 to
41b5759
Compare
b17efd7 to
f7392dd
Compare
sbueringer
left a comment
There was a problem hiding this comment.
Took a look with Fabrizio, first round of feedback
f7392dd to
36af49e
Compare
|
@sbueringer @fabriziopandini All comments should be resolved |
Signed-off-by: Alexandr Demicev <alexandr.demicev@suse.com> Co-authored-by: Stefan Büringer <buringerst@vmware.com>
d20fd71 to
9dcb6a0
Compare
|
Thank you very much! /lgtm /assign @fabriziopandini |
|
LGTM label has been added. DetailsGit tree hash: aff3bf25ef66bdcca63524b4811be38884c50653 |
|
/lgtm Let's keep on with the momentum on this effort 🥳 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
This PR introduces the runtime hooks for in-place updates see In-place updates proposal and design doc for more details
umbrella issue #12291
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #
/area runtime-sdk