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

Remove deprecated props #1435

Merged
merged 2 commits into from Oct 25, 2023
Merged

Remove deprecated props #1435

merged 2 commits into from Oct 25, 2023

Conversation

wizardlyhel
Copy link
Contributor

WHY are these changes introduced?

Remove deprecated props:

  • createStorefrontClient's buyerIp and requestGroupId
  • <Image> component's loaderOptions and widths

WHAT is this pull request doing?

HOW to test your changes?

Post-merge steps

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added tests to cover my changes
  • I've added or updated the documentation

});

defaultHeaders[STOREFRONT_REQUEST_GROUP_ID_HEADER] =
storefrontHeaders?.requestGroupId || requestGroupId || generateUUID();
storefrontHeaders?.requestGroupId || generateUUID();
Copy link
Contributor

Choose a reason for hiding this comment

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

Unrelated but curious: does the SFAPI require this request-group-id ? Or could it be undefined?

Just asking because generating a UUID in this place can be confusing. It should come from the request itself, otherwise we risk to have different UUID generated in different places -- like, this has taken me some time to debug when working on /debug-network and found out MiniOxygen wasn't adding ids properly.

If it is required then it makes sense to keep it I guess.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also think it didn't make sense to be here. requestGroupId is not mandatory for a storefront api call.

The goal of the request group id is to identify the sub requests belonging to a main request.

In Oxygen, we are guarantee to get it from getStorefrontHeaders from remix-oxygen.
In development, I think we can rely on mini-oxygen or worker to generate that for us. They weren't doing that before so it got generated at this line.

Base automatically changed from 2023-10 to main October 25, 2023 21:34
@wizardlyhel wizardlyhel merged commit 0ae7cbe into main Oct 25, 2023
9 checks passed
@wizardlyhel wizardlyhel deleted the sfapi-2023-10-deprecations branch October 25, 2023 21:57
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.

None yet

2 participants