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

fix(core): remove bundle slugs in favor of bundle id #7427

Merged
merged 8 commits into from
Aug 30, 2024
Merged

Conversation

bjoerge
Copy link
Member

@bjoerge bjoerge commented Aug 28, 2024

Description

Changes from using a slugified release title as the release bundle id to instead use the _id of the release document.

  • Release documents will get a 9 character long _id, prefixed with r + 8 random characters.
  • The bundle id associated with the release will be the _id of the release document, so for example the document with _id=foo in the release rA1NyH7Yo will be assigned the _id=versions.rA1NyH7Yo.foo

Since the release id is used as a path segment, we always prepend the letter r to avoid it from starting with a number, and also make it apparent that it's a release bundle. The random release id generation is implemented in createReleaseId.ts

Note: We want to use _type: 'release' for the release-metadata documents going forward, so I made that change as part of this PR (to avoid multiple passes of deleting existing test-data) - a follow up task should be to rename release specific components in accordance.

What to review

Quite a big diff I'm afraid, but mostly trivial changes swapping from bundle.slug to bundle._id.

Testing

Existing tests should be enough. Some of the tests are updated to reflect the new bundle id scheme.

Notes for release

n/a

Copy link

vercel bot commented Aug 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
page-building-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 29, 2024 4:46pm
performance-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 29, 2024 4:46pm
test-compiled-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 29, 2024 4:46pm
test-next-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 29, 2024 4:46pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 29, 2024 4:46pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Aug 29, 2024 4:46pm

Copy link
Contributor

No changes to documentation

Copy link
Contributor

github-actions bot commented Aug 28, 2024

Component Testing Report Updated Aug 29, 2024 4:50 PM (UTC)

✅ All Tests Passed -- expand for details
File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 44s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 9s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 30s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 37s 11 7 0
formBuilder/inputs/PortableText/copyPaste/CopyPasteFields.spec.tsx ✅ Passed (Inspect) 0s 0 12 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 18s 6 0 0
formBuilder/inputs/PortableText/DisableFocusAndUnset.spec.tsx ✅ Passed (Inspect) 10s 3 0 0
formBuilder/inputs/PortableText/DragAndDrop.spec.tsx ✅ Passed (Inspect) 3m 0s 0 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 46s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 47s 21 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 1m 16s 18 0 0
formBuilder/inputs/PortableText/PresenceCursors.spec.tsx ✅ Passed (Inspect) 9s 3 9 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 27s 9 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 19s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 1m 16s 21 0 0
formBuilder/tree-editing/TreeEditing.spec.tsx ✅ Passed (Inspect) 0s 0 3 0
formBuilder/tree-editing/TreeEditingNestedObjects.spec.tsx ✅ Passed (Inspect) 0s 0 3 0

@bjoerge bjoerge merged commit 753c859 into corel Aug 30, 2024
40 of 41 checks passed
@bjoerge bjoerge deleted the corel-108 branch August 30, 2024 07:20
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