From d9a6bfe4fad82f2e8d7129ffe0dc57b728148a71 Mon Sep 17 00:00:00 2001 From: Tony Floeder Date: Wed, 17 Jan 2024 10:12:47 -0600 Subject: [PATCH] Release updates (#119) * updates per my release process * expand and clarify a few steps in the release process Signed-off-by: Anthony Floeder * - move discussion of nnf-mfu to the top of the table to emphasize that its version is used in other dependent submodules. - clarify the nnf-deploy `master` branch steps and merge * Add section for cloning a release Signed-off-by: Anthony Floeder * Removed reference to update.sh script Signed-off-by: Anthony Floeder --------- Signed-off-by: Anthony Floeder --- README.md | 8 ++ docs/repo-guides/release-nnf-sw/readme.md | 106 ++++++++++++++-------- 2 files changed, 74 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index d7806e5..9a66940 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,13 @@ # NearNodeFlash Pages +## Retrieve the submodules + +There are references to files in other repos, so update the submodules for them. + +```bash +git submodule update external/nnf-dm +``` + ## Create mkdocs Environment ```bash diff --git a/docs/repo-guides/release-nnf-sw/readme.md b/docs/repo-guides/release-nnf-sw/readme.md index 88bbc87..ff3ce9d 100644 --- a/docs/repo-guides/release-nnf-sw/readme.md +++ b/docs/repo-guides/release-nnf-sw/readme.md @@ -18,13 +18,15 @@ part of `nnf-deploy`, but it should match the version number of `nnf-deploy`. Re other components. - [NearNodeFlash/nnf-deploy](https://github.com/NearNodeFlash/nnf-deploy) + - [DataWorkflowServices/dws](https://github.com/DataWorkflowServices/dws) - - [NearNodeFlash/lustre-fs-operator](https://github.com/NearNodeFlash/lustre-fs-operator) - [HewlettPackard/lustre-csi-driver](https://github.com/HewlettPackard/lustre-csi-driver) + - [NearNodeFlash/lustre-fs-operator](https://github.com/NearNodeFlash/lustre-fs-operator) - [NearNodeFlash/nnf-mfu](https://github.com/NearNodeFlash/nnf-mfu) - [NearNodeFlash/nnf-sos](https://github.com/NearNodeFlash/nnf-sos) - [NearNodeFlash/nnf-dm](https://github.com/NearNodeFlash/nnf-dm) - [NearNodeFlash/nnf-integration-test](https://github.com/NearNodeFlash/nnf-integration-test) + - [NearNodeFlash/NearNodeFlash.github.io](https://github.com/NearNodeFlash/NearNodeFlash.github.io) [nnf-ec](https://github.com/NearNodeFlash/nnf-ec) is vendored in as part of `nnf-sos` and does not @@ -89,72 +91,70 @@ just an example. 1. For `lustre-csi-driver`, `lustre-fs-operator`, `dws`, `nnf-sos`, and `nnf-dm` there are additional files that need to track the version number as well, which allow them to be installed with `kubectl apply -k`. - 1. For `lustre-fs-operator`, `dws`, `nnf-sos`, and `nnf-dm` update `config/manager/kustomization.yaml` with the correct version. - - 2. For `lustre-csi-driver`, update `deploy/kubernetes/base/kustomization.yaml` and - `charts/lustre-csi-driver/values.yaml` with the correct version. - - 2. If `nnf-mfu` was updated, multiple references in `nnf-dm` will need to be updated with the - new version number for the `nnf-mfu` image: - - 1. In `Dockerfile` and `Makefile`, replace `NNFMU_VERSION` with the new version - - 2. In `config/manager/kustomization.yaml`, replace `nnf-mfu`'s `newTag: ` + |Repo |Update| + |---------------------|------| + |`nnf-mfu` |The new version of `nnf-mfu` is referenced by the `NNFMFU` variable in several places:

`nnf-sos`
1. `Makefile` replace `NNFMFU` with `nnf-mfu's` tag.

`nnf-dm`
1. In `Dockerfile` and `Makefile`, replace `NNFMU_VERSION` with the new version.
2. In `config/manager/kustomization.yaml`, replace `nnf-mfu`'s `newTag: .`| + |`lustre-fs-operator` |update `config/manager/kustomization.yaml` with the correct version.| + |`dws` |update `config/manager/kustomization.yaml` with the correct version.| + |`nnf-sos` |update `config/manager/kustomization.yaml` with the correct version.| + |`nnf-dm` |update `config/manager/kustomization.yaml` with the correct version.| + |`lustre-csi-driver` |update `deploy/kubernetes/base/kustomization.yaml` and `charts/lustre-csi-driver/values.yaml` with the correct version.| -6. Create a Pull Request from your branch and **target the release branch**. When merging the Pull +6. **Target the `releases/v0` branch** with a Pull Request from your branch. When merging the Pull Request, **you must use a Merge Commit.** !!! note - - **Do not** Rebase or Squash! Those actions will remove the records that Git uses to + **Do not** Rebase or Squash! Those actions remove the records that Git uses to determine which commits have been merged, and then when the next release is created Git will treat everything like a conflict. Additionally, this will cause auto-generated release notes to include the previous release. -7. Once merged, update the release branch locally and then create an annotated tag: +7. Once merged, update the release branch locally and create an annotated tag: ```shell git checkout releases/v0 + git pull git tag -a v0.0.3 -m "Release v0.0.3" git push origin --tags ``` -8. Now that there is a tag, a release can be created via the [GitHub CLI](https://cli.github.com/). +8. Now that a tag exists, a release can be created via the [GitHub CLI](https://cli.github.com/). Alternatively, use the [Web UI](https://github.com/NearNodeFlash/nnf-dm/releases/new). ```bash gh release create --generate-notes --verify-tag -p v0.0.3 -t "Release v0.0.3" ``` -9. Repeat this process for each remaining component. +9. GOTO Step 1 and repeat this process for each remaining component. ## Release `nnf-deploy` -Once the individual components are released, we need to update the submodules and -`config/repositories.yaml` in the **master** branch before we start on the release branch. This -makes sure that everything is now current on master. +Once the individual components are released, we need to update the submodules +in `nnf-deploy's` `master` branch before we create the release branch. This ensures +that everything is current on `master` for `nnf-deploy`. -1. Update the submodules on master: +1. Update the submodules for `nnf-deploy` on master: ```shell + cd nnf-deploy git checkout master git pull - ./update.sh + git submodule foreach git checkout master + git submodule foreach git pull ``` -2. Update `config/repositories.yaml` and update the referenced versions for: - - 1. `lustre-csi-driver` +2. Create a branch to capture the submodule changes for the PR to `master` - 2. `lustre-fs-operator` - - 3. `nnf-mfu` + ```shell + git checkout -b update-submodules + ``` 3. Commit the changes and open a Pull Request against the `master` branch. -4. Once merged, follow steps 1-3 from the previous section to update the release branch with master. +4. Once merged, follow steps 1-3 from the previous section to create a release branch off of `releases/v0` and + update it with changes from `master`. -5. There will be conflicts on the submodules after step 3. This is expected. We will update the +5. There will be conflicts for the submodules after step 3. **This is expected.** Update the submodules to the new tags and then commit the changes. If each tag was committed properly, the following command can do this for you: @@ -162,20 +162,46 @@ makes sure that everything is now current on master. git submodule foreach 'git checkout `git describe --match="v*" HEAD`' ``` - Verify that each submodule is now at the proper tagged version. +6. Verify that each submodule is now at the proper tagged version. + + ```shell + git submodule + ``` + +7. Do a `git add` for each of the submodules. + +8. Update `config/repositories.yaml` with the referenced versions for: + + 1. `lustre-csi-driver` + 2. `lustre-fs-operator` + 3. `nnf-mfu` (Search for NNFMFU_VERSION) + +9. Tidy and make `nnf-deploy` to avoid embarrassment. ```shell - git submodule status + go mod tidy + make ``` -6. Do a `git add` for each of the submodules. +10. Do another `git add` for any changes, particularly `go.mod` and/or `go.sum`. + +11. Verify that `git status` is happy with `nnf-deploy` and then finalize the merge + from master by with a `git commit`. + +12. Follow steps 6-8 from the previous section to finalize the release of `nnf-deploy`. + +**The software is now released!** + +## Clone a release -7. Run `go mod tidy` and then `make`. Do another `git add` for any changes, particularly`go.mod` -and/or `go.sum`. +The follow commands clone release `v0.0.7` into `nnf-deploy-v0.0.7` -8. Verify that `git status` is happy with `nnf-deploy` and then finalize the merge from master by - doing a `git commit`. +```shell +export NNF_VERSION=v0.0.7 -9. Follow steps 6-8 from the previous section to finalize the release of `nnf-deploy`. +git clone --recurse-submodules git@github.com:NearNodeFlash/nnf-deploy nnf-deploy-$NNF_VERSION +cd nnf-deploy-$NNF_VERSION +git -c advice.detachedHead=false checkout $NNF_VERSION --recurse-submodules -The software is now released! +git submodule status +```