fix: land the stranded dependency-update branch (MAPCO-11478) - #4
Merged
Conversation
Update vulnerable dependencies and make the local CI workflow resilient to missing credentials and occupied ports. Replace brittle MVT byte-size checks with decoded tile assertions.
The image pinned golang:1.26.2-bookworm to match go.mod. The preceding commit moves go.mod to go 1.26.6 and there is no toolchain directive, so the container could no longer build the module. The workspace path was also still tegola: devcontainer.json declared workspaceFolder /workspace/shigola while the compose file mounted the repo at /workspace/tegola and both it and the Dockerfile set that as the working directory. Plain docker compose worked, but the devcontainer flow opened into a path that did not exist. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
context: .. and the workspace volume ..:/workspace/shigola both resolved one level above the repo. The build failed with "lstat .../shigola/.devcontainer: no such file or directory", and the mount put the directory holding both shigola and shigola-docs at /workspace/shigola, so go.mod was not found. Putting this file first in the -f list fixes those but then resolves the root compose file's ./testdata mount under .devcontainer/, so neither ordering worked. Relative paths resolve against the project directory -- the first -f file's directory -- which is the repo root in both invocations, including devcontainer.json's list where ../docker-compose.yml comes first. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
87144cd passed TEGOLA_PORT: ${{ env.SHIGOLA_PORT }} to the two suite steps, but SHIGOLA_PORT was defined nowhere, so the expression rendered to the empty string. It only behaved because run.sh reads ${TEGOLA_PORT:-8081}, and :- treats empty as unset. Declaring a workflow-level env: SHIGOLA_PORT default does not fix it: that takes precedence over the runner's process environment, so SHIGOLA_PORT=9081 act ... would still get the literal. It moves the hardcode rather than removing it. Instead let both consumers resolve the variable from the environment with the same shell expansion, and drop the two per-step rename blocks. run.sh now reads SHIGOLA_PORT falling back to the pre-rename TEGOLA_PORT -- the SHIGOLA_*-over- TEGOLA_* precedence internal/env.Getenv already uses -- so setting the variable works whether the suite is driven by the workflow or invoked directly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Both are load-bearing and neither is self-evident. The Coveralls guard never fires on GitHub-hosted runs, because secrets.GITHUB_TOKEN is always injected there, so nothing in the file said who it was for. The dockerComposeFile order is what makes the sibling compose file's relative build context and workspace mount resolve against the repo root. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Coverage Report for CI Build 9918Warning No base build found for commit Coverage: 47.662%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
go.mod moved to go 1.26.6 and sets no toolchain directive, so a lower Go fails with "go.mod requires go >= 1.26.6" rather than fetching one -- and the build image sets GOTOOLCHAIN=local. The release Dockerfile pinned golang:1.26.2 and broke the Docker build; the amazon-linux action pinned the same version and would have broken both lambda jobs on the next release. The action verifies a pinned checksum, so the tarball hash moves with it: 708effb7...feef89, from https://go.dev/dl and confirmed against the downloaded tarball. Three files now hardcode this version and nothing ties them to go.mod. A toolchain directive would make them self-healing, but it changes module semantics for consumers, so that belongs in its own ticket. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The workflow's serve step resolved ${SHIGOLA_PORT:-8081} while run.sh resolved
${SHIGOLA_PORT:-${TEGOLA_PORT:-8081}}. Setting only the legacy TEGOLA_PORT --
which run.sh still honours -- bound the server on 8081 while the suite polled
the other port, and the only symptom was the readiness poll timing out after
60s. Give both sides the same expression.
internal/env.Getenv warns when it falls back to a TEGOLA_ name, so run.sh now
warns too; a silent fallback is worst in exactly the place someone is still
using the old name.
Also finish the rename in three comment lines the earlier pass missed, point
each of the three hardcoded Go versions at the other two, and end the compose
context comment on what is true now rather than on the rejected alternative.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
NivGreenstein
force-pushed
the
fix/land-ci-dependency-updates
branch
from
August 25, 2026 07:33
e9cb03a to
041059a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes MAPCO-11478.
What this does
Lands the single real commit from the stranded
chore/ci-security-updatesbranch, by cherry-pick, not merge.That branch read as four commits ahead, but the content of the three older ones was already on master (verified:
tms/errors.gois byte-identical betweenmasterand5eb6988b). Only87144cdfwas new. A plain merge would have replayed the other three.fix: make pull request workflow passvendor/, the Coveralls empty-token guard, the CITE port,go: trueon both lambda jobs, and brittle MVT byte-size assertions replaced with decoded-tile assertions.fix(devcontainer): track the go.mod toolchain and the shigola renamego.modmoves to 1.26.6.fix(devcontainer): resolve compose paths from the project directoryci: make the CITE port genuinely overridableSHIGOLA_PORTwas referenced but never defined.docs: record why the coverage guard and the compose file order existfix(build): track the go.mod toolchain in the image and lambda buildsdocker build, the other would have broken the next release.2055 files, but 2048 are
vendor/— the mechanicalgo mod vendorresult of thego.modbump. The seven non-vendor files in that commit are the whole of the human change.go.mod,go.sumandvendor/must move as one unit or every-mod vendorbuild breaks.Acceptance criteria
act— logsSkipping Coveralls upload: no GitHub token is available, job succeedsThree fixes beyond the cherry-pick
The CITE port override never worked.
87144cdfpassesTEGOLA_PORT: ${{ env.SHIGOLA_PORT }}to two steps, butSHIGOLA_PORTis defined nowhere in the repo. As a GitHub expression it renders to the empty string, so the override was unreachable — it only behaved becauserun.shreads${TEGOLA_PORT:-8081}, and:-treats empty as unset.Worth recording the fix that doesn't work, since review caught it: a workflow-level
env: SHIGOLA_PORT: '8081'default. Workflow-levelenvtakes precedence over the runner's process environment, soSHIGOLA_PORT=9081 act …still gets the literal — it moves the hardcode rather than removing it. What landed instead: both consumers resolve the variable from the environment with the same shell expansion, and the two per-step rename blocks are gone.run.shnow readsSHIGOLA_PORTfalling back to the pre-renameTEGOLA_PORT— theSHIGOLA_*-over-TEGOLA_*precedenceinternal/env.Getenvalready uses. Verified: unset → 8081,SHIGOLA_PORT=9081→ 9081,TEGOLA_PORT=7081→ 7081, both → 9081.Three files hardcoded the Go version.
go.modsets notoolchaindirective, so a lower Go fails withgo.mod requires go >= 1.26.6rather than fetching one, and the build image setsGOTOOLCHAIN=local:.devcontainer/Dockerfile—golang:1.26.2-bookwormDockerfile:30—golang:1.26.2-alpine3.23, which brokedocker build.github/actions/amazon-linux-build-action/Dockerfile—GOLANG_VERSION=1.26.2, which had not fired yet but feeds both lambda jobs inon_release_publish.ymland would have broken the next releaseThat last one verifies a pinned checksum, so the hash moved with it:
708effb7…feef89, taken from the go.dev release feed and confirmed against the downloaded tarball.Nothing ties these three to
go.mod, so the next Go bump breaks them again. Atoolchaindirective would make them self-healing but changes module semantics for consumers — its own ticket.The devcontainer was unbuildable. Beyond the Go pin:
context: ..and..:/workspace/shigolaresolved one level above the repo — the build died withlstat .../shigola/.devcontainer: no such file or directory, and the mount put both repos at/workspace/shigola, sogo.modwas not found. Relative paths resolve against the compose project directory (the first-ffile's directory), which is the repo root in every invocation includingdevcontainer.json's own ordering. AlsoworkspaceFolder: /workspace/shigolavsworking_dir: /workspace/tegola, a rebrand leftover.The rename half overlaps MAPCO-11504. Happy to drop it if you would rather keep that ticket whole.
Review findings deferred, not fixed
A two-axis review flagged these. All are inherited from
87144cdfor pre-existing:assertMVTForLayersis byte-identical inprovider/hana/hana_test.goandprovider/postgis/postgis_internal_test.go. Different packages, so it cannot be shared locally —internal/ttoolsis the natural home. It also asserts layer order, which MVT does not guarantee.on_release_publish.yml'sgo: false→go: true(both lambda jobs) is real — the unconditionalSet shigola versionstep runsgo run, so those jobs died withgo: command not found— but it is uncommented and unmentioned in the cherry-picked commit body.govulncheck@latestis unpinned, so that job can flip without a commit. MAPCO-11499.f7955b0dbundles five unrelated changes. Inherited; it is precisely why the follow-up commits are separate.Verification
CI is green on all workflows. Locally, in the devcontainer (Go 1.26.6, PostGIS + Redis as compose siblings), both CGO modes:
gofmt -sclean,go build -mod vendor ./...OK,go vetclean oncache/andtms/docker buildcompletes and the binary runs with cgo and all providers linked inactwith an empty token, sincesecrets.GITHUB_TOKENis always injected on GitHub-hosted runners and the guard can never fire thereOne note for anyone developing on Apple Silicon:
TestValidateTileInGrid/a_zoom_beyond_the_scheme's_matricesandTestTile/a_matrix_the_scheme_does_not_havefail on arm64 while passing on CI's amd64 runners. They fail identically onmasterand on the stranded branch tip, and both date from the initial commitcd2f2488, so this is pre-existing and unrelated to this PR — but it is worth a look, since a localgo test ./...on a Mac is red before you change anything.TestPGXOnNoticealso fails in a devcontainer because it hardcodes127.0.0.1:5432; that one is a sandbox artifact and passes when postgis shares the network namespace.🤖 Generated with Claude Code