Skip to content

chore: bump Go toolchain to 1.26 + harden release workflow - #9

Merged
pliski merged 18 commits into
mainfrom
develop
Jul 17, 2026
Merged

chore: bump Go toolchain to 1.26 + harden release workflow#9
pliski merged 18 commits into
mainfrom
develop

Conversation

@pliski

@pliski pliski commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Bumps the Go toolchain to 1.26 everywhere it is pinned, clearing the 51 stdlib security advisories flagged against the previous 1.21/1.22 toolchain, and hardens the release workflow against shell injection.

Changes

Go toolchain bump (dcdbb89)

  • go.mod: go 1.21go 1.26.0
  • Dockerfile.spaceapi: golang:1.21-alpinegolang:1.26-alpine (the shipped release artifact)
  • ci.yml / release.yml: setup-go go-version '1.22''1.26'

Release workflow hardening (b9fb25d)

  • Move github-context values out of run: bodies into env:, referenced as quoted shell variables (per the GitHub Actions injection guidance)
  • Quote parameter expansions and $GITHUB_OUTPUT
  • Covers the Determine version and Update package visibility steps

Verification

Local, on go1.26.4:

  • go vet ./... — clean
  • go build ./cmd/spaceapi — OK
  • go test ./internal/... ./cmd/... — passing

Notes

  • 1.21 → 1.26 is a 5-minor jump (not a patch bump); @giorgio to be given a heads-up per the q30 coordination policy.
  • A v0.1.2 tag will be cut immediately after this merges (resets the release-cadence clock).

pliski added 14 commits October 28, 2025 14:35
- Added a new E2E_TESTING.md file detailing the E2E testing framework, coverage, and local execution instructions.
- Expanded CI workflow to include a dedicated E2E test job that validates API endpoints against the OpenAPI specification using Schemathesis.
- Updated README.md to clarify test sections and introduce End-to-End (E2E) testing.
- Replaced all instances of 'docker-compose' with 'docker compose' in the CI workflow and E2E_TESTING.md to align with Docker Compose V2 syntax.
- Updated documentation to specify the requirement for Docker with Compose V2 installed.
- Changed the volume mapping for spaceapi.json from /root/spaceapi.json to /app/spaceapi.json to align with application structure.
…tion

- Changed '--base-url' to '--url' in the CI workflow and E2E_TESTING.md to align with the latest Schemathesis syntax for running OpenAPI conformance tests.
…tation

- Removed '--hypothesis-phases=explicit' and '--report' options from Schemathesis commands in both the CI workflow and E2E_TESTING.md to streamline testing configurations and align with best practices.
…nds in CI workflow and documentation

- Eliminated the '--show-errors-tracebacks' option from Schemathesis commands in both the CI workflow and E2E_TESTING.md to simplify command usage and improve clarity.
- Changed the `value` property in `openapi.yaml` from `oneOf` to `anyOf` to allow for more flexible data types.
- Updated CI workflow and documentation to exclude `negative_data_rejection` checks from Schemathesis tests, clarifying the rationale for these exclusions in `E2E_TESTING.md`.
…zing hypothesis phases

- Added `--hypothesis-phases explicit,fuzzing` to Schemathesis commands in the CI workflow to enhance testing focus.
- Updated `E2E_TESTING.md` to clarify the rationale for excluding `negative_data_rejection` checks and the benefits of the new hypothesis phases, emphasizing real-world API functionality and schema validation.
- Updated Schemathesis commands in the CI workflow to focus on specific validation checks: `status_code_conformance`, `content_type_conformance`, `response_schema_conformance`, and `response_headers_conformance`.
- Revised `E2E_TESTING.md` to reflect the new focus on practical API conformance, detailing enabled and excluded checks for clarity and improved testing relevance.
- Updated Schemathesis commands in the CI workflow and E2E_TESTING.md to use a consistent comma-separated format for the `--checks` option, enhancing clarity and reducing potential errors in command execution.
…tation

- Updated the CI workflow to include detailed checks for data persistence, verifying `state.open`, `state.message`, `sensors.people_now[0].value`, and `state.lastchange` after POST operations.
- Expanded E2E_TESTING.md to document the new data persistence verification steps, ensuring clarity on the expected outcomes and structure of the API response.
- Modified the CI workflow to check the updated people count using `sensors.people_now_present` instead of `sensors.people_now`, ensuring accurate data validation.
- Updated E2E_TESTING.md to reflect the change in the verification method for the people count, enhancing clarity on the expected API response structure.
Raise the Go version everywhere the toolchain is pinned to clear the
stdlib security advisories flagged against the 1.21/1.22 toolchain:

- go.mod: go 1.21 -> 1.26.0
- Dockerfile.spaceapi: golang:1.21-alpine -> golang:1.26-alpine (the
  shipped release artifact)
- ci.yml / release.yml: setup-go go-version '1.22' -> '1.26'

Verified locally on go1.26.4: go vet clean, go build and full test
suite pass.
Move github-context values out of run: script bodies and into env:,
referencing them as quoted shell variables, per the GitHub Actions
injection guidance. Also quote parameter expansions and $GITHUB_OUTPUT.

- Determine version: github.event_name, github.event.inputs.version
- Update package visibility: github.repository

Pre-existing issues surfaced while bumping the Go version; fixed
separately to keep the toolchain bump self-contained.
Comment thread .github/workflows/ci.yml Fixed
pliski added 4 commits July 17, 2026 13:00
The pinned golangci-lint v1.64.8 (built with Go 1.24) refuses to lint a
module whose go.mod targets a newer Go than itself, breaking the Lint
job after the 1.26 bump. Upgrade to golangci-lint-action v9 + v2, which
is built with Go 1.26 and natively supports the directive.

- ci.yml: golangci-lint-action v6 -> v9, drop obsolete --timeout arg
  (v2 disables the timeout by default)
- .golangci.yml: add minimal v2 config (version: "2", default linters)
Reconcile divergence before the Go 1.26 toolchain PR. Both branches
independently added the e2e-test job to ci.yml; resolved by keeping
main's least-privilege `permissions: contents: read` block. Brings in
main's CODE_OF_CONDUCT.md and SECURITY.md.
golangci-lint v2 (now able to analyze the module) flags the redundant
type in `var ip_address string = r.RemoteAddr`. Use an idiomatic short
declaration and camelCase name. Behavior-preserving.
testify is used directly in the handler/middleware tests but was
recorded as `// indirect`. `go mod tidy` moves it into a direct require
block and completes go.sum. No functional change.
var ip_address string = r.RemoteAddr
log.Printf("%s State updated: %+v from %s", time.Unix(h.spaceAPI.State.Lastchange, 0).Format(time.RFC3339), h.spaceAPI.State, ip_address)
ipAddress := r.RemoteAddr
log.Printf("%s State updated: %+v from %s", time.Unix(h.spaceAPI.State.Lastchange, 0).Format(time.RFC3339), h.spaceAPI.State, ipAddress)
@pliski
pliski merged commit 7b6375e into main Jul 17, 2026
20 checks passed
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.

2 participants