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

Extend visibility ClusterQueue PendingWorkloads endpoint #1362

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

PBundyra
Copy link
Contributor

@PBundyra PBundyra commented Nov 23, 2023

What type of PR is this?

/kind feature
/kind api-change

What this PR does / why we need it:

This PR continues the development of KEP#168-2

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Visibility API: extend the information returned for the pending workloads in a ClusterQueue, including the workload position in the queue.

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels Nov 23, 2023
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 23, 2023
Copy link

netlify bot commented Nov 23, 2023

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit bd42e42
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/6564800844996b0008213dec

@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 Nov 23, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @PBundyra. 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/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Nov 23, 2023
@PBundyra
Copy link
Contributor Author

/assign @mimowo
/assign @alculquicondor

@k8s-ci-robot
Copy link
Contributor

@PBundyra: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test

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
Copy link
Contributor

@PBundyra: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test all

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.

@mimowo
Copy link
Contributor

mimowo commented Nov 23, 2023

/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 Nov 23, 2023
pkg/visibility/api/rest/pending_workload_CQ_test.go Outdated Show resolved Hide resolved
test/e2e/e2e_test.go Outdated Show resolved Hide resolved
test/e2e/e2e_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@mimowo mimowo left a comment

Choose a reason for hiding this comment

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

Just some nits

pkg/visibility/api/rest/local_queue.go Outdated Show resolved Hide resolved
pkg/visibility/api/rest/pending_workload_CQ_test.go Outdated Show resolved Hide resolved
test/e2e/e2e_test.go Outdated Show resolved Hide resolved
test/e2e/e2e_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@mimowo mimowo left a comment

Choose a reason for hiding this comment

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

Generally LGTM, remaining question about the conversion. I think potential changing the types could be handled outside of the this PR.

@mimowo
Copy link
Contributor

mimowo commented Nov 23, 2023

Oh, I see why the e2e tests are failing, because the workload name is actually derived from the job name according to: https://github.com/kubernetes-sigs/kueue/blob/1ecd79f748af2617111d0bfa1ca848f9e172f4d7/pkg/controller/jobframework/workload_names.go#L44C8-L44C8. Can we call this function from within e2e tests? If not, maybe we need to fetch the workloads (per job), with GET, and assert on the names.

@PBundyra
Copy link
Contributor Author

Oh, I see why the e2e tests are failing, because the workload name is actually derived from the job name according to: https://github.com/kubernetes-sigs/kueue/blob/1ecd79f748af2617111d0bfa1ca848f9e172f4d7/pkg/controller/jobframework/workload_names.go#L44C8-L44C8. Can we call this function from within e2e tests? If not, maybe we need to fetch the workloads (per job), with GET, and assert on the names.

I didn't see this comment earlier, and I've suppressed checking the Name. Do you think it's necessary to check it, as we already do it in unit tests?

@mimowo
Copy link
Contributor

mimowo commented Nov 23, 2023

I didn't see this comment earlier, and I've suppressed checking the Name. Do you think it's necessary to check it, as we already do it in unit tests?

I think it is ok to skip the check, given that it is done in unit tests + the other properties of the workload identify it in the e2e tests.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 24, 2023
@mimowo
Copy link
Contributor

mimowo commented Nov 24, 2023

LGTM. please squash

@mimowo
Copy link
Contributor

mimowo commented Nov 24, 2023

/lgtm

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

LGTM label has been added.

Git tree hash: fbbca4a5043c9117f1845c88b3dff479ae423150

Copy link
Member

@tenzen-y tenzen-y left a comment

Choose a reason for hiding this comment

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

My first pass. I have yet to see the implementation.

apis/visibility/v1alpha1/types.go Outdated Show resolved Hide resolved
pkg/queue/manager.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 24, 2023
@mimowo
Copy link
Contributor

mimowo commented Nov 24, 2023

Still LGTM

apis/visibility/v1alpha1/types.go Show resolved Hide resolved
pkg/queue/manager.go Show resolved Hide resolved
apis/visibility/v1alpha1/types.go Outdated Show resolved Hide resolved
apis/visibility/v1alpha1/types.go Outdated Show resolved Hide resolved
@alculquicondor
Copy link
Contributor

/lgtm canel
/approve
Leaving LGTM to @mimowo once comments are addressed.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alculquicondor, PBundyra

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 Nov 24, 2023
@alculquicondor
Copy link
Contributor

/lgtm cancel

@mimowo
Copy link
Contributor

mimowo commented Nov 27, 2023

LGTM, please squash

…ts, add unit tests, change query parameters types: int -> int32
@mimowo
Copy link
Contributor

mimowo commented Nov 27, 2023

Leaving LGTM to @mimowo once comments are addressed.

I consider the comments addressed.
/lgtm

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

LGTM label has been added.

Git tree hash: 5b35eb1b0e54d7773ec8675a6d7b5eee39cb552a

@k8s-ci-robot k8s-ci-robot merged commit cb1c985 into kubernetes-sigs:main Nov 27, 2023
14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.6 milestone Nov 27, 2023
@PBundyra PBundyra deleted the extend-cq branch January 29, 2024 11:27
@alculquicondor
Copy link
Contributor

/release-note-edit

Visibility API: extend the information returned for the pending workloads in a ClusterQueue, including the workload position in the queue.

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. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/feature Categorizes issue or PR as related to a new feature. 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. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants