Context
Migrating cuida.electrolux.com.ec into the Electrolux FastStore storefront. Before authoring
entries with parity cms, we needed two values. Neither is discoverable today, and both fail
silently when wrong.
Problem 1 — the store ID is unguessable, and a wrong one looks valid
parity cms requires PARITY_CMS_STORE, but nothing tells you what it is. On this account three
independently plausible values were all wrong:
| Candidate |
Why it looked right |
Result |
faststore |
the repo has cms/faststore/, @faststore/core ships cms/faststore/, and vtex content upload-schema defaults to it |
wrong |
electroluxecfaststore |
the VTEX account, and what discovery.config.js calls storeId |
wrong |
electroluxec |
a sibling VTEX account |
wrong (401 — different account) |
The real value is electrolux, which matches nothing in the repo.
What makes this expensive is that a wrong store ID does not error:
GET api/content-platform/manage/{account}/{anything}/branches -> 200 []
GET api/content-platform/schemas/{account}.{anything}/content-types -> 404 SCHEMA_NOT_FOUND
200 [] for any string reads as "valid store, no branches yet". Accepting the CLI default would
have published a schema into a namespace nothing reads — sections present in the registry, absent
from the CMS, and no error anywhere.
The one reliable way we found (note it does not take a store, so it bootstraps):
GET api/content-platform/manage/{account}/entries?contentTypes=&page=1&pageSize=100
-> { entries: [ { storeId: "electrolux", contentTypeId: "landingPage", ... } ] }
Problem 2 — published schema versions cannot be listed
vtex content upload-schema prompts for a semver and rejects one already in the registry:
? Schema version to publish (e.g. 1.2.0 or 1.2.0-beta.1, not already in the registry)
> Version must be major.minor.patch, optionally with a prerelease tag
But there is no way to see what is already published:
vtex content only has generate-schema, init, split-components, split-content-types, upload-schema — no list.
- The repo records no schema version;
package.json version is the app release, a different thing.
- We could not find a read endpoint for registry versions.
So the only ways forward are asking whoever published last, or guessing a number and hoping it
collides rather than lands somewhere wrong.
Proposal
parity cms doctor should resolve and print the store ID from entries[].storeId, and fail
loudly when PARITY_CMS_STORE disagrees with what the account actually uses. This is the check
that catches the silent-namespace failure.
- Consider making
PARITY_CMS_STORE optional, deriving it when unambiguous.
- Investigate whether the schema registry exposes published versions. If it does, surface them
in doctor and suggest the next version on upload. If it does not, that is worth documenting so
people stop looking.
Both are prerequisites to a safe first publish, and today both are guesswork.
Context
Migrating
cuida.electrolux.com.ecinto the Electrolux FastStore storefront. Before authoringentries with
parity cms, we needed two values. Neither is discoverable today, and both failsilently when wrong.
Problem 1 — the store ID is unguessable, and a wrong one looks valid
parity cmsrequiresPARITY_CMS_STORE, but nothing tells you what it is. On this account threeindependently plausible values were all wrong:
faststorecms/faststore/,@faststore/coreshipscms/faststore/, andvtex content upload-schemadefaults to itelectroluxecfaststorediscovery.config.jscallsstoreIdelectroluxecThe real value is
electrolux, which matches nothing in the repo.What makes this expensive is that a wrong store ID does not error:
200 []for any string reads as "valid store, no branches yet". Accepting the CLI default wouldhave published a schema into a namespace nothing reads — sections present in the registry, absent
from the CMS, and no error anywhere.
The one reliable way we found (note it does not take a store, so it bootstraps):
Problem 2 — published schema versions cannot be listed
vtex content upload-schemaprompts for a semver and rejects one already in the registry:But there is no way to see what is already published:
vtex contentonly hasgenerate-schema,init,split-components,split-content-types,upload-schema— no list.package.jsonversion is the app release, a different thing.So the only ways forward are asking whoever published last, or guessing a number and hoping it
collides rather than lands somewhere wrong.
Proposal
parity cms doctorshould resolve and print the store ID fromentries[].storeId, and failloudly when
PARITY_CMS_STOREdisagrees with what the account actually uses. This is the checkthat catches the silent-namespace failure.
PARITY_CMS_STOREoptional, deriving it when unambiguous.in
doctorand suggest the next version on upload. If it does not, that is worth documenting sopeople stop looking.
Both are prerequisites to a safe first publish, and today both are guesswork.