Skip to content

Commit

Permalink
doc: make it clear real GCP record is required for PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwenma committed Sep 16, 2024
1 parent 7d20d25 commit d07dd38
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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_<resource>.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_<resource>.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_<resource>.golden.yaml `telling the corresponding git diff.

### PR Reviews

* We require the PR to contain the real GCP record for `_generated_object_<resource>.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_<resource>.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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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_<resource>.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_<resource>.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.
Expand Down
10 changes: 10 additions & 0 deletions docs/develop-resources/scenarios/new-field.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_<resource>.golden.yaml` and `_http.log`
* We require the PR reflects the new field in the `create.yaml`, `update.yaml`(if mutable), `_generated_object_<resource>.golden.yaml` and `_http.log`
1 change: 1 addition & 0 deletions docs/develop-resources/scenarios/new-resource.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_<resource>.golden.yaml` shall verify the basic controller is functioning.
* We require the PR to contain the real GCP record for `_generated_object_<resource>.golden.yaml` and `_http.log`

## Add MockGCP

Expand Down

0 comments on commit d07dd38

Please sign in to comment.