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

Build: Add a retry mechanism for exports file generation #20018

Merged
merged 1 commit into from
Nov 30, 2022

Conversation

ndelangen
Copy link
Member

@ndelangen ndelangen commented Nov 29, 2022

Issue:
On some CI runs, and sometimes locally as well, (@shilman reported this stack trace to me), we get this:

    ✖  nx run @storybook/manager:prep
       > /Users/shilman/projects/storybookjs/storybook/scripts/node_modules/.bin/ts-node ./scripts/generate-exports-file.ts
       An error occurred while executing: `/Users/shilman/projects/storybookjs/storybook/scripts/node_modules/.bin/ts-node ./scripts/generate-exports-file.ts`
       undefined

       Error: Command failed with exit code 1: /Users/shilman/projects/storybookjs/storybook/scripts/node_modules/.bin/ts-node ./scripts/generate-exports-file.ts
       An error occurred while executing: `yarn lint:js:cmd --fix /Users/shilman/projects/storybookjs/storybook/code/ui/manager/src/globals/exports.ts`
       Error: Command failed with exit code 1: yarn lint:js:cmd --fix /Users/shilman/projects/storybookjs/storybook/code/ui/manager/src/globals/exports.ts

       /Users/shilman/projects/storybookjs/storybook/code/ui/manager/src/globals/exports.ts
         0:0  error  Parsing error: Debug Failure. False expression: /users/shilman/projects/storybookjs/storybook/code/node_modules/@storybook/addon-actions/dist/manager.d.ts linked to nonexistent file /Users/shilman/projects/storybookjs/storybook/code/addons/actions/dist/manager.d.ts

What I did

I added a retry mechanism, in the hope that after 6 attempts it should have worked.

This is under the assumption that there's some race condition going on.
I tried a few things to reproduce locally, but was not successful at doing so.

Therefore I resorted to adding a retry mechanism, hoping the problem stays away now.

@ndelangen ndelangen self-assigned this Nov 29, 2022
@ndelangen ndelangen added the build Internal-facing build tooling & test updates label Nov 29, 2022
@ndelangen ndelangen requested a review from shilman November 29, 2022 23:37
@shilman shilman changed the title add a retry mechanism Build: Add a retry mechanism for exports file generation Nov 30, 2022
@ndelangen
Copy link
Member Author

self merging @shilman

@ndelangen ndelangen merged commit a7b54ca into next Nov 30, 2022
@ndelangen ndelangen deleted the fix/exports-generator-inconsistency branch November 30, 2022 12:16
@IanVS
Copy link
Member

IanVS commented Nov 30, 2022

I think this probably isn't needed if #20021 is merged. @ndelangen maybe you can take a look or explain why this retry is needed vs the simpler approach in that PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Internal-facing build tooling & test updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants