Skip to content

Conversation

@Dav-14
Copy link
Contributor

@Dav-14 Dav-14 commented Mar 13, 2025

No description provided.

@Dav-14 Dav-14 requested a review from a team as a code owner March 13, 2025 16:11
@coderabbitai
Copy link

coderabbitai bot commented Mar 13, 2025

Walkthrough

This pull request updates the Helm chart versions for Cloudprem, Console, Console-V3, and Portal in the main README and their respective chart README files. Each of these charts now includes a new "Stargate configuration" section with two configuration keys: global.platform.stargate.enabled and global.platform.stargate.stackApiUrl. Additionally, the helper templates for both Portal and Console have been modified to introduce a new environment variable, API_STACK_URL, whose value is conditionally generated based on the state of the stargate feature.

Changes

File(s) Change Summary
README.md Updated Helm chart versions: Cloudprem from 3.0.0 to 3.0.1; Console from 2.1.3 to 2.1.4; Console-V3 from 2.1.2 to 2.1.3; Portal from 2.1.3 to 2.1.4.
charts/cloudprem/README.md, charts/portal/README.md, charts/console/README.md, charts/console-v3/README.md Updated version badges and added a new "Stargate configuration" section with two configuration keys: global.platform.stargate.enabled (bool, default: false) and global.platform.stargate.stackApiUrl (string, default: "").
charts/portal/templates/_helpers.tpl, charts/console/templates/_helpers.tpl Introduced a new API_STACK_URL environment variable; its value is conditionally generated based on the global.platform.stargate.enabled flag, resulting in one of two URL formats for API access.

Possibly related PRs

Suggested reviewers

  • flemzord

Poem

I'm a little rabbit, hopping with glee,
Updating versions for charts, as happy as can be.
Stargate dreams in each configuration line,
API URLs now twinkle and shine.
Code fields bloom like a garden in spring—
A joyful hop, a celebratory ring!
Happy coding, from my burrow to thee!

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e9609dc and df971a5.

⛔ Files ignored due to path filters (7)
  • charts/cloudprem/Chart.lock is excluded by !**/*.lock, !**/*.lock
  • charts/console-v3/Chart.yaml is excluded by !**/*.yaml
  • charts/console-v3/values.schema.json is excluded by !**/*.json
  • charts/console-v3/values.yaml is excluded by !**/*.yaml
  • charts/console/Chart.yaml is excluded by !**/*.yaml
  • charts/console/values.schema.json is excluded by !**/*.json
  • charts/console/values.yaml is excluded by !**/*.yaml
📒 Files selected for processing (6)
  • README.md (1 hunks)
  • charts/cloudprem/README.md (4 hunks)
  • charts/console-v3/README.md (3 hunks)
  • charts/console-v3/templates/_helpers.tpl (1 hunks)
  • charts/console/README.md (3 hunks)
  • charts/console/templates/_helpers.tpl (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • charts/console-v3/templates/_helpers.tpl
  • charts/console-v3/README.md
🧰 Additional context used
🪛 LanguageTool
README.md

[style] ~13-~13: Using many exclamation marks might seem excessive (in this case: 10 exclamation marks for a text that’s 3026 characters long)
Context: ...tions, users, roles, and permissions. | Artifact HUB | | Portal | 2.1.4 | 5e7b404a3a208b1f38603719e02a8b1883c10acf | Formance Portal | Artifact HUB | | Regions | 2.15.1 | latest | Formance Private Regions Helm Chart | Artifact HUB | | Stargate | 0.7.3 | latest | Formance EE Stargate gRPC Gateway | [![Artifact HUB](https://img.shields.io/en...

(EN_EXCESSIVE_EXCLAMATION)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Tests
🔇 Additional comments (9)
README.md (1)

8-10: Chart version updates look good

The version numbers have been properly incremented for Cloudprem, Console, Console-V3, and Portal charts as part of this release.

Also applies to: 14-14

charts/console/README.md (3)

3-3: Version number correctly updated

The Console chart version has been properly incremented from 2.1.3 to 2.1.4.


62-67: New Stargate configuration section is well-documented

The new Stargate configuration section clearly explains both configuration options:

  1. global.platform.stargate.enabled - Controls whether Stargate is enabled
  2. global.platform.stargate.stackApiUrl - Specifies the external URL when Stargate is disabled

This documentation follows the same format as other sections and provides sufficient details for users.


91-91: Properly marked as deprecated

Good practice to mark the config.stargate_url parameter as deprecated rather than removing it entirely, allowing for backward compatibility.

charts/console/templates/_helpers.tpl (1)

75-79: Good implementation of conditional API_URL configuration

The implementation correctly sets the API_URL based on the stargate.enabled flag:

  • When enabled, it formats the URL with the release name and stargate component
  • When disabled, it falls back to either the provided stackApiUrl, the legacy stargate_url, or the default gateway URL

This approach ensures compatibility with both configurations while preparing for the transition away from the deprecated config.stargate_url parameter.

charts/cloudprem/README.md (4)

4-4: Version number correctly updated

The Cloudprem chart version has been properly incremented from 3.0.0 to 3.0.1.


466-471: New Stargate configuration section is consistent

The added Stargate configuration section matches the implementation in the console chart, maintaining consistency across the documentation. Both configuration options are clearly documented with the same descriptions.


552-552: Properly marked as deprecated

Good practice to mark the console.config.stargate_url parameter as deprecated rather than removing it entirely, maintaining backward compatibility.


596-599: Console-V3 cookie configuration moved appropriately

The console-v3 cookie configuration parameters have been moved to the "Other Values" section, which is appropriate for the reorganization of configuration management across the charts.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added bug Something isn't working docs feature release labels Mar 13, 2025
@Dav-14 Dav-14 changed the title fix: API_STACK_URL is required fix(portal, console-v2, console-v3): API_STACK_URL is required Mar 13, 2025
@Dav-14 Dav-14 force-pushed the fix/pla-277-feat-add-portal-api_stack_url-interface-with-stargate branch from e9609dc to df971a5 Compare March 13, 2025 16:26
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 (6)
charts/console/README.md (1)

91-91: Deprecation notice for stargate_url is properly documented.

The config.stargate_url parameter is correctly marked as deprecated. However, the default value "toto2" seems like a placeholder or test value. Consider using a more descriptive default value or leave it empty if it's being deprecated.

-| config.stargate_url | string | `"toto2"` | Deprecated |
+| config.stargate_url | string | `""` | Deprecated, use global.platform.stargate.stackApiUrl instead |
charts/console-v3/templates/_helpers.tpl (1)

75-79: Good implementation of conditional API_URL based on Stargate feature flag.

The conditional logic for API_URL is implemented correctly. When Stargate is enabled, it uses the Stargate service URL, otherwise it falls back to the default gateway URL or a provided custom URL.

One suggestion: add a comment explaining the placeholder formats like #{organizationId} and #{stackId} to improve maintainability.

 - name: API_URL
 {{- if .Values.global.platform.stargate.enabled  }}
+  # #{organizationId} and #{stackId} are placeholder variables that will be replaced at runtime
   value: {{ printf "http://%s-%s:8080/#{organizationId}/#{stackId}/api" .Release.Name "stargate" -}}
 {{- else }}
+  # #{organizationId} and #{stackId} are placeholder variables that will be replaced at runtime
   value: {{ default "http://gateway.#{organizationId}-#{stackId}.svc:8080/api" (default .Values.global.platform.stargate.stackApiUrl .Values.config.stargate_url) }}
 {{- end }}
charts/console/templates/_helpers.tpl (1)

75-79: Good implementation of conditional API_URL based on Stargate feature flag.

The conditional logic for API_URL is implemented correctly, matching the implementation in console-v3. When Stargate is enabled, it uses the Stargate service URL, otherwise it falls back to the default gateway URL or a provided custom URL.

Similar to console-v3, consider adding a comment explaining the placeholder formats.

 - name: API_URL
 {{- if .Values.global.platform.stargate.enabled  }}
+  # #{organizationId} and #{stackId} are placeholder variables that will be replaced at runtime
   value: {{ printf "http://%s-%s:8080/#{organizationId}/#{stackId}/api" .Release.Name "stargate" -}}
 {{- else }}
+  # #{organizationId} and #{stackId} are placeholder variables that will be replaced at runtime
   value: {{ default "http://gateway.#{organizationId}-#{stackId}.svc:8080/api" (default .Values.global.platform.stargate.stackApiUrl .Values.config.stargate_url) }}
 {{- end }}
charts/cloudprem/README.md (1)

466-472: Stargate Configuration Section Added.
A new section for "Stargate configuration" has been introduced with the keys global.platform.stargate.enabled and global.platform.stargate.stackApiUrl. The functionality appears correct. For improved clarity, consider adding punctuation in the description (for example, insert a period after "not required") so that the templating detail is distinct from the condition description.

charts/console-v3/README.md (2)

60-64: Stargate Configuration Section Added.
The addition of a "Stargate configuration" section is consistent with the updates across other chart READMEs. It adds global.platform.stargate.enabled and global.platform.stargate.stackApiUrl with descriptive default values. As the description text is nearly identical to that in the Cloudprem file, consider adding proper punctuation (for example, a period after "not required") to enhance readability.


84-87: Cookie Configuration Keys (Other Values).
The cookie-related configuration keys (config.cookie.encryptionKey, config.cookie.existingSecret, config.cookie.name, and config.cookie.secretKeys) are now located in the "Other Values" section. Verify that this reorganization is clearly documented so users can easily find these settings if needed.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bd70dfa and e9609dc.

⛔ Files ignored due to path filters (7)
  • charts/cloudprem/Chart.lock is excluded by !**/*.lock, !**/*.lock
  • charts/console-v3/Chart.yaml is excluded by !**/*.yaml
  • charts/console-v3/values.schema.json is excluded by !**/*.json
  • charts/console-v3/values.yaml is excluded by !**/*.yaml
  • charts/console/Chart.yaml is excluded by !**/*.yaml
  • charts/console/values.schema.json is excluded by !**/*.json
  • charts/console/values.yaml is excluded by !**/*.yaml
📒 Files selected for processing (6)
  • README.md (1 hunks)
  • charts/cloudprem/README.md (4 hunks)
  • charts/console-v3/README.md (3 hunks)
  • charts/console-v3/templates/_helpers.tpl (1 hunks)
  • charts/console/README.md (3 hunks)
  • charts/console/templates/_helpers.tpl (1 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md

[style] ~13-~13: Using many exclamation marks might seem excessive (in this case: 10 exclamation marks for a text that’s 3026 characters long)
Context: ...tions, users, roles, and permissions. | Artifact HUB | | Portal | 2.1.4 | 5e7b404a3a208b1f38603719e02a8b1883c10acf | Formance Portal | Artifact HUB | | Regions | 2.15.1 | latest | Formance Private Regions Helm Chart | Artifact HUB | | Stargate | 0.7.3 | latest | Formance EE Stargate gRPC Gateway | [![Artifact HUB](https://img.shields.io/en...

(EN_EXCESSIVE_EXCLAMATION)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Tests
🔇 Additional comments (7)
README.md (1)

8-10: Chart version updates look good.

The version updates for Cloudprem (3.0.0 → 3.0.1), Console (2.1.3 → 2.1.4), Console-V3 (2.1.2 → 2.1.3), and Portal (2.1.3 → 2.1.4) are consistent with the changes to support the new Stargate configuration feature.

Also applies to: 14-14

charts/console/README.md (2)

3-3: Version badge update correctly reflects the version change.

The version badge has been updated from 2.1.3 to 2.1.4, matching the version update in the main README.


62-67: Clear documentation for Stargate configuration.

The new Stargate configuration section provides useful information about the new feature flags that control API URL generation.

charts/console/templates/_helpers.tpl (1)

2-35: API_STACK_URL environment variable is missing from documentation.

According to the PR title "API_STACK_URL is required", but there's no documentation or implementation of this environment variable in the file. Consider adding it if it's required, or update the PR title if it's referring to a different change.

You may want to verify if the API_STACK_URL environment variable is intended to be added to this file, or if it's part of a different component not included in this PR. The PR title suggests it's a requirement.

charts/cloudprem/README.md (1)

4-4: Version Badge Updated.
The version badge now correctly displays "3.0.1" (along with the updated AppVersion), ensuring consistency with the release.

charts/console-v3/README.md (2)

3-3: Version Badge Updated.
The version badge now correctly reflects Version 2.1.3, indicating that the chart release has been appropriately updated.


95-95: Deprecation Notice for config.stargate_url.
The entry for config.stargate_url is marked as deprecated, which aligns with the new configuration approach.

@Dav-14 Dav-14 added this pull request to the merge queue Mar 13, 2025
Merged via the queue into main with commit 6961f34 Mar 13, 2025
5 checks passed
@Dav-14 Dav-14 deleted the fix/pla-277-feat-add-portal-api_stack_url-interface-with-stargate branch March 13, 2025 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working docs feature release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants