Skip to content

Mark initializing when reserved only - #39

Merged
InftyAI-Agent merged 1 commit into
InftyAI:mainfrom
kerthcet:cleanup/provision-change
Aug 11, 2026
Merged

Mark initializing when reserved only#39
InftyAI-Agent merged 1 commit into
InftyAI:mainfrom
kerthcet:cleanup/provision-change

Conversation

@kerthcet

Copy link
Copy Markdown
Member

What this PR does / why we need it

Which issue(s) this PR fixes

Fixes #

Special notes for your reviewer

Does this PR introduce a user-facing change?


Signed-off-by: kerthcet <kerthcet@gmail.com>
Copilot AI lite review requested due to automatic review settings August 11, 2026 19:28
@InftyAI-Agent InftyAI-Agent added needs-triage Indicates an issue or PR lacks a label and requires one. needs-priority Indicates a PR lacks a label and requires one. do-not-merge/needs-kind Indicates a PR lacks a label and requires one. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refines how the virtual kubelet reports Pod status during provisioning by distinguishing between providers that reserve capacity synchronously (e.g., AWS instant fleet) and those that may accept a request without capacity committed yet (e.g., Modal). It updates the provider contract to return an additional reserved flag and aligns status reporting, polling behavior, and documentation accordingly.

Changes:

  • Extend provider.Provider.Provision to return (instanceID, reserved, err) and propagate through all provider implementations (AWS/Modal/fake) and call sites.
  • Update vnode CreatePod to emit Provisioning before Provision, and only advance to Initializing immediately when reserved=true.
  • Tighten Modal client behavior by treating sandbox tag-read failures as fatal to reads, preventing unsafe “absent => terminated” conclusions.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pkg/vnode/handler.go Emit Provisioning before long-running Provision; advance to Initializing only when capacity is reserved.
pkg/vnode/handler_test.go Add tests covering reserved vs unreserved behavior and safety during in-flight provisioning.
pkg/provider/provider.go Change Provision interface to include reserved semantics and document guarantees.
pkg/provider/modal/modal.go Implement reserved=false for fresh sandboxes; infer reserved on observed running adoption.
pkg/provider/modal/modal_test.go Update tests to assert reserved semantics for Modal create/adopt paths.
pkg/provider/modal/client.go Make tag read failures fail the overall read to avoid unsafe identity loss.
pkg/provider/fake/fake.go Always return reserved=true for the in-memory provider.
pkg/provider/fake/fake_test.go Update fake provider tests for new return signature and reserved semantics.
pkg/provider/aws/aws.go Return reserved=true for all successful AWS provisions (instant fleet semantics).
pkg/provider/aws/aws_test.go Update AWS tests for new return signature and reserved expectations.
internal/controller/nodeclaim_controller.go Update comments to reflect “evidence of existence” via reserved provision or list observation.
internal/controller/nodeclaim_controller_test.go Update fake provider to satisfy new Provision signature.
docs/status.md Document new status timeline and meaning of unreserved ids.
docs/architecture.md Removes mention of provider-count limit (now mismatched with API validation).
config/samples/nodepool.yaml Comments out Modal provider in sample NodePool.
config/samples/deployment.yaml Changes sample accelerator type from a100-80gb to a100-40gb.
api/v1alpha1/groupversion_info.go Update PodReasonProvisioning / PodReasonInitializing semantics and evidence rules.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/architecture.md
Comment thread config/samples/nodepool.yaml
Comment thread config/samples/deployment.yaml
@kerthcet

Copy link
Copy Markdown
Member Author

/lgtm
/kind cleanup

@InftyAI-Agent InftyAI-Agent added lgtm Looks good to me, indicates that a PR is ready to be merged. cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed do-not-merge/needs-kind Indicates a PR lacks a label and requires one. labels Aug 11, 2026

@InftyAI-Agent InftyAI-Agent left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved: PR has both lgtm and approved labels

@InftyAI-Agent InftyAI-Agent left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved: PR has both lgtm and approved labels

@InftyAI-Agent InftyAI-Agent left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved: PR has both lgtm and approved labels

@InftyAI-Agent
InftyAI-Agent merged commit 03e9f38 into InftyAI:main Aug 11, 2026
41 of 43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Looks good to me, indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a label and requires one. needs-triage Indicates an issue or PR lacks a label and requires one.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants