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

Migrate backend code to use storyblokUuid #781

Open
3 tasks
kyleecodes opened this issue Feb 19, 2025 · 4 comments · May be fixed by #786
Open
3 tasks

Migrate backend code to use storyblokUuid #781

kyleecodes opened this issue Feb 19, 2025 · 4 comments · May be fixed by #786
Assignees
Labels
backend complexity: advanced Time needed to do this ticket will be large e.g. 2-3+ days full-stack refactor
Milestone

Comments

@kyleecodes
Copy link
Member

kyleecodes commented Feb 19, 2025

Overview

The backend currently uses both storyblokId and storyblokUuid. We need to migrate all code to use storyblokUuid to maintain consistency.

❗️ Blockers: While there are no blockers for this issue, this issue should ideally be completed alongside this frontend issue.

The database migration is handled in this separate issue.

Action Items

  • Audit: identify all instances where storyblokId is used in the backend code.
  • Update code: remove storyblokId from entities, interfaces, and all code, including affected services and controllers. Some functions may need refactored to reflect reduction in number of arguments required.
  • Test: report any errors in issue or PR discussions.
  • Modify unit tests calling storyblokId, then run unit tests.
  • Test functionality in the UI (check that user paths work, functions related to the modifications work, and check the backend / frontend logs for errors)
  • You may run integration tests, however, maintainers will run integration tests with more coverage from the frontend on your open PR, so be available for discussion there.

Resources

@kyleecodes kyleecodes added backend complexity: beginner Time needed to do this ticket is less than 1 day. refactor labels Feb 19, 2025
@kyleecodes kyleecodes added this to the 02. Roadmaps milestone Feb 19, 2025
@kyleecodes kyleecodes added complexity: moderate Time needed to do this ticket will be moderate e.g. 1-2 days and removed complexity: beginner Time needed to do this ticket is less than 1 day. labels Feb 19, 2025
@strawHat121
Copy link

Please assign this to me as well.

Copy link

Thank you @strawHat121 you have been assigned this issue!
Please follow the directions in our Contributing Guide. We look forward to reviewing your pull request. ✨


Support Chayn's mission? ⭐ Please star this repo to help us find more contributors like you!
Learn more about our impact and sign-up for our volunteer programsto join our mission!. 🌸

@strawHat121
Copy link

Hi @kyleecodes

I was going through the codebase and had some questions on this issue.

  1. From what I can see, the storyBlokId is used in resource.service.ts, session.service.ts and a few more places. So I just need to find all occurences and replace it with storyblokUuid?
  2. How to test out these things? I tried to trigger the current functions by running both frontend and backend locally and completing a course, but still I was not able to trigger the function.

@kyleecodes kyleecodes added complexity: advanced Time needed to do this ticket will be large e.g. 2-3+ days full-stack and removed complexity: moderate Time needed to do this ticket will be moderate e.g. 1-2 days labels Feb 24, 2025
@kyleecodes
Copy link
Member Author

@strawHat121 great questions! I've updated the issue description with more details and upgraded this issue from moderate to advanced complexity level. If still interested in this issue, I suggest taking on the database migration issue linked in the description (this can be done separately, but it helps for testing). Otherwise, you can follow the updated testing steps in the description. Ultimately, this issue may require frequent communication with Chayn devs to notify us of errors and edge cases. We will keep track of this issue and respond promptly. If errors arise with replacing all instances, we can still merge a PR that replaces as much as possible, and create new issues for more complex replacements.

@strawHat121 strawHat121 linked a pull request Feb 25, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend complexity: advanced Time needed to do this ticket will be large e.g. 2-3+ days full-stack refactor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants