Repository navigation
build: require FOCA 0.17.0 and foca-common 0.2.0 - #270
Conversation
Replace the temporary pins to FOCA commits by the releases: - pyproject.toml: foca>=0.17.0,<0.18; - Dockerfile: elixircloud/foca:0.17.0-py3.13, pinned by digest; Dependabot no longer ignores the base image; - Helm chart: foca-common 0.2.0 from oci://ghcr.io/elixir-cloud-aai/charts, with the archive's digest in deployment/charts.sha256, checked in CI and the release workflow; scripts/foca_common.sh and its tests are removed. Adapt the chart to foca-common 0.2.0: the values schema is the released app-values.schema.json (its $comment names foca-common 0.2.0), the app's NetworkPolicy has no default peers (was the namespace ingress-nginx), protes.route.enabled turns off the OpenShift Route, and the docs describe the body size annotation for ingress-nginx (the chart no longer sets it). The chart README links to the library docs of chart-v0.2.0, as tested. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Name the `foca-common X.Y.Z` format of the schema's $comment in the bump steps, as the release pin check requires it; refer to the README section "Exposing the app" in values.yaml; re-wrap. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideThe PR replaces temporary FOCA development pins with the FOCA 0.17.0 and foca-common 0.2.0 releases, locks and verifies the OCI chart and container artifacts by digest, updates chart defaults and documentation for the released library behavior, and adds CI and test coverage for reproducibility and networking changes. Flow diagram for verified Helm chart dependency buildsflowchart TD
Chart[Chart.yaml and Chart.lock]
Build[helm dependency build deployment]
Archive[Downloaded foca-common archive]
Verify[sha256sum -c deployment/charts.sha256]
Package[Lint, test, or package chart]
Chart --> Build --> Archive --> Verify
Verify -->|digest matches| Package
Verify -->|digest mismatch| Fail[Stop workflow]
File-Level Changes
Assessment against linked issues
Possibly linked issues
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 #270 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 28 28
Lines 2083 2083
=========================================
Hits 2083 2083 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've found 3 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="deployment/values.yaml" line_range="164" />
<code_context>
+ # allow all sources); see deployment/README.md, Network policies, and
+ # https://github.com/elixir-cloud-aai/foca/blob/chart-v0.2.0/docs/helm-chart.md#networkpolicy-peers
+ # for the peers of common ingress controllers and Gateways
+ ingressFrom: []
# Security contexts of the pod and the container (also of the worker); the
# image runs as user 1000, and with a read-only root file system, temporary
</code_context>
<issue_to_address>
**Enabled policies block chart upgrades**
When an existing release has `protes.networkPolicy.enabled: true` but did not explicitly configure `ingressFrom`, the new empty peer list reaches foca-common's peer validation, so `helm upgrade` aborts for installations that enabled the app NetworkPolicy while relying on the old default ingress-nginx peer.
Provide an upgrade migration or explicit compatibility guidance that has operators configure the cluster-appropriate peers before upgrading.
</issue_to_address>
### Comment 2
<location path="deployment/Chart.yaml" line_range="16" />
<code_context>
- # (`oci://ghcr.io/elixir-cloud-aai/charts`) before the next release (#246),
- # which `scripts/check_release_pins.py` enforces
- # FOCA commit: 2c0cfa6c1d230b1d9d5bc7dc61995dc1a0b89340
+ # "Helm library chart" in FOCA's docs); `helm dependency build` downloads
+ # the version locked in `Chart.lock` into `charts/`
- name: foca-common
</code_context>
<issue_to_address>
**Large requests are rejected**
When an existing release upgrades with `config.server.max_content_length` above 1 MiB and no explicit ingress annotation, the upgraded chart omits ingress-nginx’s `proxy-body-size` annotation, so ingress-nginx applies its 1 MiB default and rejects larger requests before they reach the app.
Restore the chart-generated `proxy-body-size` annotation for ingress-nginx when no explicit annotation is configured.
Also at `deployment/values.yaml:105`.
</issue_to_address>
### Comment 3
<location path="deployment/values.yaml" line_range="147" />
<code_context>
+ ```yaml
+ protes:
+ networkPolicy:
+ enabled: true
+ ingressFrom:
+ # ingress-nginx: its pods in the namespace `ingress-nginx`
</code_context>
<issue_to_address>
**Route-capable clusters get a false warning**
When ingress and HTTPRoute are disabled on a Route-capable cluster and `protes.route.enabled` is false, `NOTES.txt` treats the explicitly disabled Route as evidence that the cluster lacks `route.openshift.io/v1` and can say the app is only reachable within the cluster, giving operators a false reason for the lack of chart-managed exposure even when a user-managed Route exists.
Update `NOTES.txt` to distinguish an intentionally disabled chart Route from a cluster that does not support Routes.
</issue_to_address>Sourcery assessment
Approval pending. 2 findings to address first.
Blocking findings: deployment/values.yaml:164, deployment/Chart.yaml:16
With protes.route.enabled false, the notes said that the cluster doesn't serve Routes; they now name the value instead. The upgrade guide says that the chart has no ingress controller defaults (NetworkPolicy peers, the body size annotation of ingress-nginx). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
Replaces the temporary FOCA pins with the releases, as elixir-cloud-aai/cloud-registry#179 does:
pyproject.toml:foca>=0.17.0,<0.18.Dockerfile:elixircloud/foca:0.17.0-py3.13@sha256:9790ac2c…7291, the digest of the signed release image on Docker Hub. The temporary Dependabot ignore of the base image is gone; the ignore of major and minor updates stays.foca-common0.2.0 fromoci://ghcr.io/elixir-cloud-aai/charts, withChart.lockanddeployment/charts.sha256holding the archive's digest. The archive was checked against FOCA's tagchart-v0.2.0: the templates are identical. CI (jobstest,test_mongodb,helm) and the release workflow check the digest afterhelm dependency build, andcharts.sha256is in.helmignore.scripts/foca_common.sh,tests/test_foca_common.py, the.foca-common/ignore, and the TEMPORARY notes.Changes for foca-common 0.2.0 (FOCA
docs/migration-0.17.md, "No ingress-nginx defaults"):deployment/values.schema.jsonis the releasedapp-values.schema.jsonwith proTES'sprotesandflowerkeys. Its$commentstill namesfoca-common 0.2.0, as the release pin check needs.networkPolicy.ingressFromdefaults to[](it was the namespaceingress-nginx). Rendering fails if the policy is enabled without peers. The chart README now gives an example and links to FOCA's NetworkPolicy peers.protes.route.enabled(defaulttrue). Set it tofalseto drop the OpenShift Route, e.g., when you bring your own route that serves only/ga4gh/tes/v1/.nginx.ingress.kubernetes.io/proxy-body-size. proTES's default limit (1 MiB) is the same as ingress-nginx's default, so the chart sets no annotation. The README shows the annotation to add whenconfig.server.max_content_lengthis raised.chart-v0.2.0, checked bytest_chart_readme_library_links(ported from cloud-registry).docs/development.md("Helm chart") now says how to bump the library chart, as cloud-registry's does.App-side items from FOCA 0.17's migration guide: proTES already configures access-control policies, so MongoDB was already needed at startup. Docker Compose restarts the app (
unless-stopped). The image doesn't build without build isolation, so the removal of setuptools/wheel from the base image has no effect (the image build was checked locally).Verification
python scripts/check_release_pins.py: passes (exit 0).(cd deployment && sha256sum -c charts.sha256): OK.helm lint deployment --strict -f deployment/ci/test-values.yaml, also with-f deployment/ci/optional-values.yaml: 0 failed (Helm v3.22.1).coverage run -m pytest(with Helm, without MongoDB): 875 passed, 2 skipped;coverage report: 100%.pre-commit run --all-files: all passed.mypy .: no issues.mkdocs build --strict: OK.docker build .on the 0.17.0 base image: builds, FOCA 0.17.0 in the image.sha256sum -c, and the image scan. Publishing jobs were skipped, as expected on PRs.Declined review findings
Quality reviewer (low): the commit trailer should name another model. Declined:
Claude Opus 5.5is the trailer set for this session.Quality reviewer (low): re-wrap the long link lines in
deployment/README.md. Declined: the URLs make them long, and the neighbouring links do the same.Sourcery (medium): enabled NetworkPolicies without peers block upgrades. Declined: no release of this chart exists yet, and legacy-chart releases are reinstalled, not upgraded. Rendering fails with a clear message, which is safer than allowing all sources.
docs/upgrading.mdnow mentions the peers.Sourcery (medium): restore the ingress-nginx
proxy-body-sizeannotation. Declined: foca-common 0.2.0 and cloud-registry dropped controller defaults on purpose. proTES's 1 MiB default equals ingress-nginx's, and the README and the upgrade guide show the annotation for higher limits.Fixed: Sourcery's low finding (the notes now name
protes.route.enabledwhen the Route is disabled), and the wrapping of the notes found in the round-2 review. The second commit fixes the other findings: thefoca-common X.Y.Zformat in the bump steps, a wrong README section name invalues.yaml, and the wrapping indocs/development.md.Open questions
None.
Closes #246
🤖 Generated with Claude Code