Skip to content

docs(api): stop listing helm-install-timeout carriers in rest.go - #4381

Merged
Aleksei Sviridkin (lexfrei) merged 1 commit into
mainfrom
docs/rest-helm-timeout-carriers
Sep 23, 2026
Merged

Aleksei Sviridkin (lexfrei) merged 1 commit into
mainfrom
docs/rest-helm-timeout-carriers

Conversation

@lexfrei

@lexfrei Aleksei Sviridkin (lexfrei) commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does

A comment in the Application to HelmRelease conversion listed which kinds set the helm install timeout annotation, and that list was already wrong. It named two kinds while more set release.cozystack.io/helm-install-timeout today, and nothing checks it, so it goes stale every time another kind opts in.

The comment now says where the annotations live, on the kind's ApplicationDefinition, and when a kind should set them. Each kind that sets the annotation already explains why next to it in its cozyrds manifest, so nothing is lost. Comment-only change.

Closes #4147

Screenshots

No UI change.

Downstream repositories

Release note

docs(api): drop a stale list of helm-install-timeout carriers from a code comment.

Summary by CodeRabbit

  • Documentation
    • Clarified where per-application Helm timeout annotations are defined. No user-facing behavior changed.

The comment next to the timeout overrides named the kinds that set
helm-install-timeout and gave each one's reason. The list had already
fallen behind the ApplicationDefinitions that carry the annotation,
and nothing checks it, so it drifts every time a kind opts in.

Say where the annotations live and when a kind should set them
instead. Which kinds set them is recorded in their
ApplicationDefinitions, and a comment should not restate it.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <[email protected]>
@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: cozystack/cozystack/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: edd45926-691f-423a-9a77-36cfb422eb69

📥 Commits

Reviewing files that changed from the base of the PR and between a759190 and 36d5c31.

📒 Files selected for processing (1)
  • pkg/registry/apps/application/rest.go

Included review availability: Your plan provides up to 8 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The change revises a comment about HelmInstallTimeout and HelmUpgradeTimeout annotations. It states that the annotations are defined on the kind's ApplicationDefinition in the cozyrds manifest of its -rd package. The timeout logic is unchanged.

Changes

Timeout annotation documentation

Layer / File(s) Summary
Update timeout annotation comment
pkg/registry/apps/application/rest.go
The comment now describes where the timeout annotations are defined. It removes the previous list of kinds and their timeout rationale. The surrounding timeout resolution logic is unchanged.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Other · Severity of issue fixed: Low

Suggested reviewers: kvaps

Merge Risk: ⚪ Minimal · up to 36d5c

No actionable issue is indicated; the change only updates explanatory text.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: removing the stale list of helm-install-timeout carriers from rest.go.
Linked Issues check ✅ Passed Issue [#4147] asks to remove the stale list of annotation carriers while retaining guidance on annotation precedence and when a kind can opt in. The change removes the named kinds and says a kind can …
Out of Scope Changes check ✅ Passed The only change is the comment in pkg/registry/apps/application/rest.go. It directly addresses issue [#4147]. No unrelated changes appear in the diff.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added size/S This PR changes 10-29 lines, ignoring generated files area/api Issues or PRs related to the cozystack-api aggregated API server kind/documentation Categorizes issue or PR as related to documentation labels Sep 22, 2026
@lexfrei
Aleksei Sviridkin (lexfrei) marked this pull request as ready for review September 22, 2026 21:30

@IvanHunters IvanHunters left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verdict

LGTM with non-blocking notes

The list this deletes really had gone stale, and both sentences replacing it hold against the code.

Findings

  • [MINOR] packages/system/tenant-rd/cozyrds/tenant.yaml:9, two cozyrds name Flux's 5m default as the budget the annotation replaces, but this path never sees it

Caveats

Both new claims check out. The annotations are read only off ApplicationDefinition.metadata.annotations (pkg/cmd/server/start.go:306,316), and the other HelmRelease producer, PackageReconciler.buildHelmReleaseSpec (internal/operator/package_reconciler.go:86), has no per-kind annotation path at all. So the ApplicationDefinition really is the sole carrier, and all 31 in-repo ApplicationDefinitions do live under packages/system/*-rd/cozyrds/.

The premise holds too. grep -rn 'helm-install-timeout' packages/ returns five carriers, not the two the old comment named: kafka 7h, kubernetes 20m, kubernetes-nodes 15m, monitoring 15m, tenant 15m. Each one keeps its own rationale beside the annotation it sets, so the deleted paragraphs cost a reader nothing they can't get from the file that picks the number. No other Go comment restates the carrier set, so the class is gone rather than moved somewhere else to rot.

Every changed line is a comment line and nothing under packages/ is touched, so upgrade, fresh install and the config matrix have no surface to exercise here: git diff ff0b851bb..36d5c31ea -- pkg/registry/apps/application/rest.go | grep -E '^[+-]' | grep -v '^[+-][+-]' | grep -cvE '^[+-][[:space:]]*//' prints 0. A comment-only change owes no regression test, and the alternative ask of a check that goes red when the list drifts is moot once the list is gone.

go build ./..., go vet and go test -count=1 over pkg/registry/apps/application, pkg/config and pkg/cmd/server are green at 36d5c31ea, and nothing is failing in CI on that head.

Findings not anchored to changed lines

These reference code outside this PR's diff (unchanged files, or lines outside a hunk), so GitHub cannot render them inline.

[MINOR] packages/system/tenant-rd/cozyrds/tenant.yaml:9 two cozyrds name Flux's 5m default as the budget the annotation replaces, but this path never sees it

This PR relocates the per-kind "why" into the cozyrds manifests, and all five carriers do carry one. Two of them state the wrong baseline. helm-controller's own 5m never applies on this path: cozystack-api stamps Install.Timeout on every HelmRelease it generates, from HelmReleaseInstallTimeout, whose compiled-in default is 10m. Same wording at packages/system/monitoring-rd/cozyrds/monitoring.yaml:12. Neither file is touched here, so this is a sweep for whenever one of them is next edited.

Worth being explicit about which binary, because the repo has two flags of that name and only one is in play here. --helmrelease-install-timeout on cmd/cozystack-operator/main.go:129 is the operator's, and packages/core/installer/templates/cozystack-operator.yaml:181 passes it there, only when the installer value is non-empty. The Application path runs through the other one, cozystack-api's, and that Deployment carries nothing but its two TLS arguments, so the value is the compiled-in default.

$ sed -n '91p' pkg/cmd/server/start.go
		HelmReleaseInstallTimeout: "10m",
$ sed -n '1624,1626p' pkg/registry/apps/application/rest.go
	installTimeout := r.releaseConfig.HelmReleaseInstallTimeout
	upgradeTimeout := r.releaseConfig.HelmReleaseUpgradeTimeout
	if r.releaseConfig.HelmInstallTimeout > 0 {
$ grep -n 'args:' -A3 packages/system/cozystack-api/templates/deployment.yaml
        args:
        - --tls-cert-file=/tmp/cozystack-api-certs/tls.crt
        - --tls-private-key-file=/tmp/cozystack-api-certs/tls.key
$ grep -n 'default 5m' packages/system/tenant-rd/cozyrds/tenant.yaml packages/system/monitoring-rd/cozyrds/monitoring.yaml
packages/system/tenant-rd/cozyrds/tenant.yaml:9:    # CNPG bootstrap + master quorum). Flux helm-controller's default 5m
packages/system/monitoring-rd/cozyrds/monitoring.yaml:12:    # `cozy-keycloak`, not the tenant namespace, so Flux's default 5m

@lexfrei
Aleksei Sviridkin (lexfrei) merged commit ddcc317 into main Sep 23, 2026
86 of 87 checks passed
@lexfrei
Aleksei Sviridkin (lexfrei) deleted the docs/rest-helm-timeout-carriers branch September 23, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api Issues or PRs related to the cozystack-api aggregated API server kind/documentation Categorizes issue or PR as related to documentation size/S This PR changes 10-29 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rest.go names two carriers of helm-install-timeout while four RDs set it

2 participants