Skip to content

support create modal sandbox with url and token returned - #44

Merged
InftyAI-Agent merged 3 commits into
InftyAI:mainfrom
kerthcet:feat/support-modal-svc
Aug 13, 2026
Merged

support create modal sandbox with url and token returned#44
InftyAI-Agent merged 3 commits into
InftyAI:mainfrom
kerthcet:feat/support-modal-svc

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 13, 2026 00:06
@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 13, 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 extends Nebula’s provider and virtual-node plumbing to support providers (notably Modal) that mint a one-shot connect URL + bearer token at create time, publishing the URL on the Pod endpoint annotation while persisting the token in a Kubernetes Secret.

Changes:

  • Change provider.Provider.Provision to return a ProvisionResult struct including ConnectURL/ConnectToken (with redacted string formatting).
  • Update the vnode handler to stamp/create-time endpoints, patch endpoint annotations via a single write path, and persist connect credentials to a Pod-owned Secret.
  • Update Modal provider/client to mint and return credentials at sandbox creation; add/adjust unit tests and docs to reflect the new publication model.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
README.md Minor README presentation tweaks (capitalization/badge ordering).
pkg/vnode/status.go Update comment reference to renamed endpoint patch helper.
pkg/vnode/handler.go Core logic: publish create-time endpoint, patch endpoint annotation, and write connect Secret.
pkg/vnode/handler_test.go Add/extend tests covering connect Secret behavior and endpoint persistence semantics.
pkg/provider/provider.go Introduce ProvisionResult with connect credential fields and redacted stringers.
pkg/provider/modal/modal.go Modal Provision now returns ProvisionResult including minted connect credential; add ConnectPort.
pkg/provider/modal/modal_test.go Update tests for new Provision signature and add credential/ConnectPort test coverage.
pkg/provider/modal/client.go SDK client now mints connect token on create and returns it (no per-tick endpoint lookup).
pkg/provider/fake/fake.go Update fake provider to new Provision signature (no credential minted).
pkg/provider/fake/fake_test.go Adjust fake provider tests for ProvisionResult.
pkg/provider/aws/aws.go Update AWS provider to new Provision signature (explicitly returns no credential).
pkg/provider/aws/aws_test.go Adjust AWS provider tests for ProvisionResult.
internal/controller/nodeclaim_controller_test.go Update controller test fake provider signature.
docs/status.md Document provider-dependent endpoint publication timing and “never clear” behavior.
config/manager/kustomization.yaml Bump controller image tag.
api/v1alpha1/groupversion_info.go Update endpoint annotation docs to include URL form and provider-dependent write timing.

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

Comment thread pkg/vnode/handler.go Outdated
Comment thread pkg/vnode/handler.go
Comment on lines +782 to +793
_, err := h.client.CoreV1().Secrets(pod.Namespace).Create(ctx, secret, metav1.CreateOptions{})
switch {
case apierrors.IsAlreadyExists(err):
return // a Secret under this name already exists; see above
case err != nil:
// Loud, because it is not retried: the token cannot be re-minted, so this
// instance stays credential-less until it is replaced.
log.Error(err, "write connect secret; the workload's credential is LOST (delete the Pod to re-provision)",
"pod", k, "secret", ConnectSecretName(pod.Name))
return
}
log.Info("wrote connect secret", "pod", k, "secret", ConnectSecretName(pod.Name))

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The possibility is quite small, ignore it for now.

Signed-off-by: kerthcet <kerthcet@gmail.com>
Copilot AI review requested due to automatic review settings August 13, 2026 10:06

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Signed-off-by: kerthcet <kerthcet@gmail.com>
Copilot AI review requested due to automatic review settings August 13, 2026 12:20

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@kerthcet

Copy link
Copy Markdown
Member Author

/lgtm
/kind feature

@InftyAI-Agent InftyAI-Agent added lgtm Looks good to me, indicates that a PR is ready to be merged. feature Categorizes issue or PR as related to a new feature. and removed do-not-merge/needs-kind Indicates a PR lacks a label and requires one. labels Aug 13, 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 merged commit 682f92e into InftyAI:main Aug 13, 2026
22 of 23 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. feature Categorizes issue or PR as related to a new feature. 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