-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
New-feature, WiP: Ephemeral Environments for PRs — Uffizzi Integration #18127
Conversation
Signed-off-by: Shruti Chaturvedi <shrutichaturvedi16.sc@gmail.com>
On the preview, it seems some of the API endpoints from API Core return a 404 — namely some endpoints concerning jobservice ( I would really appreciate some help on how the issue with some of these endpoints can be resolved! |
Codecov Report
@@ Coverage Diff @@
## main #18127 +/- ##
==========================================
- Coverage 67.39% 67.36% -0.03%
==========================================
Files 980 980
Lines 106778 106778
Branches 2662 2662
==========================================
- Hits 71958 71930 -28
- Misses 30947 30979 +32
+ Partials 3873 3869 -4
Flags with carried forward coverage won't be shown. Click here to find out more. |
Thank you for your contribution, it is excellent to have a preview environment. |
thanks for taking a look into this, @Vad1mo! You're right — I will move the changes into its own directory so it's efficient and not intrusive. |
hi @OrlinVasilev ~ thanks for the review on this. Agree, the certs shouldn't be needed. I had added this for the config of the services, but these can be removed. I'll be cleaning the PR according to the suggestions (and will also point to some necessary changes, added to core code) |
Signed-off-by: Shruti Chaturvedi <66940685+ShrutiC-git@users.noreply.github.com>
9a85866
to
5fb94b7
Compare
hi, @Vad1mo @OrlinVasilev, I have moved preview-specific files to their own directory to keep the integration code separate. Also, as you pointed out, have removed the files that are not used in the service volumes. Thanks for helping clean this up! Let me know how I can make it more efficient. We can probably add more modules to be built from source, but some of the co-dependencies were missing so currently we are limited to building 3 of Harbor components. |
@ShrutiC-git how we can test it ? |
hey, @OrlinVasilev - To test this, here's what I had done: The first step was opening a PR against my fork of Harbor, the uffizzi-build.yml file triggered the Build PR Image action. Once this action was completed, the uffizzi-preview.yml GHA-file triggered the Deploy Preview action. We use this 2-step workflow for open-source projects, to allow open-source projects to have previews for contributions from forks. Here is a more in-depth read into why we use a two-stage workflow.
To log into the preview, use the following credentials:
For previews on this repo, this PR needs to be merged. That is because the Here's an in-depth read on why we use the 2-stage workflow, if you'd like to know why we have the workflows separated out into two separate actions. |
@ShrutiC-git - the backstage environment looks quite good and responsive, is there a way to make that available for tests with Harbor and possibly to do some demo on our next community meeting thanks! |
hey @OrlinVasilev, thanks for looking further into this.
could you maybe explain what you mean by this? What would be helpful for the community? were you able to take a look at the preview environment link for Harbor (linked in the comment above)? How does that look so far? |
@ShrutiC-git thank you! @goharbor/all-maintainers can you take a look here: Thank you! username: admin |
monitoring this too, @OrlinVasilev. Let me know what changes we can make to these ephemeral environments to align with what the community needs. |
@OrlinVasilev what's the appetite here? Do you want to move forward? |
@jpthurman - waiting the rest of the @goharbor/all-maintainers to test it and share some thought BTW do you plan to leave it free for the OS projects or we can expect some changes in the policy in the future? |
as a follow up question can we make it on demand so we can exclude the possibility our pipelines to depend on it? |
Hi @OrlinVasilev |
@jpthurman we are CNCF graduated project as such is 101% open source, of course there are companies which are building products and services based on Harbor! If we decide to continue with this adding you to the readme it's for sure there! On demand I mean, to tune it so we have these preview envs in special conditions like only UI is impacted or something like that I suppose that can be managed on the github action workflow level! |
Great - yes the service will be free for Harbor For on-demand yes you can set the GHA for whatever scenarios you can imagine. What's in this PR is the template used across many Open Source projects and they are quite happy with it. How much longer do you plan to get feedback from harbor community? Do you want to set a time period for feedback? When you are ready we can update this PR (I'm sure it's a little stale) and you can merge. Tagging @ShrutiC-git |
This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days. |
@ShrutiC-git @jpthurman hi folks :) are you still interested to do a live session during our community meetings :) so we can finally decide and merge this one :)) |
Hi @OrlinVasilev! |
@jpthurman fantastic! Let's park that for now then! BTW do you need any help with the helm part maybe I can contribute :) |
@OrlinVasilev perhaps, a few things to square away on our end - we'll circle back. Thanks! |
@jpthurman will be waiting :) |
Updated one is on the way! |
Thank you for contributing to Harbor!
Comprehensive Summary of your change
This PR is adding support for preview environments for PR events (opened, sync'ed, reopened, etc) on Harbor, powered by Uffizzi.
This PR uses GHA workflows to build and provision preview environments. Utilizing docker-compose examples from Harbor, the PR uses docker-compose.uffizzi.yml to build open-sourced components of Harbor from source: Harbor portal, Harbor, registryctl, and jobservice. Building from source makes sure the latest changes are reflected in the preview.
The docker-compose also has Harbor core, Harbor registry, postgres charmuseum and redis containers, utilizing images from DockerHub.
Once a PR event is triggered — PR opened, PR synced, review requested — the build workflow will build Harbor portal, jobservice and harbor-registryctl from source along with other related services, and the preview workflow will either spin up a new preview or update an existing preview. The previews are ephemeral — so they live for only as long as needed.
A comment will be posted on the PR containing the URL of the preview environment, allowing contributors and maintainers to easily navigate to the preview.
To test this, the first step was opening a PR against my fork of Harbor, the uffizzi-build.yml file triggered the Build PR Image action. Once this action was completed, the uffizzi-preview.yml GHA-file triggered the Deploy Preview action. We use this 2-step workflow for open-source projects, to allow open-source projects to have previews for contributions from forks. Here is a more in-depth read into why we use a two-stage workflow.
To log into the preview, use the following credentials:
Issue being fixed
Fixes #18006
Please indicate you've done the following:
cc @waveywaves