From 2c41c8ed111fceaf018dfc181cf2fcfaae9e5260 Mon Sep 17 00:00:00 2001 From: nullun Date: Wed, 4 Mar 2026 11:21:35 +0000 Subject: [PATCH 1/7] fix: resolve docker arg expansion error in latest version download Docker expands the `DOLT_VERSION` ARG before bash execution. When set to `latest`, the dynamically fetched version number was being overwritten, causing the script to request `/vlatest/install.sh` and fail with a 404. This commit introduces an internal `ACTUAL_VERSION` variable in the bash script to bypass Docker's string substitution. --- docker/serverDockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docker/serverDockerfile b/docker/serverDockerfile index 50a3b7ae7d1..3e42115e01c 100644 --- a/docker/serverDockerfile +++ b/docker/serverDockerfile @@ -43,13 +43,16 @@ FROM base AS download-binary ARG DOLT_VERSION RUN if [ "$DOLT_VERSION" = "latest" ]; then \ # Fetch latest version number from GitHub API - DOLT_VERSION=$(curl -s https://api.github.com/repos/dolthub/dolt/releases/latest \ + # Use a new variable name so Docker doesn't overwrite it + ACTUAL_VERSION=$(curl -s https://api.github.com/repos/dolthub/dolt/releases/latest \ | grep '"tag_name"' \ | cut -d'"' -f4 \ | sed 's/^v//'); \ + else \ + ACTUAL_VERSION=$DOLT_VERSION; \ fi && \ - if [ "$DOLT_VERSION" != "source" ]; then \ - curl -L "https://github.com/dolthub/dolt/releases/download/v${DOLT_VERSION}/install.sh" | bash; \ + if [ "$ACTUAL_VERSION" != "source" ]; then \ + curl -L "https://github.com/dolthub/dolt/releases/download/v${ACTUAL_VERSION}/install.sh" | bash; \ fi From 77adafa3eab928cc7ff6b40100a3eb96992fe153 Mon Sep 17 00:00:00 2001 From: nullun Date: Wed, 4 Mar 2026 11:44:23 +0000 Subject: [PATCH 2/7] Revert "/integration-tests/bats/docker-entrypoint.bats: skip flaky test" This reverts commit 29dba59c89f0f620338ca4dbbc15ddac833b9771. --- integration-tests/bats/docker-entrypoint.bats | 2 -- 1 file changed, 2 deletions(-) diff --git a/integration-tests/bats/docker-entrypoint.bats b/integration-tests/bats/docker-entrypoint.bats index 0b100492e79..27091a1b719 100644 --- a/integration-tests/bats/docker-entrypoint.bats +++ b/integration-tests/bats/docker-entrypoint.bats @@ -925,8 +925,6 @@ EOF # bats test_tags=no_lambda @test "docker-entrypoint: latest binary build from dolt directory" { - skip "this is way too flaky in CI and needs investigation into why/ how to stabilize" - BATS_TEST_RETRIES=5 # GitHub ver. retrieval can sometimes return Not Found on CI, could be some form of rate limiting cname="${TEST_PREFIX}latest-docker" From fbce4d66d360eeb187aa4776fe36cdeef133394c Mon Sep 17 00:00:00 2001 From: nullun Date: Wed, 4 Mar 2026 13:17:04 +0000 Subject: [PATCH 3/7] Revert "fix: resolve docker arg expansion error in latest version download" This reverts commit 2c41c8ed111fceaf018dfc181cf2fcfaae9e5260. --- docker/serverDockerfile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/docker/serverDockerfile b/docker/serverDockerfile index 3e42115e01c..50a3b7ae7d1 100644 --- a/docker/serverDockerfile +++ b/docker/serverDockerfile @@ -43,16 +43,13 @@ FROM base AS download-binary ARG DOLT_VERSION RUN if [ "$DOLT_VERSION" = "latest" ]; then \ # Fetch latest version number from GitHub API - # Use a new variable name so Docker doesn't overwrite it - ACTUAL_VERSION=$(curl -s https://api.github.com/repos/dolthub/dolt/releases/latest \ + DOLT_VERSION=$(curl -s https://api.github.com/repos/dolthub/dolt/releases/latest \ | grep '"tag_name"' \ | cut -d'"' -f4 \ | sed 's/^v//'); \ - else \ - ACTUAL_VERSION=$DOLT_VERSION; \ fi && \ - if [ "$ACTUAL_VERSION" != "source" ]; then \ - curl -L "https://github.com/dolthub/dolt/releases/download/v${ACTUAL_VERSION}/install.sh" | bash; \ + if [ "$DOLT_VERSION" != "source" ]; then \ + curl -L "https://github.com/dolthub/dolt/releases/download/v${DOLT_VERSION}/install.sh" | bash; \ fi From 0aeaac1dc941662a70d2c2b86c7a677d196d3c4c Mon Sep 17 00:00:00 2001 From: nullun Date: Wed, 4 Mar 2026 13:20:01 +0000 Subject: [PATCH 4/7] fix: use redirect URL to fetch latest Dolt version The GitHub API was rate limiting unauthenticated requests in CI, causing the version fetch to silently return an empty string and the subsequent install script download to fail. --- docker/serverDockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/serverDockerfile b/docker/serverDockerfile index 50a3b7ae7d1..911fb7e589f 100644 --- a/docker/serverDockerfile +++ b/docker/serverDockerfile @@ -43,10 +43,10 @@ FROM base AS download-binary ARG DOLT_VERSION RUN if [ "$DOLT_VERSION" = "latest" ]; then \ # Fetch latest version number from GitHub API - DOLT_VERSION=$(curl -s https://api.github.com/repos/dolthub/dolt/releases/latest \ - | grep '"tag_name"' \ - | cut -d'"' -f4 \ - | sed 's/^v//'); \ + DOLT_VERSION=$(curl -sI https://github.com/dolthub/dolt/releases/latest \ + | grep -i location \ + | sed 's|.*/v||' \ + | tr -d '[:space:]'); \ fi && \ if [ "$DOLT_VERSION" != "source" ]; then \ curl -L "https://github.com/dolthub/dolt/releases/download/v${DOLT_VERSION}/install.sh" | bash; \ From 17a7de3c667d31b8cd8bcc7cadfa3dba62a50f20 Mon Sep 17 00:00:00 2001 From: nullun Date: Wed, 4 Mar 2026 14:37:29 +0000 Subject: [PATCH 5/7] same redirect trick used as previous commit --- integration-tests/bats/docker-entrypoint.bats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-tests/bats/docker-entrypoint.bats b/integration-tests/bats/docker-entrypoint.bats index 27091a1b719..65cfd4c619e 100644 --- a/integration-tests/bats/docker-entrypoint.bats +++ b/integration-tests/bats/docker-entrypoint.bats @@ -929,7 +929,7 @@ EOF cname="${TEST_PREFIX}latest-docker" LATEST_IMAGE="dolt-entrypoint-latest:test" - EXPECTED_VERSION=$(curl -s https://api.github.com/repos/dolthub/dolt/releases/latest | grep '"tag_name"' | cut -d'"' -f4 | sed 's/^v//') + EXPECTED_VERSION=$(curl -sI https://github.com/dolthub/dolt/releases/latest | grep -i location | sed 's|.*/v||' | tr -d '[:space:]') cd "$WORKSPACE_ROOT/dolt" docker build --no-cache -f docker/serverDockerfile --build-arg DOLT_VERSION=latest -t "$LATEST_IMAGE" . From 60d06f87fffd3e977dc2c5c7f02dcaf12c18e45f Mon Sep 17 00:00:00 2001 From: nullun Date: Wed, 4 Mar 2026 15:16:55 +0000 Subject: [PATCH 6/7] reintroduce `ACTUAL_VERSION` to prevent docker shadowing into vlatest --- docker/serverDockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docker/serverDockerfile b/docker/serverDockerfile index 911fb7e589f..75f348b4067 100644 --- a/docker/serverDockerfile +++ b/docker/serverDockerfile @@ -43,13 +43,15 @@ FROM base AS download-binary ARG DOLT_VERSION RUN if [ "$DOLT_VERSION" = "latest" ]; then \ # Fetch latest version number from GitHub API - DOLT_VERSION=$(curl -sI https://github.com/dolthub/dolt/releases/latest \ + ACTUAL_VERSION=$(curl -sI https://github.com/dolthub/dolt/releases/latest \ | grep -i location \ | sed 's|.*/v||' \ | tr -d '[:space:]'); \ + else \ + ACTUAL_VERSION=$DOLT_VERSION; \ fi && \ - if [ "$DOLT_VERSION" != "source" ]; then \ - curl -L "https://github.com/dolthub/dolt/releases/download/v${DOLT_VERSION}/install.sh" | bash; \ + if [ "$ACTUAL_VERSION" != "source" ]; then \ + curl -L "https://github.com/dolthub/dolt/releases/download/v${ACTUAL_VERSION}/install.sh" | bash; \ fi From fee765f6a47a732de2677970f0b5bf6182691952 Mon Sep 17 00:00:00 2001 From: nullun Date: Fri, 6 Mar 2026 13:49:11 +0000 Subject: [PATCH 7/7] Revert "reintroduce `ACTUAL_VERSION` to prevent docker shadowing into vlatest" This reverts commit 60d06f87fffd3e977dc2c5c7f02dcaf12c18e45f. --- docker/serverDockerfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docker/serverDockerfile b/docker/serverDockerfile index 75f348b4067..911fb7e589f 100644 --- a/docker/serverDockerfile +++ b/docker/serverDockerfile @@ -43,15 +43,13 @@ FROM base AS download-binary ARG DOLT_VERSION RUN if [ "$DOLT_VERSION" = "latest" ]; then \ # Fetch latest version number from GitHub API - ACTUAL_VERSION=$(curl -sI https://github.com/dolthub/dolt/releases/latest \ + DOLT_VERSION=$(curl -sI https://github.com/dolthub/dolt/releases/latest \ | grep -i location \ | sed 's|.*/v||' \ | tr -d '[:space:]'); \ - else \ - ACTUAL_VERSION=$DOLT_VERSION; \ fi && \ - if [ "$ACTUAL_VERSION" != "source" ]; then \ - curl -L "https://github.com/dolthub/dolt/releases/download/v${ACTUAL_VERSION}/install.sh" | bash; \ + if [ "$DOLT_VERSION" != "source" ]; then \ + curl -L "https://github.com/dolthub/dolt/releases/download/v${DOLT_VERSION}/install.sh" | bash; \ fi