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

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

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

schirrel
Copy link
Contributor

@schirrel schirrel commented Jan 26, 2025

πŸ”— 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

@schirrel schirrel requested a review from danielroe as a code owner January 26, 2025 03:07
@codecov-commenter
Copy link

codecov-commenter commented Jan 26, 2025

Codecov Report

All modified and coverable lines are covered by tests βœ…

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #705   +/-   ##
=======================================
  Coverage        ?   13.33%           
=======================================
  Files           ?       66           
  Lines           ?     3351           
  Branches        ?       95           
=======================================
  Hits            ?      447           
  Misses          ?     2873           
  Partials        ?       31           

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

Copy link

pkg-pr-new bot commented Jan 26, 2025

Open in Stackblitz

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

commit: 0028062

@schirrel schirrel changed the title ci: fix build-head siize failure for forks ci: fix build-head size failure for forks Jan 26, 2025
@schirrel schirrel force-pushed the ci/build-head-failure-for-forks branch from 577a44f to fb88def Compare January 26, 2025 03:45
Copy link
Member

@danielroe danielroe left a comment

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
Member

oops. too hasty an approval.

still, thank you for looking at this

@schirrel
Copy link
Contributor Author

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
Contributor Author

@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
Member

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

@schirrel
Copy link
Contributor Author

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

@schirrel schirrel force-pushed the ci/build-head-failure-for-forks branch from 1641a70 to ec73171 Compare January 26, 2025 09:47
@schirrel
Copy link
Contributor Author

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
Contributor Author

@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 :/

@danielroe
Copy link
Member

weirdly, this still seems to be failing.

@schirrel
Copy link
Contributor Author

schirrel commented Feb 5, 2025

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

@schirrel
Copy link
Contributor Author

schirrel commented Feb 5, 2025

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
Contributor Author

schirrel commented Feb 5, 2025

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}}

Copy link
Contributor

github-actions bot commented Feb 5, 2025

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 count Total bundle size % Changed
5 977.22 kB 0%

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

Asset File Size % Changed
index.mjs 1.03 kB 0%
chunks/multipart-parser.mjs 5.11 kB 0%
chunks/prompt.mjs 42.92 kB 0%
chunks/satisfies.mjs 43.66 kB 0%
shared/create-nuxt-app.COz3HthK.mjs 884.5 kB 0%

Copy link
Contributor

github-actions bot commented Feb 5, 2025

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 count Total bundle size % Changed
52 5.66 MB 0%

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

Asset File Size % Changed
index.mjs 188 B 0%
chunks/prompt.mjs 42.92 kB 0%
chunks/add.mjs 6.83 kB 0%
chunks/analyze.mjs 3.18 kB 0%
chunks/build.mjs 1.97 kB 0%
chunks/cleanup.mjs 471 B 0%
chunks/dev-child.mjs 1.94 kB 0%
chunks/dev.mjs 9.83 kB 0%
chunks/devtools.mjs 764 B 0%
chunks/generate.mjs 388 B 0%
chunks/info.mjs 4.39 kB 0%
chunks/init.mjs 796.75 kB 0%
chunks/index.mjs 274 B 0%
chunks/prepare.mjs 984 B 0%
chunks/preview.mjs 2.84 kB 0%
chunks/test.mjs 1.16 kB 0%
chunks/typecheck.mjs 1.74 kB 0%
chunks/upgrade.mjs 6.28 kB 0%
chunks/satisfies.mjs 116 B 0%
chunks/main.mjs 15.34 kB 0%
chunks/index2.mjs 928.05 kB 0%
chunks/dev2.mjs 69.63 kB 0%
chunks/index3.mjs 17.14 kB 0%
chunks/xdg-open.mjs 25.32 kB 0%
chunks/node.mjs 134.29 kB 0%
chunks/index4.mjs 1.24 kB 0%
chunks/index5.mjs 71.77 kB 0%
chunks/multipart-parser.mjs 5.11 kB 0%
chunks/add2.mjs 12.02 kB 0%
chunks/search.mjs 45.83 kB 0%
chunks/index6.mjs 5.87 kB 0%
chunks/index7.mjs 886.12 kB 0%
chunks/multipart-parser2.mjs 4.58 kB 0%
shared/nuxi.CNOaPyMI.mjs 76.09 kB 0%
shared/nuxi.CQCOwqp7.mjs 804 B 0%
shared/nuxi.OOMyZ32S.mjs 294 B 0%
shared/nuxi.DdI-vRyV.mjs 1.54 kB 0%
shared/nuxi.DA2iyhWl.mjs 17.68 kB 0%
shared/nuxi.BSm0_9Hr.mjs 107 B 0%
shared/nuxi.DdhC99SO.mjs 836 B 0%
shared/nuxi.CuJTCwFq.mjs 1.34 kB 0%
shared/nuxi.CJma5jOe.mjs 14.64 kB 0%
shared/nuxi.DJS4sf9f.mjs 6.13 kB 0%
shared/nuxi.CgvJibj-.mjs 9.65 kB 0%
shared/nuxi.DjaK5DQQ.mjs 2.02 MB 0%
shared/nuxi.E-ZsRS8r.mjs 943 B 0%
shared/nuxi.BgENdoyd.mjs 1.76 kB 0%
shared/nuxi.D-jL-mQ9.mjs 151.93 kB 0%
shared/nuxi.BhrojoaM.mjs 285.05 kB 0%
shared/nuxi.ChFrgAY-.mjs 5.71 kB 0%
shared/nuxi.Do0aYBCO.mjs 5.46 kB 0%
shared/nuxi.Dka9C7kP.mjs 43.55 kB 0%

Copy link
Contributor

github-actions bot commented Feb 5, 2025

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 count Total bundle size % Changed
29 78.85 kB 0%

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

Asset File Size % Changed
index.mjs 200 B 0%
chunks/add.mjs 6.83 kB 0%
chunks/analyze.mjs 3.18 kB 0%
chunks/build.mjs 1.97 kB 0%
chunks/cleanup.mjs 471 B 0%
chunks/dev-child.mjs 1.95 kB 0%
chunks/dev.mjs 7.21 kB 0%
chunks/devtools.mjs 763 B 0%
chunks/generate.mjs 388 B 0%
chunks/info.mjs 4.39 kB 0%
chunks/init.mjs 5.21 kB 0%
chunks/index.mjs 274 B 0%
chunks/prepare.mjs 984 B 0%
chunks/preview.mjs 2.84 kB 0%
chunks/test.mjs 1.16 kB 0%
chunks/typecheck.mjs 1.74 kB 0%
chunks/upgrade.mjs 6.28 kB 0%
chunks/dev2.mjs 7.8 kB 0%
chunks/add2.mjs 11.83 kB 0%
chunks/search.mjs 2.94 kB 0%
shared/cli.DWe7ol-H.mjs 5.48 kB 0%
shared/cli.DUZiDcEB.mjs 804 B 0%
shared/cli.D7pftKtD.mjs 294 B 0%
shared/cli.yR2Mj6Rb.mjs 1.23 kB 0%
shared/cli.BSm0_9Hr.mjs 107 B 0%
shared/cli.8etUNhu4.mjs 836 B 0%
shared/cli.DlcAx0De.mjs 1.04 kB 0%
shared/cli.DaI-EKv1.mjs 107 B 0%
shared/cli.C935N1ss.mjs 687 B 0%

@danielroe
Copy link
Member

danielroe commented Feb 5, 2025

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
Contributor Author

schirrel commented Feb 6, 2025

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

@schirrel
Copy link
Contributor Author

schirrel commented Feb 6, 2025

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 10ca2f2 schirrel@10ca2f2
nuxt/cli commit 6e93739 6e93739

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

Sign up for free to 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