-
Notifications
You must be signed in to change notification settings - Fork 0
fix: provider stack naming #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
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 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. 📒 Files selected for processing (2)
WalkthroughThe 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
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
Poem
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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 testsWe 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.goAction items:
- Rename types and constants (e.g. FormanceStackEndpoint → StackEndpoint, FormanceStackClientIdKey → stack-client-id-key, etc.).
- Update flag definitions/defaults to use “stack” instead of “formance-stack” in CLI help text.
- Replace calls in tests to server.FormanceStackEndpoint/ClientId/ClientSecret with server.StackEndpoint/ClientId/ClientSecret.
- Verify default API endpoint URL and other defaults align with the “stack” branding.
- 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-provideris 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
📒 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_titleand 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 ReportAll modified and coverable lines are covered by tests ✅
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. 🚀 New features to boost your workflow:
|
No description provided.