Skip to content

ci: fix build-head size failure for forks - #705

Closed
schirrel wants to merge 21 commits into
nuxt:mainfrom
schirrel:ci/build-head-failure-for-forks
Closed

ci: fix build-head size failure for forks#705
schirrel wants to merge 21 commits into
nuxt:mainfrom
schirrel:ci/build-head-failure-for-forks

Conversation

@schirrel

@schirrelschirrel commented Jan 26, 2025

Copy link
Copy Markdown
Contributor

🔗 Linked issue

Not a related issue but this state of Dan about the failure of the build-head from size for forks
#702 (comment)

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Adding repository: ${{ github.event.pull_request.head.repo.full_name }} to comparate build size for forked branchs too
From actions/checkout#551

@codecov-commenter

codecov-commenter commented Jan 26, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@e59a0da). Learn more about missing BASE report.

Additional details and impacted files
@@ Coverage Diff @@## main #705 +/- ##
=======================================
Coverage ? 13.36% =======================================
Files ? 68 Lines ? 3420 Branches ? 98 =======================================
Hits ? 457 Misses ? 2932 Partials ? 31 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pkg-pr-new

pkg-pr-newBot commented Jan 26, 2025

Copy link
Copy Markdown

Open in Stackblitz

npm i https://pkg.pr.new/create-nuxt@705
npm i https://pkg.pr.new/nuxi@705
npm i https://pkg.pr.new/@nuxt/cli@705

commit: 46554b4

@schirrelschirrel changed the title ci: fix build-head siize failure for forksci: fix build-head size failure for forksJan 26, 2025
@schirrel
schirrelforce-pushed the ci/build-head-failure-for-forks branch from 577a44f to fb88defCompareJanuary 26, 2025 03:45

@danielroedanielroe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thank you 🙏❤️

@danielroe

Copy link
Copy Markdown
Member

oops. too hasty an approval.

still, thank you for looking at this

@schirrel

Copy link
Copy Markdown
ContributorAuthor

THanks @danielroe , i am tring to see why the compare is failing, looks like it is relative to permisison/fork too, i am investigating that

@schirrel

Copy link
Copy Markdown
ContributorAuthor

@danielroe i've tried one hour long all the things to find out why it was not working... even tho i was wondering if it is related to the fork, i saw some olders PR (weeks not that much) that the check passed.
Please fill free to close this one and create a branch with cherry-pick/copying the code to check if it all pass.
SOrry about that, thanks to look it up

@danielroe

Copy link
Copy Markdown
Member

thank you! if you're happy to leave this PR open, I can experiment a bit with it

@schirrel

Copy link
Copy Markdown
ContributorAuthor

@danielroe for sure, feel free to play around with it

@schirrel
schirrelforce-pushed the ci/build-head-failure-for-forks branch from 1641a70 to ec73171CompareJanuary 26, 2025 09:47
@schirrel

Copy link
Copy Markdown
ContributorAuthor

I did some testing and looks like when changing from pull_request to pull_request_target works, but the pull_request_target must be on the main yml.
At my test it does look like related to the fork, but quite doesnot make sense to me, once other prs with fork have passed on the past

@schirrel

Copy link
Copy Markdown
ContributorAuthor

@danielroe sorry i wrote it wrong, by:

but the pull_request_target must be on the main yml.

i mean on the yml of the main branch here https://github.com/nuxt/cli/blob/main/.github/workflows/size.yml
at my tests, adding it on the branch/pr yml did not make any effect :/

Comment thread.github/workflows/size.yml Outdated
@danielroe

Copy link
Copy Markdown
Member

weirdly, this still seems to be failing.

@schirrel

Copy link
Copy Markdown
ContributorAuthor

@danielroe i believe is due the repository: ${{ github.event.pull_request.head.repo.full_name }} line missing isnot?

@schirrel

Copy link
Copy Markdown
ContributorAuthor

Brought back the repo info but continue to failing, nowi am changing to use sha as twk3 said in here twk3/rollup-size-compare-action#273 (comment)

@schirrel

Copy link
Copy Markdown
ContributorAuthor

Looks like that:
for pull_request_target, it needs:

ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}

for pull_request it needs the ref to be

ref: ${{github.event.pull_request.head.sha}}

@github-actions

Copy link
Copy Markdown
Contributor

Bundle Stats — create-nuxt-app size comparison

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files countTotal bundle size% Changed
5977.22 kB0%

Changeset

No files were changed

View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

No assets were smaller

Unchanged

AssetFile Size% Changed
index.mjs1.03 kB0%
chunks/multipart-parser.mjs5.11 kB0%
chunks/prompt.mjs42.92 kB0%
chunks/satisfies.mjs43.66 kB0%
shared/create-nuxt-app.COz3HthK.mjs884.5 kB0%

@github-actions

Copy link
Copy Markdown
Contributor

Bundle Stats — nuxi size comparison

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files countTotal bundle size% Changed
525.66 MB0%

Changeset

No files were changed

View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

No assets were smaller

Unchanged

AssetFile Size% Changed
index.mjs188 B0%
chunks/prompt.mjs42.92 kB0%
chunks/add.mjs6.83 kB0%
chunks/analyze.mjs3.18 kB0%
chunks/build.mjs1.97 kB0%
chunks/cleanup.mjs471 B0%
chunks/dev-child.mjs1.94 kB0%
chunks/dev.mjs9.83 kB0%
chunks/devtools.mjs764 B0%
chunks/generate.mjs388 B0%
chunks/info.mjs4.39 kB0%
chunks/init.mjs796.75 kB0%
chunks/index.mjs274 B0%
chunks/prepare.mjs984 B0%
chunks/preview.mjs2.84 kB0%
chunks/test.mjs1.16 kB0%
chunks/typecheck.mjs1.74 kB0%
chunks/upgrade.mjs6.28 kB0%
chunks/satisfies.mjs116 B0%
chunks/main.mjs15.34 kB0%
chunks/index2.mjs928.05 kB0%
chunks/dev2.mjs69.63 kB0%
chunks/index3.mjs17.14 kB0%
chunks/xdg-open.mjs25.32 kB0%
chunks/node.mjs134.29 kB0%
chunks/index4.mjs1.24 kB0%
chunks/index5.mjs71.77 kB0%
chunks/multipart-parser.mjs5.11 kB0%
chunks/add2.mjs12.02 kB0%
chunks/search.mjs45.83 kB0%
chunks/index6.mjs5.87 kB0%
chunks/index7.mjs886.12 kB0%
chunks/multipart-parser2.mjs4.58 kB0%
shared/nuxi.CNOaPyMI.mjs76.09 kB0%
shared/nuxi.CQCOwqp7.mjs804 B0%
shared/nuxi.OOMyZ32S.mjs294 B0%
shared/nuxi.DdI-vRyV.mjs1.54 kB0%
shared/nuxi.DA2iyhWl.mjs17.68 kB0%
shared/nuxi.BSm0_9Hr.mjs107 B0%
shared/nuxi.DdhC99SO.mjs836 B0%
shared/nuxi.CuJTCwFq.mjs1.34 kB0%
shared/nuxi.CJma5jOe.mjs14.64 kB0%
shared/nuxi.DJS4sf9f.mjs6.13 kB0%
shared/nuxi.CgvJibj-.mjs9.65 kB0%
shared/nuxi.DjaK5DQQ.mjs2.02 MB0%
shared/nuxi.E-ZsRS8r.mjs943 B0%
shared/nuxi.BgENdoyd.mjs1.76 kB0%
shared/nuxi.D-jL-mQ9.mjs151.93 kB0%
shared/nuxi.BhrojoaM.mjs285.05 kB0%
shared/nuxi.ChFrgAY-.mjs5.71 kB0%
shared/nuxi.Do0aYBCO.mjs5.46 kB0%
shared/nuxi.Dka9C7kP.mjs43.55 kB0%

@github-actions

Copy link
Copy Markdown
Contributor

Bundle Stats — nuxt-cli size comparison

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files countTotal bundle size% Changed
2978.85 kB0%

Changeset

No files were changed

View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

No assets were smaller

Unchanged

AssetFile Size% Changed
index.mjs200 B0%
chunks/add.mjs6.83 kB0%
chunks/analyze.mjs3.18 kB0%
chunks/build.mjs1.97 kB0%
chunks/cleanup.mjs471 B0%
chunks/dev-child.mjs1.95 kB0%
chunks/dev.mjs7.21 kB0%
chunks/devtools.mjs763 B0%
chunks/generate.mjs388 B0%
chunks/info.mjs4.39 kB0%
chunks/init.mjs5.21 kB0%
chunks/index.mjs274 B0%
chunks/prepare.mjs984 B0%
chunks/preview.mjs2.84 kB0%
chunks/test.mjs1.16 kB0%
chunks/typecheck.mjs1.74 kB0%
chunks/upgrade.mjs6.28 kB0%
chunks/dev2.mjs7.8 kB0%
chunks/add2.mjs11.83 kB0%
chunks/search.mjs2.94 kB0%
shared/cli.DWe7ol-H.mjs5.48 kB0%
shared/cli.DUZiDcEB.mjs804 B0%
shared/cli.D7pftKtD.mjs294 B0%
shared/cli.yR2Mj6Rb.mjs1.23 kB0%
shared/cli.BSm0_9Hr.mjs107 B0%
shared/cli.8etUNhu4.mjs836 B0%
shared/cli.DlcAx0De.mjs1.04 kB0%
shared/cli.DaI-EKv1.mjs107 B0%
shared/cli.C935N1ss.mjs687 B0%

@danielroe

danielroe commented Feb 5, 2025

Copy link
Copy Markdown
Member

Looking, I think the issue is not about the pull_request_target but in fact the token permissions required by the action.

you can see it correctly commented above - so I'm not quite sure what is failing

@schirrel

Copy link
Copy Markdown
ContributorAuthor

@danielroe that is real odd, i cant reason about it anymore :

@schirrel

Copy link
Copy Markdown
ContributorAuthor

As you mentioned here #705 (comment) there was a check that passed https://github.com/nuxt/cli/actions/runs/13159970893/job/36725939692

I looked upon it and looks like the target commits are:
my fork commit 10ca2f2schirrel@10ca2f2
nuxt/cli commit 6e937396e93739

The only difference after that commit on both repos is the merge of the dependabot bf6020b 🤔 it does not make sense

@danielroe

Copy link
Copy Markdown
Member

I think this was resolved in #999.

thank you for your work on this ❤️

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@schirrel@codecov-commenter@danielroe