Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add note for project dependency gotcha in mockgcp docs #3313

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jasonvigil
Copy link
Collaborator

No description provided.

Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from yuwenma. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jingyih
Copy link
Collaborator

jingyih commented Dec 4, 2024

Ah, this is why your project keeps getting deleted? 😄

/lgtm

@@ -29,6 +29,12 @@ Create a directory for your resource [pkg/test/resourcefixture/testdata/basic](p
Just to add the `create.yaml`, `update.yaml` and `dependencies.yaml` (if applicable) to each bottommost directory.
These three files are all Kubernetes config files, except that `create.yaml` and `update.yaml` only holds the your Config Connector CR object, and the `dependencies.yaml` holds all the dependent objects.

Note: Do not add your GCP Project as a dependency in `dependencies.yaml` (even with the `cnrm.cloud.google.com/deletion-policy: abandon` annotation). Adding your project as a dependency will cause Config Connector to add the label `cnrm-test: true` to your project during test runs, which likely not desirable. Instead, you can refer to your development project in the `create.yaml` and `update.yaml` resources via an external project reference, with the `${projectId}` template variable. For example:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest adding the condition that 1. for hack/record-gcp but not hack/compare-mock. 2. "your GCP project" refers to the default project in gcloud config get project 3. explain a little bit more on what happened to "cnrm-test: true" label.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed :)

Copy link
Collaborator

@yuwenma yuwenma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding this note! It is very helpful.

@jasonvigil jasonvigil force-pushed the document-project-dependency-gotcha branch from 84c98ad to a412213 Compare December 12, 2024 20:57
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@google-oss-prow google-oss-prow bot removed the lgtm label Dec 12, 2024
@jasonvigil jasonvigil requested a review from yuwenma December 12, 2024 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants