Skip to content

fix: upgrade for cluster spec changes#2363

Open
rugggger wants to merge 1 commit into03-12-fix_unify_upgrade_path_for_image_and_configfrom
03-15-fix_upgrade_for_cluster_spec_changes
Open

fix: upgrade for cluster spec changes#2363
rugggger wants to merge 1 commit into03-12-fix_unify_upgrade_path_for_image_and_configfrom
03-15-fix_upgrade_for_cluster_spec_changes

Conversation

@rugggger
Copy link
Contributor

@rugggger rugggger commented Mar 15, 2026

TL;DR

Optimized cluster upgrade process to only run image-related operations when the container image actually changes, while still handling configuration-only updates.

What changed?

  • Added UpdatableFields struct to track configuration changes that should trigger upgrades without requiring image operations
  • Introduced isImageChanged() method to distinguish between image upgrades and configuration-only updates
  • Modified upgrade workflow to conditionally execute image pre-pull, upgrade preparation, and finalization steps only when the image changes
  • Refactored upgrade preparation logic to use the new anyContainerConfigApplied() helper function for cleaner code

How to test?

  1. Test configuration-only changes (e.g., tolerations, node selectors, memory settings) to verify they trigger upgrades without running image operations
  2. Test actual image upgrades to ensure all image-related steps (pre-pull, preparation, finalization) still execute properly
  3. Verify mixed scenarios where both image and configuration changes occur simultaneously

Why make this change?

This optimization reduces unnecessary overhead during configuration-only updates by skipping expensive image-related operations when they're not needed. Previously, any cluster specification change would trigger the full upgrade workflow including image operations, even when only configuration parameters changed.

Copy link
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label main-merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@rugggger rugggger marked this pull request as ready for review March 16, 2026 08:23
@rugggger rugggger requested a review from a team as a code owner March 16, 2026 08:23
@graphite-app
Copy link

graphite-app bot commented Mar 16, 2026

Graphite Automations

"Add anton/matt/sergey/kristina as reviwers on operator PRs" took an action on this PR • (03/16/26)

3 reviewers were added to this PR based on Anton Bykov's automation.

@rugggger rugggger force-pushed the 03-15-fix_upgrade_for_cluster_spec_changes branch 3 times, most recently from e2d50bb to e4fa5ac Compare March 23, 2026 14:00
@rugggger rugggger force-pushed the 03-15-fix_upgrade_for_cluster_spec_changes branch from e4fa5ac to c32a815 Compare March 24, 2026 13:34
@rugggger rugggger force-pushed the 03-15-fix_upgrade_for_cluster_spec_changes branch from c32a815 to ca23f3c Compare March 24, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant