Skip to content

[V2]Sandbox for flyte v2#6955

Merged
popojk merged 32 commits intov2from
add_flyte_binary_build
Mar 10, 2026
Merged

[V2]Sandbox for flyte v2#6955
popojk merged 32 commits intov2from
add_flyte_binary_build

Conversation

@popojk
Copy link
Contributor

@popojk popojk commented Mar 2, 2026

Tracking issue

Related to #6922

Why are the changes needed?

What changes were proposed in this pull request?

How was this patch tested?

Build sandbox:

make sandbox-build

Run sandbox(add FLYTE_DEV=True arg to run in dev mode):

make sandbox-run

Set kubeconfig to v2 sandbox

export KUBECONFIG=~/.flyte/sandboxv2/kubeconfig

Run an example in flyte-sdk repo:

python examples/basics/devbox_one.py

sdk config.yaml:

admin:
  endpoint: dns:///localhost:30080
  insecure: True
logger:
  show-source: true
  level: 0

image:
  builder: local

task:
  domain: development
  project: testproject
  org: testorg

The task pods are good to go: Screenshot 2026-03-02 at 3 24 04 PM

Labels

Please add one or more of the following labels to categorize your PR:

  • added: For new features.
  • changed: For changes in existing functionality.
  • deprecated: For soon-to-be-removed features.
  • removed: For features being removed.
  • fixed: For any bug fixed.
  • security: In case of vulnerabilities

This is important to improve the readability of release notes.

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
@github-actions github-actions bot mentioned this pull request Feb 28, 2026
3 tasks
@@ -0,0 +1,5 @@
{
"repository": {
"default_branch": "master"
Copy link
Member

Choose a reason for hiding this comment

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

What is this file? should we use v2 branch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry this is an unused file, deleted.

@pingsutw
Copy link
Member

pingsutw commented Mar 2, 2026

Seeing this error when building the sandbox

 => CACHED [flytebuilder  6/17] COPY flytecopilot flytecopilot                                                                                                                          0.0s 
 => CACHED [flytebuilder  7/17] COPY flyteidl2 flyteidl2                                                                                                                                0.0s 
 => CACHED [flytebuilder  8/17] COPY flyteplugins flyteplugins                                                                                                                          0.0s 
 => CACHED [flytebuilder  9/17] COPY flytestdlib flytestdlib                                                                                                                            0.0s 
 => CACHED [flytebuilder 10/17] COPY gen gen                                                                                                                                            0.0s 
 => ERROR [flytebuilder 11/17] COPY queue queue                                                                                                                                         0.0s 
 => CACHED [flytebuilder 12/17] COPY runs runs                                                                                                                                          0.0s 
 => ERROR [flytebuilder 13/17] COPY state state                                                                                                                                         0.0s 
------                                                                                                                                                                                       
 > [flytebuilder 11/17] COPY queue queue:
------
------
 > [flytebuilder 13/17] COPY state state:
------

 1 warning found (use docker --debug to expand):
 - CopyIgnoredFile: Attempting to Copy file "gen" that is excluded by .dockerignore (line 18)                                                                                                
Dockerfile:21
--------------------
  19 |     COPY queue queue
  20 |     COPY runs runs
  21 | >>> COPY state state
  22 |     
  23 |     COPY go.mod go.sum ./
--------------------
ERROR: failed to build: failed to solve: failed to compute cache key: failed to calculate checksum of ref ekpscsqwcfa3y7gk4uz2qd27c::3cqpgmh56y7uxudzrdnq23t3i: "/state": not found

View build details: docker-desktop://dashboard/build/flyte-sandbox/flyte-sandbox0/lkbrhm8bgsq2h72sjruqmtdll
make[1]: *** [flyte] Error 1
make: *** [build-sandbox] Error 2

popojk added 2 commits March 3, 2026 10:41
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
@popojk
Copy link
Contributor Author

popojk commented Mar 3, 2026

Seeing this error when building the sandbox

 => CACHED [flytebuilder  6/17] COPY flytecopilot flytecopilot                                                                                                                          0.0s 
 => CACHED [flytebuilder  7/17] COPY flyteidl2 flyteidl2                                                                                                                                0.0s 
 => CACHED [flytebuilder  8/17] COPY flyteplugins flyteplugins                                                                                                                          0.0s 
 => CACHED [flytebuilder  9/17] COPY flytestdlib flytestdlib                                                                                                                            0.0s 
 => CACHED [flytebuilder 10/17] COPY gen gen                                                                                                                                            0.0s 
 => ERROR [flytebuilder 11/17] COPY queue queue                                                                                                                                         0.0s 
 => CACHED [flytebuilder 12/17] COPY runs runs                                                                                                                                          0.0s 
 => ERROR [flytebuilder 13/17] COPY state state                                                                                                                                         0.0s 
------                                                                                                                                                                                       
 > [flytebuilder 11/17] COPY queue queue:
------
------
 > [flytebuilder 13/17] COPY state state:
------

 1 warning found (use docker --debug to expand):
 - CopyIgnoredFile: Attempting to Copy file "gen" that is excluded by .dockerignore (line 18)                                                                                                
Dockerfile:21
--------------------
  19 |     COPY queue queue
  20 |     COPY runs runs
  21 | >>> COPY state state
  22 |     
  23 |     COPY go.mod go.sum ./
--------------------
ERROR: failed to build: failed to solve: failed to compute cache key: failed to calculate checksum of ref ekpscsqwcfa3y7gk4uz2qd27c::3cqpgmh56y7uxudzrdnq23t3i: "/state": not found

View build details: docker-desktop://dashboard/build/flyte-sandbox/flyte-sandbox0/lkbrhm8bgsq2h72sjruqmtdll
make[1]: *** [flyte] Error 1
make: *** [build-sandbox] Error 2

@pingsutw The build failed due to state and queue service are deleted. I just push a fix commit to it and the build is working now. Thanks!

@popojk popojk requested a review from pingsutw March 3, 2026 02:44
@popojk popojk changed the title Add flyte binary build [V2]Sandbox for flyte v2 Mar 3, 2026
@machichima
Copy link
Member

Could you also paster the config for flyte-sdk in the PR description? Is it like so?

admin:
  endpoint: dns:///localhost:8090
  insecure: True
image:
  builder: local
task:
  domain: development
  project: testproject
  org: testorg

@machichima
Copy link
Member

Got this error when running make build-sandbox

Downloading docker-registry from repo https://twuni.github.io/docker-registry.helm
Downloading kubernetes-dashboard from repo https://kubernetes-retired.github.io/dashboard/
Downloading minio from repo https://charts.bitnami.com/bitnami
Downloading postgresql from repo https://charts.bitnami.com/bitnami
Deleting outdated charts
mkdir -p manifests
kustomize build \
                --enable-helm \
                --load-restrictor=LoadRestrictionsNone \
                kustomize/complete > manifests/complete.yaml
Error: namespace transformation produces ID conflict: [{"apiVersion":"v1","kind":"Secret","metadata":{"annotations":{"internal.config.kubernetes.io/previousKinds":"Secret","internal.config.kubernetes.io/previousNames":"kubernetes-dashboard-csrf","internal.config.kubernetes.io/previousNamespaces":"flyte"},"name":"kubernetes-dashboard-csrf","namespace":"flyte"}} {"apiVersion":"v1","kind":"Secret","metadata":{"annotations":{"internal.config.kubernetes.io/previousKinds":"Secret","internal.config.kubernetes.io/previousNames":"kubernetes-dashboard-csrf","internal.config.kubernetes.io/previousNamespaces":"default"},"labels":{"app.kubernetes.io/instance":"flyte-sandbox","app.kubernetes.io/managed-by":"Helm","app.kubernetes.io/name":"kubernetes-dashboard","app.kubernetes.io/version":"2.7.0","helm.sh/chart":"kubernetes-dashboard-6.0.0"},"name":"kubernetes-dashboard-csrf","namespace":"flyte"},"type":"Opaque"}]
make[1]: *** [manifests] Error 1
make: *** [build-sandbox] Error 2

I think it's because we enable kubernetes-dashboard here

kubernetes-dashboard:
enabled: true

And this will create the secret automathically:

apiVersion: v1
kind: Secret
metadata:
labels:
app.kubernetes.io/instance: flyte-sandbox
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: kubernetes-dashboard
app.kubernetes.io/version: 2.7.0
helm.sh/chart: kubernetes-dashboard-6.0.0
name: kubernetes-dashboard-csrf
type: Opaque

Then we defined secret with same name in:

apiVersion: v1
kind: Secret
metadata:
name: kubernetes-dashboard-csrf
namespace: flyte

this cause the conflict

@popojk
Copy link
Contributor Author

popojk commented Mar 3, 2026

Could you also paster the config for flyte-sdk in the PR description? Is it like so?

admin:
  endpoint: dns:///localhost:8090
  insecure: True
image:
  builder: local
task:
  domain: development
  project: testproject
  org: testorg

I have updated the PR description, thanks!

admin:
  endpoint: dns:///localhost:30080
  insecure: True
logger:
  show-source: true
  level: 0

image:
  builder: local

task:
  domain: development
  project: testproject
  org: testorg

@popojk
Copy link
Contributor Author

popojk commented Mar 3, 2026

Got this error when running make build-sandbox

Downloading docker-registry from repo https://twuni.github.io/docker-registry.helm
Downloading kubernetes-dashboard from repo https://kubernetes-retired.github.io/dashboard/
Downloading minio from repo https://charts.bitnami.com/bitnami
Downloading postgresql from repo https://charts.bitnami.com/bitnami
Deleting outdated charts
mkdir -p manifests
kustomize build \
                --enable-helm \
                --load-restrictor=LoadRestrictionsNone \
                kustomize/complete > manifests/complete.yaml
Error: namespace transformation produces ID conflict: [{"apiVersion":"v1","kind":"Secret","metadata":{"annotations":{"internal.config.kubernetes.io/previousKinds":"Secret","internal.config.kubernetes.io/previousNames":"kubernetes-dashboard-csrf","internal.config.kubernetes.io/previousNamespaces":"flyte"},"name":"kubernetes-dashboard-csrf","namespace":"flyte"}} {"apiVersion":"v1","kind":"Secret","metadata":{"annotations":{"internal.config.kubernetes.io/previousKinds":"Secret","internal.config.kubernetes.io/previousNames":"kubernetes-dashboard-csrf","internal.config.kubernetes.io/previousNamespaces":"default"},"labels":{"app.kubernetes.io/instance":"flyte-sandbox","app.kubernetes.io/managed-by":"Helm","app.kubernetes.io/name":"kubernetes-dashboard","app.kubernetes.io/version":"2.7.0","helm.sh/chart":"kubernetes-dashboard-6.0.0"},"name":"kubernetes-dashboard-csrf","namespace":"flyte"},"type":"Opaque"}]
make[1]: *** [manifests] Error 1
make: *** [build-sandbox] Error 2

I think it's because we enable kubernetes-dashboard here

kubernetes-dashboard:
enabled: true

And this will create the secret automathically:

apiVersion: v1
kind: Secret
metadata:
labels:
app.kubernetes.io/instance: flyte-sandbox
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: kubernetes-dashboard
app.kubernetes.io/version: 2.7.0
helm.sh/chart: kubernetes-dashboard-6.0.0
name: kubernetes-dashboard-csrf
type: Opaque

Then we defined secret with same name in:

apiVersion: v1
kind: Secret
metadata:
name: kubernetes-dashboard-csrf
namespace: flyte

this cause the conflict

Strange it runs fine in my local machine. I just changed the way to set k8s dashboard secret, can you help me to try again?

Signed-off-by: Alex Wu <c.alexwu@gmail.com>
.PHONY: run-sandbox
run-sandbox: ## Start the flyte sandbox without rebuilding the image
$(MAKE) -C docker/sandbox-bundled start

Copy link
Member

Choose a reason for hiding this comment

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

Could we add a stop-sandbox command?

Copy link
Contributor Author

@popojk popojk Mar 5, 2026

Choose a reason for hiding this comment

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

fixed in 7ff112c

.PHONY: run-sandbox
run-sandbox: ## Start the flyte sandbox without rebuilding the image
$(MAKE) -C docker/sandbox-bundled start

Copy link
Member

Choose a reason for hiding this comment

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

btw I think it would be better to name the command as sandbox-..., so that when we type sandbox and press tab, we can see available commands. For example:

Image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in 7ff112c

@machichima
Copy link
Member

Strange it runs fine in my local machine. I just changed the way to set k8s dashboard secret, can you help me to try again?

Still get error:

kustomize build \
                --enable-helm \
                --load-restrictor=LoadRestrictionsNone \
                kustomize/complete > manifests/complete.yaml
Error: namespace transformation produces ID conflict: [{"apiVersion":"v1","kind":"Service","metadata":{"annotations":{"internal.config.kubernetes.io/previousKinds":"Service","internal.config.kubernetes.io/previousNames":"flyte-sandbox-kubernetes-dashboard","internal.config.kubernetes.io/previousNamespaces":"flyte"},"name":"flyte-sandbox-kubernetes-dashboard","namespace":"flyte"},"spec":{"externalName":"flyte-sandbox-kubernetes-dashboard.default.svc.cluster.local","type":"ExternalName"}} {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{"internal.config.kubernetes.io/previousKinds":"Service","internal.config.kubernetes.io/previousNames":"flyte-sandbox-kubernetes-dashboard","internal.config.kubernetes.io/previousNamespaces":"default"},"labels":{"app.kubernetes.io/component":"kubernetes-dashboard","app.kubernetes.io/instance":"flyte-sandbox","app.kubernetes.io/managed-by":"Helm","app.kubernetes.io/name":"kubernetes-dashboard","app.kubernetes.io/version":"2.7.0","helm.sh/chart":"kubernetes-dashboard-6.0.0","kubernetes.io/cluster-service":"true"},"name":"flyte-sandbox-kubernetes-dashboard","namespace":"flyte"},"spec":{"ports":[{"name":"http","port":80,"targetPort":"http"}],"selector":{"app.kubernetes.io/component":"kubernetes-dashboard","app.kubernetes.io/instance":"flyte-sandbox","app.kubernetes.io/name":"kubernetes-dashboard"},"type":"ClusterIP"}}]
make[1]: *** [manifests] Error 1
make: *** [build-sandbox] Error 2

I think it might because we are using the different version? Below is the version I used:

# kustomize version
❯ kustomize version
v5.7.1

# helm version
❯ helm version --short
v3.18.6+gb76a950

app/k8s.go Outdated

func buildRESTConfig(ctx context.Context, kubeconfig string) (*rest.Config, error) {
if kubeconfig != "" {
kubeconfig = expandPath(kubeconfig)
Copy link
Member

Choose a reason for hiding this comment

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

While this kubeconfig is from the config file, I think it would be better to also add normalize into the config layer, if there's other places that get the kubeconfig, we can also give the normalized path.

We can add util function under flytestdlib/config, and under the GetConfig() for each component, we can do something like so:

func GetConfig() *Config {
	raw := configSection.GetConfig().(*Config)
	cfg := *raw
	cfg.Kubernetes.KubeConfig = config.NormalizeFilePath(cfg.Kubernetes.KubeConfig)
	return &cfg
}

So that we can ensure that the kubeconfig get from the Config struct is always normalized

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in e84accb

@machichima
Copy link
Member

Just a note for follow-up, flyte/executor/cmd/main.go is using GetConfigOrDie while all others use app.InitKubernetesClient, we should make them consistent (all use app.InitKubernetesClient).

k8sConfig := ctrl.GetConfigOrDie()

@machichima
Copy link
Member

btw please do:

git rm --cached gen/rust/Cargo.lock

This is already being ignored in the .gitignore, but some branch still have it. We should ensure we clean this up

@@ -0,0 +1,175 @@
# flyte-binary

![Version: v0.1.10](https://img.shields.io/badge/Version-v0.1.10-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)
Copy link
Member

Choose a reason for hiding this comment

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

should be v0.2.0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in 186914f

Comment on lines +411 to +426
tasks:
# -- Plugins configuration, [structure](https://pkg.go.dev/github.com/flyteorg/flytepropeller/pkg/controller/nodes/task/config#TaskPluginConfig)
task-plugins:
# -- [Enabled Plugins](https://pkg.go.dev/github.com/lyft/flyteplugins/go/tasks/config#Config).
# Enable sagemaker*, athena if you install the backend plugins
enabled-plugins:
- container
- sidecar
- connector-service
- echo
default-for-task-types:
container: container
sidecar: sidecar
container_array: k8s-array
# -- Uncomment to enable task type that uses Flyte Connector
# bigquery_query_job_task: connector-service
Copy link
Member

Choose a reason for hiding this comment

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

Do we need those? I think now we register the plugin through blank import (although we only do blank import for flyteplugins/go/tasks/plugins/k8s/pod now), but I think this is not used anywhere in v2?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I leave it for now because we might need it in the future I think? e.g. default-for-task-types is crucial when we have multiple plugins for 1 task type and we need to assign the plugin in runtime

logs:
config: {{- include "flyte-binary.configuration.logging.plugins" . | nindent 12 }}
{{- if .Values.flyteconnector.enabled }}
connector-service:
Copy link
Member

Choose a reason for hiding this comment

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

Just a note. Right now we do not call RegisterConnectorPlugin so that this config does not really work. And is there connector in V2? @pingsutw

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't have default connector in sandbox in v2, so maybe we don't need this. fixed in ab1ff1e

002-database.yaml: |
{{- with .Values.configuration.database }}
database:
postgres:
Copy link
Member

Choose a reason for hiding this comment

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

we currently have two options, postgres and sqlite, do we want to include the sqlite config here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

SG. Fixed in 56e61cc

Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Copy link
Member

@machichima machichima Mar 4, 2026

Choose a reason for hiding this comment

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

I think this file and charts/flyte-binary/templates/auth-client-secret.yaml are not used anywhere now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just leave it because we might need to implement auth feature in the future

@machichima
Copy link
Member

machichima commented Mar 4, 2026

I test with helm template test and the following case will fail:

❯ helm template test charts/flyte-binary --set ingress.create=true
Error: template: flyte-binary/templates/ingress/grpc.yaml:2:15: executing "flyte-binary/templates/ingress/grpc.yaml" at <include "flyte-binary.ingress.grpcPaths" .>: error calling include: template: no template "flyte-binary.ingress.grpcPaths" associated with template "gotpl"

Use --debug flag to render out invalid YAML
❯ helm template test charts/flyte-binary --set ingress.separateGrpcIngress=false
Error: template: flyte-binary/templates/service/http.yaml:51:15: executing "flyte-binary/templates/service/http.yaml" at <include "flyte-binary.service.grpc.port" .>: error calling include: template: no template "flyte-binary.service.grpc.port" associated with template "gotpl"

Use --debug flag to render out invalid YAML
  • This is for auth, and we can leave for the follow-up when we are adding auth
❯ helm template test charts/flyte-binary --set configuration.auth.enabled=true
Error: template: flyte-binary/templates/auth-client-secret.yaml:5:11: executing "flyte-binary/templates/auth-client-secret.yaml" at <include "flyte-binary.configuration.auth.clientSecretName" .>: error calling include: template: no template "flyte-binary.configuration.auth.clientSecretName" associated with template "gotpl"

Use --debug flag to render out invalid YAML

{{- if .Values.commonAnnotations }}
{{- tpl ( .Values.commonAnnotations | toYaml ) . | nindent 4 }}
{{- end }}
{{- if .Values.service.annotations }}
Copy link
Member

Choose a reason for hiding this comment

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

We expect service.annotations from Values.yaml, but it's missing in values.yaml. We should either remove it or add the service.annotations under values.yaml

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in 4eda970

Signed-off-by: Alex Wu <c.alexwu@gmail.com>
@machichima
Copy link
Member

Got errors when running go test under docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/

~/w/op/flyte-v2/dock/sandbox-bundled/bootstrap/internal/transform/plugins/config add_flyte_binary_build *22 !2 ?1
❯ go test
# github.com/flyteorg/flyte/docker/sandbox-bundled/bootstrap/internal/transform/plugins/config [github.com/flyteorg/flyte/docker/sandbox-bundled/bootstrap/internal/transform/plugins/config.test]
./loader_test.go:18:3: unknown field ClusterResourceTemplatesConfigMapName in struct literal of type LoaderOpts
./loader_test.go:115:3: unknown field ClusterResourceTemplatesConfigMapName in struct literal of type LoaderOpts
./loader_test.go:125:18: c.clusterResourceTemplates undefined (type *Loader has no field or method clusterResourceTemplates)
./loader_test.go:145:3: unknown field ClusterResourceTemplatesConfigMapName in struct literal of type LoaderOpts
./loader_test.go:155:18: c.clusterResourceTemplates undefined (type *Loader has no field or method clusterResourceTemplates)
FAIL    github.com/flyteorg/flyte/docker/sandbox-bundled/bootstrap/internal/transform/plugins/config [build failed]

--env FLYTE_DEV=$(FLYTE_DEV) \
--env K3S_KUBECONFIG_OUTPUT=/.kube/kubeconfig \
--volume $(PWD)/.kube:/.kube \
--volume $(HOME)/.flyte/sandbox:/var/lib/flyte/config \
Copy link
Member

Choose a reason for hiding this comment

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

We have .flyte/sandbox here and .flyte/sandboxv2 below, should we just pick one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should only mount to .flyte/sandboxv2, fixed

. .venv/bin/activate && pip install flytekit

.PHONY: test
test: export FLYTECTL_CONFIG := test/config.yaml
Copy link
Member

Choose a reason for hiding this comment

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

I think there's no test/ directly under sandbox-bundle?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

deleted in cdf1207

@machichima
Copy link
Member

Please do git rm --cached gen/rust/Cargo.lock

popojk added 5 commits March 9, 2026 08:10
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
@popojk
Copy link
Contributor Author

popojk commented Mar 9, 2026

Got errors when running go test under docker/sandbox-bundled/bootstrap/internal/transform/plugins/config/

~/w/op/flyte-v2/dock/sandbox-bundled/bootstrap/internal/transform/plugins/config add_flyte_binary_build *22 !2 ?1
❯ go test
# github.com/flyteorg/flyte/docker/sandbox-bundled/bootstrap/internal/transform/plugins/config [github.com/flyteorg/flyte/docker/sandbox-bundled/bootstrap/internal/transform/plugins/config.test]
./loader_test.go:18:3: unknown field ClusterResourceTemplatesConfigMapName in struct literal of type LoaderOpts
./loader_test.go:115:3: unknown field ClusterResourceTemplatesConfigMapName in struct literal of type LoaderOpts
./loader_test.go:125:18: c.clusterResourceTemplates undefined (type *Loader has no field or method clusterResourceTemplates)
./loader_test.go:145:3: unknown field ClusterResourceTemplatesConfigMapName in struct literal of type LoaderOpts
./loader_test.go:155:18: c.clusterResourceTemplates undefined (type *Loader has no field or method clusterResourceTemplates)
FAIL    github.com/flyteorg/flyte/docker/sandbox-bundled/bootstrap/internal/transform/plugins/config [build failed]

Fixed in 8d3f05a

popojk added 3 commits March 9, 2026 09:42
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Signed-off-by: Alex Wu <c.alexwu@gmail.com>
cd gen/python && uv sync --all-groups --frozen && cd ../.. &&
make gen-local &&
git diff --exit-code || (echo 'Generated files are out of date. Run \`make gen\` and commit changes.' && exit 1) &&
git diff --exit-code -- ':!gen/rust/Cargo.lock' || (echo 'Generated files are out of date. Run \`make gen\` and commit changes.' && exit 1) &&
Copy link
Contributor Author

@popojk popojk Mar 9, 2026

Choose a reason for hiding this comment

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

We need to add this otherwise the gen diff CI test is gonna fail

Signed-off-by: Alex Wu <c.alexwu@gmail.com>
@machichima
Copy link
Member

machichima commented Mar 9, 2026

Overall LGTM! Few last things:

  1. Did we do export KUBECONFIG=$KUBECONFIG:~/.flyte/sandboxv2/kubeconfig when doing make sandbox-run? I think I still need to do it explicitly
  2. Please update the PR description with new make sandbox-XXX command.
  3. Right now the context and cluster name are "default". Could we change the name to "flytev2-sandbox" or something else?
image

Can be in follow-up PR

  1. Could you add a doc to show how to start the sandbox somewhere?
  2. I think we do not need to run make build-sandbox if we want to run in dev mode? We may need to document this also
  3. Could you also document the username and password for minio? I think it's minio and miniostorage?

@machichima
Copy link
Member

After running make sandbox-build, the manifests are updated. I think we shouldn't update them every time we build the sandbox?

image

@popojk
Copy link
Contributor Author

popojk commented Mar 9, 2026

After running make sandbox-build, the manifests are updated. I think we shouldn't update them every time we build the sandbox?

image

Maybe we should keep it? We only build the sandbox image every time we have a new version of docker image to release. We can automatically make sure the manifests are up to date with this config.

Signed-off-by: Alex Wu <c.alexwu@gmail.com>
@popojk
Copy link
Contributor Author

popojk commented Mar 9, 2026

3. Right now the context and cluster name are "default". Could we change the name to "flytev2-sandbox"

  1. The make file handle export in sub-process, which will not be effective in current terminal context. So seems like we need to execute the exclude command mannually.
  2. Fixed
  3. Make sense, fixed in fbc6cf9

4-6 will be done in follow up issues

Copy link
Member

@machichima machichima left a comment

Choose a reason for hiding this comment

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

Overall LGTM! Just note that after I did sandbox-stop and sandbox-run, I'll get this error

❯ make sandbox-stop
Makefile:30: warning: overriding commands for target `build'
go.Makefile:75: warning: ignoring old commands for target `build'
Makefile:76: warning: overriding commands for target `help'
go.Makefile:25: warning: ignoring old commands for target `help'
/Library/Developer/CommandLineTools/usr/bin/make -C docker/sandbox-bundled stop
docker stop flyte-sandbox
flyte-sandbox

❯ make sandbox-run
Makefile:30: warning: overriding commands for target `build'
go.Makefile:75: warning: ignoring old commands for target `build'
Makefile:76: warning: overriding commands for target `help'
go.Makefile:25: warning: ignoring old commands for target `help'
/Library/Developer/CommandLineTools/usr/bin/make -C docker/sandbox-bundled start
[ -n "flyte-sandbox" ] || \
                docker volume create flyte-sandbox
docker: Error response from daemon: Conflict. The container name "/flyte-sandbox" is already in use by container "e8b2e7ee4aac95b852516f0bfdb052f0b7d5a7e8630965e6f45784137241c7b0". You have to remove (or rename) that container to be able to reuse that name.

Run 'docker run --help' for more information
make[1]: *** [start] Error 125
make: *** [sandbox-run] Error 2

I'll need to manually remove the old container with

docker rm -f flyte-sandbox

@popojk
Copy link
Contributor Author

popojk commented Mar 10, 2026

Overall LGTM! Just note that after I did sandbox-stop and sandbox-run, I'll get this error

❯ make sandbox-stop
Makefile:30: warning: overriding commands for target `build'
go.Makefile:75: warning: ignoring old commands for target `build'
Makefile:76: warning: overriding commands for target `help'
go.Makefile:25: warning: ignoring old commands for target `help'
/Library/Developer/CommandLineTools/usr/bin/make -C docker/sandbox-bundled stop
docker stop flyte-sandbox
flyte-sandbox

❯ make sandbox-run
Makefile:30: warning: overriding commands for target `build'
go.Makefile:75: warning: ignoring old commands for target `build'
Makefile:76: warning: overriding commands for target `help'
go.Makefile:25: warning: ignoring old commands for target `help'
/Library/Developer/CommandLineTools/usr/bin/make -C docker/sandbox-bundled start
[ -n "flyte-sandbox" ] || \
                docker volume create flyte-sandbox
docker: Error response from daemon: Conflict. The container name "/flyte-sandbox" is already in use by container "e8b2e7ee4aac95b852516f0bfdb052f0b7d5a7e8630965e6f45784137241c7b0". You have to remove (or rename) that container to be able to reuse that name.

Run 'docker run --help' for more information
make[1]: *** [start] Error 125
make: *** [sandbox-run] Error 2

I'll need to manually remove the old container with

docker rm -f flyte-sandbox

Hey I tested it locally multiple times but cannot reproduce the error. I'll merge first and get back to this issue in the future.

Signed-off-by: Alex Wu <c.alexwu@gmail.com>
@popojk popojk merged commit 5a3e0e6 into v2 Mar 10, 2026
5 checks passed
@popojk popojk deleted the add_flyte_binary_build branch March 10, 2026 00:46
@pingsutw pingsutw modified the milestone: V2 GA Mar 10, 2026
popojk added a commit that referenced this pull request Mar 11, 2026
* add helm chart

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* add docker folder for running k3s cluster

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* delete queue state service add actions service

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* delete queue state service add actions service

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* patch k8s secret config

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* fix unimplement rpc issue

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* fix k8s dashboard conflict issue

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* add normalize path function to std lib

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* add sandbox-stop command and fix sandbox command name

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* remove cargo file in gen folder

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* fix doc flyte version

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* delete connector config in configmap

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* add sqlite config

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* delete service annotation config

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* fix ingress config

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* regen manifests

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* fix some docker script error

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* regenerate manifests

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* fix dicker image name

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* add kube folder to gitignore

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* remove test make script under sandbox bundle folder

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* fix test cases

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* delete cargo.lock

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* regenerate proto

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* fix gen diff check rule

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* fix gen check rule to exclude Cargo

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* delete complete-connector folder

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

* fix sandbox cluster name

Signed-off-by: Alex Wu <c.alexwu@gmail.com>

---------

Signed-off-by: Alex Wu <c.alexwu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants