Skip to content

fix(ckan): align template standards#652

Merged
mberlofa merged 2 commits into
mainfrom
fix/ckan-template-standards
Jul 6, 2026
Merged

fix(ckan): align template standards#652
mberlofa merged 2 commits into
mainfrom
fix/ckan-template-standards

Conversation

@mberlofa

@mberlofa mberlofa commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add the canonical ckan.validate helper and validate.yaml gate
  • fail fast for incomplete external PostgreSQL, external Redis, external Solr, ingress rules, backup S3 settings, and selector label overrides
  • preserve hostless catch-all Ingress support by omitting spec.rules[].host when not configured
  • align NOTES.txt with the numbered HelmForge sections and add helm-unittest validation coverage

Validation

  • make template-standards-check CHART=ckan
  • helm unittest charts/ckan
  • helm lint --strict charts/ckan
  • make standards-check CHART=ckan
  • make validate-chart CHART=ckan TIMEOUT=1200: FULLY VALIDATED (14 layers)
  • make site-sync-check CHART=ckan
  • make release-check REPO=charts
  • make attribution-check REPO=charts

Site PR: helmforgedev/site#332
Issue: #633

Summary by CodeRabbit

  • New Features
    • Added render-time configuration validation for external DB, external Redis, Solr, ingress, and S3 backup settings, plus safeguards to prevent overriding critical selector labels.
  • Documentation
    • Updated installation notes with a structured summary, clearer access/credentials commands, runtime component states, improved operational checks, and revised troubleshooting/resources; removed the upgrade reminder.
  • Bug Fixes
    • Ingress manifests no longer emit an empty/missing host rule when hosts are specified without a host.
  • Tests
    • Expanded validation coverage, added an ingress catch-all case without host, and adjusted backup assertions for default DB host behavior.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 942f47e9-3b35-421e-bec6-bdd687856c98

📥 Commits

Reviewing files that changed from the base of the PR and between 89e8e20 and c2f0533.

📒 Files selected for processing (1)
  • charts/ckan/tests/validation_test.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • charts/ckan/tests/validation_test.yaml

📝 Walkthrough

Walkthrough

Adds centralized Helm validation for external services, ingress, backups, and selector labels; updates ingress host rendering for host-less rules; adds matching tests; and rewrites NOTES.txt into structured installation and operational guidance.

Changes

Configuration Validation and Ingress

Layer / File(s) Summary
Validation helper and wiring
charts/ckan/templates/_helpers.tpl, charts/ckan/templates/validate.yaml
Adds ckan.validate checks for external DB/Redis/Solr, ingress, backup S3, and label overrides, removes inline backup S3 validation from ckan.backupEnabled, and renders the helper through validate.yaml.
Ingress host rendering
charts/ckan/templates/ingress.yaml
Only renders host: when an ingress host value is present.
Validation and ingress tests
charts/ckan/tests/validation_test.yaml, charts/ckan/tests/backup_test.yaml, charts/ckan/tests/ingress_test.yaml
Adds validation failures and selector-label checks, updates backup assertions to the new behavior, removes the obsolete backup S3 endpoint failure case, and adds a host-less ingress test.

Estimated code review effort: 3 (Moderate) | ~25 minutes

NOTES.txt Restructuring

Layer / File(s) Summary
Structured notes content
charts/ckan/templates/NOTES.txt
Reorganizes notes into installation summary, access, credentials, runtime components, operational checks, storage and backup, troubleshooting, and resources sections.

Estimated code review effort: 2 (Simple) | ~12 minutes

Suggested labels: area:docs

🚥 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 matches the PR’s main goal of aligning the CKAN chart templates with standards.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ckan-template-standards

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

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Standards Check (GR-079) — PASS

Every changed chart fully passes standards-check.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

🟢 Security Scan: ckan

Framework Score
MITRE + NSA + SOC2 78.71212%

✅ Security posture acceptable.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9b82b640d3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread charts/ckan/templates/_helpers.tpl

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

🧹 Nitpick comments (1)
charts/ckan/tests/validation_test.yaml (1)

49-68: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Missing coverage for backup.s3.bucket and backup.s3.accessKey failure branches.

The helper (ckan.validate) also fails when backup.s3.bucket or backup.s3.accessKey/existingSecret is missing (see _helpers.tpl lines 66-71), but only the endpoint and secretKey branches are tested here.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/ckan/tests/validation_test.yaml` around lines 49 - 68, Add validation
test coverage for the missing backup S3 branches in ckan.validate. Update the
validation_test.yaml cases around the existing backup.enabled scenarios to also
assert failures when backup.s3.bucket is omitted and when backup.s3.accessKey is
omitted without backup.s3.existingSecret, matching the checks in _helpers.tpl.
Use failedTemplate assertions with the expected error messages so both branches
are exercised alongside the existing endpoint and secretKey tests.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@charts/ckan/tests/validation_test.yaml`:
- Around line 49-68: Add validation test coverage for the missing backup S3
branches in ckan.validate. Update the validation_test.yaml cases around the
existing backup.enabled scenarios to also assert failures when backup.s3.bucket
is omitted and when backup.s3.accessKey is omitted without
backup.s3.existingSecret, matching the checks in _helpers.tpl. Use
failedTemplate assertions with the expected error messages so both branches are
exercised alongside the existing endpoint and secretKey tests.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2a768af5-9e1e-4d43-8692-4588271a1a33

📥 Commits

Reviewing files that changed from the base of the PR and between 870b4c7 and 9b82b64.

📒 Files selected for processing (7)
  • charts/ckan/templates/NOTES.txt
  • charts/ckan/templates/_helpers.tpl
  • charts/ckan/templates/ingress.yaml
  • charts/ckan/templates/validate.yaml
  • charts/ckan/tests/backup_test.yaml
  • charts/ckan/tests/ingress_test.yaml
  • charts/ckan/tests/validation_test.yaml
💤 Files with no reviewable changes (1)
  • charts/ckan/tests/backup_test.yaml

@mberlofa mberlofa force-pushed the fix/ckan-template-standards branch from c899418 to 89e8e20 Compare July 4, 2026 16:51
@mberlofa

mberlofa commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the CodeRabbit review-summary nitpick for backup validation coverage.

Changes:

  • Added validation coverage for missing backup.s3.bucket when backups are enabled.
  • Added validation coverage for missing backup.s3.accessKey when backups are enabled and no backup.s3.existingSecret is set.

Validation:

  • make validate-chart CHART=ckan passed
  • Result: ckan: FULLY VALIDATED (14 layers), including all k3d GR-027 scenarios
  • make release-check REPO=charts passed with only the expected post-merge release confirmation warning
  • make attribution-check REPO=charts passed
  • git diff --check passed

Note: this CodeRabbit item was posted in the review summary/body, not as an active review thread, so there is no thread ID to reply to or resolve for it. The existing inline thread is already resolved.

@mberlofa mberlofa merged commit 1beaf30 into main Jul 6, 2026
17 checks passed
@mberlofa mberlofa deleted the fix/ckan-template-standards branch July 6, 2026 08:23
mberlofa added a commit to helmforgedev/site that referenced this pull request Jul 6, 2026
## Summary
- register ckan in the site sync playground registry
- keep the playground/site sync gate aligned with the chart validation
PR

## Validation
- make site-sync-check CHART=ckan
- npm run lint
- npm run format:check
- npm run build
- make release-check REPO=site
- make attribution-check REPO=site

Chart PR: helmforgedev/charts#652
Issue: helmforgedev/charts#633
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant