Skip to content

Added request chain priority; added conditional debug - #204

Open
wender wants to merge 3 commits into
masterfrom
chore/changing-request-chain-priority
Open

Added request chain priority; added conditional debug#204
wender wants to merge 3 commits into
masterfrom
chore/changing-request-chain-priority

Conversation

@wender

@wender wender commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Changed

  • setProfile no longer blocks the session response on cart/profile side effects (clearCart, getB2BSettings, getMarketingTags, updateOrderFormShipping, updateOrderFormMarketingData, generateClUser, updateOrderFormProfile). These only affect the cart/profile, not the session's own fields, so they now run in a detached chain after the response is sent — reducing setProfile's response time and its exposure to session-manager's 2s timeout on the transform call. Internal ordering (clearCart before the writes that follow it) is unchanged.
  • setProfile reads cost centers from Master Data (cost_centers) via masterDataExtended instead of b2b-organizations-graphql. getActiveUserByEmail now searches b2b_users through the same client instead of paginating with the default Master Data client. Invalid-cost-center and inactive-organization fallbacks (getOrganizationsByEmail / getOrganizationsPaginatedByEmail) now search b2b_users and hydrate cost_centers / organizations the same way, instead of the GraphQL round-trip through b2b-organizations-graphql.
  • masterDataExtended HTTP GETs (getDocumentById, searchDocuments) are cached in-process for 30 minutes, keyed per request URL so distinct documents/searches do not share a slot.

Added

  • New app setting debug (default false) to enable setProfile timing logs. When enabled, each setProfile.timing log includes orderFormId and the accumulated step timeline.

@vtex-io-ci-cd

vtex-io-ci-cd Bot commented Aug 20, 2026

Copy link
Copy Markdown

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@vtex-io-docs-bot

vtex-io-docs-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

Beep boop 🤖

I noticed you didn't make any changes at the docs/ folder

  • There's nothing new to document 🤔
  • I'll do it later 😞

In order to keep track, I'll create an issue if you decide now is not a good time

  • I just updated 🎉🎉

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.

1 participant