Skip to content

refactor: split offerings handling into a sub-module#1166

Merged
comtalyst merged 15 commits intomainfrom
comtalyst/offerings-split
Oct 22, 2025
Merged

refactor: split offerings handling into a sub-module#1166
comtalyst merged 15 commits intomainfrom
comtalyst/offerings-split

Conversation

@comtalyst
Copy link
Copy Markdown
Collaborator

@comtalyst comtalyst commented Sep 17, 2025

Fixes #

Description

The processes of instance provisioning and SKU/Priority/zone selection/handling should be clearly distinguishable from one another. However, current code does not seem to reflect that well enough. This concern is also previously noted in #791.
Naturally, it has been an obstacle to efficient improvements on each, especially for upcoming Machine API integration.

This PR attempts to separate the latter into its own sub-module, with the logic intact.

How was this change tested?

Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: #
  • No

Release Note


@comtalyst comtalyst added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 17, 2025
@comtalyst comtalyst force-pushed the comtalyst/vm-instance-renames branch from f8d89d7 to 03cec38 Compare September 30, 2025 23:02
@comtalyst comtalyst force-pushed the comtalyst/offerings-split branch from b2364ca to c0bc25f Compare September 30, 2025 23:03
@comtalyst comtalyst force-pushed the comtalyst/vm-instance-renames branch from 03cec38 to 6080df2 Compare September 30, 2025 23:07
@comtalyst comtalyst force-pushed the comtalyst/offerings-split branch from c0bc25f to 4169676 Compare September 30, 2025 23:14
Comment thread pkg/providers/instance/offerings/commonerrorhandlers.go
Comment thread pkg/providers/instance/resperrorhandlers.go
Comment thread pkg/providers/instance/offerings/commonerrorhandlers.go
Comment thread pkg/providers/instance/offerings/commonerrorhandlers.go Outdated
Comment thread pkg/providers/instance/offerings/commonerrorhandlers_test.go
Comment thread pkg/providers/instance/offerings/resperrorhandlers.go Outdated
Comment thread pkg/providers/instance/offerings/offerings.go
Comment thread pkg/providers/instance/offerings/resperrorhandlers.go Outdated
Comment thread pkg/providers/instance/vminstance.go Outdated
Comment thread pkg/providers/instance/vminstance.go Outdated
matthchr
matthchr previously approved these changes Oct 8, 2025
Copy link
Copy Markdown
Member

@matthchr matthchr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

My main issue here remaining is the fact that the error shape from machine API cannot be used like the CRP error shape, we have to go get the error off the entity itself.

I think that should be fixed (or else at least I want to understand better why it has to be that way), but that is more a machine API behavior problem and less an issue with this Karpenter code.

LGTM.

Base automatically changed from comtalyst/vm-instance-renames to main October 18, 2025 00:05
@comtalyst comtalyst dismissed matthchr’s stale review October 18, 2025 00:05

The base branch was changed.

matthchr
matthchr previously approved these changes Oct 20, 2025
@comtalyst comtalyst merged commit 30165d7 into main Oct 22, 2025
23 of 26 checks passed
@comtalyst comtalyst deleted the comtalyst/offerings-split branch October 22, 2025 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants