Skip to content

docs: add MkDocs docs and align the README - #77

Merged
uniqueg merged 25 commits into
devfrom
docs/mkdocs
Nov 6, 2026
Merged

uniqueg merged 25 commits into
devfrom
docs/mkdocs

Conversation

@uniqueg

@uniqueg uniqueg commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Summary

Closes #74. Part of #72.

  • docs/ in MkDocs Material, styled like foca and cloud-registry (mkdocs.yml: same theme, palette, extensions and validation): home and design, API (endpoints, service info, status codes), configuration (all settings, service info), access control (moved from auth.md), deployment (images, signatures, Kubernetes, running locally), upgrading (1.2.0) and development (build, tests, CI, releases, stub generation).
  • Self-contained for the TESK documentation, which includes docs/ as its "TESK API" section at build time: pages link only to each other with relative links within docs/, and to source files with full GitHub URLs; no assumptions about the site-wide navigation. No Read the Docs config and no publishing here.
  • CI: new job Docs (mkdocs build --strict), added to the gate and to the needs of Publish image.
  • Dependencies pinned in docs/requirements.txt, updated by a new Dependabot pip entry (target dev, monthly, grouped).
  • README aligned with cloud-registry: logo, badges (license, CI, docs, coverage, tag, image), synopsis, quick start, development, citation, contributing. The docs badge, the links and site_url point to the tesk-api section of the TESK documentation, https://tesk.readthedocs.io/en/latest/tesk-api/.
  • Removed from the README: the outdated GCR image and EMBL-EBI deployment links.

Light lane: docs, a docs CI job without secrets or permissions, and Dependabot config; I reviewed the diff myself.

Verified

  • mkdocs build --strict (mkdocs 1.6.1, mkdocs-material 9.8.0, pymdown-extensions 12.3): no warnings.
  • Workflow and Dependabot YAML parse (yq).
  • CI on this PR: see the checks.

🤖 Generated with Claude Code

Summary by Sourcery

Add a standalone MkDocs documentation section and align the project README with the current TESK API documentation and distribution.

New Features:

  • Add a self-contained MkDocs Material documentation site covering the TESK API, configuration, access control, deployment, upgrades, and development.

Enhancements:

  • Replace the outdated README content with an aligned overview, quick start, development guidance, project links, and current badges.
  • Move and update access-control documentation to work within the new documentation structure.

Build:

  • Pin documentation dependencies and configure MkDocs navigation, theme, extensions, and link validation.

CI:

  • Add a strict documentation build to CI and require it for the CI gate and image publishing.

Documentation:

  • Document API endpoints, service information, configuration settings, deployment options, version 1.2.0 upgrades, and development workflows.

Chores:

  • Configure monthly grouped Dependabot updates for documentation dependencies.

uniqueg and others added 21 commits November 5, 2026 05:38
Add ci.yml as in the org's other repositories (PR title, lint, test,
smoke test, image scan, gate). The scan only reports until the
dependency update.

The base image of the Dockerfile no longer exists; build from source on
Temurin 8 instead (not Alpine: TLS handshakes fail there on Java 8).
Add a .dockerignore.

Remove the old workflows, which can't run any more and would publish
over the tag of the last release on every push to master, and Travis.

Closes #59

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Move to the last releases of the Spring Boot 2.7 line, and pin the
transitive dependencies the scan flags. spring-security-oauth2 2.5
makes its exception translator generic, which the entry point adapts
to.

What is fixed only in Spring Boot 3 goes to .trivyignore.yaml, each
entry with its reason and expiry date. The scan in CI now fails on
fixable critical and high findings.

Closes #60

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Add release.yml as in the org's other repositories: a tag vX.Y.Z
publishes X.Y.Z (and latest for the highest release) to the same image
name, by digest, after checks of the tag and of CI, and a scan. Other
version tags stay untouched.

After that, one POST to Pubgrade, skipped unless its settings are set.
It needs Pubgrade's publish mode (elixir-cloud-aai/Pubgrade#33).

Closes #61

Co-Authored-By: Claude Opus 5.5 <[email protected]>
GET /service-info stays public by default, also with the auth profile.
TESK_API_SERVICE_INFO_PUBLIC=false requires a valid token for it. Test
both settings with and without a token, and fix auth.md, which said
that all endpoints are secured.

Part of elixir-cloud-aai/TESK#216, whose chart change follows.

Closes #62

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A re-run of all jobs builds a new digest: refuse it if X.Y.Z points to
another one. Publish one release at a time, so that latest is decided
and written in one go.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Align CI with the branching model of the org's other repositories
(`dev` + `main`): run on pull requests and pushes to `dev`; on pushes,
push the image by digest in the environment `dev-images`, scan exactly
that digest, then attest, sign and tag it `dev` and `sha-<commit>`, as
cloud-registry does. Add the weekly scan of `latest` (`scan.yml`), let
Dependabot target `dev`, and fail pushes on Codecov upload errors.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Publish only on pushes to this repository, or to forks that set
`DOCKERHUB_ORG` (`PUBLISH`, as in proTES and foca): other runs scan a
local build, upload nothing to code scanning and don't fail on Codecov
upload errors, and the gate allows the skipped publishing jobs. Name
the environment and secrets publishing needs in the README, and fix
comments from the review.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	.github/workflows/ci.yml
# Conflicts:
#	.github/workflows/ci.yml
#	.trivyignore.yaml
The branching model is now `dev` + `main`: release commits must be on
`main`, `latest` goes by the tags on `main`, and CI must have passed for
the push of the release commit to `dev`. As in cloud-registry, the
version in `CITATION.cff` must be the release version, as Zenodo
archives the tagged metadata.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Refuse a version that is already published before attesting and
signing the new digest, and fail on registry errors instead of taking
them for a missing tag. Name the tag rulesets that protect the release
and Pubgrade secrets, and clarify the version rules for pre-releases.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Restore the files of #67 to their state on `dev`, so that this pull
request no longer depends on #67, which waits for a decision.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Restore the files of #67 to their state on `dev`, so that this pull
request no longer depends on #67, which waits for a decision.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Move the documentation of the README and `auth.md` into `docs/`
(MkDocs Material, styled like foca and cloud-registry): API and service
info, configuration, access control, deployment, upgrade notes for
1.2.0, development and releases. Pages link to each other only within
`docs/`, so that the TESK documentation can include them as its section
"TESK API". Build them strictly in CI (job `Docs`), without publishing
from here, and let Dependabot update their dependencies. The README
follows the other repositories: logo, badges, synopsis, quick start,
development, citation and contributing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	README.md
#	docs/access-control.md
@sourcery-ai

sourcery-ai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

The PR introduces a self-contained, strictly validated MkDocs Material documentation section, moves and expands access-control guidance into the new structure, updates the README as the primary user and contributor entry point, and wires documentation builds and dependency updates into project automation.

Flow diagram for documentation CI dependencies

flowchart TD
    Commit["Pull request or push to dev"] --> Docs["Docs: install docs/requirements.txt"]
    Docs --> Strict["mkdocs build --strict"]
    Strict --> Gate["CI passed"]
    Gate --> Publish["Publish image"]
Loading

File-Level Changes

Change Details Files
Added a self-contained MkDocs Material documentation site covering usage, architecture, API behavior, configuration, security, deployment, upgrades, and development workflows.
  • Created the MkDocs site configuration with Material theme, navigation, extensions, validation, and pinned dependencies.
  • Added pages for the API, service information and status codes; all configuration settings; OIDC and group-based access control; deployment and image verification; version 1.2.0 upgrades; and development practices.
  • Moved authentication and authorization guidance into the documentation structure and updated links to use relative documentation paths or full GitHub URLs.
  • Added light/dark ELIXIR On-Cloud logo assets.
mkdocs.yml
docs/index.md
docs/api.md
docs/configuration.md
docs/access-control.md
docs/deployment.md
docs/upgrading.md
docs/development.md
docs/requirements.txt
docs/images/logo_elixir_on_cloud.png
docs/images/logo_elixir_on_cloud_night.png
auth.md
Integrated strict documentation validation into the CI dependency graph.
  • Added a Python 3.13 Docs job that installs pinned documentation dependencies and runs mkdocs build --strict.
  • Made documentation part of image publishing prerequisites and the aggregate required-check gate.
  • Documented the documentation build and CI behavior for contributors.
.github/workflows/ci.yml
docs/development.md
Aligned the project README with the current project presentation and documentation entry points.
  • Replaced legacy overview and operational details with ELIXIR On-Cloud branding, badges, synopsis, quick start, development, citation, and contribution guidance.
  • Linked users to the TESK documentation's tesk-api section and removed obsolete GCR and EMBL-EBI deployment references.
  • Added repository-relative references for local documentation and centralized badge/link definitions.
README.md
Added automated dependency maintenance for documentation tooling.
  • Configured monthly grouped Dependabot updates for pip dependencies under docs/, targeting the dev branch.
.github/dependabot.yml

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

@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.94%. Comparing base (c699412) to head (fbca270).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev      #77   +/-   ##
=======================================
  Coverage   55.94%   55.94%           
=======================================
  Files          64       64           
  Lines        2152     2152           
  Branches      234      234           
=======================================
  Hits         1204     1204           
  Misses        807      807           
  Partials      141      141           

☔ 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.

@uniqueg
uniqueg marked this pull request as ready for review November 6, 2026 05:09
sourcery-ai[bot]
sourcery-ai Bot previously approved these changes Nov 6, 2026

@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.

Sourcery assessment

Approved.

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

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

## Individual Comments

### Comment 1
<location path="README.md" line_range="41" />
<code_context>
+[kind](https://kind.sigs.k8s.io/)):
+
+```bash
+docker run --rm --publish 8080:8080 \
+  --volume "${HOME}/.kube/config:/root/.kube/config:ro" \
+  elixircloud/tesk-api:latest
</code_context>
<issue_to_address>
**Remote callers get unauthenticated task access**

When a developer runs either Docker example on a host reachable by untrusted callers, docker publishes port 8080 on all host interfaces, and the image defaults to `noauth`, so remote callers can submit and inspect tasks using the mounted Kubernetes credentials.

Bind the published port to localhost or require authentication for the exposed API.

Also at `docs/deployment.md:55-56`.
</issue_to_address>

### Comment 2
<location path="docs/deployment.md" line_range="37-38" />
<code_context>
+client](https://github.com/kubernetes-client/java). Inside the cluster, it uses
+the service account of its pod (`spec.template.spec.serviceAccountName` of its
+deployment); outside, the `KUBECONFIG` file. Either way, it needs the rights to
+create, read, list and label jobs and pods and to read pod logs in its
+namespace (`TESK_API_K8S_NAMESPACE`); the built-in `edit` role is enough. The
+taskmaster's service account (`TESK_API_TASKMASTER_SERVICE_ACCOUNT_NAME`)
+needs to manage jobs, pods and persistent volume claims.
</code_context>
<issue_to_address>
**Task creation permissions are incomplete**

When an operator configures a custom role from the documented resource list instead of using the built-in `edit` role, a deployment that grants only the documented job and pod permissions denies TESK API’s `createNamespacedConfigMap` call for every task; requests fail instead of creating tasks. When a task specifies RAM, the API also lists namespace LimitRanges, another permission the instructions omit.

Document the required ConfigMap creation and LimitRange listing permissions, along with the necessary job and pod patch permissions for cancellation.
</issue_to_address>

### Comment 3
<location path="docs/deployment.md" line_range="17" />
<code_context>
+
+```bash
+cosign verify elixircloud/tesk-api:1.2.0 \
+  --certificate-identity-regexp '^https://github\.com/elixir-cloud-aai/tesk-api/\.github/workflows/' \
+  --certificate-oidc-issuer https://token.actions.githubusercontent.com
+```
</code_context>
<issue_to_address>
**Release check accepts dev signatures**

When a consumer uses the documented command to verify a release tag whose digest has a CI/dev signature, the identity regex accepts any workflow and ref in this repository, including the CI workflow that signs dev images, so verification of a release tag does not establish that its digest was signed by the release workflow; callers can accept a dev-signed digest as a release artifact.

Restrict the identity regex to the release workflow and version-tag refs for release images.
</issue_to_address>

### Comment 4
<location path="README.md" line_range="42" />
<code_context>
+
+```bash
+docker run --rm --publish 8080:8080 \
+  --volume "${HOME}/.kube/config:/root/.kube/config:ro" \
+  elixircloud/tesk-api:latest
+```
</code_context>
<issue_to_address>
**Tasks use the wrong cluster configuration**

When the host's `KUBECONFIG` points to a file other than `~/.kube/config`, the Docker command mounts only `~/.kube/config` and does not pass the host's `KUBECONFIG` value into the container, so `Config.defaultClient()` reads the wrong or missing configuration and task requests fail to reach the intended cluster.

Mount the kubeconfig selected by the host's `KUBECONFIG` and make that file available at the container's default config path.

Also at `docs/deployment.md:56`.
</issue_to_address>

### Comment 5
<location path="docs/api.md" line_range="21" />
<code_context>
+`/v2/api-docs`.
+
+With the `auth` profile, all endpoints but service info, the Swagger UI and the
+API description need a valid access token; see [Access
+control](access-control.md).
+
</code_context>
<issue_to_address>
**Service info access requirements are misstated**

When the `auth` profile is active and `TESK_API_SERVICE_INFO_PUBLIC` is `false`, the API page says service info is exempt from authentication, but `/service-info` then requires a valid token, so clients that omit one receive `401 Unauthorized`.

Update the API page to state that `/service-info` requires a valid token when `TESK_API_SERVICE_INFO_PUBLIC` is false.

Also at `docs/api.md:20`.
</issue_to_address>

### Comment 6
<location path="docs/api.md" line_range="11" />
<code_context>
+--- | --- | ---
+`GET` | `/service-info` | Information about the service
+`POST` | `/tasks` | Create a task
+`GET` | `/tasks` | List tasks (filter by name prefix, pages)
+`GET` | `/tasks/{id}` | Get a task
+`POST` | `/tasks/{id}:cancel` | Cancel a task
</code_context>
<issue_to_address>
**Name filtering returns extra tasks**

When a client supplies `namePrefix` to list tasks, `TesServiceImpl.listTasks` does not apply `namePrefix`, so clients that request a name-prefix filter still receive tasks with other names.

Document name-prefix filtering as unsupported until the implementation applies the filter.
</issue_to_address>

### Comment 7
<location path="docs/configuration.md" line_range="27-28" />
<code_context>
+`TESK_API_TASKMASTER_EXECUTOR_SECRET_NAME` | Name of a Kubernetes secret to mount into every executor as a volume (all its files). Default: none.
</code_context>
<issue_to_address>
**Executor secret settings are ignored**

When a deployment configures the executor secret using the documented environment-variable names, spring Boot maps underscores in environment-variable names to property separators, so these names do not bind to `tesk.api.taskmaster.executor-secret.name` or `tesk.api.taskmaster.executor-secret.mount-path`; the secret therefore is not mounted at the documented path.

Document the Spring Boot environment-variable names that bind to these properties, or change the property names to match the documented forms.
</issue_to_address>

### Comment 8
<location path="docs/development.md" line_range="46-48" />
<code_context>
+to `dev`: it checks the pull request title, lints the workflows, builds and
+tests TESK API (with coverage to [Codecov](https://codecov.io/gh/elixir-cloud-aai/tesk-api)),
+builds the docs strictly, starts the image in both profiles, and scans the
+image for known vulnerabilities. The scan fails on critical and high
+vulnerabilities that have a fix, except those accepted in `.trivyignore.yaml`,
+each with a reason and an expiry date. On pushes to `dev`, it publishes the
+scanned and signed image as `<org>/tesk-api:dev` (and `sha-<commit>`), where
+`<org>` is the variable `DOCKERHUB_ORG` (by default `elixircloud`); this needs
</code_context>
<issue_to_address>
**CI scan does not block vulnerable images**

When trivy finds a fixable critical or high vulnerability not covered by an ignore entry, the scan step uses `fail: "false"`, so CI continues even when Trivy finds fixable critical or high vulnerabilities that are not ignored; maintainers see a non-blocking report rather than the failure the docs promise.

Set the scan action to fail on those findings, or revise the documentation to describe the scan as non-blocking.
</issue_to_address>

Linked issues

#74 docs: add MkDocs docs and align the README · 4 of 5 met · 1 to check by hand

# Requirement Status Notes
1 Add self-contained MkDocs Material documentation covering the API, service info, configuration, deployment, building and testing, and 1.2.0 upgrade notes. ✅ Met The docs pages cover the requested topics and use relative links between documentation pages.
2 Build the docs strictly in CI, without Read the Docs configuration or documentation publishing in this repository. ✅ Met The Docs job runs mkdocs build --strict and is included in the CI gate; no Read the Docs configuration or docs publishing job is added.
3 Align the README with the other repositories' structure and shields for CI, Codecov, docs, license, and release. ✅ Met The README includes all requested badges and the requested overview, quick start, development, citation, and contributing sections.
4 Point the README docs badge and links to the TESK API section on the TESK documentation site. 👀 Check by hand (external system) Verify that the configured /en/latest/tesk-api/ URL resolves to the TESK API section on the live TESK documentation site.
5 Configure Dependabot updates for the documentation dependencies. ✅ Met Dependabot is configured for pip in /docs, monthly, targeting dev with grouped updates.

Sourcery assessment

Approval pending. 8 findings to address first.

Blocking findings: README.md:41, docs/deployment.md:38, docs/deployment.md:17, README.md:42, docs/api.md:21, and 3 more


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

Comment thread README.md Resolved
Comment thread docs/deployment.md Resolved
Comment thread docs/deployment.md Resolved
Comment thread README.md Resolved
Comment thread docs/api.md Resolved
Comment thread docs/api.md Resolved
Comment thread docs/configuration.md Resolved
Comment thread docs/development.md Resolved
@sourcery-ai
sourcery-ai Bot dismissed their stale review November 6, 2026 05:13

Sourcery withdrew this approval because the latest commits introduced blocking findings.

Bind the local examples to localhost and mount the kubeconfig in use,
limit the cosign identity to the release workflow and version tags, list
the Kubernetes rights TESK API needs, and say that the name prefix filter
is ignored, when service info needs a token, and that the CI scan only
reports until the dependencies are updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@uniqueg
uniqueg merged commit d60f190 into dev Nov 6, 2026
25 checks passed
@uniqueg
uniqueg deleted the docs/mkdocs branch November 6, 2026 05:20
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: add MkDocs docs and align the README

1 participant