Add in routes for site launch. To be reviewed in conjunction with fe pr
Solution
Add in the routes
launchSite and launchInfo to enable this functionality.
Breaking Changes
[ ] Yes - this PR contains breaking changes
Details ...
[X] No - this PR is backwards compatible
Features:
This PR introduces some semantic changes for the end state for the site that will be stored in the db.
Previously, all site launches used end with a site_status = LAUNCHED and the job_status = RUNNING.
Moving forward, we want to make it such that at the end state, we want to change this site_status = LAUNCHED and job_status = READY. The problem I am trying to solve here is that I need a way to store in the DB that the launch process has started, but has yet to complete, as this leads to a visual change of what we display to the user. What this means is that there will be some manual remediation for the already launched sites to modify their states to job_status from RUNNING to READY. Open to alternatives to solve this!
CC. @seaerchin @harishv7
I want to introduce a util method for the error handling stuff. I noticed that there are quite a number of functions that require me to throw an error, and log the exact same message. I have introduced this in here, but am not sure if this is the best place to put this/if there is already an util function for this.
Note to reviewers
I am not too sure if I am logging this error message properly. The reason for this dilemma is that an error thrown here is not necessarily an error. It could mean that the site launch process has not started, or already ended.
I am still opting for logging the error here as if in the case of an genuine error, at least we can refer to the logs for this rather than being confused about why that occurred in the first place
Tests
I will be exploring introducing e2e tests for this but don't have bandwidth to do this yet.
for now a manual test is shown here.
Problem
Add in routes for site launch. To be reviewed in conjunction with fe pr
Solution
Add in the routes
launchSite
andlaunchInfo
to enable this functionality.Breaking Changes
Features:
This PR introduces some semantic changes for the end state for the site that will be stored in the db. Previously, all site launches used end with a
site_status
=LAUNCHED
and thejob_status
=RUNNING
. Moving forward, we want to make it such that at the end state, we want to change thissite_status
=LAUNCHED
andjob_status
=READY
. The problem I am trying to solve here is that I need a way to store in the DB that the launch process has started, but has yet to complete, as this leads to a visual change of what we display to the user. What this means is that there will be some manual remediation for the already launched sites to modify their states tojob_status
fromRUNNING
toREADY
. Open to alternatives to solve this!CC. @seaerchin @harishv7 I want to introduce a util method for the error handling stuff. I noticed that there are quite a number of functions that require me to throw an error, and log the exact same message. I have introduced this in here, but am not sure if this is the best place to put this/if there is already an util function for this.
Note to reviewers I am not too sure if I am logging this error message properly. The reason for this dilemma is that an error thrown here is not necessarily an error. It could mean that the site launch process has not started, or already ended. I am still opting for logging the error here as if in the case of an genuine error, at least we can refer to the logs for this rather than being confused about why that occurred in the first place
Tests
I will be exploring introducing e2e tests for this but don't have bandwidth to do this yet. for now a manual test is shown here.