-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
feat: buildless ecosystem ci #18525
base: main
Are you sure you want to change the base?
feat: buildless ecosystem ci #18525
Conversation
/ecosystem-ci run |
commit: |
/ecosystem-ci run |
script: | | ||
const prData = ${{ steps.get-pr-data.outputs.result }} | ||
const url = `https://pkg.pr.new/vite@${prData.commit}` | ||
const response = await fetch(url) |
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 do not yet implement the HEAD
for pkg.pr.new! So here instead of consuming the request body and waiting for it, we just check the status and then the step would be done.
So if it was fetching, it'd be aborted I think.
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.
cc @dominikg
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.
if you await fetch(), the full file has been downloaded already, its just not been parsed yet. of course if pkg.pr.new does not implement head we have to go with full, but should be considered as an optimization. or do you implement the endpoints about package information that the public registry has?
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.
if you await fetch(), the full file has been downloaded already
I did not know that, does not that defeat the purpose of streams (e.g. .body
)?
As far as I know the await on .body
would wait until finishing the fetch and meanwhile give us the result buffer by buffer while fetching.
but should be considered as an optimization
💯
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.
hmm, maybe need to get more coffee and you are right.
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.
Haha, thanks, let me get my own coffee too now 😅
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 do not yet implement the
HEAD
for pkg.pr.new!
Any plan to support it? It sounds interesting.
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.
Any plan to support it? It sounds interesting.
I'll create an issue for it then!
/ecosystem-ci run |
As far as I know this tests the previous version of vite-ecosystem-ci
rather than the new one.
Which makes it requires a merge.
…On Tue, 5 Nov 2024, 13:43 vite-ecosystem-ci[bot], ***@***.***> wrote:
⏳ Triggered ecosystem CI: Open
<https://github.com//vitejs/vite-ecosystem-ci/actions/runs/11681487209>
—
Reply to this email directly, view it on GitHub
<#18525 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJBMICDQVZRRLA6YQFS6JPLZ7CHMDAVCNFSM6AAAAABQ5A7JXWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJWGY4TMNBWGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
📝 Ran ecosystem CI on
✅ analogjs, ladle, laravel, marko, nuxt, previewjs, quasar, qwik, rakkas, storybook, vite-plugin-pwa, vite-plugin-react-swc, vite-setup-catalogue, vitepress, vuepress |
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.
The code looks good to me 👍
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
app_id: ${{ secrets.ECOSYSTEM_CI_GITHUB_APP_ID }} | ||
installation_retrieval_payload: "${{ github.repository_owner }}/vite-ecosystem-ci" | ||
private_key: ${{ secrets.ECOSYSTEM_CI_GITHUB_APP_PRIVATE_KEY }} | ||
- uses: actions/github-script@v7 | ||
fetch-depth: 0 | ||
|
||
- name: Check Commit Hash Ambiguity | ||
id: check_ambiguity | ||
run: | | ||
HEAD_SHA=${{ steps.get-pr-data.outputs.head_sha }} | ||
COMMIT_SHORT=${HEAD_SHA:0:7} | ||
|
||
if git show "$COMMIT_SHORT"; then | ||
echo "COLLISION=false" >> $GITHUB_ENV | ||
else | ||
echo "COLLISION=true" >> $GITHUB_ENV | ||
fi |
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.
Let me confirm when these steps can be removed. Is the following understanding right?
It cannot be removed now because even if we passed the full hash to pr.pkg.new, pr.pkg.new will try to match with 7char prefix if it didn't match with the full hash.
It can be removed after all the 7char is purged. How long does it take for that? If the date is known, could we have a comment that says "we can remove this in ..."?
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.
will try to match with 7char prefix
exactly, any release made before yesterday, will match the 7char version of commits (yesterday's release fixes that completely but only gets applied after the new commits)
if we do not use any of the releases made before for a month, it'd get remove! but if we keep using it, the timeline would be expanded to at most 6 months and at that time, it'd be force deleted.
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 see. Then, would you add a comment telling that this part can be removed on May 26, 2025?
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.
done!
6c13980
to
f3170e2
Compare
Co-authored-by: 翠 / green <[email protected]>
Co-authored-by: 翠 / green <[email protected]>
Co-authored-by: 翠 / green <[email protected]>
Co-authored-by: 翠 / green <[email protected]>
Co-authored-by: 翠 / green <[email protected]>
Co-authored-by: 翠 / green <[email protected]>
f3170e2
to
d6961c2
Compare
By using the --commit option in vite-ecosystem-ci, we can leverage the already built versions of vite in pkg.pr.new!
Here, after sending the ecosystem comment, we'll check if there's an already built version, if not, we'll try triggering a build. The 🚀 reaction is a sign that the build is happening and we should wait until it's done.
After that, the normal process continues.