-
Bug
-
Resolution: Done
-
Critical
-
None
-
None
-
False
-
False
-
HAC Infra - Sprint 213
Looks like choices you make inside the form (and wizard?) between OSDTrial / OSD are ignored!
- Click [Create trial cluster] button. This takes you to /openshift/create/osdtrial/aws (or /gcp)
- Inside form, switch to "Annual: Fixed capacity subscription from Red Hat"
- Fill & submit form. The actual backend request sends product "id": "osd"
Similarly:
- Click [Create cluster] button. This takes you to /openshift/create/osd/aws (or /gcp)
- Inside form, switch to "Free trial (upgradeable)"
- Fill & submit form. The actual backend request sends product "id": "osd"
I'm not 100% certain users see this, because in prod I no longer qualify for OSDTrial, and in staging the buttons go to wizard — I can only reproduce in staging by going to /create/ {osdtrial,osd}/aws URLs directly.
I do also see this issue in wizard!
However let's focus on form as more urgent and one I better understand.
Another variant:
- Click [Create trial cluster] button. This takes you to /openshift/create/osdtrial/aws (or /gcp)
- Inside form, switch to "On-demand: Flexible usage billed through the Red Hat Marketplace"
- Fill & submit form. The actual backend request sends billing_model "marketplace" with product "id": "osdtrial"
— results in error CLUSTERS-MGMT-400: 'marketplace' billing_model is not allowed for OSD Trial clusters
This happens because https://gitlab.cee.redhat.com/service/uhc-portal/-/blob/4a2921c619df59b9608ef8a0f2d85fa164081d52/src/components/clusters/CreateOSDPage/index.js#L130 does
onSubmit: submitOSDRequest(dispatch, ownProps),
and createClusterRequest() prioritizes passed-in props:
// in non-wizard, cloudProviderID is supplied as a parameter. in the wizard, it's in the form. const actualCloudProviderID = cloudProviderID || formData.cloud_provider; const actualProduct = product || formData.product;
The cloudProviderId and product props come from router reflecting which button user used to open form:
<TermsGuardedRoute path="/create/osdtrial/aws" gobackPath="/create/osdtrial" render={() => <CreateOSDPage cloudProviderID="aws" product={normalizedProducts.OSDTrial} />} history={history} /> <TermsGuardedRoute path="/create/osdtrial/gcp" gobackPath="/create/osdtrial" render={() => <CreateOSDPage cloudProviderID="gcp" product={normalizedProducts.OSDTrial} />} history={history} /> <Route path="/create/osdtrial" render={() => <GatedCreationWizard product={normalizedProducts.OSDTrial} />} /> <Route path="/create/osd" render={() => <GatedCreationWizard product={normalizedProducts.OSD} />} />
(remember that in prod GatedCreationWizard still shows the form)
But unlike provider, the passed-in product prop is NOT final choice, it was merely supposed to be used to initialize the radio button. We should still use formData.product!
- is related to
-
OCMUI-911 [OSD Wizard, Spike] Is wizard OSDTrial / OSD / Marketplace choice ignored for quota checks?
-
- Closed
-
- mentioned on