Repository navigation
Change to mainnet and testnet branch for feature development #346
Copy link
Copy link
Closed
Labels
procedureAction that must be executedAction that must be executedr&d:polykey:core activity 4End to End Networking behind Consumer NAT DevicesEnd to End Networking behind Consumer NAT Devices
Description
We can build a staging system for PK.
- Change
mastertomainnet - Create a staging branch
testnet
The testnet branch is an intermediate branch before merging into mainnet.
This is where we should be branching off features and where we should be cherry picking things.
This is where also the CI/CD must apply QA work to, and it must pass before it gets merged into mainnet.
mainnet testnet feature-branch
┌────┐ ┌────┐ ┌────┐
│ C1 │ │ C1 │ │ C1 │
│ C2 │ │ C2 │ │ C2 │
└─┬──┘ │ C3 │ │ C3 │
│ │ C4 │ │ C4 │
│ └─┬──┘ │ C5 │
│ │ │ C6 │
│ │ └─┬──┘
│ │ │
│ │◄─────────────────┘
│ │ merge
│ ┌─▼──┐
│ │ C5 │
│ │ C6 │
│ └─┬──┘
│ │ ───────────┐
│ ┌──────▼──────┐ │
│ │ local tests │ │
│ └──────┬──────┘ │
│ │ │
│ ┌───▼───┐ │
│ │ build │ │
│ └───┬───┘ │
│ │ │
│ ┌────▼────┐ │
│ │ quality │ │
│ └────┬────┘ │
│ rollback │ ├─ CI/CD
│ ┌───────────►├───────────────────┐ │
│ │ │ │ │
│ │ ┌─────────▼──────────┐ ┌──────▼──────┐ │
│ │ │ testnet deployment │ │ pre-release │ │
│ │ └─────────┬──────────┘ └─────────────┘ │
│ │ │ │
│ │ ┌──────▼────────┐ │
│ └─────┤ testnet tests │ │
│ └──────┬────────┘ │
│ │ │
│◄───────────────────┘ │
│ fast-forward merge │
│ ───────────┘
┌──▼─┐
│ C3 │
│ C4 │
│ C5 │
│ C6 │
└─┬──┘
┌────── │
│ │◄─────────────┐
│ │ │
│ ┌────────▼───────────┐ │
│ │ mainnet deployment │ │ rollback
│ └────────┬───────────┘ │
│ │ │
CI/CD ─┤ ┌───────▼───────┐ │
│ │ mainnet tests ├──────┘
│ └───────┬───────┘
│ │
│ ┌────▼────┐
│ │ release │
│ └─────────┘
└──────
Tasks
- 1. Create
stagingbranch offmaster - 2. Update CI/CD so that QA runs and
nixjob only apply tostagingbranch, thepackagesjob still only applies tomaster - 3. Perhaps testing can be done on
stagingas well, since there's alot of tests to run, and many branch commits are obviously not ready. On the other hand, we do want a run over the branches as well. What we can do is to automatically ignoreWIPcommits (prefixed with WIP). - 4. Figure out automatic merge to master from staging: https://stackoverflow.com/questions/67516773/is-there-any-way-to-auto-merge-branches-in-gitlab - possibly through GH bot or otherwise.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
procedureAction that must be executedAction that must be executedr&d:polykey:core activity 4End to End Networking behind Consumer NAT DevicesEnd to End Networking behind Consumer NAT Devices
Activity
CMCDragonkai commentedon Feb 21, 2022
New feature branches must then branch off
staginginstead ofmaster.@emmacasolin @tegefaulkes
CMCDragonkai commentedon Mar 23, 2022
This is our release workflow. The CI/CD will be essential to automating our work.
It also means renaming our branches to
mainnetandtestnet.[-]Create `staging` branch for feature development[/-][+]Change to `mainnet` and `testnet` branch for feature development[/+]CMCDragonkai commentedon Mar 23, 2022
@emmacasolin the NAT testing you're currently doing is now just part of local tests stage.
However once we adapt the tests to also use the
testnet.polykey.io, then they form part oftestnet testsand alsomainnet tests.Notice how the these are a separate test stage that occurs after the automatic deployment to AWS.
CMCDragonkai commentedon Mar 23, 2022
If the remote testing
testnet testsormainnet testsfail, this should cause a rollback on the deployments.The rollback may not need to be done automatically in the case of
testnetbranch, this is because perhaps we want to debug why the it failed.We could instead just do retries there and then stop if it keeps failing, keeping whatever state of testnet is.
However in the case of
mainnet, a rollback should be done if the mainnet final tests fail. This should of course never happen, as that is a production failure.Since remote tests will involve flaky networking, it's important we put in the necessary retries.
CMCDragonkai commentedon Mar 23, 2022
The fast forward merge between testnet and mainnet can be user-activated, instead of being automatic. This allows us to do any manual work in-between before pressing the big red button.
CMCDragonkai commentedon Jun 28, 2022
Actually, in order to align with other repositories, we're not going to change the name of
masterandstagingfor now.This is now done since #379 is a real PR and the bot is operational, will auto-close this once #379 merged to master.
CMCDragonkai commentedon Jun 28, 2022
Closing as it is done.