OrbStack not detected (race condition)

Open
#6,525 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
docker, go, kubernetes

Research direction

Start with internal/docker/env.go around line 71 and compare its environment detection with the Kubernetes readiness observed by the reproduction script. Run the OrbStack startup sequence followed by tilt doctor and tilt up, focusing on the reported container runtime and push decision. Done means Tilt reliably detects a newly started OrbStack environment and does not push images to Docker Hub.

Written by the indexing model from the issue text.

Description

bug
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

Dominant language
Go
Stars
10.1k
Forks
413
Avg merge
1d 10h
Merged PRs (30d)
6

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tilt-dev/tilt

All issues in tilt-dev/tilt

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.