Page MenuHomePhabricator

Update Data Bridge's Storybook major version from 5.3.21 to 6
Closed, ResolvedPublic5 Estimated Story Points

Description

Running npm audit in data-bridge reports 1 high vulnerability, namely Storybook being updated with a semver-major version.

Updating to Storybook 6 is not a straightforward task, as data-bridge uses the following storybook packages which also need to be updated accordingly:

"@storybook/addon-a11y": "^5.3.21",
 "@storybook/addon-actions": "^5.3.21",
 "@storybook/addon-docs": "^5.3.21",
 "@storybook/addon-knobs": "^5.3.21",
 "@storybook/addon-links": "^5.3.21",
 "@storybook/addons": "^5.3.21",
 "@storybook/vue": "^5.3.21",

As expected, there are quite a few breaking changes. Luckily the Storybook team wrote a migration guide.

Acceptance criteria ⛺✨ :

  • Storybook and all its packages used in data-bridge are updated to the latest major version 6
  • All stories look and behave as before
  • Optionally, the new syntax for writing stories is used instead of storiesOf(), as advised in step 3 of the migration guide, because the old way will be deprecated in version 7.
  • Optionally, we use Storybook Controls, “the no-code successor to Knobs”.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 667610 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] bridge: Update Storybook to v6

https://gerrit.wikimedia.org/r/667610

Addshore added a subscriber: Jakob_WMDE.

During polishing we realized that other storybooks in other places need updating.
@Jakob_WMDE will file tickets :)

There is an official migration guide and an upgrade command provided to migrate from v5 to v6. For termbox the whole thing was done by running docker-compose run --rm node npx -p @storybook/cli sb upgrade without requiring any manual fixes.

Termbox patch: https://gerrit.wikimedia.org/r/c/wikibase/termbox/+/668070

Addshore edited projects, added wdwb-tech (legacy-backlog); removed wdwb-tech.
Addshore moved this task from Incoming to Active on the wdwb-tech (legacy-backlog) board.

Change 670511 had a related patch set uploaded (by Jakob; owner: Jakob):
[mediawiki/extensions/Wikibase@master] bridge: update to storybook 6

https://gerrit.wikimedia.org/r/670511

Change 671080 had a related patch set uploaded (by Jakob; owner: Jakob):
[mediawiki/extensions/Wikibase@master] bridge: convert stories to Component Story Format

https://gerrit.wikimedia.org/r/671080

Change 671081 had a related patch set uploaded (by Jakob; owner: Jakob):
[mediawiki/extensions/Wikibase@master] bridge: replace knobs with controls

https://gerrit.wikimedia.org/r/671081

Change 670511 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] bridge: update to storybook 6

https://gerrit.wikimedia.org/r/670511

Change 671080 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] bridge: convert stories to Component Story Format

https://gerrit.wikimedia.org/r/671080

Change 671081 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] bridge: replace knobs with controls

https://gerrit.wikimedia.org/r/671081

Change 667610 abandoned by Lucas Werkmeister (WMDE):
[mediawiki/extensions/Wikibase@master] bridge: Update Storybook to v6

Reason:
superseded by Ie8dde64a28

https://gerrit.wikimedia.org/r/667610