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

feat: Preview Environments for PRs — Uffizzi Integration #1305

Closed
wants to merge 1 commit into from

Conversation

ShrutiC-git
Copy link

Fixes #1275

A WiP PR for Uffizzi Integration with Convoy.

This PR uses two GHA workflows — uffizzi-build.yml and uffizzi-preview.yml — to build and provision preview environments.

This PR uses convoy's Dockerfile to build convoy worker, convoy scheduler and convoy web from source, ensuring changes are reflected in the preview environment. These containers are defined in the docker-compose.uffizzi.yml file, which adds the Uffizzi integration to convoy. Other containers include redis server and replica set Mongo servers (2 in total).

Here is a test PR opened on my fork. The comment posted on the PR will take me to the preview.

Opening this draft PR to get some help on getting the previews functional and efficient for the convoy community.

@ShrutiC-git
Copy link
Author

Hi, @jirevwe! Would love to get some help on this:

Running this, what I'm seeing is all the containers come up, except one — the web container. The error I am seeing is this:
Screenshot (241)

Seems to be an issue with mongo replication!? I did try increasing the connection timeout to 30 seconds and replicating settings similar to the replica-set.sh file but that did not resolve this. Perhaps mounting the replica-set.sh onto the servers would solve this?

Do let me know how it's looking and what changes I can make to make Uffizzi previews valuable for convoy!

@ShrutiC-git
Copy link
Author

Hey @jirevwe

Friendly ping - wondering if you were able to take a look at this? Would like to fix this and make Uffizzi previews serviceable and efficient for Convoy. Let me know :)

@Dotunj
Copy link
Collaborator

Dotunj commented Feb 1, 2023

Hi @ShrutiC-git, taking a look at the logs does seem like an issue with the mongo replica set. You can take a look at this file docker-compose.yml to see how we currently recommend setting up a Mongo replica set with Convoy along with an example of what the convoy.json should look like.

@ShrutiC-git
Copy link
Author

thanks, @Dotunj, taking a look ~

@ShrutiC-git ShrutiC-git force-pushed the uffizzi branch 8 times, most recently from 33229ec to c5d6d7a Compare February 3, 2023 21:01
@ShrutiC-git
Copy link
Author

ShrutiC-git commented Feb 3, 2023

hey @Dotunj, thanks again for your help on this. The example you sent was very helpful!

cc @jirevwe
Here is the PoC PR which creates a preview environment. This is the comment on that PR, pointing me to the preview.

So, all the containers do come up, and looking at the logs, it seems the web container is now starting successfully. I see this line in the log - {"level":"info","msg":"Server running on port 5005","source":"api server","time":"2023-02-03 21:18:26"}. Also, it seems to be receiving requests from the browser - which is great.

The worker and the scheduler also are up and running.
I see these in the logs, indicating successful start of these container as well:

  • worker{"level":"info","msg":"Worker running on port 5006","source":"worker","time":"2023-02-03 21:18:26"}
  • scheduler{"level":"info","msg":"Scheduler starting","source":"scheduler","time":"2023-02-03 21:18:24"}

Also, redis, mongo (the replica set) and mongo-setup (replica setup) is running successfully too.

What is weird is I would randomly see a 503 error on the preview.

It'd load the sign-in screen. I'd log into the preview using the username [email protected] and password default. It would log in, but at times, it'd give a 503, indicating that either the web service or upstream service is unavailable. However, the logs do not indicate that anything is wrong.

The same request on retrying would serve the page successfully. Seeing this behavior also on the sign-in screen. Could it be a memory issue? The memory I have allotted to the services is rather on the higher side, but maybe it requires more.

Since I'm not seeing this error constantly, The same request on refreshing serves the page, and vice-versa ( if the sign-in screen is serviceable, on refreshing, it'd throw a 503). This does indicate that it is not an issue with the configuration itself, but perhaps the web service or the upstream service - scheduler or worker is getting killed — but the logs should indicate this. However, the logs look clean.

Not sure what could be the issue. Could taking a look at the PoC PR help? How could we debug this more efficiently?

Super glad we moved a few steps closer - the preview does come up and the containers seem healthy. Nothing obvious I could point to. Looking forward to making the final changes and having the previews serviceable and efficient!

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@subomi subomi closed this Nov 8, 2023
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.

Integrate pull request preview environments
4 participants