Skip to content

fix(ci): the Docker Hub namespace is not the account that logs in - #536

Merged
cevheri merged 1 commit into
mainfrom
fix/docker-hub-org-namespace
Sep 1, 2026
Merged

fix(ci): the Docker Hub namespace is not the account that logs in#536
cevheri merged 1 commit into
mainfrom
fix/docker-hub-org-namespace

Conversation

@cevheri

@cevheri cevheri commented Sep 1, 2026

Copy link
Copy Markdown
Member

What happened

libredb on Docker Hub was a user account. The Docker-Sponsored Open Source application requires an organization, so it was converted on 2026-09-01. An organization cannot sign in — so the single DOCKER_HUB_USERNAME variable, which until now answered both "who authenticates" and "which namespace do we publish under", had to become two:

Variable Answers Value
DOCKER_HUB_USERNAME who logs in — the org owner cevheri
DOCKER_HUB_ORGANIZATION the namespace the image is published under libredb

Both are already set on the repository. This PR makes the workflow read the second one for the image name.

Why this is not cosmetic

The variables were changed before the workflow was. In that window, a push to main would have published to docker.io/cevheri/libredb-studio — and that does not error. It creates a real repository nobody pulls, while docker.io/libredb/libredb-studio (the image behind every docker run line in the README, and the 75,137 pulls the DSOS application cites) quietly stops receiving releases. Nothing turns red; the mirror just goes stale, and DSOS's own "actively developed on Docker Hub in the past 6 months" criterion erodes on its own.

The opposite mistake is loud but costs more than it looks: buildx exports every tag in one push, so a rejected Docker Hub login fails the whole job including the canonical GHCR publish. tests/unit/docker-hub-namespace.test.ts pins both directions — the login must not use the organization, the image list must not use the login user, and an unset organization must leave the mirror off rather than guess a namespace.

Verification — end to end, on a safe tag

Not by dispatching a version: Docker Hub tag immutability is enabled on this repo scoped to semver (^\d+\.\d+\.\d+([-.][0-9A-Za-z.-]+)?$), so re-pushing a released version would be denied and would take GHCR down with it. Instead this branch is a fix/** branch, which publishes the mutable dev tag — a full credential test that cannot touch a published release.

Run 33454450035Docker Build and Push, success. Then measured from Docker Hub rather than inferred from the green tick:

  • libredb/libredb-studio:devtag_last_pushed: 2026-09-01T00:24:09Z, from this run
  • cevheri/libredb-studio404, nothing leaked into the login user's namespace
  • /v2/orgs/libredb/type: Organization, the conversion is live

Gates: format · lint · typecheck · knip · build clean; the three workflow-shape suites (release-sbom, release-provenance, docker-hub-namespace) 55 pass.

docs/DISTRIBUTION.md updated so the credentials table explains why there are two variables rather than leaving the next reader to collapse them back into one.

`libredb` was a Docker Hub user account, so one variable could answer two
different questions: who authenticates, and which namespace the image is
published under. Converting it to an organization on 2026-09-01 - required by
the Docker-Sponsored Open Source application, which will not take a user
account - split those answers apart. An organization cannot sign in, so
DOCKER_HUB_USERNAME is now the owner user and the namespace needs its own
variable.

Left as it was, this fails silently in the worse direction. Publishing to
docker.io/<owner>/libredb-studio does not error: it creates a real repository
nobody pulls, while docker.io/libredb/libredb-studio - the image behind every
`docker run` line in the README and the 75k pulls the DSOS application cites -
quietly stops receiving releases. Nothing turns red.

The login steps keep DOCKER_HUB_USERNAME and are asserted not to use the
organization, because that failure is loud in a way that costs more than it
looks: buildx exports every tag in one push, so a rejected Docker Hub login
takes the canonical GHCR publish down with it.

tests/unit/docker-hub-namespace.test.ts pins both directions.
@sonarqubecloud

sonarqubecloud Bot commented Sep 1, 2026

Copy link
Copy Markdown

@cevheri
cevheri merged commit c404dfb into main Sep 1, 2026
27 checks passed
@cevheri
cevheri deleted the fix/docker-hub-org-namespace branch September 1, 2026 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant