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
CFE-684: Add user defined tags to the created gcp resource #54
Conversation
Skipping CI for Draft Pull Request. |
082acf6
to
fd54b9b
Compare
@bharath-b-rh: This pull request references CFE-684 which is a valid jira issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
470f119
to
bd17b92
Compare
bd17b92
to
9f7fd2a
Compare
/hold openshift/api#1506 |
/remove-label lifecycle/stale |
@bharath-b-rh: The label(s) In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/remove-lifecycle stale |
/cc @JoelSpeed |
9f7fd2a
to
abcee33
Compare
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good after a first pass! I have a few questions / nits :)
6ce7fe4
to
e36eb83
Compare
df8eab3
to
18602b1
Compare
/remove-hold |
d7f6515
to
34c53ff
Compare
34c53ff
to
46a0e1a
Compare
Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
@bharath-b-rh: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/lgtm My only nit would be potentially generating some of the test cases (e.g a for loop rather than tens of tags being defined as literals) Nice job! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this mostly makes sense to me, just had a question about the unit tests
@@ -215,6 +217,8 @@ func TestNewMachineScope(t *testing.T) { | |||
for _, tc := range cases { | |||
t.Run(tc.name, func(t *testing.T) { | |||
gs := NewWithT(t) | |||
tc.params.tagsClientBuilder = tagservice.NewMockTagServiceBuilder | |||
tc.params.featureGates = featuregates.NewFeatureGate(nil, []configv1.FeatureGateName{configv1.FeatureGateGCPLabelsTags}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would have expected us to add new test cases to exercise the tab builder service when the feature gate is on or off (to make sure the negative assertion works), is this already captured in the tests?
i'm curious why we are always setting the feature gate, eg shouldn't we have a test for creation with the feature gate enabled and one with it disabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, both scenarios are covered but not in same modules. Test cases added in actuator and machine_scope modules have the featuregate disabled and cases in reconciler have it enabled. And test cases added for gcp_tags modules is for enabled scenario.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: elmiko The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[ART PR BUILD NOTIFIER] This PR has been included in build ose-machine-api-provider-gcp-container-v4.16.0-202403281943.p0.gfc80687.assembly.stream.el9 for distgit ose-machine-api-provider-gcp. |
PR has the changes for enhancement proposed to support GCP tags in OCP, which requires machine-api-provider-gcp to add gcp userTags available in the status sub resource of infrastructure CR, to all the gcp resources created by the operator.