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

Add a visibility API endpoint for fetching pending workloads in a Local Queue #1365

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

PBundyra
Copy link
Contributor

@PBundyra PBundyra commented Nov 24, 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:

I have manually tested RBAC.

Does this PR introduce a user-facing change?

Visibility API: Add an endpoint that allows a user to fetch information about pending workloads and their position in LocalQueue.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels Nov 24, 2023
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 24, 2023
Copy link

netlify bot commented Nov 24, 2023

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 4f36bd3
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/65670dfbccfeff00086f6268

@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 24, 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Nov 24, 2023
@PBundyra
Copy link
Contributor Author

/assign @mimowo

@mimowo
Copy link
Contributor

mimowo commented Nov 24, 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 24, 2023
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, couple nits, yet to review the e2e test

pkg/visibility/api/install.go Outdated Show resolved Hide resolved
pkg/visibility/api/rest/local_queue.go Outdated Show resolved Hide resolved
pkg/visibility/api/rest/pending_workloads_LQ.go Outdated Show resolved Hide resolved
@PBundyra
Copy link
Contributor Author

I've manually tested RBACs, and they seem to work well

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 27, 2023
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 27, 2023
@PBundyra
Copy link
Contributor Author

/assign @alculquicondor
/assign @tenzen-y

apis/visibility/v1alpha1/types.go Outdated Show resolved Hide resolved
config/components/rbac/kustomization.yaml Outdated Show resolved Hide resolved
pkg/queue/manager.go Outdated Show resolved Hide resolved
pkg/visibility/api/rest/pending_workloads_LQ.go Outdated Show resolved Hide resolved
@PBundyra
Copy link
Contributor Author

/assign @mwielgus

@mimowo
Copy link
Contributor

mimowo commented Nov 28, 2023

/lgtm
/assign @alculquicondor @tenzen-y

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

LGTM label has been added.

Git tree hash: 3516af411872fefe0ecba20653eb4f979f2664d0

@PBundyra
Copy link
Contributor Author

/retest

@tenzen-y
Copy link
Member

/release-note-edit

Extend visibility API by adding an endpoint that allows a user to fetch information about pending workloads and their position in LocalQueue.

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.

Generally, lgtm

pkg/visibility/api/rest/pending_workloads_lq_test.go Outdated Show resolved Hide resolved
test/e2e/e2e_test.go Outdated Show resolved Hide resolved
})
})

ginkgo.It("Should allow fetching information about position of pending workloads from different LocalQueues", func() {
Copy link
Member

@tenzen-y tenzen-y Nov 29, 2023

Choose a reason for hiding this comment

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

Can we move this and "Should allow fetching information about position of pending workloads from different LocalQueues from different Namespaces" to integration tests?

I'd like to make e2e lightweight as much as possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently, integration tests for the visibility server are under development. I definitely agree with the idea of keeping e2e as lightweight as possible, but I suggest keeping them as they are until we have integration tests ready.

Copy link
Contributor

@mimowo mimowo Nov 29, 2023

Choose a reason for hiding this comment

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

Yea, @PBundyra already had one attempt to add integration tests, but it proved to be challenging, because it requires setting up kubeconfig / certificates for communication between the main API server and the visibility extension. Also, there is no good example, because the metrics-server only uses e2e tests.

So, we went with e2e tests until the challenges with integration tests are figured out.

Also, we put an effort into running the tests as quickly as possible, in particular, we don't use the 5s sleep.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the clarification. Introducing integration tests seems to be hard work. So we can work on these follow-ups.

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

mimowo commented Nov 29, 2023

Still LGTM, please squash.

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.

@PBundyra Thanks for this great and valuable contribution :)
/lgtm
/approve

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

LGTM label has been added.

Git tree hash: 181eb85d3e351b4528b865f032bf231df15ef572

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: PBundyra, tenzen-y

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 29, 2023
@tenzen-y
Copy link
Member

Still LGTM, please squash.

I'm ok without squash. The prow automatically will squash commits.

@tenzen-y
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot merged commit 808319d into kubernetes-sigs:main Nov 29, 2023
14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v0.6 milestone Nov 29, 2023
@alculquicondor
Copy link
Contributor

/release-note-edit

Visibility API: Add an endpoint that allows a user to fetch information about pending workloads and their position in LocalQueue.

kannon92 pushed a commit to openshift-kannon92/kubernetes-sigs-kueue that referenced this pull request Nov 19, 2024
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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants