Skip to content

Conversation

@mauriciozanettisalomao
Copy link
Contributor

Overview

This pull request makes a minor update to the ruleset.yaml template for the mailing list service Helm chart. The main change is converting comments about OpenFGA being disabled from regular YAML comments to Helm template comments for better compatibility and clarity in the rendered output.

Tests

==> Printing templates for Helm chart...
helm template lfx-v2-mailing-list-service ./charts/lfx-v2-mailing-list-service --namespace lfx --set image.tag=ad58385
...
# Source: lfx-v2-mailing-list-service/templates/ruleset.yaml
apiVersion: heimdall.dadrus.github.com/v1alpha4
kind: RuleSet
metadata:
  name: lfx-v2-mailing-list-service
  namespace: lfx
spec:
  rules:
    # GroupsIO Services endpoints
    - id: "rule:lfx:lfx-v2-mailing-list-service:groupsio-services:create"
      ...
        - authorizer: allow_all
        - finalizer: create_jwt
     ...

    - id: "rule:lfx:lfx-v2-mailing-list-service:groupsio-services:get"
      ...
        - authorizer: allow_all
   ...
==> Templates printed for Helm chart: lfx-v2-mailing-list-service

…pdated comments to use block syntax for clarity, indicating that allowing all requests is intended for local development only.

Jira Ticket: https://linuxfoundation.atlassian.net/browse/LFXV2-594

Generated with [Cursor](https://cursor.com/)

Signed-off-by: Mauricio Zanetti Salomao <[email protected]>
@mauriciozanettisalomao mauriciozanettisalomao requested a review from a team as a code owner September 29, 2025 13:14
Copilot AI review requested due to automatic review settings September 29, 2025 13:14
@coderabbitai
Copy link

coderabbitai bot commented Sep 29, 2025

Walkthrough

Converted two inline comments to Helm/Go-template block comments in ruleset.yaml; logic and conditionals remain unchanged.

Changes

Cohort / File(s) Summary
Helm template comment adjustments
`charts/lfx-v2-mailing-list-service/templates/ruleset.yaml`
Replaced inline comments with Helm/Go template block comments documenting OpenFGA-disabled behavior for create/delete rules; no functional changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly references the main change in the pull request by indicating a fix to the ruleset.yaml behavior when OpenFGA is disabled and includes the related issue key for context.
Linked Issues Check ✅ Passed The pull request addresses the linked issue LFXV2-594 by modifying the ruleset.yaml to eliminate YAML parsing errors through Helm template comments and demonstrates a successful helm template execution, thereby satisfying the acceptance criteria for fixing syntax errors in the mailing-list-service Helm templates.
Out of Scope Changes Check ✅ Passed All changes in this pull request are confined to updating comment syntax within ruleset.yaml to address the linked issue and there are no modifications outside the scope of fixing YAML compatibility.
Description Check ✅ Passed The description succinctly explains the purpose of the pull request, references the Jira ticket, details converting YAML comments to Helm template comments in ruleset.yaml, and provides sample output from a successful helm template run to demonstrate the change.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request updates the ruleset.yaml template in the mailing list service Helm chart to convert regular YAML comments about OpenFGA being disabled into Helm template comments for better compatibility and cleaner rendered output.

  • Converts YAML comments (#) to Helm template comments ({{/* */}}) for OpenFGA disabled scenarios
  • Ensures comments don't appear in the final rendered YAML when the template is processed
  • Maintains the same explanatory content about local development usage

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
charts/lfx-v2-mailing-list-service/templates/ruleset.yaml (1)

33-36: Use Helm block comments with whitespace trimming

  • Convert inline comments to {{- /* … */ -}} to strip surrounding blank lines in the rendered YAML.
  • Manually run the equivalent helm template commands for both --set openfga.enabled=false and --set openfga.enabled=true to verify no stray comments or blank lines appear.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between ad58385 and 1d3264a.

📒 Files selected for processing (1)
  • charts/lfx-v2-mailing-list-service/templates/ruleset.yaml (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-09-02T15:52:00.460Z
Learnt from: prabodhcs
PR: linuxfoundation/lfx-v2-mailing-list-service#6
File: charts/lfx-v2-mailing-list-service/templates/ruleset.yaml:118-137
Timestamp: 2025-09-02T15:52:00.460Z
Learning: User prabodhcs confirmed that using "authorizer: allow_all" in the OpenFGA-enabled branch for the groupsio-mailing-list:create rule in charts/lfx-v2-mailing-list-service/templates/ruleset.yaml is acceptable, despite it bypassing permission checks when OpenFGA is enabled.

Applied to files:

  • charts/lfx-v2-mailing-list-service/templates/ruleset.yaml
📚 Learning: 2025-09-01T19:57:35.490Z
Learnt from: mauriciozanettisalomao
PR: linuxfoundation/lfx-v2-mailing-list-service#5
File: charts/lfx-v2-mailing-list-service/templates/ruleset.yaml:25-31
Timestamp: 2025-09-01T19:57:35.490Z
Learning: In Heimdall rulesets, when using direct field access like `.Request.Body.project_uid` in templates, it's safe to do so when preceded by a `json_content_type` authorizer that validates the JSON body format first, as the authorizers execute sequentially and the body access only occurs after successful validation.

Applied to files:

  • charts/lfx-v2-mailing-list-service/templates/ruleset.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: MegaLinter
🔇 Additional comments (1)
charts/lfx-v2-mailing-list-service/templates/ruleset.yaml (1)

115-118: Repeatable, safe pattern; consider consistency and whitespace trimming.

Apply the same Helm comment trimming ({{- /* ... */ -}}) to other OpenFGA-disabled branches or remove redundant comments for uniformity.

@mauriciozanettisalomao mauriciozanettisalomao merged commit c0c7321 into linuxfoundation:main Sep 29, 2025
5 checks passed
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.

2 participants