Skip to content

docs: deploy a released version - #101

Merged
AnonymousXC merged 2 commits into
devfrom
docs/77-deploy-release
Nov 17, 2026
Merged

AnonymousXC merged 2 commits into
devfrom
docs/77-deploy-release

Conversation

@uniqueg

@uniqueg uniqueg commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Summary

Completes the operator guide so that an operator can deploy, configure and check a released image (0.1.0) from the docs alone, with the focus on the parts that take time: settings, login client and CORS. Structure follows the operator guide of cloud-registry-ui (quick start in the index, a separate Login page, upgrade tables).

  • Operator guide index: what a deployment needs, and a quick start from the client registration to the check of the deployment.
  • Configuration: one reference table of every setting the code reads (LOGIN_PROVIDERS, APP_ORIGIN, CLOUD_REGISTRY_URL, OIDC_REDIRECT_URI, COMPUTE_ACCESS_REQUEST_URL, PRIVACY_*, plus the image's PORT and LISTEN_HOSTNAME) with required/optional, format, default and example; states that Krini doesn't check settings at start.
  • Login (new page): the login flow as implemented (code flow + PKCE S256, client_secret_post, ID token checks), the provider fields (moved here from the Helm chart page), the LS Login client registration (redirect URI, post-logout redirect URI <APP_ORIGIN>/, scopes incl. eduperson_entitlement and offline_access, JWT access tokens), access tiers (without computeGroups/adminGroups nobody can run anything), sessions and logout.
  • Deployment: pinning releases by digest, branch images for testing only, a docker run example with a release and a sample env file, a "Checking a deployment" walk-through, a table of which service is contacted by Krini's server vs. the browser, the registry entry rules (types, https, WES service-info probe), what TES/WES services need, and CORS headers that match what Krini actually sends (only GET/POST, Authorization + Content-Type, no cookies, so no Allow-Credentials; the old examples listed PUT/DELETE and credentials). Only TES/WES services and gateways need CORS; the Cloud Registry and the login provider don't. New "Network access" section, including the server's request to its own APP_ORIGIN.
  • Upgrading: from the branch images (mapping of the old LS_LOGIN_URL/OIDC_* settings to LOGIN_PROVIDERS) and from the Vite app (VITE_HOST_URI, port 8081).
  • README and docs home link the operator guide, settings and login pages.

Light lane: documentation only (no code, configuration or workflow changes), so no reviewer subagents; I reviewed the diff myself against the code (src/lib/oidc/*, src/app/auth/api/*, src/app/api/*, src/lib/service-providers.ts, the Cloud Components' REST providers, the Dockerfile, and the dev-legacy branch for the Vite settings).

Closes #77

Verification

  • mkdocs build --strict with docs/requirements.txt (as in CI and Read the Docs): passes, no warnings (links and anchors checked).
  • bunx biome check src docs README.md: no findings (Markdown isn't linted by Biome).
  • Unit and end-to-end tests not run locally: the PR changes no code.
  • CI on 8b374a8: all checks pass (CI passed, Docs, Read the Docs preview https://krini--101.org.readthedocs.build/en/101/, end-to-end tests, Vercel).
  • Sourcery: 4 threads, all answered and resolved. Fixed: the access token also goes to the provider's user info endpoint; the browser calls the WES (not the TES) service info; rolling updates run two pods briefly, which can log out users with concurrent refreshes (now in Helm chart > Pods and Upgrading). Out of scope (code): a refresh in flight can undo the logout; drafted as a follow-up.

Gaps found (follow-ups, not in this PR)

The docs describe the current behaviour; these gaps are drafted as follow-up issues, not posted:

  • Krini doesn't validate its settings at start and silently ignores an invalid LOGIN_PROVIDERS (no log line).
  • The WES service-info page is rendered with a request from Krini's server to its own APP_ORIGIN, which fails where the server can't reach its own public address.
  • .env.example (and the copy in configuration.md) uses the logo /icon.jpg, which isn't in public/; the shipped file is /ls-login-grey-wide.jpg.
  • From the review: a token refresh in flight can restore the session after logout, and the refresh replay check is per pod.

Declined review findings

  • Sourcery, "Logout can restore session": a code issue in the refresh/logout routes, out of scope for this docs PR.

Open questions

None.

🤖 Generated with Claude Code

Complete the operator guide for deploying a release:

- Quick start in the operator guide, from client registration to
  checking the deployment
- Reference table of all runtime settings (required, format, default,
  example), including PORT and LISTEN_HOSTNAME
- New Login page: login flow, provider fields, LS Login client
  registration, access tiers (computeGroups needed to run anything),
  sessions and logout
- Which services Krini's server and the browser contact, what the
  registry and the TES/WES services need, and CORS headers that match
  the requests Krini makes (GET/POST, Authorization and Content-Type,
  no credentials)
- Network access, including the server's request to its own origin
- Pinning releases by digest, a docker run example with a release
- Upgrades from the branch images (old LS_LOGIN_URL/OIDC_* settings)
  and from the Vite app

Closes #77

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@uniqueg uniqueg added this to the v0.1.0 milestone Nov 17, 2026
@uniqueg uniqueg self-assigned this Nov 17, 2026
@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
krini Ready Ready Preview Nov 17, 2026 3:55pm UTC

@sourcery-ai

sourcery-ai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Documentation

Review the runtime settings reference and the deployment guidance together, including released-image pinning, sample configuration, deployment checks, registry discovery, TES/WES requirements, CORS, and network access.

  • docs/operator-guide/configuration.md L12-38, L69-73, L81-95
  • docs/operator-guide/deployment.md L136-168, L247-303, L336-369 (+6 small edits)

Review the new login guide alongside the Helm chart references, checking provider configuration, LS Login registration, access tiers, sessions, logout, and rolling-update implications.

  • docs/operator-guide/helm-chart.md L26-37, L174-175, L292-294
  • docs/operator-guide/login.md L1-148

Read the operator-guide quick start and its entry-point links to see how operators are directed through deployment, configuration, login, and checks.

  • README.md L26-28, L88-90, L129
  • docs/index.md L13-14, L19-20
  • docs/operator-guide/index.md L6-78
  • mkdocs.yml L78

Review the migration guidance for moving from branch images or the legacy Vite app to release 0.1.0, including setting mappings and deployment changes.

  • docs/operator-guide/upgrading.md L21-54, L60-82 (+2 small edits)

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 Nov 17, 2026 •

Copy link
Copy Markdown

@codecov

codecov Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (88cb1df) to head (8b374a8).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #101   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           20        20           
  Lines          566       566           
  Branches       161       161           
=========================================
  Hits           566       566           

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@uniqueg
uniqueg marked this pull request as ready for review November 17, 2026 15:45
@uniqueg
uniqueg requested a review from AnonymousXC as a code owner November 17, 2026 15:45
@sourcery-ai

sourcery-ai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Linked issues

Checked at commit 8b374a8

#77 docs: deploy a released version · 7 of 7 met

# Requirement Status Notes
1 Document release tags, when to pin a version or digest, and that branch images are for testing only. ✅ Met The deployment guide describes release and moving tags, recommends digest pinning, and limits branch images to testing.
2 Show how to verify a release image's signature and attestation, including the release workflow identity. ✅ Met The release example verifies the signature against the release workflow at the specific tag and verifies the GitHub attestation.
3 Provide a settings reference with required/optional status, format, examples, and secret-handling guidance; link the documentation from the README. ✅ Met The configuration table covers the application and image settings, and the guide says to keep client secrets in server-side environment or mounted-secret configuration, not in the repository, image, or client-side code; the README links the operator guide, settings, and login pages.
4 Document the login client, service-side prerequisites, registry entries, and CORS requirements. ✅ Met The guides cover redirect and post-logout URIs, scopes, accepted client IDs and tokens for TES/WES, registry entry rules, and CORS; they also clarify that Krini only reads the registry's public service list, so registry write access is not required.
5 Document upgrades from branch images and the Vite app, and direct operators to release notes for breaking setting changes. ✅ Met The upgrade guide includes both migration paths and the release-notes instruction.
6 Include a minimal released-image docker run example and a link to the Helm chart. ✅ Met The operator guide includes a release-tagged docker run example and links to the chart.
7 Let an operator run and verify a released image using the deployment guide alone, without setting deployment-specific defaults. ✅ Met The operator guide links configuration and verification, gives a release deployment example, and includes a post-start deployment checklist; deployment-specific values are presented as examples rather than defaults.

@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 4 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="docs/operator-guide/login.md" line_range="143" />
<code_context>
+
+Logging out is a `POST` to `/auth/api/logout` from Krini's own pages: Krini
+accepts it only with the `Origin` of `APP_ORIGIN`, so serve Krini at that
+address. It deletes Krini's cookies and, if the provider's discovery
+document has an `end_session_endpoint` (OpenID Connect RP-Initiated
+Logout), sends the browser there, with the ID token, the client ID and
</code_context>
<issue_to_address>
**Logout can restore session**

When a token refresh is in flight when the user logs out, and its response arrives after the logout response, `POST /auth/api/refresh` can finish after `POST /auth/api/logout` and return fresh session cookies; because the refresh request cannot see the logout response's marker, the browser can end up logged in after logout.

Coordinate logout with in-flight refreshes so a refresh that began before logout cannot reissue session cookies afterward.
</issue_to_address>

### Comment 2
<location path="docs/operator-guide/upgrading.md" line_range="18-19" />
<code_context>
    deploys its image unless your values set `krini.tag` (remove it, or set
    the new version; see [Helm chart](helm-chart.md#upgrades)), and whose
    values may have changed, too.
+4. Go through [Checking a deployment](deployment.md#checking-a-deployment).
</code_context>
<issue_to_address>
**Single-replica upgrades can log users out**

When a one-replica Helm deployment is upgraded while overlapping refresh requests are routed to different pods, the Helm chart's default rolling update temporarily runs a second pod (`maxSurge: 25%` rounds up for one replica). If concurrent tab refreshes reach different pods, their in-memory refresh-success maps don't coordinate; the losing refresh gets a 401 and clears the session cookies, logging the user out.

Document that upgrades also need sticky sessions or a rollout strategy that prevents overlapping pods, or make refresh coordination shared across pods.
</issue_to_address>

### Comment 3
<location path="docs/operator-guide/deployment.md" line_range="205" />
<code_context>
-e.g. `https://tes.example.org/ga4gh/tes/v1`: Krini appends the API paths
-(e.g. `/tasks`) to it.
+Krini's server and the users' browsers contact different services; only
+the TES and WES services get the user's token, and only they need CORS
+settings for Krini:
+
</code_context>
<issue_to_address>
**Login provider token destination is omitted**

When the provider advertises a user-info endpoint and Krini uses it, `getUserSession` sends the user's access token to the provider's user-info endpoint in a Bearer header, but the text says only TES/WES services receive the token and the table shows a dash for the login provider, leaving operators with an inaccurate account of where the token is sent.

Update the text and table to show that Krini sends the access token to the provider's user-info endpoint when one is used.

Also at `docs/operator-guide/deployment.md:210`.
</issue_to_address>

### Comment 4
<location path="docs/operator-guide/deployment.md" line_range="213" />
<code_context>
+| Login provider | Browser (redirects) and Krini's server (discovery, keys, token, user info) | See [Login](login.md#how-the-login-works) | — | No |
+| Cloud Registry | Krini's server | `GET /services` | No | No |
+| WES services and gateways | Krini's server | `GET /service-info`, to list and check them | No | No |
+| WES services and gateways | Browser | Service info and runs: list, submit, status, cancel | Yes | Yes |
+| TES services and gateways | Browser | Service info and tasks: list, create, get, cancel | Yes | Yes |
+
</code_context>
<issue_to_address>
**WES info is misattributed**

When an operator uses the table to determine which WES requests require browser CORS, the browser does not call a WES service’s `/service-info` endpoint directly: `get-wes-servers` probes it from Krini’s server, and the service-info page uses a Krini API route that fetches it server-side. The table therefore directs operators to treat this request as browser traffic requiring CORS, which can mislead CORS troubleshooting.

Remove “Service info” from the browser row or clarify that service-info requests are made by Krini’s server.
</issue_to_address>

Sourcery assessment

Approval pending. 3 findings to address first.

Blocking findings: docs/operator-guide/login.md:143, docs/operator-guide/upgrading.md:19, docs/operator-guide/deployment.md:205


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

Comment thread docs/operator-guide/login.md Resolved
Comment thread docs/operator-guide/upgrading.md Resolved
Comment thread docs/operator-guide/deployment.md Resolved
Comment thread docs/operator-guide/deployment.md Resolved
- The login provider's user info endpoint gets the access token too,
  from Krini's server
- The browser calls the WES service info (workflow form), not the TES
  service info
- A rolling update runs two pods for a short time, which can log out
  users with concurrent refreshes

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vercel
vercel Bot temporarily deployed to Preview – krini November 17, 2026 15:54 Inactive
@AnonymousXC
AnonymousXC merged commit 973e611 into dev Nov 17, 2026
61 checks passed
@AnonymousXC
AnonymousXC deleted the docs/77-deploy-release branch November 17, 2026 16:36
uniqueg added a commit that referenced this pull request Nov 19, 2026
Set date-released to 2026-11-19 and reorder the CITATION.cff authors
by lines added on dev (without lock files, public/ and
src/components/ui/, as in #74). Add everything merged since the first
draft to the release notes: TES tasks with the user's token (#90),
the WES run details (#100), the minimal dashboard (#108), the Helm
chart (#92, #95), the image end-to-end tests (#99), the deployment
docs (#101), the Next.js update (#102) and the fixes #109 and #110.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

This branch was previously deployed

1 inactive deployment
Preview – krini — 8b374a89 Deployed Nov 17, 2026 by vercel[bot]
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.

docs: deploy a released version

2 participants