Skip to content

build: require FOCA 0.17.0 and foca-common 0.2.0 - #270

Merged
uniqueg merged 4 commits into
devfrom
build/foca-0.17.0
Oct 23, 2026
Merged

uniqueg merged 4 commits into
devfrom
build/foca-0.17.0

Conversation

@uniqueg

@uniqueg uniqueg commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

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.
  • Helm chart: foca-common 0.2.0 from oci://ghcr.io/elixir-cloud-aai/charts, with Chart.lock and deployment/charts.sha256 holding the archive's digest. The archive was checked against FOCA's tag chart-v0.2.0: the templates are identical. CI (jobs test, test_mongodb, helm) and the release workflow check the digest after helm dependency build, and charts.sha256 is in .helmignore.
  • Removed 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.json is the released app-values.schema.json with proTES's protes and flower keys. Its $comment still names foca-common 0.2.0, as the release pin check needs.
  • The app's networkPolicy.ingressFrom defaults to [] (it was the namespace ingress-nginx). Rendering fails if the policy is enabled without peers. The chart README now gives an example and links to FOCA's NetworkPolicy peers.
  • New value protes.route.enabled (default true). Set it to false to drop the OpenShift Route, e.g., when you bring your own route that serves only /ga4gh/tes/v1/.
  • The Ingress no longer sets 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 when config.server.max_content_length is raised.
  • The chart README's links to the library docs point to chart-v0.2.0, checked by test_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.
  • CI: all checks passed, including "Check release readiness", the chart's 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.5 is 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.md now mentions the peers.

  • Sourcery (medium): restore the ingress-nginx proxy-body-size annotation. 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.enabled when the Route is disabled), and the wrapping of the notes found in the round-2 review. The second commit fixes the other findings: the foca-common X.Y.Z format in the bump steps, a wrong README section name in values.yaml, and the wrapping in docs/development.md.

Open questions

None.

Closes #246

🤖 Generated with Claude Code

uniqueg and others added 2 commits October 23, 2026 22:07
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]>
@sourcery-ai

sourcery-ai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

The 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 builds

flowchart 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]
Loading

File-Level Changes

Change Details Files
Replaced unreleased FOCA sources with pinned 0.17.0 software and container releases.
  • Changed the Python requirement to the 0.17.x release range.
  • Pinned the Docker base image to the signed 0.17.0 image digest.
  • Removed the temporary Dependabot ignore and release-pin workarounds.
pyproject.toml
Dockerfile
.github/dependabot.yml
docs/development.md
Switched the Helm dependency to the released foca-common 0.2.0 OCI chart and added reproducible archive verification.
  • Updated Chart.yaml and Chart.lock to use the OCI repository and released version.
  • Added the downloaded chart archive digest and excluded generated chart files from the package.
  • Made test, MongoDB, Helm, and release workflows verify the archive after dependency resolution.
  • Removed the temporary chart checkout script and its tests.
deployment/Chart.yaml
deployment/Chart.lock
deployment/charts.sha256
deployment/.helmignore
.github/workflows/checks.yaml
.github/workflows/release.yaml
scripts/foca_common.sh
tests/test_foca_common.py
tests/helm.py
Aligned application chart values, templates, schema, and documentation with foca-common 0.2.0 behavior.
  • Updated the released library schema and version metadata.
  • Removed ingress-nginx-specific body-size and NetworkPolicy defaults.
  • Added configurable OpenShift Route creation and validation requiring peers for enabled app NetworkPolicies.
  • Updated README guidance, pinned FOCA documentation links, and development instructions.
deployment/values.schema.json
deployment/values.yaml
deployment/README.md
docs/development.md
Expanded chart tests to enforce release pinning, archive integrity, documentation versioning, and new networking behavior.
  • Validated dependency, lockfile, archive digest, library chart metadata, and schema alignment.
  • Tested controller-neutral Ingress annotations, optional Routes, and NetworkPolicy peer validation.
  • Checked that FOCA README links target the pinned chart release.
tests/test_chart.py
tests/test_chart_readme.py

Assessment against linked issues

Issue Objective Addressed Explanation
#246 Replace the temporary FOCA development commit and base-image pins with FOCA 0.17.0 releases, retaining the major/minor Dependabot ignore and ensuring release-pin checks and image-pin tests work. ✅
#246 Replace the temporary local foca-common checkout with the released 0.2.0 OCI chart, lock and verify its archive digest, remove the checkout script and related workflow/test references, and update chart values, schema, tests, and documentation for the released chart. ✅

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@read-the-docs-community

read-the-docs-community Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 proTES | 🛠️ Build #35365121 | 📁 Comparing 9745d4f against latest (2073853)

  🔍 Preview build  

3 files changed
± deployment/index.html
± development/index.html
± upgrading/index.html

@uniqueg
uniqueg marked this pull request as ready for review October 23, 2026 20:22
@codecov

codecov Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (2073853) to head (9745d4f).
⚠️ Report is 1 commits behind head on dev.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread deployment/values.yaml Resolved
Comment thread deployment/Chart.yaml Resolved
Comment thread deployment/values.yaml Resolved
uniqueg and others added 2 commits October 23, 2026 22:29
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]>
@uniqueg
uniqueg merged commit e9b5a20 into dev Oct 23, 2026
17 checks passed
@uniqueg
uniqueg deleted the build/foca-0.17.0 branch October 23, 2026 20:38
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.

build: require FOCA 0.17.0 and foca-common 0.2.0

1 participant