Skip to content
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

✨ Implement Priority and Serial settings for discovered handlers #11818

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Danil-Grigorev
Copy link
Member

@Danil-Grigorev Danil-Grigorev commented Feb 7, 2025

What this PR does / why we need it:

In-place upgrades defines machine-updates process as looping until completion for each registered updater.

In order to leverage runtime extensions in processing these updaters, handler execution needs to be able to block (retry until completion) on individual updater, in case it responds with pending status before requesting other unfinished hooks. This PR introduces serial setting for the handler discovery.

Additionally, current handlers list is not guarantied to be ordered, so it may cause a situation when:

  • Updater A has finished
  • Updater B is serial and is pending
  • Updater C has not started (waiting on B)

On the second iteration:

  • Updater A has finished
  • Updater C has finished (jumped the queue and skipped waiting on B)
  • Updater B is serial and is pending

To address this, a priority field is added, which allows updaters to declare execution order.

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 rancher/highlander#118

/area runtime-sdk

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. area/runtime-sdk Issues or PRs related to Runtime SDK cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 7, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign fabriziopandini for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 7, 2025
@Danil-Grigorev Danil-Grigorev changed the title [WIP] Implement Priority and Serial settings for discovered handlers [WIP] ✨ Implement Priority and Serial settings for discovered handlers Feb 10, 2025
@Danil-Grigorev Danil-Grigorev changed the title [WIP] ✨ Implement Priority and Serial settings for discovered handlers ✨ Implement Priority and Serial settings for discovered handlers Feb 10, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 10, 2025
@Danil-Grigorev Danil-Grigorev force-pushed the priority-handlers branch 2 times, most recently from 9fb72a6 to 7d2e096 Compare February 11, 2025 19:30
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 6, 2025
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

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-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/runtime-sdk Issues or PRs related to Runtime SDK cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stateless Updater Execution
3 participants