Continuous deployment of main to the stage environment
Categories
(Conduit :: Lando, enhancement)
Tracking
(Not tracked)
People
(Reporter: shtrom, Unassigned)
References
(Blocks 2 open bugs)
Details
Objective:
- keep
stageupdated to the latest version ofmainfor testing by other teams - allow overriding
mainwithstagingfor pre-merge testing onstage - restore sync from 1 when done
Idea
- Add a workflow that tries to push to
stagingon pushes tomain. It will work or fail depending on fast-forwards (for 2, if someone has manually pushed tostaging, the workflow will not override those changes), and if it works, it will deploy to stage as a matter of course (caters for 1). - add a dispatch to actively force-push main to staging to reset it when we're done bespoke testing (caters for 3)
| Reporter | ||
Comment 1•3 months ago
|
||
We may be able to apply the same logic for bug 2057368.
Comment 2•3 months ago
|
||
Couple of ideas here:
- Currently we mostly use staging as a backup dev server (in practice) even though in theory it should always have main
- The staging cluster (including Phabricator and BMO) are usually behind or out of date, so that's something else to keep in mind
- If we continue to use staging as a backup dev server, this may break things in the workflow when db migrations diverge, which may cause unexpected behaviour even if fast-forwards work.
- A dispatch to actively force-push will not work without additional logic to handle DB divergences
Ideally, we couple this change with an automatic DB reset that synchronizes the schema with whatever's on production, which would alleviate most issues in this respect.
I think DEV is often used for testing by other teams, because it is a little more well configured, but improving the state of staging should encourage more usage of the staging server for its intended purpose!
| Reporter | ||
Comment 3•3 months ago
|
||
I think DEV is often used for testing by other teams, because it is a little more well configured, but improving the state of staging should encourage more usage of the staging server for its intended purpose!
Yes, I think that's my key. So we can focus use dev for our own work, but let other teams essentially use main ahead of time. I'm not too worried about data being a bit out of date, as long as the environment is close enough to what's in prod.
The migrations are an issue. In my proposal, we still allow to push divergences from main to staging, at which point it will not be auto-synced until parity with main is restored. I think that would need to be a manual intervention in any case, but it might be good to see how we can automate resyncing the schemata, which is the same issue as we have in dev, so killing two stones with one bird.
Description
•