-
Notifications
You must be signed in to change notification settings - Fork 46
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
SWATCH-2915 Specify BYOS aws product code #3821
base: main
Are you sure you want to change the base?
SWATCH-2915 Specify BYOS aws product code #3821
Conversation
84eba36
to
ced5969
Compare
ced5969
to
bf8b439
Compare
Our previous implementation was based off the incorrect assumption that the presence of an aws billing code on a system fact indicated that system was tied to a marketplace subscription. We've since learned that any system provisioned in aws, regardless of if they're paying for the subscription through aws, gets an aws billing code associated with it. Systems that were provisioned with a red hat gold image get specifically *bp-63a5400a* as a billing product code. PM identified this product code as indicating BYOS. If a billing product code is absent, that also indicates BYOS. A meeting with PM was had, and it was decided that we would maintain a list of product codes to consider BYOS instead of the opposite. If a billing product code is present and it doesn't appear in the list of BYOS product codes, then consider it a Marketplace system. Similar updates will need to happen with other system reporters since HBI doesn't centralize any normalization.
bf8b439
to
4301b36
Compare
/retest |
/retest |
1 similar comment
/retest |
/retest |
Tested locally and seems to work as expected. Automation is looking pretty good, just dealing with MR pipeline issues and flaky runs in EE (not related to is_marketplace). New test worked well when testing locally in stage, so hoping by first thing next week automation can get merged. Feel free to merge this sooner. IQE MR: https://gitlab.cee.redhat.com/insights-qe/iqe-rhsm-subscriptions-plugin/-/merge_requests/891 |
/retest |
Jira issue: SWATCH-2915
Description
Our previous implementation was based off the incorrect assumption that the presence of an aws billing code on a system fact indicated that system was tied to a marketplace subscription. We've since learned that any system provisioned in aws, regardless of if they're paying for the subscription through aws, gets an aws billing code associated with it.
Systems that were provisioned with a red hat gold image get specifically bp-63a5400a as a billing product code. PM identified this product code as indicating BYOS. If a billing product code is absent, that also indicates BYOS. A meeting with PM was had, and it was decided that we would maintain a list of product codes to consider BYOS instead of the opposite. If a billing product code is present and it doesn't appear in the list of BYOS product codes, then consider it a Marketplace system. Similar updates will need to happen with other system reporters since HBI doesn't centralize any normalization.
Testing
Setup
swatch-2915-wiremock.zip
Run wiremock with stubs. For convenience here is a zip file with a compose file and the wiremock mappings and payloads. The format of the responses came from a real response from https://api.rhsm.redhat.com/v1/candlepin/consumers/feeds, and then I modified sensitive values. Account numbers and ip addresses are randomly generated.
If you don't use podman-compose, here's the cli equivalent:
Confirm that wiremock is serving responses properly for both account ids
9999999
and1111111
.We're expecting
Steps
Start conduit
Hit the conduit API described as "Initiate viewing conduit representation of an org's systems from RHSM" with each of the org ids that we mocked with wiremock
http ':8000/api/rhsm-subscriptions/v1/internal/organizations/9999999/inventory?limit=10' x-rh-swatch-psk:placeholder Origin:console.redhat.com
http ':8000/api/rhsm-subscriptions/v1/internal/organizations/1111111/inventory?limit=10' x-rh-swatch-psk:placeholder Origin:console.redhat.com
Verification
We're expecting
is_marketplace: true
for 9999999, andis_marketplace: false
for 1111111