Skip to content

[B2BTEAM-3599] Introducing major-based schema - #88

Open
wender wants to merge 2 commits into
masterfrom
feature/B2BTEAM-3599_major-based-schema
Open

[B2BTEAM-3599] Introducing major-based schema#88
wender wants to merge 2 commits into
masterfrom
feature/B2BTEAM-3599_major-based-schema

Conversation

@wender

@wender wender commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

What problem is this solving?

When two different major versions of b2b-quotes-graphql are installed in the same VTEX account, they share a single VBase key (settings) for Master Data schema auto-sync. Each major has different schema definitions and versions, so they produce different hashes. Each major overwrites the other's hash on every request, causing an infinite schema sync loop.

Additionally, major 4 was still using the legacy schema version v1.3, which could be overwritten or conflict with schemas from other installed majors.

This change:

  • Scopes the VBase settings key per app major (settings-v{N}, e.g. settings-v4)
  • Bumps the quotes Master Data schema version to v4.3 to align with app major 4
  • Leaves B2B_USER_SCHEMA_VERSION at v0.1.2 (read-only reference to b2b-organizations; future migration to v3.1.2 is out of scope)

How to test it?

Workspace

  1. Link the branch: vtex link
  2. Trigger any operation that calls checkConfig (e.g. getAppSettings or getQuotes GraphQL query)
  3. VBase: Confirm a new key settings-v4 exists in bucket b2b-quotes-graphql (legacy settings key is intentionally left untouched)
  4. Master Data: Confirm schema v4.3 exists for entity quotes via MD API
  5. CRUD: Create and read a quote — operations should succeed using SCHEMA_VERSION
  6. Logs: Confirm schema sync runs once, not repeatedly on every request
  7. (Optional) With two majors installed in the same account, confirm each major maintains its own settings-v{N} key without interfering with the other

Screenshots or example usage:

image image image

@vtex-io-docs-bot

vtex-io-docs-bot Bot commented Jul 7, 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 🎉🎉

@vtex-io-ci-cd

vtex-io-ci-cd Bot commented Jul 7, 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 😞

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.

2 participants