Repository navigation
ci: mark releases before 1.0.0 as prereleases - #126
Conversation
Split the release flag in two: `prerelease` (GitHub pre-release) is now also true for all releases with major version 0, while the new `stable` flag (no alpha, beta or release candidate suffix) decides whether the image is tagged `latest`, as `prerelease` did before. Images of 0.x releases are thus tagged exactly as before. The GitHub release is only marked "Latest" if it is no pre-release, so `--latest=true` is never combined with `--prerelease=true`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Address review findings: on reruns, `gh release edit` now also sets the pre-release flag, so existing releases follow the current policy. The workflow header and README describe which tags update the `latest` image and which are GitHub pre-releases without overloading "pre-release". Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideThe release workflow now independently classifies GitHub pre-release status and Docker stability: all 0.x releases are GitHub pre-releases, while only non-alpha/beta/RC releases can promote Docker Sequence diagram for release creation and rerun flagssequenceDiagram
participant Workflow
participant GitHub
participant Docker
Workflow->>Workflow: Parse release tag
Workflow->>Workflow: Compute stable and prerelease
Workflow->>Workflow: Determine latest
Workflow->>Docker: Publish version image
opt highest stable release
Workflow->>Docker: Publish latest image
end
alt Existing GitHub release
Workflow->>GitHub: gh release upload
Workflow->>GitHub: gh release edit --prerelease= --latest=
else New GitHub release
Workflow->>GitHub: gh release create --prerelease= --latest=
end
Flow diagram for release classification and publishingflowchart TD
Tag[Release tag] --> Version[Validate and parse version]
Version --> Pre[Detect alpha beta or RC suffix]
Version --> Major[Check major version]
Pre --> Stable[stable=false]
Major --> Zero[major is 0]
Zero --> Prerelease[prerelease=true]
Pre --> Prerelease
Stable --> LatestImage[Docker latest only for highest stable release]
Prerelease --> GitHubPre[GitHub pre-release]
GitHubPre --> LatestGuard[GitHub Latest=false]
LatestImage --> Publish[Publish release image and GitHub release]
LatestGuard --> Publish
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #126 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 10 10
Lines 775 775
=========================================
Hits 775 775 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="README.md" line_range="656" />
<code_context>
-GitHub pre-releases, with chart version `X.Y.Z-rc1`, and never update `latest`.
+PyPI. Tags of alpha, beta and release candidate versions (e.g., `vX.Y.Zrc1`,
+also `aN` and `bN`) get chart version `X.Y.Z-rc1` and never update the `latest`
+image. These and, until 1.0.0, all other releases are GitHub pre-releases
+(never marked as the latest release).
Images of commits on `dev` are published by the [CI workflow][checks-workflow]
</code_context>
<issue_to_address>
**Alpha chart versions are misdocumented**
When a reader uses an alpha or beta tag to find or refer to its packaged chart, the release workflow preserves the suffix when building `chart_version`, so `vX.Y.ZaN` and `vX.Y.ZbN` produce chart versions `X.Y.Z-aN` and `X.Y.Z-bN`; the README instead tells readers to expect `X.Y.Z-rc1`, so they look for the wrong chart package.
Document the suffix-specific chart versions: `-aN`, `-bN`, and `-rcN`.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 1 finding to address first, and if the pre-1.0.0 classification is wrong, GitHub will publish those releases as pre-releases, affecting how they are presented and which release GitHub treats as latest; the Docker latest image is still controlled separately. Reverting the workflow will not change releases already published, but their status can be corrected manually.
Blocking findings: README.md:656
Address Sourcery review: alpha and beta tags get chart versions `X.Y.Z-aN` and `X.Y.Z-bN`, not `X.Y.Z-rc1`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(api): reject user ID groups in permissions
PUT and DELETE /services/{serviceId}/permissions/groups matched the
user permission routes with the user ID "groups": they granted or
revoked a role of a user "groups", and that stray owner then satisfied
the last-owner check. Both now return 404, like the group path with an
empty group (.../permissions/groups/), and store nothing.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix(helm): disable service links in pods
Kubernetes injects <SERVICE>_PORT and similar variables for each
Service in the namespace. FOCA reads MONGO_PORT, so a Service named
mongo (e.g., of another release) made the app crash-loop with an
invalid MongoDB URI. Neither pod uses these variables.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* fix: silence keep_group_subjects warning in dev
FOCA warned on every Docker Compose start that keep_group_subjects has
no effect, as config.dev.yaml set no group_mapping. An empty mapping
keeps the behavior (no admins, group claim values as subjects) without
the warning.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* ci: keep FOCA minors out of Dependabot image bumps
Dependabot bumped the FOCA base image in the Dockerfile and the foca
pin in requirements.txt separately, so a base image with a new FOCA
minor would get the old FOCA reinstalled on top. Minor and major
updates of the base image are now ignored; FOCA minors are bumped by
hand in both files.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* ci: pin Helm in CI and release workflow
Both workflows used whatever Helm the runner image had. They now install
Helm v3.22.1, the version the runners had at the time, with
azure/setup-helm (pinned by commit, like the other actions).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* ci: run actionlint in pre-commit
actionlint checks the workflows, and their scripts with shellcheck where
it is installed, as on GitHub-hosted runners. It would have caught
workflow mistakes such as those in the version logic of #126.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* test: check roles after DELETE of groups path
Also format the new dev overlay test as ruff does.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* test: seed a groups role before DELETE
The DELETE of .../permissions/groups returned 404 also without the
guard, as no role of a user groups existed. Now one is stored first,
and must be kept.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
Summary
Releases are marked as GitHub pre-releases until 1.0.0. The release
workflow derived a single
prereleaseflag (tags ending inaN,bNorrcN) that decided the GitHub pre-release label, thelatestDocker imageand the GitHub "Latest" release. It is now split:
prerelease(gh release create --prerelease=):aN/bN/rcNtags ormajor version 0.
stable(Dockerlatesttag, steplatest): noaN/bN/rcNsuffix,i.e., what
prerelease == falsemeant before. Images of 0.x releases aretagged exactly as before.
--latest=): as before (latestoutput), but forced tofalsefor pre-releases, so--latest=trueis never combined with--prerelease=true. Reruns (gh release edit) now set both--prerelease=and--latest=, as on create.chart_versionis unchanged. The README "Versioning and releases" sectionis updated accordingly.
Resulting behaviour
latestv0.3.0(highest stable onmain)--latest=false)v0.2.1(not the highest)v0.4.0rc1v1.0.0rc1v1.0.0(highest stable onmain)--latest=true)v1.0.1(not the highest, e.g., afterv1.1.0)--latest=false)GitHub never marks a pre-release as "Latest" (the REST API: "Drafts and
prereleases cannot be set as latest");
ghitself does not validate thecombination and would send
make_latest=truewithprerelease=true, sothe workflow now avoids it. With
--latest=false, GitHub leaves the"Latest" release where it is; the repository has no releases yet, so until
1.0.0 there is no "Latest" release at all.
Verification
the repository): no findings, before and after the change.
("highest stable release on
main", a/b/rc tags vs. GitHubpre-releases), workflow header comment, and
--prerelease=on the rerungh release edit, so reruns apply the current policy.stable,prerelease,--latestand (unchanged)chart_versionvalues forv0.15.0,v0.15.1rc1,v0.3.0a2,v0.0.1,v1.0.0,v1.0.0rc1,v1.2.3b1,v10.0.0.check-yaml, trailingwhitespace, end of file): pass; ruff, mypy, semgrep, ast-grep and the
tests are unaffected (workflow and README changes only).
X.Y.Z-rc1), fixed in the README.for pull requests).
Declined review findings
LATEST=falseoverride reassigns an envvariable in the
Create releasestep instead of a separate output of thelateststep. Declined: kept minimal and commented; thelateststep(and its output) is about the image, the override only about GitHub.
Open questions
None.
🤖 Generated with Claude Code