Skip to content

fix(appwrite): align template standards#645

Open
mberlofa wants to merge 2 commits into
mainfrom
fix/appwrite-template-standards
Open

fix(appwrite): align template standards#645
mberlofa wants to merge 2 commits into
mainfrom
fix/appwrite-template-standards

Conversation

@mberlofa

@mberlofa mberlofa commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add the canonical appwrite.validate helper and validate.yaml gate
  • centralize fail-fast validation for database, cache, backup, ingress, and Gateway API settings
  • add helm-unittest coverage for validation failures

Validation

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

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

Summary by CodeRabbit

  • New Features
    • Added chart rendering-time configuration validation to catch invalid setups early.
    • Improves failure messages for common issues such as missing ingress hosts, incomplete ingress host entries, missing gateway parent references, conflicting database/cache configuration, and missing backup endpoint details when backups are enabled.
  • Bug Fixes
    • Prevents deployments from proceeding when required settings are missing or mutually exclusive.
  • Tests
    • Added Helm validation test coverage for valid configurations and targeted failure cases with expected error messages.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds Helm render-time validation for Appwrite configuration, wires the validation helper into a new template, and extends tests to assert the expected failure messages for invalid database, cache, backup, ingress, and gateway settings.

Changes

Configuration validation

Layer / File(s) Summary
Validation helper template
charts/appwrite/templates/_helpers.tpl
Adds appwrite.validate template performing fail-based checks for ingress and gateway configuration, plus helper evaluations for database, cache, and backup settings.
Template rendering wiring
charts/appwrite/templates/validate.yaml
Adds validate.yaml to include appwrite.validate with the current context.
Validation test suite
charts/appwrite/tests/validation_test.yaml
Adds validation tests for the success case and for exact failure messages covering ambiguous database/cache selection, missing backup endpoint, empty ingress hosts, missing ingress host fields, and missing gateway parent refs.

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

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the PR’s main goal of aligning the Appwrite chart with template standards.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/appwrite-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: appwrite

Framework Score
MITRE + NSA + SOC2 79.59956%

✅ Security posture acceptable.

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

Actionable comments posted: 1

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

Inline comments:
In `@charts/appwrite/templates/_helpers.tpl`:
- Around line 56-65: The current appwrite.validate check only verifies that
ingress.hosts exists, but entries without a host field still break rendering in
ingress.yaml, NOTES.txt, and appwrite.domain. Update appwrite.validate in
_helpers.tpl to validate each item in .Values.ingress.hosts and fail when any
entry is missing or has an empty .host, using the existing appwrite.validate
helper to enforce a non-empty hostname for every ingress host entry.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 53f8469d-b21b-47e5-9af5-cc2758715d07

📥 Commits

Reviewing files that changed from the base of the PR and between 0d8168f and 458b1fa.

📒 Files selected for processing (3)
  • charts/appwrite/templates/_helpers.tpl
  • charts/appwrite/templates/validate.yaml
  • charts/appwrite/tests/validation_test.yaml

Comment thread charts/appwrite/templates/_helpers.tpl
@mberlofa mberlofa force-pushed the fix/appwrite-template-standards branch from c6fd020 to 79bc260 Compare July 4, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant