Skip to content

fix(docker): drop vendor/tokpress COPY step (build broken since v0.9.2) - #24

Merged
ArkNill merged 1 commit into
mainfrom
fix/docker-drop-tokpress
May 21, 2026
Merged

fix(docker): drop vendor/tokpress COPY step (build broken since v0.9.2)#24
ArkNill merged 1 commit into
mainfrom
fix/docker-drop-tokpress

Conversation

@ArkNill

@ArkNill ArkNill commented May 21, 2026

Copy link
Copy Markdown
Owner

Summary

Docker workflow has been failing on every tag push since the
vendor/tokpress COPY step was added (sometime between v0.9.1 and
v0.9.2). Both v0.9.4 (PR #22) and v0.9.5 (PR #23) tag pushes failed
identically. This PR removes the broken step.

What was happening

Dockerfile:9
COPY vendor/tokpress /tmp/tokpress
ERROR: failed to compute cache key: failed to calculate checksum
  of ref ...: "/vendor/tokpress": not found

The vendor/ directory is .gitignored (line 15) -- the source has
always been kept outside this repo. The COPY only worked locally
because vendor/ exists on the maintainer's filesystem; on the CI
runner it never existed, so the build failed at step 4/10.

The last successful Docker build was v0.9.1 (2026-04-29), which
predates the tokpress COPY step.

Why removing it is safe

src/llm_relay/proxy/proxy.py already guards the import:

_tokpress_available = False
if _TOKPRESS_ENABLED:
    try:
        from tokpress.integrations.proxy import compress_tool_results
        _tokpress_available = True
    except ImportError:
        pass

And every call site checks _tokpress_available before using the
function. With the package absent the flag stays False and the
optional compression feature is simply disabled -- which is exactly
the runtime behaviour every successfully-built Docker image has had
since the failure was introduced (i.e. none of them, because none
were built).

No published image regresses; the actual regression is that the
last runnable image is v0.9.1 and we want v0.9.5 to be available
on ghcr.io.

Changes

  • Dockerfile: drop the COPY + RUN pair; replace with a short
    comment explaining the optional layer is intentionally absent
    from the published image.
  • CHANGELOG.md: noted under [Unreleased] ### Fixed. No version
    bump -- this is a CI / image build fix, not a code change visible
    to PyPI consumers.

Test plan

  • pytest -- 593 pass (no source changes).
  • ruff check src/ tests/ -- clean.
  • NDA grep on diff -- 0 hits.

Post-merge

After this lands on main, re-trigger the Docker workflow against
the existing 0.9.5 tag so the image actually publishes:

gh workflow run docker.yml -f tag=0.9.5

That produces ghcr.io/arknill/llm-relay:0.9.5 from the current
main (which has this Dockerfile fix), matching the PyPI 0.9.5
release.

…0.9.2)

The Dockerfile unconditionally COPY'd vendor/tokpress into the build,
but that path is kept outside this repository -- the COPY has been
failing on every tag push since v0.9.2. v0.9.4 and v0.9.5 both
triggered the Docker workflow and both failed identically.

The proxy already imports tokpress inside a try/except ImportError
guard (src/llm_relay/proxy/proxy.py around the `_tokpress_available`
flag), so the image runs unchanged when the package is absent --
the compression feature simply stays disabled, which has been the
de-facto state of every Docker image attempt since v0.9.2 anyway.

Action plan:

  - Drop the COPY + pip install lines.
  - Replace with a comment explaining why the optional layer is
    intentionally absent from the published image.
  - After merge, re-trigger the Docker workflow for the 0.9.5 tag
    via `gh workflow run docker.yml -f tag=0.9.5` so users can
    finally `docker pull ghcr.io/arknill/llm-relay:0.9.5`.

CHANGELOG: noted under Unreleased ### Fixed (no version bump --
this is a CI / image build fix, not a code change visible to PyPI
consumers).

Tests: 593 pass (no source change). Ruff clean. NDA grep on diff
clean.
@ArkNill
ArkNill merged commit 8ca5757 into main May 21, 2026
6 checks passed
@ArkNill
ArkNill deleted the fix/docker-drop-tokpress branch May 21, 2026 00:30
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