-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat: create a preview environment for every PR using Uffizzi #3040
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
Conversation
Hello @waveywaves thanks a lot for this PR I will review as soon as I can. We have a lot to do for the moment, so it can takes time, sorry in advance for this. Thanks again! |
654a5aa
to
8e2a1ba
Compare
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.
Hello @waveywaves,
Sorry again for the time I took to review
I have multiples questions
- when I click on the preview I have "no such file or directory" error. I guess it's because I took too much time to review 😅
- What should I activate to have the same comment you got in your PR? A uffizi integration?
- does it mean a new image and so a new comment will be created for each commit pushed? Can't we just have a single comment, and the provided container is updated by keeping the same link?
Thanks again for your time, I'm trying to check if it will concretely meet the needs of the team 😊
workflows: | ||
- "Build PR Image" | ||
types: | ||
- completed |
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.
Since you need the previous workflow to be completed, can't we make them in the same workflow instead? The cache-compose-file
could only start when build-pr-image
is done.
It complexity to have two separated files
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.
This is part of the two stage workflow. Conisdering this question comes up a lot, we have written a blog post about it !
beef775
to
37f07fb
Compare
@curquiza https://app.uffizzi.com/github.com/waveywaves/meilisearch/pull/2 check this link for the updated preview from the PR! |
Happy New Year 2023 team ! :) @curquiza I have updated the PR, let me know what you think. |
Hello @waveywaves Happy new year as well! If I'm correct you did not answer my questions
|
@curquiza sorry looks like I missed them
The merge and run of the github workflow will create an account for the org automatically. We cannot get the same comment in this PR because that comment is generated by the uffizzi-deploy step, and for it to run it needs to be in the default branch of the repo (main branch). Check out this article to learn about why the workflow is written the way it is.
New image will be pushed and the old comment will be updated but the link for the PR preview will stay the same. It will look like https://app.uffizzi.com/github.com/meilisearch/meilisearch/pull/ After this PR is merged, I will open a test PR to this repo to see if the previews are working as expected. |
Also, I'm not able to reach Meilisearch:
Do I miss something? |
@curquiza app.uffizzi.com/github.com/waveywaves/meilisearch/pull/2 is a dynamic link which points to the current working preview, the link you tried reaching is an older preview looks like |
Thanks @waveywaves |
Open a tab, run the Then, use app.uffizzi.com/github.com/waveywaves/meilisearch/pull/2/meilisearch which will forward all requests to the port 7700 of the container. |
The problem with the
I should see |
@curquiza I understand, I'll fix this |
6028d46
to
dba5a4b
Compare
@curquiza the url rewrite in nginx is fixed now. I tested and am getting the following log on the terminal. I tested it with running
Let me know if this works for you. |
@curquiza The preview has been fixed now, let me know what you think ! |
Thanks @waveywaves it is now work. Thank you so much for your time and answering our questions. I will now discuss with the team since the prototype is available, to know if this is something we want to integrate now or not 😊 |
FROM uffizzi/ttyd:alpine | ||
|
||
ENV MEILI_HTTP_ADDR 0.0.0.0:7700 | ||
ENV MEILI_SERVER_PROVIDER docker |
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.
ENV MEILI_SERVER_PROVIDER docker | |
ENV MEILI_SERVER_PROVIDER docker | |
ENV MEILI_NO_ANALYTICS |
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.
Hey @waveywaves and @curquiza 👋
I'm just passing by to add the MEILI_NO_ANALYTICS
so we don't forget it 🪄
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.
@gmourier I have updated the PR, the preview will get updated as well.
@curquiza Is it preferrable to remove the master key then ? |
yes |
@curquiza done ! |
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's try this!
thanks @waveywaves for your patience and your help!
bors merge
🕐 Waiting for PR status (GitHub check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set. |
bors merge |
Already running a review |
Build succeeded:
|
Pull Request
Related discussion (was created as an issue initially)
https://github.com/meilisearch/meilisearch/discussions/2883
What does this PR do?
This PR adds gha workflows to create preview environments on every PR. This workflow also posts the preview url as a comment on the PR.
This PR created against my fork of meilisearch demonstrates how this change behaves.
In the demo preview you can run the
meilisearch
binary built from the PR and can access meilisearch running from the PR by adding/meilisearch
to the url of the PR.eg: I go to the demo preview at the URL https://app.uffizzi.com/github.com/waveywaves/meilisearch/pull/2, run
meilisearch
in the terminal. I can access this running instance ofmeilisearch
in the preview env fromhttps://pr-2-deployment-7396-meilisearch.app.uffizzi.com/meilisearchPR checklist
Please check if your PR fulfills the following requirements:
Thank you so much for contributing to Meilisearch!