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

Update Storybook and pin Nuxt Storybook module version #5025

Merged
merged 2 commits into from
Oct 31, 2024
Merged

Conversation

obulat
Copy link
Contributor

@obulat obulat commented Oct 9, 2024

Fixes

Fixes #4963 by @sarayourfriend

Description

Now that the Nuxt Storybook module has released a stable release that works with Openverse, we can pin its version, and update the module's dependencies to match it.

TLDR; Updating the node version and removing node_modules volume from playwright docker-compose definition fixed the Storybook build problems in the CI, without making the tests run longer.

More detailed description of the build problems

Unfortunately, the changes in Storybook v8.3.0-alpha.4 made it so that a wrong version of ufo file is being required (.mjs instead of .cjs), probably by the nuxt-link.js in storybook nuxt module, and this throws an unexpected identifier export error. I couldn't find a way of fixing this as there seems to be layers upon layers of rewriting/hijacking require. The best solution I found here for now was to pin Storybook at v8.3.0-alpha.3.

When I tried to debug the issues, I ran storybook build locally, without ov. This time, I didn't see the build issue, and noticed that my local version of Node is different than what we have in package.json engines. This is why I updated the Node version, and updated the Storybook versions to the latest versions here.
It still seems to be failing if we keep using the local pnpm folder as a volume. When I removed it in this PR, the Storybook build in CI was fixed.

This PR also sets the default port for Storybook in dev mode to match that of the production mode.

Testing Instructions

The Storybook tests in the CI should pass.
Run ov just frontend/run dev. This should run the Storybook in dev mode at http://localhost:54000.

Checklist

  • My pull request has a descriptive title (not a vague title likeUpdate index.md).
  • My pull request targets the default branch of the repository (main) or a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.
  • I ran the DAG documentation generator (ov just catalog/generate-docs for catalog
    PRs) or the media properties generator (ov just catalog/generate-docs media-props
    for the catalog or ov just api/generate-docs for the API) where applicable.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@obulat obulat requested a review from a team as a code owner October 9, 2024 06:31
@openverse-bot openverse-bot added 🧱 stack: documentation Related to Sphinx documentation 🧱 stack: frontend Related to the Nuxt frontend 🟧 priority: high Stalls work on the project or its dependents 🛠 goal: fix Bug fix 💻 aspect: code Concerns the software code in the repository labels Oct 9, 2024
@obulat obulat removed the request for review from zackkrida October 9, 2024 10:37
Copy link

github-actions bot commented Oct 9, 2024

Latest k6 run output1

     ✓ status was 200

     checks.........................: 100.00% ✓ 6400      ✗ 0   
     data_received..................: 1.5 GB  8.6 MB/s
     data_sent......................: 838 kB  4.9 kB/s
     http_req_blocked...............: avg=12.47µs  min=2.02µs   med=4.17µs   max=7.42ms p(90)=5.47µs   p(95)=5.93µs  
     http_req_connecting............: avg=7.73µs   min=0s       med=0s       max=7.37ms p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=598.25ms min=38.68ms  med=520.9ms  max=2.28s  p(90)=1.07s    p(95)=1.17s   
       { expected_response:true }...: avg=598.25ms min=38.68ms  med=520.9ms  max=2.28s  p(90)=1.07s    p(95)=1.17s   
   ✓ http_req_failed................: 0.00%   ✓ 0         ✗ 6400
     http_req_receiving.............: avg=138.61µs min=45.74µs  med=117.54µs max=9.87ms p(90)=180.56µs p(95)=208.68µs
     http_req_sending...............: avg=21.99µs  min=6.23µs   med=19.91µs  max=4.89ms p(90)=25.47µs  p(95)=27.38µs 
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s     p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=598.09ms min=38.56ms  med=520.76ms max=2.28s  p(90)=1.07s    p(95)=1.17s   
     http_reqs......................: 6400    37.187908/s
     iteration_duration.............: avg=3.19s    min=866.65ms med=2.69s    max=8.03s  p(90)=6.23s    p(95)=6.55s   
     iterations.....................: 1200    6.972733/s
     vus............................: 5       min=5       max=30
     vus_max........................: 30      min=30      max=30

Footnotes

  1. This comment will automatically update with new output each time k6 runs for this PR

@obulat obulat marked this pull request as draft October 9, 2024 18:09
@obulat obulat force-pushed the update/storybook branch 2 times, most recently from 81254a6 to d5dffda Compare October 11, 2024 17:04
Copy link

Full-stack documentation: https://docs.openverse.org/_preview/5025

Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again.

You can check the GitHub pages deployment action list to see the current status of the deployments.

@obulat obulat force-pushed the update/storybook branch 6 times, most recently from 2e823c0 to dd9e2e7 Compare October 23, 2024 18:24
@obulat obulat marked this pull request as ready for review October 25, 2024 11:20
@obulat obulat changed the base branch from main to update/node-pnpm October 26, 2024 05:36
Base automatically changed from update/node-pnpm to main October 26, 2024 06:58
@obulat obulat marked this pull request as draft October 28, 2024 15:40
@obulat obulat force-pushed the update/storybook branch 3 times, most recently from 9c295d1 to f3f8922 Compare October 28, 2024 18:24
@obulat obulat self-assigned this Oct 28, 2024
@obulat obulat marked this pull request as ready for review October 28, 2024 18:53
@obulat obulat force-pushed the update/storybook branch 2 times, most recently from d699003 to 9bf3814 Compare October 30, 2024 16:52
@openverse-bot
Copy link
Collaborator

Based on the high urgency of this PR, the following reviewers are being gently reminded to review this PR:

@dhruvkb
This reminder is being automatically generated due to the urgency configuration.

Excluding weekend1 days, this PR was ready for review 2 day(s) ago. PRs labelled with high urgency are expected to be reviewed within 2 weekday(s)2.

@obulat, if this PR is not ready for a review, please draft it to prevent reviewers from getting further unnecessary pings.

Footnotes

  1. Specifically, Saturday and Sunday.

  2. For the purpose of these reminders we treat Monday - Friday as weekdays. Please note that the operation that generates these reminders runs at midnight UTC on Monday - Friday. This means that depending on your timezone, you may be pinged outside of the expected range.

Copy link
Member

@dhruvkb dhruvkb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to be back on a stable version instead of nightly.

@obulat obulat merged commit 77cc631 into main Oct 31, 2024
46 checks passed
@obulat obulat deleted the update/storybook branch October 31, 2024 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟧 priority: high Stalls work on the project or its dependents 🧱 stack: documentation Related to Sphinx documentation 🧱 stack: frontend Related to the Nuxt frontend
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Peer dependency issues with storybook
3 participants