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

CFE-684: Add user defined tags to the created gcp resource #54

Merged
merged 2 commits into from Mar 28, 2024

Conversation

bharath-b-rh
Copy link
Contributor

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.

@bharath-b-rh
Copy link
Contributor Author

/hold openshift/enhancements#1217

@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jun 27, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 27, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@bharath-b-rh bharath-b-rh force-pushed the cfe-684 branch 2 times, most recently from 082acf6 to fd54b9b Compare July 25, 2023 08:03
@bharath-b-rh bharath-b-rh changed the title CFE-684 : Add user defined tags to the created gcp resource CFE-684: Add user defined tags to the created gcp resource Aug 9, 2023
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Aug 9, 2023

@bharath-b-rh: This pull request references CFE-684 which is a valid jira issue.

In response to this:

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.

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.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 9, 2023
@openshift-merge-robot openshift-merge-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Aug 9, 2023
@openshift-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 9, 2023
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 9, 2023
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 24, 2023
@bharath-b-rh
Copy link
Contributor Author

/hold openshift/api#1506

@bharath-b-rh bharath-b-rh marked this pull request as ready for review November 27, 2023 15:01
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 27, 2023
@bharath-b-rh
Copy link
Contributor Author

/remove-label lifecycle/stale

Copy link
Contributor

openshift-ci bot commented Nov 27, 2023

@bharath-b-rh: The label(s) /remove-label lifecycle/stale cannot be applied. These labels are supported: acknowledge-critical-fixes-only, platform/aws, platform/azure, platform/baremetal, platform/google, platform/libvirt, platform/openstack, ga, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, px-approved, docs-approved, qe-approved, downstream-change-needed, rebase/manual, approved, backport-risk-assessed, bugzilla/valid-bug, cherry-pick-approved, jira/valid-bug, staff-eng-approved. Is this label configured under labels -> additional_labels or labels -> restricted_labels in plugin.yaml?

In response to this:

/remove-label lifecycle/stale

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.

@bharath-b-rh
Copy link
Contributor Author

/remove-lifecycle stale

@openshift-ci openshift-ci bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 27, 2023
@openshift-ci openshift-ci bot requested review from elmiko and nrb November 27, 2023 15:11
@bharath-b-rh
Copy link
Contributor Author

/cc @JoelSpeed

@bharath-b-rh
Copy link
Contributor Author

/retest

Copy link

@theobarberbany theobarberbany left a 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 :)

cmd/manager/main.go Outdated Show resolved Hide resolved
pkg/cloud/gcp/actuators/machine/machine_scope.go Outdated Show resolved Hide resolved
pkg/cloud/gcp/actuators/machine/reconciler_test.go Outdated Show resolved Hide resolved
pkg/cloud/gcp/actuators/machine/reconciler_test.go Outdated Show resolved Hide resolved
pkg/cloud/gcp/actuators/machine/reconciler.go Outdated Show resolved Hide resolved
pkg/cloud/gcp/actuators/util/gcp_tags_labels_test.go Outdated Show resolved Hide resolved
pkg/cloud/gcp/actuators/util/gcp_tags_labels_test.go Outdated Show resolved Hide resolved
pkg/cloud/gcp/actuators/util/gcp_tags_labels_test.go Outdated Show resolved Hide resolved
pkg/cloud/gcp/actuators/util/gcp_tags_labels_test.go Outdated Show resolved Hide resolved
pkg/cloud/gcp/actuators/util/gcp_tags_labels_test.go Outdated Show resolved Hide resolved
pkg/cloud/gcp/actuators/util/gcp_tags_labels_test.go Outdated Show resolved Hide resolved
pkg/cloud/gcp/actuators/util/gcp_tags_labels.go Outdated Show resolved Hide resolved
pkg/cloud/gcp/actuators/util/gcp_tags_labels.go Outdated Show resolved Hide resolved
pkg/cloud/gcp/actuators/util/gcp_tags_labels.go Outdated Show resolved Hide resolved
pkg/cloud/gcp/actuators/util/gcp_tags_labels.go Outdated Show resolved Hide resolved
pkg/cloud/gcp/actuators/util/gcp_tags_labels.go Outdated Show resolved Hide resolved
@bharath-b-rh
Copy link
Contributor Author

/remove-hold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 30, 2024
Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
Copy link
Contributor

openshift-ci bot commented Feb 16, 2024

@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.

@theobarberbany
Copy link

theobarberbany commented Mar 14, 2024

/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!

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 14, 2024
Copy link
Contributor

@elmiko elmiko left a 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})
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

@elmiko elmiko left a comment

Choose a reason for hiding this comment

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

/approve

Copy link
Contributor

openshift-ci bot commented Mar 28, 2024

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 28, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit fc80687 into openshift:main Mar 28, 2024
9 checks passed
@openshift-bot
Copy link
Contributor

[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.
All builds following this will include this PR.

@bharath-b-rh bharath-b-rh deleted the cfe-684 branch April 1, 2024 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants