Skip to content

Commit 8389088

Browse files
authored
Merge pull request #716 from opentensor/sam-remove-old-ci-stuff
switch back to the old deploy/release process
2 parents a03ce30 + d1c40dd commit 8389088

8 files changed

+29
-186
lines changed

.github/workflows/check-devnet.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Devnet Deploy Check
22

33
on:
44
pull_request:
5-
branches: [devnet]
5+
branches: [devnet, devnet-ready]
66

77
env:
88
CARGO_TERM_COLOR: always
@@ -37,7 +37,7 @@ jobs:
3737
echo "network spec_version: $spec_version"
3838
if (( $(echo "$local_spec_version <= $spec_version" | bc -l) )); then echo "$local_spec_version ≯ $spec_version ❌"; exit 1; fi
3939
echo "$local_spec_version > $spec_version ✅"
40-
40+
4141
check-devnet-migrations:
4242
name: check devnet migrations
4343
runs-on: ubuntu-22.04
@@ -51,4 +51,4 @@ jobs:
5151
runtime-package: "node-subtensor-runtime"
5252
node-uri: "wss://dev.chain.opentensor.ai:443"
5353
checks: "pre-and-post"
54-
extra-args: "--disable-spec-version-check --no-weight-warnings"
54+
extra-args: "--disable-spec-version-check --no-weight-warnings"

.github/workflows/check-rust.yml

-4
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,3 @@ jobs:
338338

339339
- name: Check features
340340
run: zepter run check
341-
342-
343-
344-

.github/workflows/check-testnet.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Testnet Deploy Check
22

33
on:
44
pull_request:
5-
branches: [testnet]
5+
branches: [testnet, testnet-ready]
66

77
env:
88
CARGO_TERM_COLOR: always

.github/workflows/devnet-labels.yml

-19
This file was deleted.

.github/workflows/devnet-ready-labels.yml

-17
This file was deleted.

.github/workflows/testnet-labels.yml

-19
This file was deleted.

.github/workflows/testnet-ready-labels.yml

-17
This file was deleted.

CONTRIBUTING.md

+25-106
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Lifecycle of a Pull Request
44

55
1. Individuals wishing to contribute to subtensor should develop their change/feature/fix in a
6-
[Pull Request](https://github.com/opentensor/subtensor/compare) (PR) targeting the `main`
6+
[Pull Request](https://github.com/opentensor/subtensor/compare) (PR) targeting the `devnet-ready`
77
branch of the subtensor GitHub repository. It is recommended to start your pull request as a
88
draft initially until you are ready to have other developers actively look at it. Any
99
changes to pallet/runtime code should be accompanied by integration and/or unit tests fully
@@ -13,69 +13,29 @@
1313
Review" and request review from "Nucleus".
1414
3. Core Nucleus team members will review your PR, possibly requesting changes, and will also
1515
add appropriate labels to your PR as shown below. Three positive reviews are required.
16-
4. Once the required passing reviews have been obtained, you are ready to request that your PR
17-
be included in the next `devnet` deploy. To do this, you should open a companion PR merging
18-
a copy of your branch into the `devnet-ready` branch. You must include a link to the parent
19-
PR in the description and preface your PR title with "(Devnet Ready)" or the PR will be
20-
closed/ignored. Your companion PR should have the `devnet-companion` label.
21-
5. A core team administrator will review your "(Devnet Ready)" PR, verifying that it logically
22-
matches the changes introduced in the parent PR (there will sometimes be minor differences
23-
due to merge conflicts) and will either request changes or approve the PR and merge it. Once
24-
your companion PR is merged, the administrator will add the `devnet-ready` label to the
25-
parent PR, indicating that the PR is on the `devnet-ready` branch and will be included in
26-
the next deploy to `devnet`.
27-
6. At some point, a core team administrator will open a PR merging the current `devnet-ready`
16+
4. Once the required passing reviews have been obtained, you or an administrator may merge the
17+
PR into the `devnet-ready` branch.
18+
5. At some point, a core team administrator will open a PR merging the current `devnet-ready`
2819
branch into `devnet`, and the CI will enforce some additional safety checks on this PR
2920
including a requirement that the new `spec_version` be greater than the current on-chain
3021
`spec_version`. The PR should include a bulleted list of all PRs included in the deploy so
31-
they can be easily found after the fact (TODO: automate this). This PR will require two
32-
reviews from the core team as a sanity check. After merging, the administrator will then
33-
need to update all PRs with the `devnet-ready` label to instead have the `on-devnet` label
34-
(TODO: automate this upon merge). The administrator will then deploy `devnet`.
35-
7. Once the `on-devnet` label appears on your PR, if you are a core team member it is your
36-
responsibility to verify that the features/changes/fixes introduced by your PR are
37-
functioning properly on `devnet` by interacting with the live network. If you are an
38-
external contributor, a core team member will be assigned to test this for you.
39-
8. If your feature/change/fix is confirmed working on `devnet`, the `devnet-pass` label should
40-
be added. Otherwise if there are issues, the `devnet-fail` label should be added and you
41-
will need to make changes to your PR and repeat the previous steps in this process. In some
42-
cases a revert PR will need to be created reverting your changes from the `pre-devnet` and
43-
`devnet` branches, respectively.
44-
9. Once `devnet-pass` has been added to your PR, it is eligible for inclusion in the next
45-
`testnet` deploy. We typically run `testnet` deploys every other wednesday.
46-
10. On the appropriate date, an administrator will open a PR merging the current `devnet`
22+
they can be easily found after the fact.
23+
6. Once your feature/change/fix is on `devnet`, it is your responsibility to confirm it is
24+
working properly. If it is not working and additional changes are needed, please coordinate
25+
with a core team administrator and/or open up a new PR into `devnet` either reverting your
26+
changes or making any required changes in order for the feature to function properly.
27+
7. On the appropriate date, an administrator will open a PR merging the current `devnet`
4728
branch into `testnet`. This PR should include a bulleted list of all PRs included in the
48-
deploy so they can be easily found after the fact (TODO: automate this). The PR should
49-
exclude any PRs that currently have the `devnet-fail` label via a revert (TODO: enforce via
50-
CI). This PR will require two reviews from the core team as a sanity check. After merging
51-
into `testnet`, the administrator will then need to run the deploy and update all PRs
52-
included in the deploy with the `on-testnet` label (TODO: automate this upon merge). Next
53-
the administrator must cut a (pre-release) release in GitHub for `testnet` (TODO: github
54-
action to generate the release and release notes).
55-
11. Once the `on-testnet` label appears on your PR, if you are a core team member it is your
56-
responsibility to once again verify that the features/changes/fixes introduced by your PR
57-
are functioning properly on `testnet` by interacting with the live network, if applicable.
58-
If you are an external contributor, a core team member may be assigned to do this testing
59-
for you but otherwise it will be your responsibility to show evidence on the PR that the
60-
testing is successful. Once this has been verified, the `testnet-pass` label should be
61-
added. If testing fails, the `testnet-fail` label should be added and PRs should be opened
62-
reverting the change from `devnet-ready`, and then a PR should be opened merging the
63-
modified `devnet` into `testnet`. These revert PRs, if they occur, _must_ be merged before
64-
a new deploy can be run (TODO: enforce this via CI).
65-
12. After the SOP period (1 week on `testnet`) has passed and the `testnet-pass` label has been
66-
added, the CI checks on your PR should now turn all green and a core team member will be
67-
able to merge your PR into `main`. At this point your PR is done and is eligible to be
68-
included in the next `finney` deploy (TODO: track and enforce SOP compliance on a per-PR
69-
basis in CI based on the timestamps of label changes). We typically run `finney` deploys
70-
every other Wednesday, so this will typically happen the Wednesday following the Wednesday
71-
your PR was deployed to `testnet`. An administrator will run this deploy. The process the
72-
administrator follows is to open a PR merging `main` into the `finney` branch, which will
73-
always track the current state of `finney`. This PR automatically has some additional
74-
checks on it such as asserting that the spec_version gets bumped properly and other sanity
75-
checks designed to stop a bad deploy. Once the PR is reviewed and merged, the administrator
76-
will run the actual deploy. Once that is successful, the administrator will cut a new
77-
GitHub release tagged off of the latest `main` branch commit that was included in the
78-
deploy, and announcements will be made regarding the release.
29+
deploy so they can be easily found after the fact (TODO: automate this). This PR is merged,
30+
the administrator will deploy `testnet` and cut a (pre-release) release in GitHub for
31+
`testnet` (TODO: github action to generate the release and release notes).
32+
11. It is now your responsibility to once again check that your feature/change/fix is working
33+
properly, this time on `testnet`. Once again if it is not working or additional changes are
34+
needed, please coordinate with a core team administrator ASAP and/or open up a new PR into
35+
`testnet` either reverting your changes or making any required changes in order for the
36+
feature to function properly.
37+
12. At some point the administrator will merge current `testnet` into `main` and cut a new
38+
deploy to mainnet/finney.
7939

8040
## PR Labels
8141

@@ -85,40 +45,24 @@
8545
| `blue-team` | PR is focused on preventative/safety measures and/or dev UX improvements | none |
8646
| `runtime` | PR contains substantive changes to runtime / pallet code | none |
8747
| `breaking-change` | PR requires synchronized changes with bittensor | Triggers an automatic bot message so the relevant teams are made aware of the change well in advance |
88-
| `migration` | PR contains one or more migrations | none |
89-
| `devnet-companion` | Designates a devnet companion PR | Presence of `devnet-companion` label is checked |
90-
| `devnet-ready` | PR's branch has been merged into the `devnet-ready` branch and will be included in the next `devnet` deploy | none |
91-
| `on-devnet` | PR has been deployed to `devnet` | Removes `devnet-ready` |
92-
| `devnet-pass` | PR has passed manual testing on `devnet` | `devnet-pass` or `devnet-skip` required |
93-
| `devnet-skip` | Allows a critical hotfix PR to skip required testing on `devnet` | `devnet-pass` or `devnet-skip` required |
94-
| `devnet-fail` | PR has failed manual testing on `devnet` and requires modification | none |
95-
| `testnet-companion` | Designates a testnet companion PR | Presence of `testnet-companion` label is checked |
96-
| `on-testnet` | PR has been deployed to `testnet` | none |
97-
| `testnet-pass` | PR has passed manual testing on `testnet` | `testnet-pass` or `testnet-skip` required |
98-
| `testnet-skip` | Allows a critical hotfix PR to skip required manual testing and SOP on `testnet` | `testnet-pass` or `testnet-skip` required |
99-
| `testnet-fail` | PR has failed manual testing on `testnet` and requires modification | none |
100-
10148

10249
## Branches
10350

10451

10552
### `devnet-ready`
10653

107-
Companion PRs merge into this branch, eventually accumulating into a merge of `devnet-ready`
108-
into `devnet`, coinciding with a deploy of `devnet`.
54+
All new feature/change/fix PRs should merge into this branch.
10955

11056
#### Restrictions
11157
* no deleting the branch
11258
* no force pushes
11359
* no direct pushes
114-
* require 1 positive review from an administrator
115-
* new code changes invalidate existing reviews
60+
* require 3 positive review from an administrator
61+
* new code changes do _not_ invalidate existing reviews
11662
* only merge commit style merging allowed
11763

11864
#### CI-Enforced Restrictions
11965
* `check-rust.yml` must pass
120-
* TODO: parent PR must be linked to in description
121-
* TODO: parent PR must have the required number of positive reviews
12266

12367

12468
### `devnet`
@@ -164,33 +108,8 @@ tags for `testnet` releases.
164108

165109
### `main`
166110

167-
Default branch for all new PRs. Slightly ahead of what is currently on `finney`. When a PR is all
168-
green and "done", meaning it has been tested on `devnet` and `testnet`, it can be merged into
169-
`main`. Contains tags for `finney` releases.
170-
171-
#### Restrictions
172-
* no deleting the branch
173-
* no force pushes
174-
* no direct pushes
175-
* require 3 positive reviews from core team members
176-
* new code changes invalidate existing reviews
177-
* all conversations must be resolved
178-
* only merge commit style merging allowed
179-
180-
#### CI-Enforced Restrictions
181-
* `check-rust.yml` must pass
182-
* `check-labels.yml` must pass
183-
* must have `devnet-skip` or `devnet-pass` label
184-
* must have `testnet-skip` or `testnet-pass` label
185-
* if `breaking-change` label is present, bot will message the appropriate teams
186-
* TODO: when we get auditing, presence of `needs-audit` label = require a review from auditor
187-
* TODO: track SOP on PR based on label age
188-
189-
190-
### `finney`
191-
192111
Tracks the current state of what is deployed to `finney` (mainnet). Updated via an
193-
administrator-submitted PR merging `main` into `finney` in concert with a `finney` deploy.
112+
administrator-submitted PR merging `testnet` into `main` in concert with a `finney` deploy.
194113

195114
#### Restrictions
196115
* no deleting the branch
@@ -203,5 +122,5 @@ administrator-submitted PR merging `main` into `finney` in concert with a `finne
203122
#### CI-Enforced Restrictions
204123
* `check-rust.yml` must pass
205124
* `check-finney.yml` must pass
206-
* spec_version must be greater than what is currently on live `finney`
125+
* `spec_version` must be greater than what is currently on live `finney`
207126
* TODO: other pre-deploy sanity checks here

0 commit comments

Comments
 (0)