MeteringMarketplace: Support CustomerAWSAccountId in BatchMeterUsage - #10133
Open
Sgitario wants to merge 1 commit into
Open
MeteringMarketplace: Support CustomerAWSAccountId in BatchMeterUsage#10133Sgitario wants to merge 1 commit into
Sgitario wants to merge 1 commit into
Conversation
Author
|
Hi @bblommers , this is my first contribution to this project and I was looking to get a review on supporting CustomerAWSAccountId :) |
Sgitario
added a commit
to RedHatInsights/rhsm-subscriptions
that referenced
this pull request
Jul 28, 2026
#6415) Jira issue: SWATCH-5116 ## Description The IQE tests use Moto to validate the happy path scenarios when submitting AWS usages. However, moto does not support the CustomerAWSAccountId field (I contributed to moto to support this getmoto/moto#10133). In the mean time, this is a workaround / hack to support CustomerAWSAccountId and CustomerIdentifier both fields. This is necessary to validate the CustomerAWSAccountId (AWS concurrent agreements epic) in the IQE tests. I also reported https://redhat.atlassian.net/browse/SWATCH-5317 to stop using Moto (which does not guarantee the compatibility with AWS SDK) and start using Wiremock as done in the component tests. ## Testing IQE MR: https://gitlab.cee.redhat.com/insights-qe/iqe-rhsm-subscriptions-plugin/-/merge_requests/1560 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved AWS Marketplace metering compatibility by correctly handling customer account identifiers during batch usage reporting. - Enhanced local service startup reliability and validation for metering workflows. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
BatchMeterUsageUsageRecords may identify the buyer with eitherCustomerIdentifierorCustomerAWSAccountId(AWS Concurrent Agreements).Moto previously required
CustomerIdentifierand raisedKeyErrorwhen onlyCustomerAWSAccountIdwas present.This change accepts either field (or both), echoes the provided fields on the
returned UsageRecord, and uses a shared customer key for subscription /
duplicate checks.
Testing