Skip to content
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

MWPW-152283: add acom wcs endpoint #12

Merged
merged 2 commits into from
Jun 24, 2024
Merged

Conversation

3ch023
Copy link
Collaborator

@3ch023 3ch023 commented Jun 24, 2024

Resolve https://jira.corp.adobe.com/browse/MWPW-152283

Oversimplified ability to test acom wcs domain performance (should take away OPTIONS request from stage.adobe.com)
To see this in action add ?commerce.env=STAGE&domain.switch=true

image

Test URLs:

@3ch023 3ch023 requested review from yesil and npeltier June 24, 2024 12:59
const { env, wcsApiKey: apiKey } = settings;

const { env, domainSwitch, wcsApiKey: apiKey } = settings;
const baseUrl = domainSwitch ? WcsBaseUrl['STAGE_ACOM'] : WcsBaseUrl[env];
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is problematic in case you are domainSwitch on and env production, no? i guess we won't have both normally, but still looks weird

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i added acom prod too

@@ -217,6 +219,7 @@ function getSettings(config = {}) {
entitlement,
extraOptions: Defaults.extraOptions,
modal,
upgrade,
Copy link
Collaborator

Choose a reason for hiding this comment

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

please don't mix things up

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

okie, will revert

@@ -180,6 +180,7 @@ function getSettings(config = {}) {
Defaults.entitlement
);
const modal = toBoolean(getParameter('modal', commerce), Defaults.modal);
const upgrade = toBoolean(getParameter('upgrade', commerce), Defaults.upgrade);
Copy link
Collaborator

Choose a reason for hiding this comment

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

please don't mix things up

Copy link
Collaborator

@yesil yesil left a comment

Choose a reason for hiding this comment

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

not sure domainSwitch param was discussed before, but I think we should avoid introducing new params.

@@ -576,6 +576,7 @@ declare global {
wcsBufferDelay: number;
wcsBufferLimit: number;
wcsEnv: Environment;
domainSwitch: boolean;
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we really need to introduce a new parameter with a confusing name:domainSwitch ?
I would like to avoid having to support temporarily introduced parameters for ever.
Can we just switch to this new domain?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is just to verify options request will be gone.
I will remove it in the following PR when actually implementing the switch

Copy link
Collaborator

Choose a reason for hiding this comment

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

@yesil we need both domains to work so we can compare stuff from same domain

@@ -22,6 +22,7 @@ export const Defaults = Object.freeze({
entitlement: false,
extraOptions: {},
modal: false,
upgrade: false,
Copy link
Collaborator

Choose a reason for hiding this comment

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

please don't mix things up

@@ -576,6 +576,7 @@ declare global {
wcsBufferDelay: number;
wcsBufferLimit: number;
wcsEnv: Environment;
domainSwitch: boolean;
Copy link
Collaborator

Choose a reason for hiding this comment

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

@yesil we need both domains to work so we can compare stuff from same domain

@3ch023 3ch023 merged commit f18620d into adobecom:main Jun 24, 2024
2 of 3 checks passed
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.

3 participants