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: buildless ecosystem ci #18525

Merged
merged 60 commits into from
Dec 10, 2024
Merged

Conversation

Aslemammad
Copy link
Contributor

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.

@Aslemammad
Copy link
Contributor Author

/ecosystem-ci run

Copy link

pkg-pr-new bot commented Nov 1, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/vitejs/vite@18525

commit: c97f0eb

@Aslemammad
Copy link
Contributor Author

/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)
Copy link
Contributor Author

@Aslemammad Aslemammad Nov 5, 2024

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@dominikg dominikg Nov 5, 2024

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?

Copy link
Contributor Author

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

💯

Copy link
Contributor

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.

Copy link
Contributor Author

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 😅

Copy link

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.

Copy link
Contributor Author

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!

@Aslemammad Aslemammad marked this pull request as ready for review November 5, 2024 09:25
@dominikg
Copy link
Contributor

dominikg commented Nov 5, 2024

/ecosystem-ci run

@Aslemammad
Copy link
Contributor Author

Aslemammad commented Nov 5, 2024 via email

@vite-ecosystem-ci
Copy link

📝 Ran ecosystem CI on 5406307: Open

suite result latest scheduled
astro failure failure
histoire failure failure
redwoodjs failure failure
remix failure failure
sveltekit failure failure
unocss failure failure
vike failure failure
vite-environment-examples failure success
vite-plugin-react success failure
vite-plugin-svelte success failure
vite-plugin-vue failure failure
vitest failure failure

analogjs, ladle, laravel, marko, nuxt, previewjs, quasar, qwik, rakkas, storybook, vite-plugin-pwa, vite-plugin-react-swc, vite-setup-catalogue, vitepress, vuepress

.github/workflows/ecosystem-ci-trigger.yml Outdated Show resolved Hide resolved
.github/workflows/ecosystem-ci-trigger.yml Outdated Show resolved Hide resolved
.github/workflows/ecosystem-ci-trigger.yml Show resolved Hide resolved
.github/workflows/ecosystem-ci-trigger.yml Outdated Show resolved Hide resolved
.github/workflows/ecosystem-ci-trigger.yml Outdated Show resolved Hide resolved
.github/workflows/ecosystem-ci-trigger.yml Outdated Show resolved Hide resolved
.github/workflows/ecosystem-ci-trigger.yml Outdated Show resolved Hide resolved
sapphi-red
sapphi-red previously approved these changes Nov 6, 2024
Copy link
Member

@sapphi-red sapphi-red left a 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 👍

@Aslemammad Aslemammad force-pushed the feat/buildless-ecosystem-ci branch from 6c13980 to f3170e2 Compare November 26, 2024 14:50
@Aslemammad Aslemammad force-pushed the feat/buildless-ecosystem-ci branch from f3170e2 to d6961c2 Compare November 26, 2024 14:54
@@ -89,7 +223,7 @@ jobs:
prNumber: '' + prData.num,
branchName: prData.branchName,
repo: prData.repo,
commit: prData.commit,
commit: process.env.COLLISION === 'false' ? prData.commit : '',
Copy link
Member

@sapphi-red sapphi-red Nov 28, 2024

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, let me do so!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

merged that, thanks!

Copy link
Member

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

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

LGTM!

@sapphi-red sapphi-red changed the title feat: buildless ecosystem ci ci: buildless ecosystem ci Dec 10, 2024
@sapphi-red sapphi-red merged commit b53479e into vitejs:main Dec 10, 2024
12 checks passed
@Aslemammad
Copy link
Contributor Author

Aslemammad commented Dec 10, 2024 via email

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.

4 participants