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

Netlify deployments randomly failing #4335

Closed
JoshuaKGoldberg opened this issue Dec 21, 2021 · 6 comments · Fixed by #4381
Closed

Netlify deployments randomly failing #4335

JoshuaKGoldberg opened this issue Dec 21, 2021 · 6 comments · Fixed by #4381
Labels
bug Something isn't working help wanted Extra attention is needed repo maintenance things to do with maintenance of the repo, and not with code/docs

Comments

@JoshuaKGoldberg
Copy link
Member

This has been showing up on builds here and there. Example: #4334 -> https://app.netlify.com/sites/typescript-eslint/deploys/61c0fa45d8c444000897bf3a

4:50:25 PM: ———————————————————————————————————————————————
4:50:27 PM: > nx run @typescript-eslint/eslint-plugin:build
4:50:27 PM: yarn run v1.22.10
4:50:27 PM: $ tsc -b tsconfig.build.json
4:50:32 PM: ../types/src/ts-estree.ts(1,27): error TS2307: Cannot find module './ast-spec' or its corresponding type declarations.
4:50:32 PM: ../types/src/ts-estree.ts(4,16): error TS2664: Invalid module name in augmentation, module './ast-spec' cannot be found.
4:50:32 PM: ../types/src/ts-estree.ts(21,27): error TS2307: Cannot find module './ast-spec' or its corresponding type declarations.
4:50:32 PM: ../types/src/index.ts(1,32): error TS2307: Cannot find module './ast-spec' or its corresponding type declarations.
4:50:32 PM: ../types/src/index.ts(2,33): error TS2307: Cannot find module './ast-spec' or its corresponding type declarations.
4:50:33 PM: error Command failed with exit code 2.

...does anybody know why?

@JoshuaKGoldberg JoshuaKGoldberg added bug Something isn't working repo maintenance things to do with maintenance of the repo, and not with code/docs labels Dec 21, 2021
@Josh-Cena
Copy link
Member

Josh-Cena commented Dec 21, 2021

What confuses me is that the production build seems to succeed despite deploy previews constantly failing... Unless someone actually keeps rebuilding until the production build succeeds. The error itself is clearly because the copy-ast-spec script is not run before building the eslint plugin. We should probably yarn build before building the website, since it seems the package dependency graph is incorrect.

Actually, copying a package to another package looks pretty weird. Is that a historical setup? Because of circular dependency or something?

@JoshuaKGoldberg
Copy link
Member Author

JoshuaKGoldberg commented Dec 31, 2021

seems the package dependency graph is incorrect

Yeah, bypassing the historical & practical question of why this is the way it is (I don't know), I think the project.json for eslint-plugin needs to note the implicit dependency on the types package.

@JoshuaKGoldberg
Copy link
Member Author

#4381 (comment)

Is this actually fixed...? Assuming that the recent PRs are based on the latest main HEAD, seems they are still failing for the same error?

😞 yeah @Josh-Cena, it's back / still present. https://github.com/typescript-eslint/typescript-eslint/pull/4445/checks?check_run_id=4833084370 -> https://app.netlify.com/sites/typescript-eslint/deploys/61e4469b19500d000783c5f8

11:25:41 AM: $ npx nx build website
11:25:48 AM: >  NX  Running target build for project website and 10 task(s) that it depends on.
11:25:48 AM: ———————————————————————————————————————————————
11:25:50 AM: > nx run @typescript-eslint/scope-manager:build
11:25:51 AM: yarn run v1.22.10
11:25:51 AM: $ tsc -b tsconfig.build.json
11:25:55 AM: ../types/src/ts-estree.ts(1,27): error TS2307: Cannot find module './ast-spec' or its corresponding type declarations.

What's interesting is that scope-manager seems like it should have a transitive dependency on ast-spec:

  1. packages/scope-manager/package.json has "@typescript-eslint/types under dependencies
  2. packages/types/project.json includes "implicitDependencies": ["@typescript-eslint/ast-spec"]

It's also a bit odd in https://nx.app/runs/62s679jrbFm that scope-manager was a cache miss while everything else was a cache hit...?

...maybe this is some kind of NX caching weirdness?

@JoshuaKGoldberg JoshuaKGoldberg added the help wanted Extra attention is needed label Jan 16, 2022
@bradzacher
Copy link
Member

What's weird is that it only happens on the netlify builds, not on any other build.

@Josh-Cena
Copy link
Member

Seems the production builds do succeed though?

@JoshuaKGoldberg
Copy link
Member Author

I haven't seen this particular failure in a while. Tentatively closing. 🤞

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed repo maintenance things to do with maintenance of the repo, and not with code/docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants