github.com/pachyderm/pachyderm@v1.13.4/doc/major_minor_release_instructions.md (about) 1 # New major or minor releases 2 3 In the case of a new major or minor release (x.0.0 or 1.x.0), you will need 4 to make a couple of additional changes beyond those outlined in the 5 [release instructions.](./release_instructions.md). Make sure to follow these 6 steps after the normal release instructions. 7 8 ## Branch off 9 10 Create a new branch off master called `<major>.<minor>.x` and push it to 11 origin: 12 13 ```shell 14 git checkout master 15 git branch <major>.<minor>.x 16 git push origin -u <major>.<minor>.x 17 ``` 18 19 ## Update code on master 20 21 Now, on the master branch, you'll need to make some changes to prepare the 22 codebase for the _next_ major or minor release. To see what a complete diff 23 should look like with these changes, see 24 [this PR.](https://github.com/pachyderm/pachyderm/pull/5569) 25 26 ### Update the version 27 28 On master, update `src/client/version/client.go` again with the _next_ major 29 or minor release: 30 31 ```shell 32 make VERSION_ADDITIONAL= install 33 git add src/client/version/client.go 34 git commit -m"Increment version for $(pachctl version --client-only) release" 35 ``` 36 37 ### Regenerate the golden manifests 38 39 ```shell 40 make regenerate-test-deploy-manifests 41 ``` 42 43 ### Write up the extract/restore functionality 44 45 Every extract/restore is a bit different, so there's no one-size-fits-all 46 instructions here. But if you were, e.g. just released 1.12 and are updating 47 master to be 2.0, you'd do the following: 48 49 #### Update protos 50 51 Make a copy of the protos: 52 53 ```shell 54 mkdir -p src/client/admin/v1_12/pfs 55 cp src/client/pfs/pfs.proto src/client/admin/v1_12/pfs/pfs.proto 56 mkdir -p src/client/admin/v1_12/pps 57 cp src/client/pps/pps.proto src/client/admin/v1_12/pps/pps.proto 58 mkdir -p src/client/admin/v1_12/auth 59 cp src/client/auth/auth.proto src/client/admin/v1_12/auth/auth.proto 60 mkdir -p src/client/admin/v1_12/enterprise 61 cp src/client/enterprise/enterprise.proto src/client/admin/v1_12/enterprise/enterprise.proto 62 ``` 63 64 Then, in the copied over protos: 65 66 * Change the package names to be suffixed with the version, e.g. in 67 `pfs.proto` change `package pfs`; to `package pfs_1_12;`. Also update the 68 `go_package` field. 69 * Update the imports to reference the copied protos. e.g. in `pps.proto`, 70 change `import client/pfs/pfs.proto` to 71 `import client/admin/v1_12/pfs/pfs.proto`, and any uses of `pfs.` to 72 `pfs_1_12.`. 73 74 In `src/client/admin/admin.proto`: 75 76 * Import the copied PFS and PPS protos 77 * Rename `Op1_12` (which should already exist) to `Op2_0`. 78 * Add a new `Op1_12`, which is basically a copy of `Op2_0` referencing the 79 copied protos: 80 81 ```protobuf 82 message Op1_12 { 83 pfs_1_12.PutObjectRequest object = 2; 84 pfs_1_12.CreateObjectRequest create_object = 9; 85 pfs_1_12.TagObjectRequest tag = 3; 86 pfs_1_12.PutBlockRequest block = 10; 87 pfs_1_12.CreateRepoRequest repo = 4; 88 pfs_1_12.BuildCommitRequest commit = 5; 89 pfs_1_12.CreateBranchRequest branch = 6; 90 pps_1_12.CreatePipelineRequest pipeline = 7; 91 pps_1_12.CreateJobRequest job = 8; 92 auth_1_12.SetACLRequest set_acl = 11; 93 auth_1_12.ModifyClusterRoleBindingRequest set_cluster_role_binding = 12; 94 auth_1_12.SetConfigurationRequest set_auth_config = 13; 95 auth_1_12.ActivateRequest activate_auth = 14; 96 auth_1_12.RestoreAuthTokenRequest restore_auth_token = 15; 97 enterprise_1_12.ActivateRequest activate_enterprise = 16; 98 CheckAuthToken check_auth_token = 17; 99 } 100 ``` 101 102 * Add `Op2_0 op2_0 = 7` in `message Op { ... }`. Assign the next sequential number to op2_0. 103 104 Finally, run `make proto` to rebuild the protos. 105 106 #### Wire in the proto changes 107 108 Copy over the converters: 109 110 ```shell 111 cp src/server/admin/server/convert1_11.go src/server/admin/server/convert1_12.go 112 ``` 113 114 Then update `convert1_11.go`: 115 116 * Update imports for pfs, pps, auth, enterprise to point to 1.12 version. Eg. `import client/pfs` to `import client/admin/v1_12/pfs` 117 * Replace all instances of `pfs.` with `pfs1_12.` 118 * Replace all instances of `pps.` with `pps1_12.` 119 * Replace all instances of `auth.` with `auth1_12.` 120 * Replace all instances of `enterprise.` with `enterprise1_12.` 121 122 Then update `convert1_12.go`: 123 124 * Replace all instances of `1_12` with `2_0` 125 * Replace all instances of `1_11` with `1_12` 126 * Make any appropriate changes necessary for the conversion process (sometimes 127 just the above replacements are sufficient) 128 129 Update the admin client (`src/client/admin.go`) and admin server 130 (`src/server/admin/server/api_server.go`). Mostly this just involves looking 131 for instances of `1_11` or `1_12` in those files and updating the code and 132 add `applyOp2_0` function which should be a copy of `applyOp1_12` 133 134 Update `convert1_7.go`, around line 309, to include `convert1_12Objects`. 135 136 Finally `make install docker-build` to ensure everything compiles, then commit 137 the updates and push.