From d07dd3814b35dec8eccf3d0954e8a3cab64eda0b Mon Sep 17 00:00:00 2001 From: Yuwen Ma Date: Mon, 16 Sep 2024 14:37:14 +0000 Subject: [PATCH] doc: make it clear real GCP record is required for PR review --- .../scenarios/migrate-tf-resource-alpha.md | 3 ++- .../scenarios/migrate-tf-resource-beta.md | 1 + docs/develop-resources/scenarios/new-field.md | 10 ++++++++++ docs/develop-resources/scenarios/new-resource.md | 1 + 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/develop-resources/scenarios/migrate-tf-resource-alpha.md b/docs/develop-resources/scenarios/migrate-tf-resource-alpha.md index 61aa99a547..ae37ae454b 100644 --- a/docs/develop-resources/scenarios/migrate-tf-resource-alpha.md +++ b/docs/develop-resources/scenarios/migrate-tf-resource-alpha.md @@ -4,12 +4,13 @@ Follow [Step 1](https://github.com/yuwenma/k8s-config-connector/blob/scifi-guide/docs/develop-resources/guides/1-add-mockgcp-tests.md) -1. The 1st PR should set the `create.yaml `and `update.yaml `fields the same value for both test suites, with `_http.log `telling the matching HTTP request/response, and `_generated_object_.golden.yaml` telling the output-only fields. +1. The 1st PR should set the `create.yaml `and `update.yaml `fields the same value for both test suites, with `_http.log `telling the matching HTTP request/response, and `_generated_object_.golden.yaml` telling the output-only fields. It shall record against real GCP 2. The 2nd PR should have `update.yaml `fields update all mutable fields for both basic and full test suites, with `_http.log` and` _generated_object_.golden.yaml `telling the corresponding git diff. ### PR Reviews +* We require the PR to contain the real GCP record for `_generated_object_.golden.yaml` and `_http.log` * We require the 2nd PR git diff can show the mutable fileds in `update.yaml`. * We require the `_generated_object_.golden.yaml` reflecting the mutable fields are successfully updated. * We require the `dependencies.yaml` to cover all referenced fields, and the `_http.log` showing the Cloud requests. You need to implement those dependencies' MockGCP methods as well. diff --git a/docs/develop-resources/scenarios/migrate-tf-resource-beta.md b/docs/develop-resources/scenarios/migrate-tf-resource-beta.md index a68e0707b6..f269d8698b 100644 --- a/docs/develop-resources/scenarios/migrate-tf-resource-beta.md +++ b/docs/develop-resources/scenarios/migrate-tf-resource-beta.md @@ -10,6 +10,7 @@ Follow [Step 1](https://github.com/yuwenma/k8s-config-connector/blob/scifi-guide ### PR Reviews +* We require the PR to contain the real GCP record for `_generated_object_.golden.yaml` and `_http.log` * We require the 2nd PR git diff can show the mutable fileds in `update.yaml`. * We require the `_generated_object_.golden.yaml` reflecting the mutable fields are successfully updated. * We require the `dependencies.yaml` to cover all referenced fields, and the `_http.log` showing the Cloud requests. You need to implement those dependencies' MockGCP methods as well. diff --git a/docs/develop-resources/scenarios/new-field.md b/docs/develop-resources/scenarios/new-field.md index 674d4e0cee..ce2086e30a 100644 --- a/docs/develop-resources/scenarios/new-field.md +++ b/docs/develop-resources/scenarios/new-field.md @@ -39,3 +39,13 @@ The apis directory the contains the existing API types of the resource. If the newly added fields contain resource references, you should have a second PR to update the resource reference, following [4.2 resolve resource references](https://github.com/yuwenma/k8s-config-connector/blob/scifi-guide/docs/develop-resources/guides/4-add-controller.md#42-resolve-resource-references) (TODO: update the link) Add a new test suite with `dependencies.yaml` to cover the referenced fields. + + +## Add MockGCP coverage + +Follow [Step 1](https://github.com/yuwenma/k8s-config-connector/blob/scifi-guide/docs/develop-resources/guides/1-add-mockgcp-tests.md) + +### PR Reviews + +* We require the PR to contain the real GCP record for `_generated_object_.golden.yaml` and `_http.log` +* We require the PR reflects the new field in the `create.yaml`, `update.yaml`(if mutable), `_generated_object_.golden.yaml` and `_http.log` diff --git a/docs/develop-resources/scenarios/new-resource.md b/docs/develop-resources/scenarios/new-resource.md index 088726b540..67839875cf 100644 --- a/docs/develop-resources/scenarios/new-resource.md +++ b/docs/develop-resources/scenarios/new-resource.md @@ -21,6 +21,7 @@ Different than other scenarios, developing a pure Direct resource requires you t * Code shall come from the auto-generate code. * Only the basic test suite is required, full and other test suites can comment out unimplemented fields. * `_http.log` and `_generated_object_.golden.yaml` shall verify the basic controller is functioning. +* We require the PR to contain the real GCP record for `_generated_object_.golden.yaml` and `_http.log` ## Add MockGCP