-
Notifications
You must be signed in to change notification settings - Fork 1
[BB-1546] fix error when provisioning accounts #18
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
WalkthroughCreateAccount in pkg/connector/user.go now returns a populated CreateAccountResponse_ActionRequiredResult with a success message including the user email and sets IsCreateAccountResult to true. Previously, it returned an empty ActionRequiredResult. No other exported declarations changed. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Caller
participant Connector as Connector.CreateAccount
Caller->>Connector: CreateAccount(email)
rect rgba(200,235,255,0.3)
note right of Connector: Send invitation (existing behavior)
end
Connector-->>Caller: ActionRequiredResult { message: "User <email> invitation sent successfully", IsCreateAccountResult: true }
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Comment |
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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pkg/connector/user.go (1)
115-115: Fix incorrect error message (“name” → “email”).The lookup is for "email" but the error says "name", which is misleading.
Apply this diff:
- return nil, nil, nil, fmt.Errorf("baton-tableau: name not found in profile") + return nil, nil, nil, fmt.Errorf("baton-tableau: email not found in profile")
🧹 Nitpick comments (1)
pkg/connector/user.go (1)
96-96: Unify method receiver naming (uvso).Other methods use
o *userResourceType. Keep it consistent.Apply this diff:
-func (u *userResourceType) CreateAccountCapabilityDetails(ctx context.Context) (*v2.CredentialDetailsAccountProvisioning, annotations.Annotations, error) { +func (o *userResourceType) CreateAccountCapabilityDetails(ctx context.Context) (*v2.CredentialDetailsAccountProvisioning, annotations.Annotations, error) {
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
pkg/connector/user.go(1 hunks)
🔇 Additional comments (1)
pkg/connector/user.go (1)
131-134: Good: explicit success result with message.Returning an ActionRequiredResult with a clear message and
IsCreateAccountResult: truealigns with the PR goal and should surface a user‑friendly confirmation.Please confirm that the Baton SDK/UI treats
ActionRequiredResultwithIsCreateAccountResult: trueas a non-blocking success (i.e., no further user action required) and that this field exists in the pinned SDK version.
Summary by CodeRabbit