From 28b66d2400308270a6cfcbd857f3e4c05623c9c3 Mon Sep 17 00:00:00 2001 From: Juana De La Cuesta Date: Tue, 27 Jun 2023 10:52:38 +0200 Subject: [PATCH] Update checklist-rpc-endpoint.md (#17698) * Update checklist-rpc-endpoint.md * Update checklist-rpc-endpoint.md * Update contributing/checklist-rpc-endpoint.md Co-authored-by: Tim Gross --------- Co-authored-by: Tim Gross --- contributing/checklist-rpc-endpoint.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/contributing/checklist-rpc-endpoint.md b/contributing/checklist-rpc-endpoint.md index a961d8ca0..7f64c2b28 100644 --- a/contributing/checklist-rpc-endpoint.md +++ b/contributing/checklist-rpc-endpoint.md @@ -6,13 +6,16 @@ Prefer adding a new message to changing any existing RPC messages. * [ ] `Request` struct and `*RequestType` constant in `nomad/structs/structs.go`. Append the constant, old constant - values must remain unchanged + values must remain unchanged. Just add the request type to this file, all other resource definitions + must be on their own separate file. * [ ] In `nomad/fsm.go`, add a dispatch case to the switch statement in `(n *nomadFSM) Apply` * `*nomadFSM` method to decode the request and call the state method -* [ ] State method for modifying objects in a `Txn` in `nomad/state/state_store.go` - * `nomad/state/state_store_test.go` +* [ ] State method for modifying objects in a `Txn` in the `state` package, located in + `nomad/state/`. Every new resource should have its own file and test file, named using the convention + `nomad/state/state_store_[resource].go` and `nomad/state/state_store_[resource]_test.go` + * [ ] Handler for the request in `nomad/foo_endpoint.go` * RPCs are resolved by matching the method name for bound structs