Skip to content

Conversation

@Dav-14
Copy link
Contributor

@Dav-14 Dav-14 commented Jul 7, 2025

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Jul 7, 2025

Warning

Rate limit exceeded

@Dav-14 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 9 minutes and 13 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between fce5a33 and 5c217d8.

📒 Files selected for processing (2)
  • README.md (2 hunks)
  • pkg/tokenprovider.go (3 hunks)

Walkthrough

The changes systematically rename the Terraform provider and all related resource references from "formancestack" to "stack" throughout documentation, code, and test files. This includes updates to provider metadata, documentation titles, resource names, test configurations, and the provider factory keys. No logic, schema, or API signatures were altered.

Changes

File(s) Change Summary
README.md, docs/index.md Updated provider name from "formancestack" to "stack" in documentation and configuration examples.
docs/resources/ledger.md, docs/resources/noop.md, docs/resources/payments_connectors.md, Changed resource documentation names and headings from "formancestack_" to "stack_".
docs/resources/payments_pool.md, docs/resources/reconciliation_policy.md, docs/resources/webhooks.md
internal/server/provider.go Changed provider metadata TypeName from "formancestack" to "stack".
internal/server/provider_test.go Updated test assertion to expect provider TypeName as "stack".
main.go Changed go:generate directive provider name from "formancestack" to "stack".
tests/e2e/ledger_test.go, tests/e2e/noop_test.go, tests/e2e/webhooks_test.go Updated provider and resource references from "formancestack" to "stack" in e2e test files.
tests/integration/noop_test.go, tests/integration/payments_connectors_test.go, Updated provider and resource references from "formancestack" to "stack" in integration test files.
tests/integration/payments_pool_test.go, tests/integration/reconciliation_policy_test.go

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Terraform
    participant StackProvider

    User->>Terraform: Configure provider "stack"
    Terraform->>StackProvider: Initialize provider (TypeName: "stack")
    User->>Terraform: Declare resources (e.g., stack_ledger, stack_noop)
    Terraform->>StackProvider: Apply resource operations
    StackProvider-->>Terraform: Respond with resource state
    Terraform-->>User: Show results
Loading

Poem

A hop, a skip, a name anew,
From "formancestack" to "stack" we flew!
Docs and tests all join the dance,
With tidy names, we now advance.
The burrow’s code is crisp and clean—
Stack’s the name, and rabbits beam!
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/provider-stack-naming

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
🪧 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests 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.

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

🔭 Outside diff range comments (1)
docs/resources/webhooks.md (1)

1-30: Required: Rename all leftover “FormanceStack” identifiers to “Stack” and update tests

We still have numerous references to the old provider name in code, flags, constants, and tests that must be updated before release:

• internal/server/api.go
• internal/server/module.go
• internal/server/provider.go
• tests/e2e/main_test.go
• tests/integration/noop_test.go
• tests/integration/payments_connectors_test.go
• tests/integration/payments_pool_test.go
• tests/integration/reconciliation_policy_test.go

Action items:

  1. Rename types and constants (e.g. FormanceStackEndpoint → StackEndpoint, FormanceStackClientIdKey → stack-client-id-key, etc.).
  2. Update flag definitions/defaults to use “stack” instead of “formance-stack” in CLI help text.
  3. Replace calls in tests to server.FormanceStackEndpoint/ClientId/ClientSecret with server.StackEndpoint/ClientId/ClientSecret.
  4. Verify default API endpoint URL and other defaults align with the “stack” branding.
  5. Draft a migration guide and note this breaking change in your release notes; optionally provide a temporary alias to support existing “formancestack” configurations.
🧹 Nitpick comments (2)
README.md (2)

22-26: Provider block updated ‑ verify upgrade guidance.

The rename is a breaking change for existing users. Consider adding an explicit “Migration” or “Upgrading from formancestack → stack” note right below this snippet so users understand that a terraform state replace-provider is required.


33-36: Consistent provider alias example?

If you plan to keep the old provider name as an alias for a transition period, showing it here (or explicitly stating it’s no longer supported) would remove ambiguity.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 90d8558 and fce5a33.

📒 Files selected for processing (18)
  • README.md (2 hunks)
  • docs/index.md (1 hunks)
  • docs/resources/ledger.md (1 hunks)
  • docs/resources/noop.md (1 hunks)
  • docs/resources/payments_connectors.md (1 hunks)
  • docs/resources/payments_pool.md (1 hunks)
  • docs/resources/reconciliation_policy.md (1 hunks)
  • docs/resources/webhooks.md (1 hunks)
  • internal/server/provider.go (1 hunks)
  • internal/server/provider_test.go (1 hunks)
  • main.go (1 hunks)
  • tests/e2e/ledger_test.go (5 hunks)
  • tests/e2e/noop_test.go (2 hunks)
  • tests/e2e/webhooks_test.go (5 hunks)
  • tests/integration/noop_test.go (2 hunks)
  • tests/integration/payments_connectors_test.go (5 hunks)
  • tests/integration/payments_pool_test.go (4 hunks)
  • tests/integration/reconciliation_policy_test.go (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
docs/resources/ledger.md (1)
Learnt from: Dav-14
PR: formancehq/terraform-provider-stack#9
File: internal/resources/ledger_ledger.go:214-247
Timestamp: 2025-06-17T15:52:11.655Z
Learning: In the ledger resource (internal/resources/ledger_ledger.go), only metadata fields are mutable after creation. The name and bucket fields are immutable and cannot be changed after the ledger is created. Therefore, the Update method should only handle metadata updates via the UpdateLedgerMetadata SDK call.
tests/e2e/ledger_test.go (1)
Learnt from: Dav-14
PR: formancehq/terraform-provider-stack#9
File: internal/resources/ledger_ledger.go:214-247
Timestamp: 2025-06-17T15:52:11.655Z
Learning: In the ledger resource (internal/resources/ledger_ledger.go), only metadata fields are mutable after creation. The name and bucket fields are immutable and cannot be changed after the ledger is created. Therefore, the Update method should only handle metadata updates via the UpdateLedgerMetadata SDK call.
🧬 Code Graph Analysis (3)
tests/e2e/webhooks_test.go (1)
tests/e2e/main_test.go (2)
  • CloudProvider (28-28)
  • StackProvider (29-29)
tests/e2e/noop_test.go (1)
tests/e2e/main_test.go (2)
  • CloudProvider (28-28)
  • StackProvider (29-29)
tests/e2e/ledger_test.go (1)
tests/e2e/main_test.go (2)
  • CloudProvider (28-28)
  • StackProvider (29-29)
🪛 LanguageTool
docs/resources/noop.md

[misspelling] ~9-~9: ‘noop’ zou fout kunnen zijn. Misschien bedoelt u: “hoop”
Context: ...ory: "" description: |- --- # stack_noop (Resource) <!-- schema generated b...

(NL_SIMPLE_REPLACE_NOOP)

⏰ 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). (4)
  • GitHub Check: Tests (Unit)
  • GitHub Check: Dirty (Pre-commit)
  • GitHub Check: Tests (Integration)
  • GitHub Check: Tests (E2E)
🔇 Additional comments (17)
docs/index.md (1)

3-3: Documentation updates look good!

The page title and heading changes correctly reflect the provider renaming from "formancestack" to "stack". The documentation structure and formatting remain consistent.

Also applies to: 8-8

main.go (1)

10-10: Documentation generation updated correctly.

The go:generate directive now uses the correct provider name "stack" for documentation generation, ensuring consistency with the provider renaming.

docs/resources/payments_pool.md (1)

3-3: Resource documentation updated correctly.

The resource name has been properly updated from "formancestack_payments_pool" to "stack_payments_pool" in both the page title and heading, maintaining consistency with the provider renaming.

Also applies to: 9-9

internal/server/provider_test.go (1)

44-44: Test assertion updated correctly.

The test now expects the provider TypeName to be "stack" instead of "formancestack", which is consistent with the provider renaming effort.

docs/resources/webhooks.md (1)

3-3: Resource documentation updated correctly.

The resource name has been properly updated from "formancestack_webhooks" to "stack_webhooks" in both the page title and heading, maintaining consistency with the provider renaming.

Also applies to: 9-9

docs/resources/noop.md (1)

3-9: Rename looks correct; confirm internal x-refs.

page_title and heading update align with the provider rename. Make sure all intra-docs links (e.g., [[/docs/resources/noop]] or anchor references) were also updated; otherwise broken links could slip in.

docs/resources/reconciliation_policy.md (1)

3-9: LGTM – rename only.

Title and heading reflect the new provider name; no schema text affected.

docs/resources/ledger.md (1)

3-9: LGTM – rename only.

Matches provider rename; no further action.

docs/resources/payments_connectors.md (1)

3-9: LGTM – rename only.

No functional or content issues detected.

internal/server/provider.go (1)

192-192: LGTM! Core provider renaming implemented correctly.

The TypeName change from "formancestack" to "stack" is the fundamental change that enables the provider renaming throughout the codebase. This change is clean and correctly implemented.

tests/e2e/noop_test.go (1)

17-18: LGTM! Test configuration updated consistently.

The provider factory keys, provider block, and resource type references have been updated consistently from "formancestack" to "stack", maintaining the same test logic while aligning with the provider renaming.

Also applies to: 28-28, 34-34

tests/integration/payments_pool_test.go (1)

130-130: LGTM! Integration test consistently updated.

All provider and resource references have been systematically updated from "formancestack" to "stack" throughout the test configuration and state checks, maintaining test functionality while aligning with the provider renaming.

Also applies to: 138-138, 144-144, 154-154, 159-159, 164-164, 177-177, 183-183, 192-192

tests/integration/noop_test.go (1)

90-90: LGTM! Integration test references updated consistently.

The provider block, resource type, and provider factory key have been updated consistently from "formancestack" to "stack", maintaining the same test logic while aligning with the provider renaming.

Also applies to: 96-96, 107-107

tests/integration/payments_connectors_test.go (1)

151-151: LGTM! Integration test thoroughly updated.

All provider and resource references have been systematically updated from "formancestack" to "stack" throughout the test configuration and state checks, maintaining test functionality while aligning with the provider renaming.

Also applies to: 159-159, 165-165, 180-180, 185-185, 194-194, 199-199, 204-204, 219-219, 224-224, 233-233

tests/e2e/webhooks_test.go (1)

22-22: Provider renaming changes look good and consistent.

The systematic renaming from "formancestack" to "stack" is correctly applied across:

  • Provider factory key (line 22)
  • Provider blocks (lines 37, 75)
  • Resource declarations (lines 43, 81)
  • State checks (lines 56-64, 93-100)

All changes maintain the original test logic while updating the naming convention.

Also applies to: 37-37, 43-43, 56-64, 75-75, 81-81, 93-100

tests/e2e/ledger_test.go (1)

21-21: Provider renaming changes are correctly implemented.

The renaming from "formancestack" to "stack" is consistently applied throughout:

  • Provider factory key (line 21)
  • Provider blocks (lines 31, 60)
  • Resource declarations (lines 37, 66)
  • State checks (lines 47-49, 76-78)

The test logic remains intact while adopting the new naming convention.

Also applies to: 31-31, 37-37, 47-49, 60-60, 66-66, 76-78

tests/integration/reconciliation_policy_test.go (1)

138-138: Provider renaming changes are properly implemented.

The systematic renaming from "formancestack" to "stack" is correctly applied:

  • Provider factory key (line 138)
  • Provider block (line 146)
  • Resource declaration (line 152)
  • State checks (lines 182-186)

Note: This represents a breaking change for users of the provider who will need to update their Terraform configurations to use the new provider and resource names.

Also applies to: 146-146, 152-152, 182-186

@codecov
Copy link

codecov bot commented Jul 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.76%. Comparing base (90d8558) to head (5c217d8).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #22      +/-   ##
==========================================
- Coverage   57.04%   56.76%   -0.28%     
==========================================
  Files          19       19              
  Lines        1448     1448              
==========================================
- Hits          826      822       -4     
- Misses        517      519       +2     
- Partials      105      107       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Dav-14 Dav-14 merged commit 527515f into main Jul 7, 2025
9 of 10 checks passed
@Dav-14 Dav-14 deleted the fix/provider-stack-naming branch July 7, 2025 15:47
@coderabbitai coderabbitai bot mentioned this pull request Aug 18, 2025
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