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

🌱Added WatchDeploymentLogsByLabelSelector function #7039

Merged

Conversation

adilGhaffarDev
Copy link
Contributor

@adilGhaffarDev adilGhaffarDev commented Aug 9, 2022

What this PR does / why we need it:
Adds WatchDeploymentLogsByLabelSelector function. Now we can call a function in e2e tests to stream logs of deployments, selected by a label selector, for not requiring to know the exact name of the deployment in the test implementation.

Which issue(s) this PR fixes(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged)*:
Fixes #6965

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Aug 9, 2022
@k8s-ci-robot
Copy link
Contributor

@adilGhaffarDev: This issue is currently awaiting triage.

If CAPI contributors determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 9, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @adilGhaffarDev. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 9, 2022
Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

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

Looks like a very good idea!

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 9, 2022
@adilGhaffarDev adilGhaffarDev force-pushed the refactor-watch-deployment-logs/adil branch 3 times, most recently from 8710040 to 34e2b00 Compare August 9, 2022 11:21
@adilGhaffarDev
Copy link
Contributor Author

/retest

@adilGhaffarDev adilGhaffarDev force-pushed the refactor-watch-deployment-logs/adil branch from 34e2b00 to 9c9f05a Compare August 9, 2022 11:31
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 9, 2022
@adilGhaffarDev adilGhaffarDev force-pushed the refactor-watch-deployment-logs/adil branch from 9c9f05a to e6abdc7 Compare August 9, 2022 11:35
@adilGhaffarDev adilGhaffarDev force-pushed the refactor-watch-deployment-logs/adil branch 4 times, most recently from 8b86052 to e350817 Compare August 10, 2022 15:01
Copy link
Member

@chrischdi chrischdi left a comment

Choose a reason for hiding this comment

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

Some further improvement recommendations:-)

test/framework/deployment_helpers.go Outdated Show resolved Hide resolved
test/framework/deployment_helpers.go Outdated Show resolved Hide resolved
test/framework/deployment_helpers.go Outdated Show resolved Hide resolved
test/framework/deployment_helpers.go Outdated Show resolved Hide resolved
test/framework/deployment_helpers.go Outdated Show resolved Hide resolved
@adilGhaffarDev adilGhaffarDev force-pushed the refactor-watch-deployment-logs/adil branch from e350817 to 25db926 Compare August 12, 2022 12:40
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 12, 2022
@fabriziopandini
Copy link
Member

Change lgtm to me.
Please resolve pending comment above and also add a note about this change in https://main.cluster-api.sigs.k8s.io/developer/providers/v1.3-to-v1.4.html#api-changes (we are renaming a public func that providers might be using in their test)

test/framework/deployment_helpers.go Outdated Show resolved Hide resolved
test/framework/deployment_helpers.go Show resolved Hide resolved
test/framework/deployment_helpers.go Outdated Show resolved Hide resolved
test/framework/deployment_helpers.go Outdated Show resolved Hide resolved
test/framework/deployment_helpers.go Outdated Show resolved Hide resolved
test/framework/deployment_helpers.go Outdated Show resolved Hide resolved
test/framework/deployment_helpers.go Outdated Show resolved Hide resolved
test/framework/deployment_helpers.go Outdated Show resolved Hide resolved
test/framework/deployment_helpers.go Outdated Show resolved Hide resolved
test/framework/deployment_helpers.go Outdated Show resolved Hide resolved
@adilGhaffarDev adilGhaffarDev force-pushed the refactor-watch-deployment-logs/adil branch from ab6b959 to da4158c Compare January 5, 2023 13:17
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 5, 2023
@adilGhaffarDev adilGhaffarDev force-pushed the refactor-watch-deployment-logs/adil branch from da4158c to 8e9df77 Compare January 5, 2023 13:18
@adilGhaffarDev
Copy link
Contributor Author

Please resolve pending comment above and also add a note about this change in https://main.cluster-api.sigs.k8s.io/developer/providers/v1.3-to-v1.4.html#api-changes (we are renaming a public func that providers might be using in their test)

Should I create a separate PR for notes or just add it to this PR.

@adilGhaffarDev adilGhaffarDev requested review from sbueringer and removed request for chrischdi January 5, 2023 14:21
@sbueringer
Copy link
Member

@adilGhaffarDev Please add them to this PR

@adilGhaffarDev adilGhaffarDev force-pushed the refactor-watch-deployment-logs/adil branch from 8e9df77 to 881d2df Compare January 9, 2023 03:54
@adilGhaffarDev
Copy link
Contributor Author

/test pull-cluster-api-test-main

@adilGhaffarDev adilGhaffarDev force-pushed the refactor-watch-deployment-logs/adil branch from 881d2df to 89b15dd Compare January 9, 2023 22:32
test/framework/deployment_helpers.go Outdated Show resolved Hide resolved
test/framework/deployment_helpers.go Outdated Show resolved Hide resolved
@sbueringer
Copy link
Member

Found two other ones. Apart from that it should be really fine now (I also verified the resulting log folder structure and it looks good)

@adilGhaffarDev adilGhaffarDev force-pushed the refactor-watch-deployment-logs/adil branch from 89b15dd to 3c636ea Compare January 10, 2023 09:40
@sbueringer
Copy link
Member

/retest

@sbueringer
Copy link
Member

Thank you very much!

/lgtm

I'll merge through after the tests.

Not sure why they weren't triggered. Some GitHub or Prow issue I assume.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 10, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 2388aa10023fffcacbb32d77a2ee85ecbf6c8859

@sbueringer
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbueringer

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 10, 2023
@k8s-ci-robot k8s-ci-robot merged commit 281297c into kubernetes-sigs:main Jan 10, 2023
@k8s-ci-robot k8s-ci-robot added this to the v1.4 milestone Jan 10, 2023
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor WatchDeploymentLogs to use label selectors instead of selecting deployments by name.
6 participants