Skip to content

Dev Process: Branch Policy

Miao ZhiCheng edited this page Jun 14, 2022 · 1 revision

The branch rules setup using github are to ensure the code quality, release cycles and security of the monorepo packages.

Feature Branch

Any branches other than dev and release-* are considered feature branches, and there is no merge requirements to them.

Subgraph Feature Branch Policy

3 cases re breaking changes:

  • major breaking change, bump subgraph major version.
  • partial breaking change, use @deprecated field to annotate fields to be removed.
  • no breaking change.

for non-major breaking change

  • feature should be tested in subgraph testsuite.
  • update subgraph feature endpoint
  • testing feature branch against at least the latest sdk-core
  • all passes -> merge to dev branch.

Workflow Files

CI

ci.feature.yml

  • All feature branches push would trigger build and tests.
  • To skip the workflow, include "[skip ci]" in the commit message.

CD: Pull Request Builds

cd.feature.create-pr-artifact.yml

  • Any feature branch that have an active pull request update will trigger the creation of PR packages.
  • handler.publish-release-packages.yml does the actual job of publishing them to the github package registry.

Dev Branch

Merge Requirements

To merge to the dev branch:

  • Approvals from relevant code owners are required.
  • Feature branch CI passes.

CI/CD

ci.canary.yml

  • Build and test essential packages: ethereum-contracts, js-sdk, sdk-core, sdk-redux.
  • Coverage test of ethereum-contracts.
  • Coverage test of sdk-core.
  • Publish packages as "canary" packages (npm package tag "dev") to both github package registry and npmjs registry.
  • Deploy and upgrade goerli testnet with protocol release version "test".

Release Branches

ETHEREUM-CONTRACTS Pre-Release Policy

  • Checklist
  • TODO

Merge Requirements

  • Only designated release managers can push the the branch.
  • Require signed commits.
  • Approvals from relevant code owners are required.
  • Pull request must must be made prior.

Release Branches

  • release-ethereum-contracts-stable
    • Detect new version required for @superfluid-finance/ethereum-contracts@latest package.
    • CD Workflow: cd.ethereum-contracts-stable.create-release-drafts.yml

SDK-CORE Pre-Release Policy

Checklist:

  • (manual) dev subgraph endpoints are up to date (the most relevant latest "dev" branch commit)
  • (automated tests + manually reported):
subgraph endpoint \ sdk-core NEW-VERSION
v1 👍
dev 👍
  • 👍 always works
  • ⛔ always fail AND THIS IS A NG for the release
  • ℹ️ conditional, in certain breaking-change case it's broken (impact analysis needed, and to be documented in README/CHANGELOG).
  • release-sdk-core-stable
    • Prerequisite: Subgraph is deployed and indexed on all V1 endpoints.
    • PR is made to release-sdk-core-stable and CI is run: ci.pre-release-draft-test-sdk-core-subgraph-integration.yml to ensure sdk-core/subgraph compatibility locally then tested against V1 endpoint. If this second test passes, we know that sdk-core is at most in sync with the subgraph, and possibly behind.
    • Detect new version required for @superfluid-finance/sdk-core@latest package.
    • CD Workflow: cd.sdk-core-stable.create-release-drafts.yml

SDK-CORE Pre-Release Policy

Checklist:

  • TODO
  • release-sdk-redux-stable
    • Detect new version required for @superfluid-finance/sdk-redux@latest package.
    • CD Workflow: cd.sdk-redux-stable.create-release-drafts.yml

JS-SDK Pre-Release Policy

Checklist:

  • TODO
  • release-js-sdk-stable
    • Detect new version required for @superfluid-finance/js-sdk@latest package.
    • CD Workflow: cd.js-sdk-stable.create-release-drafts.yml

Subgraph Pre-Release Policy

Checklist:

  • (manual) dev subgraph endpoints are up to date (the most relevant latest "dev" branch commit)
  • (automated tests + manually reported):
subgraph endpoint \ sdk-core < NEW-VERSION NEW-VERSION
dev 👍 or ℹ️ 👍 (a)
  • 👍 always works
  • ⛔ always fail AND THIS IS A NG for the release
  • ℹ️ conditional, in certain breaking-change case it's broken (impact analysis needed, and to be documented in README/CHANGELOG).
  • (b) This is important, since it tells that new-version is fully working with dev endpoint.
  • release-subgraph-v1
    • PR is made to release-subgraph-v1 and CI is run: ci.pre-release-draft-test-sdk-core-subgraph-integration.yml to ensure sdk-core/subgraph compatibility locally and new subgraph backwards compatibility.
    • Detect new version required for @superfluid-finance/sdk-core
    • CD Workflow: cd.subgraph-stable.create-release-drafts.yml

Package Publishing Workflow

CD Workflow: Publish Packages

  • Once release drafts created by above steps are published, handler.publish-release-packages.yml is triggered.
Clone this wiki locally