Repository navigation
docs: deploy a released version - #101
Conversation
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]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Reviewer's GuideDocumentationReview 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.
Review the new login guide alongside the Helm chart references, checking provider configuration, LS Login registration, access tiers, sessions, logout, and rolling-update implications.
Read the operator-guide quick start and its entry-point links to see how operators are directed through deployment, configuration, login, and checks.
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.
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 #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. 🚀 New features to boost your workflow:
|
Linked issuesChecked at commit 8b374a8 #77 docs: deploy a released version · 7 of 7 met
|
There was a problem hiding this comment.
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
- 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]>
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]>
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).
LOGIN_PROVIDERS,APP_ORIGIN,CLOUD_REGISTRY_URL,OIDC_REDIRECT_URI,COMPUTE_ACCESS_REQUEST_URL,PRIVACY_*, plus the image'sPORTandLISTEN_HOSTNAME) with required/optional, format, default and example; states that Krini doesn't check settings at start.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_entitlementandoffline_access, JWT access tokens), access tiers (withoutcomputeGroups/adminGroupsnobody can run anything), sessions and logout.docker runexample 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 (onlyGET/POST,Authorization+Content-Type, no cookies, so noAllow-Credentials; the old examples listedPUT/DELETEand 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 ownAPP_ORIGIN.LS_LOGIN_URL/OIDC_*settings toLOGIN_PROVIDERS) and from the Vite app (VITE_HOST_URI, port 8081).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, theDockerfile, and thedev-legacybranch for the Vite settings).Closes #77
Verification
mkdocs build --strictwithdocs/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).CI passed, Docs, Read the Docs preview https://krini--101.org.readthedocs.build/en/101/, end-to-end tests, Vercel).Gaps found (follow-ups, not in this PR)
The docs describe the current behaviour; these gaps are drafted as follow-up issues, not posted:
LOGIN_PROVIDERS(no log line).APP_ORIGIN, which fails where the server can't reach its own public address..env.example(and the copy inconfiguration.md) uses the logo/icon.jpg, which isn't inpublic/; the shipped file is/ls-login-grey-wide.jpg.Declined review findings
Open questions
None.
🤖 Generated with Claude Code