-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fix(build): corepackのバグの回避 #15387
fix(build): corepackのバグの回避 #15387
Conversation
…se specified version in package.json
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #15387 +/- ##
===========================================
+ Coverage 38.68% 40.38% +1.69%
===========================================
Files 1603 1607 +4
Lines 204302 210127 +5825
Branches 4042 4084 +42
===========================================
+ Hits 79040 84856 +5816
- Misses 124622 124633 +11
+ Partials 640 638 -2 ☔ View full report in Codecov by Sentry. |
このPRによるapi.jsonの差分 |
storybookはpull_request_targetなので小直してもエラーになりますので無視しましょう |
Test (federation) / Federation test が落ちてるのが謎 |
.github/workflows/storybook.yml
Outdated
cache: 'pnpm' | ||
- run: corepack enable | ||
- run: pnpm i --frozen-lockfile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
corepack enableを戻したいです
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
corepack enable is obsolete here cause Install PNPM does the same thing (https://github.com/pnpm/action-setup) which is a few lines above. so either install pnpm step should be removed or corepack enable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we'ere currently generally using corepack so I prefer corepack enable and removing duplicate is out of scope of this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should also be done in a seperate PR cause I noticed you tried to already make pnpm use the version specified in package.json with ed74f7b
but it never worked on some of the workflow files cause corepack enable later on overwrote it with the latest version upon running.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but it never worked on some of the workflow files cause corepack enable later on overwrote it with the latest version upon running.
corepack won't overwrite with latest version.
Corepack checks for latest version of package manager as a part of startup (of no latest version cache are not exists), to be used as default version when version is not specified.
Regardless which version is latest version recognized by corepack, corepack will use version defined in packageManager field.
federationテストはそっちでdockerの設定があるのでそれを治す必要がありそう。 misskey/packages/backend/test-federation/compose.tpl.yml Lines 14 to 91 in a1be39d
|
細かい話だけど pnpm のバージョンの強制自体はすでに行えてるので、 corepack のバグを回避する的な書き方のほうが正しいかもしれない。 |
(Off-topic) corepackが治ったらrevertする必要がある?それとも仕様的にそうだったけど今まで問題とならなかったということ? |
revertする必要性はないかな。COREPACK_DEFAULT_TO_LATESTはpackageManagerがpackage.jsonに指定されている限りは(本来)関係ない環境変数なので。(corepackの内部実装の都合でバグのworkaroundにできてるけど別にそれが仕様とは言いづらいと思う) 更に細かい話だけど最新(というかpackageManagerで指定されているバージョンとは別のバージョン)がインストールされることはなくて、最新版がどのバージョンかだけをcorepackが取得してて、その途中に落ちるという問題なので、"インストールされるバージョンを固定する"も部分的に誤りかもしれない。 |
…sskey-dev#15387) (#246) * fix: disallow corepack from fetching latest manager version instead use specified version in package.json * apply COREPACK_DEFAULT_TO_LATEST: 0 to every github workflows * test: set COREPACK_DEFAULT_TO_LATEST for federation tests * docs(changelog): Fix: Docker のビルドに失敗する問題を修正 --------- Co-authored-by: Marie <github@yuugi.dev> Co-authored-by: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com>
9c70a4e
into
misskey-dev:develop
Thank you 🙏 |
* fix: disallow corepack from fetching latest manager version instead use specified version in package.json * Update Changelog * fix? * apply COREPACK_DEFAULT_TO_LATEST: 0 to every github workflows * Revert "apply COREPACK_DEFAULT_TO_LATEST: 0 to every github workflows" This reverts commit 67f0dc3. * apply COREPACK_DEFAULT_TO_LATEST: 0 to every github workflows (re) * fix * fix? * revert: removing corepack enable * test: set COREPACK_DEFAULT_TO_LATEST for federation tests --------- Co-authored-by: Marie <github@yuugi.dev> Co-authored-by: anatawa12 <anatawa12@icloud.com>
* fix: disallow corepack from fetching latest manager version instead use specified version in package.json * Update Changelog * fix? * apply COREPACK_DEFAULT_TO_LATEST: 0 to every github workflows * Revert "apply COREPACK_DEFAULT_TO_LATEST: 0 to every github workflows" This reverts commit 67f0dc3. * apply COREPACK_DEFAULT_TO_LATEST: 0 to every github workflows (re) * fix * fix? * revert: removing corepack enable * test: set COREPACK_DEFAULT_TO_LATEST for federation tests --------- Co-authored-by: Marie <github@yuugi.dev> Co-authored-by: anatawa12 <anatawa12@icloud.com>
Cherry-picked from misskey-dev/misskey#15387 # Conflicts: # .github/workflows/api-cherrypick-js.yml # .github/workflows/test-backend.yml # .github/workflows/test-cherrypick-js.yml # .github/workflows/test-frontend.yml # CHANGELOG.md Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> Co-authored-by: Marie <github@yuugi.dev> Co-authored-by: anatawa12 <anatawa12@icloud.com>
Cherry-picked from misskey-dev/misskey#15387 # Conflicts: # .github/workflows/api-cherrypick-js.yml # .github/workflows/test-backend.yml # .github/workflows/test-cherrypick-js.yml # .github/workflows/test-frontend.yml # CHANGELOG.md Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> Co-authored-by: Marie <github@yuugi.dev> Co-authored-by: anatawa12 <anatawa12@icloud.com>
* fix: disallow corepack from fetching latest manager version instead use specified version in package.json * Update Changelog * fix? * apply COREPACK_DEFAULT_TO_LATEST: 0 to every github workflows * Revert "apply COREPACK_DEFAULT_TO_LATEST: 0 to every github workflows" This reverts commit 67f0dc3. * apply COREPACK_DEFAULT_TO_LATEST: 0 to every github workflows (re) * fix * fix? * revert: removing corepack enable * test: set COREPACK_DEFAULT_TO_LATEST for federation tests --------- Co-authored-by: Marie <github@yuugi.dev> Co-authored-by: anatawa12 <anatawa12@icloud.com>
What
Why
Fix #15386
Additional info (optional)
これでいけるかどうかは分からない
Checklist