Update AWS SQS,SNS,MPE, MPM Samples - #151
Conversation
|
Warning Review limit reached
Next review available in: 46 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughSummary
WalkthroughThe AWS Marketplace MPE and MPM samples now use updated configuration and client construction patterns. MPE passes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
integrator-default-profile/connectors/aws.marketplace.mpe_connector_sample/automation.bal (1)
6-6: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueFix variable name casing.
The variable
mpeEntitlementsresponsedoes not follow camelCase. Rename it tompeEntitlementsResponsefor consistency with naming conventions.✏️ Proposed fix
- mpe:EntitlementsResponse mpeEntitlementsresponse = check mpeClient->getEntitlements(productCode = productCode); + mpe:EntitlementsResponse mpeEntitlementsResponse = check mpeClient->getEntitlements(productCode = productCode);🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@integrator-default-profile/connectors/aws.marketplace.mpe_connector_sample/automation.bal` at line 6, Rename the local variable in the getEntitlements call from mpeEntitlementsresponse to mpeEntitlementsResponse, and update every reference to it within the surrounding automation flow.integrator-default-profile/connectors/aws.marketplace.mpm_connector_sample/automation.bal (1)
6-6: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winLog the response to show sample output.
The sample calls
resolveCustomerand stores the response, but does not use it. Add a log statement to show the resolved customer information. This improves the sample's value as a usage reference.🔧 Proposed fix
do { - mpm:ResolveCustomerResponse ResolveCustomerResponse = check mpmClient->resolveCustomer(registrationToken = registrationToken); + mpm:ResolveCustomerResponse resolveCustomerResponse = check mpmClient->resolveCustomer(registrationToken = registrationToken); + log:printInfo("Customer resolved", response = resolveCustomerResponse); } on fail error e {🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@integrator-default-profile/connectors/aws.marketplace.mpm_connector_sample/automation.bal` at line 6, After the mpmClient->resolveCustomer call, log the returned ResolveCustomerResponse value so the sample visibly demonstrates the resolved customer information; use the existing logging mechanism in automation.bal and keep the response assignment unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@integrator-default-profile/connectors/aws.marketplace.mpm_connector_sample/automation.bal`:
- Line 6: Rename the local variable in the mpmClient->resolveCustomer call from
ResolveCustomerResponse to a camelCase name such as resolveCustomerResponse,
while keeping its declared type mpm:ResolveCustomerResponse unchanged and
updating any references to the variable.
In
`@integrator-default-profile/connectors/aws.sqs_connector_sample/automation.bal`:
- Line 6: Update the sendMessage call in the SQS sample to use a configurable
queueUrl or derive the URL from the configured region and queue settings,
keeping it consistent with the sqsClient configuration; alternatively,
explicitly restrict the sample’s region configuration to us-east-1.
---
Nitpick comments:
In
`@integrator-default-profile/connectors/aws.marketplace.mpe_connector_sample/automation.bal`:
- Line 6: Rename the local variable in the getEntitlements call from
mpeEntitlementsresponse to mpeEntitlementsResponse, and update every reference
to it within the surrounding automation flow.
In
`@integrator-default-profile/connectors/aws.marketplace.mpm_connector_sample/automation.bal`:
- Line 6: After the mpmClient->resolveCustomer call, log the returned
ResolveCustomerResponse value so the sample visibly demonstrates the resolved
customer information; use the existing logging mechanism in automation.bal and
keep the response assignment unchanged.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 63b3d578-0bcf-4e69-b57f-618a3df01e19
📒 Files selected for processing (11)
integrator-default-profile/connectors/aws.marketplace.mpe_connector_sample/automation.balintegrator-default-profile/connectors/aws.marketplace.mpe_connector_sample/config.balintegrator-default-profile/connectors/aws.marketplace.mpe_connector_sample/connections.balintegrator-default-profile/connectors/aws.marketplace.mpm_connector_sample/automation.balintegrator-default-profile/connectors/aws.marketplace.mpm_connector_sample/config.balintegrator-default-profile/connectors/aws.marketplace.mpm_connector_sample/connections.balintegrator-default-profile/connectors/aws.sns_connector_sample/config.balintegrator-default-profile/connectors/aws.sns_connector_sample/connections.balintegrator-default-profile/connectors/aws.sqs_connector_sample/automation.balintegrator-default-profile/connectors/aws.sqs_connector_sample/config.balintegrator-default-profile/connectors/aws.sqs_connector_sample/connections.bal
💤 Files with no reviewable changes (1)
- integrator-default-profile/connectors/aws.sns_connector_sample/config.bal
Purpose
Part of: https://github.com/wso2-enterprise/integration-engineering/issues/2165