Skip to content

OrbStack not detected (race condition) #6525

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
chintai-paul opened this issue Apr 1, 2025 · 0 comments
Open

OrbStack not detected (race condition) #6525

chintai-paul opened this issue Apr 1, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@chintai-paul
Copy link

chintai-paul commented Apr 1, 2025

Expected Behavior

Tilt should detect that OrbStack is running locally and not try to push images to Docker Hub.

STEP 2/3 — Pushing my-image:tilt-b40c5c3a04bf57c3
     Skipping push: building on cluster's container runtime

Current Behavior

Tilt tries to push images to Docker Hub (when OrbStack was just started).

STEP 2/3 — Pushing my-image:tilt-b40c5c3a04bf57c3
     Pushing with Docker client
     Authenticating to image repo: docker.io
     Sending image data

Build Failed: docker push: pushing image "docker.io/my-image": denied: requested access to the resource is denied

Steps to Reproduce

  1. Install OrbStack
  2. Run the following script:
orb start k8s
kubectl config use-context orbstack
while ! kubectl get node &> /dev/null; do
  echo "Waiting for Kubernetes to be ready"
  sleep 1
done
tilt doctor
tilt up
  1. Notice that Tilt tries to push docker images to Docker Hub (only when not cached and OrbStack was just started)

Context

tilt doctor Output (before running tilt up when it tries to push)

Tilt: v0.33.22, built 2025-01-03
System: darwin-arm64
---
Docker
- Host: unix:///Users/me/.orbstack/run/docker.sock
- Server Version: 27.5.1
- API Version: 1.47
- Builder: 2
- Compose Version: v2.32.4
---
Kubernetes
- Env: orbstack
- Context: orbstack
- Cluster Name: orbstack
- Namespace: default
- Container Runtime: read-failure
- Version: v1.30.7+orb1
- Cluster Local Registry: none
---
...

About Your Use Case

We're trying to automate the cluster setup, but when starting OrbStack followed by Tilt there is a race-condition in detecting the environment. Refreshing a resource does not resolve the issue. Restarting Tilt resolves the issue until the next full restart (including OrbStack). I would be happy if someone could tell me for which condition I need to wait in the script before running tilt up. From the tilt doctor output I can see that Tilt already knows that it is working with an OrbStack cluster, but the "push policy" relies on something else.

Maybe it is related to this: https://github.com/tilt-dev/tilt/blob/master/internal/docker/env.go#L71

@chintai-paul chintai-paul added the bug Something isn't working label Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant