Skip to content

Update AWS SQS,SNS,MPE, MPM Samples - #151

Merged
DimuthuMadushan merged 2 commits into
wso2:mainfrom
DimuthuMadushan:update-aws-sample
Aug 7, 2026
Merged

Update AWS SQS,SNS,MPE, MPM Samples#151
DimuthuMadushan merged 2 commits into
wso2:mainfrom
DimuthuMadushan:update-aws-sample

Conversation

@DimuthuMadushan

Copy link
Copy Markdown
Contributor

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@DimuthuMadushan, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 97b31948-7997-4f81-b02f-9321cff52f79

📥 Commits

Reviewing files that changed from the base of the PR and between a931fe9 and 50a2dfc.

📒 Files selected for processing (2)
  • integrator-default-profile/connectors/aws.marketplace.mpm_connector_sample/automation.bal
  • integrator-default-profile/connectors/aws.sqs_connector_sample/config.bal
📝 Walkthrough

Summary

  • Updated AWS SQS and SNS samples to use structured client configuration.
  • Added configurable region support to the AWS SQS and Marketplace Pub/Sub samples.
  • Updated Marketplace MPE entitlement lookup and client configuration.
  • Updated Marketplace MPM automation to call resolveCustomer with registrationToken.
  • Renamed configuration fields and removed the unused SNS security token setting.
  • Improved the SQS response variable name.

Walkthrough

The AWS Marketplace MPE and MPM samples now use updated configuration and client construction patterns. MPE passes productCode to entitlement lookup. MPM adds configurable region and registrationToken values and uses resolveCustomer. The SNS sample removes snsSecurityToken and nests credentials in the client configuration. The SQS sample adds region-based structured configuration and renames a local response variable.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description contains only a placeholder Purpose section and an issue link, while the required sections and implementation details are missing. Complete the required template sections, including Goals, Approach, testing, security checks, Samples, release note, documentation impact, and migration details.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the AWS SQS, SNS, MPE, and MPM sample updates covered by the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 value

Fix variable name casing.

The variable mpeEntitlementsresponse does not follow camelCase. Rename it to mpeEntitlementsResponse for 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 win

Log the response to show sample output.

The sample calls resolveCustomer and 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

📥 Commits

Reviewing files that changed from the base of the PR and between b04c3a8 and a931fe9.

📒 Files selected for processing (11)
  • integrator-default-profile/connectors/aws.marketplace.mpe_connector_sample/automation.bal
  • integrator-default-profile/connectors/aws.marketplace.mpe_connector_sample/config.bal
  • integrator-default-profile/connectors/aws.marketplace.mpe_connector_sample/connections.bal
  • integrator-default-profile/connectors/aws.marketplace.mpm_connector_sample/automation.bal
  • integrator-default-profile/connectors/aws.marketplace.mpm_connector_sample/config.bal
  • integrator-default-profile/connectors/aws.marketplace.mpm_connector_sample/connections.bal
  • integrator-default-profile/connectors/aws.sns_connector_sample/config.bal
  • integrator-default-profile/connectors/aws.sns_connector_sample/connections.bal
  • integrator-default-profile/connectors/aws.sqs_connector_sample/automation.bal
  • integrator-default-profile/connectors/aws.sqs_connector_sample/config.bal
  • integrator-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

@DimuthuMadushan
DimuthuMadushan requested a review from daneshk August 4, 2026 12:23
@DimuthuMadushan
DimuthuMadushan merged commit 84abb12 into wso2:main Aug 7, 2026
2 checks passed
@DimuthuMadushan
DimuthuMadushan deleted the update-aws-sample branch August 7, 2026 03:50
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