Skip to content

Commit

Permalink
move update rust-vmm-ci to its own file
Browse files Browse the repository at this point in the history
It was rather hard to find this runbook because it was hiding in
the contributing guidelines readme. The runbook was also slightly
outdated, so it now mentions Dependabot.

Signed-off-by: Andreea Florescu <fandree@amazon.com>
  • Loading branch information
andreeaflorescu committed Mar 28, 2023
1 parent e0489ab commit d30acb0
Showing 4 changed files with 83 additions and 79 deletions.
77 changes: 0 additions & 77 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -49,80 +49,3 @@ It is important to note that anyone outside the repository code owners or
the rust-vmm gatekeepers lists is very welcome to review any pending PR.
However, any resulting PR approval from an external reviewer will not count as
one of the 2 mandatory approvals for the PR to be merged.

## Development

### Updating the rust-vmm-ci

All rust-vmm components are tested using the
[rust-vmm-ci](https://github.com/rust-vmm/rust-vmm-ci/) submodule.
We recommend component owners and contributors alike to update the
`rust-vmm-ci` at least one time per month. We expect it to continuously evolve:
more tests added, updates to the
[rust-vmm-container](https://github.com/rust-vmm/rust-vmm-container), and other
goodies.

To update the `rust-vmm-ci`, run the following commands starting from the
local directory that corresponds to the git repository where the submodule
needs to be updated.

1. Make sure the `rust-vmm-ci` submodule is initialized locally:

```bash
git submodule update --init --recursive
```

2. Get the commit sha of the current commit.

```bash
cd rust-vmm-ci
OLD_COMMIT=`git rev-parse HEAD`
```

3. Update rust-vmm-ci to the latest commit on main:

```bash
git pull https://github.com/rust-vmm/rust-vmm-ci/ main
```

4. Get the pretty print of commits (this helps us keep track of updates):

```bash
git log --abbrev-commit --pretty=oneline ${OLD_COMMIT}..HEAD
```

5. Add the submodule update to a new commit:

```bash
# Change the directory to the root directory of the repo
cd ..
git add rust-vmm-ci
git commit -s
```

For the commit message use the text from step 4, but remove any branch
information that it might contain. The text should only have a list of sha1
and a short description.

Example of commit message update:

```bash
commit 6c984917be09327cfbe4c72b92825dbed3477c81 (HEAD -> update_rust_vmm_ci)
Author: Andreea Florescu <fandree@amazon.com>
Date: Tue Aug 11 12:00:59 2020 +0200

updated rust-vmm-ci

0fc8ced refactor test_benchmark.py
741b894 checkout to PR branch before finishing test_bench
645a5c3 test_bench: don't crash when no bench on master
bd32544 Fetch origin in benchmark test
35beb91 Fix commit message test
53427aa benchmarks: add test that can run at every PR
abd2c90 Add test for commit message format
fe859f4 Update container image to v6
75d7254 run cargo check on all features
Signed-off-by: Andreea Florescu <fandree@amazon.com>
```
3 changes: 2 additions & 1 deletion docs/readme.md
Original file line number Diff line number Diff line change
@@ -7,4 +7,5 @@ of development in the rust-vmm project.
- [Code Coverage](code_coverage.md)
- [Crate Release](crate_release.md)
- [Set Up a New Repository](setup_new_repo.md)
- [Update the Rust Toolchain](update-rust-toolchain.md)
- [Update the Rust Toolchain](update-rust-toolchain.md)
- [Update rust-vmm-ci](update-rust-vmm-ci.md)
3 changes: 2 additions & 1 deletion docs/update-rust-toolchain.md
Original file line number Diff line number Diff line change
@@ -26,4 +26,5 @@ updating the rust-vmm-ci submodule.
3. Update the rust-vmm-ci for the target rust-vmm repository. NOTE: the
rust-vmm-ci submodule is automatically updated using Dependabot
every week. If for any reason you need this update faster than the default
schedule, you can follow the runbook for manually updating rust-vmm-ci.
schedule, you can follow the runbook for manually
[updating rust-vmm-ci](update-rust-vmm-ci.md).
79 changes: 79 additions & 0 deletions docs/update-rust-vmm-ci.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Updating the rust-vmm-ci

All rust-vmm components are tested using the
[rust-vmm-ci](https://github.com/rust-vmm/rust-vmm-ci/) submodule.
For repositories that have Dependabot enabled, PRs for updating rust-vmm-ci
will be opened automatically every week in case of changes. The repository
maintainers (or the gatekeepers in case the repository does not have
active maintainers) are responsible for reviewing the PRs that update
rust-vmm-ci, and fix or find owners for any problems that arise from the update.

## Manual Update of rust-vmm-ci

In case the automatic update via Dependabot is not working or you want to get
the update in before the automatic schedule, you can follow the next steps to
manually update it.

The following commands must run starting from the local directory that
corresponds to the git repository where the submodule needs to be updated.

1. Make sure the `rust-vmm-ci` submodule is initialized locally:

```bash
git submodule update --init --recursive
```

2. Get the commit sha of the current commit.

```bash
cd rust-vmm-ci
OLD_COMMIT=`git rev-parse HEAD`
```

3. Update rust-vmm-ci to the latest commit on main:

```bash
git pull https://github.com/rust-vmm/rust-vmm-ci/ main
```

4. Get the pretty print of commits (this helps us keep track of updates):

```bash
git log --abbrev-commit --pretty=oneline ${OLD_COMMIT}..HEAD
```

5. Add the submodule update to a new commit:

```bash
# Change the directory to the root directory of the repo
cd ..
git add rust-vmm-ci
git commit -s
```

For the commit message use the text from step 4, but remove any branch
information that it might contain. The text should only have a list of sha1
and a short description.

Example of commit message update:

```bash
commit 6c984917be09327cfbe4c72b92825dbed3477c81 (HEAD -> update_rust_vmm_ci)
Author: Andreea Florescu <fandree@amazon.com>
Date: Tue Aug 11 12:00:59 2020 +0200

updated rust-vmm-ci

0fc8ced refactor test_benchmark.py
741b894 checkout to PR branch before finishing test_bench
645a5c3 test_bench: don't crash when no bench on master
bd32544 Fetch origin in benchmark test
35beb91 Fix commit message test
53427aa benchmarks: add test that can run at every PR
abd2c90 Add test for commit message format
fe859f4 Update container image to v6
75d7254 run cargo check on all features
Signed-off-by: Andreea Florescu <fandree@amazon.com>
```

0 comments on commit d30acb0

Please sign in to comment.