Skip to content

Change to mainnet and testnet branch for feature development #346

@CMCDragonkai

Description

@CMCDragonkai

We can build a staging system for PK.

  • Change master to mainnet
  • 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 staging branch off master
  • 2. Update CI/CD so that QA runs and nix job only apply to staging branch, the packages job still only applies to master
  • 3. Perhaps testing can be done on staging as 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 ignore WIP commits (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.

Metadata

Metadata

Assignees

Labels

procedureAction that must be executedr&d:polykey:core activity 4End to End Networking behind Consumer NAT Devices

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions