Repository navigation
fix: pre-release review findings for 0.3.0 - #193
Merged
Merged
Conversation
The pin check missed some development pins: a FOCA dev image in a later stage of the Dockerfile (or with options such as --platform, or without a tag), chart dependencies without a version or with a repository other than a chart repository (e.g. file://), and build requirements and dependency groups of pyproject.toml. Check all of them, with tests. Refs #189 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The tests run on an editable install, which reads data files from the source tree, and the wheel check of CI only looks for any API spec. Build the wheel from a copy of the sources in a test and check that it contains the base config, the files it references and the patches for deployments (e.g. the login-for-reads patch). Refs #189 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Release 0.3.0 requires FOCA 0.17 (named specs and policies, spec patches) and foca-common 0.2.0, but the notes, the chart README and the values schema still named FOCA 0.16 and foca-common 0.1.0. Correct them, list the config changes of FOCA 0.17 in the notes, say which images the chart needs for named entries and patches, and mark the chart changes of foca-common 0.2.0 as TODO(#179), so that the release workflow's TODO check blocks the release until #179 fills them in. Refs #189 Co-Authored-By: Claude Opus 5.5 <[email protected]>
With reads restricted to some users, registration stays open, and its 409 for duplicates names the registered service, also to users who may not read it. Say so in the access control docs and the 0.3.0 notes, and show how to restrict registration (register-services) by name. Refs #189 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The documented release steps ran only the citation check before the tag, but tags can't be moved or deleted, so a failing pin or notes check in the release workflow would burn the version. Run the pin check and the TODO check of the notes before tagging, too, say that a check that fails after the tag (e.g. the image scan) needs a new patch version, and describe the cases that the pin check now catches. Refs #189 Co-Authored-By: Claude Opus 5.5 <[email protected]>
- The wheel test shows the build's output if the build fails. - The registration rule extends the readers.yaml overlay above instead of a second block with the same file name. - The pin check skips only includes of dependency groups, not any entry that isn't a string. Refs #189 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The pin check missed FOCA dev images after a line continuation, with another registry or a variable in front, or in --from= of COPY and RUN --mount, and read no dependencies if the chart's dependencies key was quoted. Check these, with tests. Refs #189 Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Restricting registration doesn't stop owners and maintainers from probing for services via updates: grant those roles only to users who may read services (access control docs and notes). - Mark the claim that foca-common renders the same resources, and the values schema copy, as TODO(#179). - Run the version and chart README checks before tagging, too. Refs #189 Co-Authored-By: Claude Opus 5.5 <[email protected]>
- The pin check finds FOCA images in a first --mount option (from=...) and in quoted mounts, ignores comment lines (also inside continued lines), and calls them FOCA images; build arguments aren't resolved, which its docstring now says. - The access control docs and the notes say that owners grant roles on services, so admins review them when restricting reads, and that the permission rules can be restricted, too. Refs #189 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The pin check and the TODO check of the curated notes ran only in the release workflow, after the immutable tag exists. Run them in CI, too, for the version in CITATION.cff while it has no tag: as warnings on pull requests, and as errors on pushes to dev, which fail the CI run that the release workflow requires for the release commit. The job is not a required check and not needed for publishing dev images. Refs #189 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Requirements that name a PEP 440 local version (e.g. ==0.17.0+gabc1234, a build of a commit) passed the pin check. Reject them, as proTES's copy of the script does, with tests. Refs #189 Co-Authored-By: Claude Opus 5.5 <[email protected]>
uniqueg
marked this pull request as ready for review
October 23, 2026 10:50
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #193 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 14 14
Lines 917 959 +42
=========================================
+ Hits 917 959 +42 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Reviewer's GuideThis PR closes the 0.3.0 pre-release findings by adding pre-tag release gates, broadening dependency/image/chart pin validation, documenting FOCA 0.17 and foca-common 0.2.0 compatibility plus access-control caveats, and verifying that required configuration patches are present in built wheels. Sequence diagram for pre-tag release readiness checkssequenceDiagram
participant Maintainer
participant PR as PullRequest
participant CI as GitHubActions
participant Pins as check_release_pins.py
participant Notes as ReleaseNotes
participant Tag as GitTag
Maintainer->>PR: Update CITATION.cff version
PR->>CI: pull_request event
CI->>CI: Check version and existing tag
CI->>Pins: Run check_release_pins.py
CI->>Notes: Search release notes for TODO
alt Pull request
CI-->>PR: Report findings as warnings
else Push to dev
CI-->>PR: Report findings as errors
CI-->>PR: Fail CI when checks fail
end
Maintainer->>Pins: Run release checks before tagging
Maintainer->>Notes: Complete release notes
Maintainer->>Tag: Push immutable version tag
Tag->>CI: Trigger release workflow
Flow diagram for expanded release pin validationflowchart TD
Start["check_release_pins.py"] --> PyProject["Inspect pyproject.toml requirements"]
PyProject --> Req["dependencies, dependency-groups, build-system.requires"]
Req --> ReqResult["Reject direct, pre-release, or local versions"]
Start --> Dockerfile["Inspect Dockerfile"]
Dockerfile --> Images["Find FOCA images in FROM and from= stages"]
Images --> ImageResult["Require release-tagged FOCA images"]
Start --> Chart["Inspect deployment/Chart.yaml"]
Chart --> Dependencies["Read chart dependency mappings"]
Dependencies --> ChartResult["Require version and oci:// or https:// repository"]
ReqResult --> Result["Emit pin findings"]
ImageResult --> Result
ChartResult --> Result
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 2 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path=".github/workflows/checks.yaml" line_range="273-275" />
<code_context>
+ echo "No version in CITATION.cff: no release in preparation"
+ exit 0
+ fi
+ if git ls-remote --exit-code --tags origin "refs/tags/v${version}" > /dev/null; then
+ echo "v${version} is tagged: no release in preparation"
+ exit 0
+ fi
+ level=error
</code_context>
<issue_to_address>
**Bad release tags pass CI**
When the release tag is pushed before the readiness check runs, the readiness job exits 0 before checking pins and notes, so the release workflow accepts the skipped CI run and an immutable tag is created before release validation fails; the version then needs a patch release.
Ensure the release gate requires a completed, non-skipped readiness check instead of treating this successful exit as a pass.
</issue_to_address>
### Comment 2
<location path="scripts/check_release_pins.py" line_range="193" />
<code_context>
+ " ",
+ re.sub(r"(?m)^[ \t]*#.*\n", "", (root / "Dockerfile").read_text()),
+ )
+ images = list(BASE_IMAGE.finditer(dockerfile))
+ if not images:
+ pins.append("Dockerfile: no elixircloud/foca base image")
</code_context>
<issue_to_address>
**Missing FOCA base image passes**
When the Dockerfile uses a non-FOCA `FROM` image but references a release-tagged FOCA image only via `COPY --from=` or `RUN --mount=from=`, `BASE_IMAGE.finditer` treats `--from=` matches the same as `FROM` matches, so a Dockerfile with a non-FOCA base image and a released FOCA image used only by `COPY --from=` passes without the required FOCA base image. The release pin check then misses a Dockerfile regression.
Track base-image `FROM` matches separately and keep requiring at least one FOCA base image, while still validating FOCA images referenced through `--from=`.
</issue_to_address>Sourcery assessment
Approval pending. 2 findings to address first.
Blocking findings: .github/workflows/checks.yaml:275, scripts/check_release_pins.py:193
FOCA images in --from= counted as base images, so a Dockerfile with another base image and a FOCA image only in COPY --from= passed the "no elixircloud/foca base image" check. Count only FROM lines for it, while still checking the tags of all FOCA images. Refs #189 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The readiness job skipped all commits once the version in CITATION.cff was tagged, also the tagged commit itself, e.g. if it was tagged before the job ran. Skip only commits other than the one the tag points to. Refs #189 Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 23, 2026
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.
Summary
Fixes the findings of the second pre-release review of 0.3.0 (at
devf4a8acd):deployment/README.mdand the$commentofdeployment/values.schema.jsonnow state the FOCA 0.17 /foca-common0.2.0 requirements, including which images the chart needs for named entries and spec patches. The notes list the config changes of FOCA 0.17 (named entries, spec patches, atomic configured policies). What only build: require FOCA 0.17.0 and foca-common 0.2.0 #179 can fill in (the chart changes offoca-common0.2.0, and whether the chart still renders the same resources) is markedTODO(#179), so the release workflow's TODO gate blocks the release until then. build: require FOCA 0.17.0 and foca-common 0.2.0 #179's checklist now lists these items, the values schema copy and the chart doc links.docs/development.mdruns the version, pin, notes TODO and chart README checks before tagging, and says that a failing check after the tag (e.g. the image scan) needs a new patch version. A new CI job "Check release readiness" runs the pin and TODO checks for the version inCITATION.cffwhile it has no tag. On pull requests it reports warnings. On pushes todevit reports errors, so the CI run that the release workflow requires fails. It is not a required check, and publishing doesn't need it.scripts/check_release_pins.pynow also catches:FROMstage, after\continuations, with a registry or variable in front, and in--from=/from=;file://), and a quoteddependencieskey;build-system.requiresanddependency-groups;+gabc1234), as in proTES's copy.--from=(no FOCA base image).api/patches/login-for-reads.yaml.docs/access-control.mdand the notes now cover three points, with no change to the 409 contract:register-services;vars.DOCKERHUB_ORG || 'elixircloud').Verification
pre-commit run --all-files(ruff, ruff format, mypy, semgrep, gitleaks, actionlint, ast-grep): passedcoverage run -m pytestagainst mongomock, with Helm 3.22.1 for the chart tests: 1098 passed, coverage 100%mkdocs build --strict: passedhelm lint deployment: passedpython scripts/check_release_pins.py: exits 1 with only the 2 expected dev pins (FOCA git reference and dated base image, to be replaced in build: require FOCA 0.17.0 and foca-common 0.2.0 #179)version: "0.3.0"added toCITATION.cff: warnings and exit 0 forpull_request, errors and exit 1 forpush. Without a version it is skipped.api/patches/*.yamlfrom the package data makes the wheel test fail.CITATION.cffhas no version yet)FROMlines count as the FOCA base image), threads resolved; Sourcery approved. No Copilot review was requested.Declined review findings
find_dev_pinsinto smaller helpers (quality, low): optional refactoring that doesn't change behaviour.ARG BASE=.../FROM ${BASE}) in the pin check (adversarial round 2, low): the line-based check doesn't evaluate the Dockerfile. The docstring now states this limit.Open questions
None.
Closes #189
🤖 Generated with Claude Code