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

Reimplement wait-for-object-creation with kubectl wait #2487

Merged

Conversation

mflendrich
Copy link
Collaborator

@mflendrich mflendrich commented Feb 19, 2025

As of kubectl 1.31, there's a kubectl wait --for=create.

This should make the below excerpt of the E2E test logs less chatty and not unnecessarily highlighted as a test error.

 + wait-for-object-creation ci-clusters configmap/13ede74d-0b97-4590-b6d0-264cda6ca74d-openshift-install-config
+ for i in {1..30}
+ kubectl -n ci-clusters get configmap/13ede74d-0b97-4590-b6d0-264cda6ca74d-openshift-install-config
Error from server (NotFound): configmaps "13ede74d-0b97-4590-b6d0-264cda6ca74d-openshift-install-config" not found
+ sleep 1
+ for i in {1..30}
+ kubectl -n ci-clusters get configmap/13ede74d-0b97-4590-b6d0-264cda6ca74d-openshift-install-config
Error from server (NotFound): configmaps "13ede74d-0b97-4590-b6d0-264cda6ca74d-openshift-install-config" not found
+ sleep 1
+ for i in {1..30}
+ kubectl -n ci-clusters get configmap/13ede74d-0b97-4590-b6d0-264cda6ca74d-openshift-install-config
NAME                                                            DATA   AGE
13ede74d-0b97-4590-b6d0-264cda6ca74d-openshift-install-config   1      1s
+ break 

I picked the 60s timeout value because the existing implementation does 30 retries with sleep 1. The extra 30s is to approximate the total current kubectl get latency.

As of kubectl 1.31, there's a `kubectl wait --for=create`.
Copy link
Contributor

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

@scylla-operator-bot scylla-operator-bot 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/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 19, 2025
@mflendrich
Copy link
Collaborator Author

/test all

@mflendrich mflendrich changed the title [WIP] Reimplement wait-for-object-creation with kubectl wait Reimplement wait-for-object-creation with kubectl wait Feb 19, 2025
@mflendrich mflendrich marked this pull request as ready for review February 19, 2025 15:26
@scylla-operator-bot scylla-operator-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 19, 2025
@mflendrich
Copy link
Collaborator Author

/kind cleanup
/priority important-longerm
/cc zimnx grzywin

@scylla-operator-bot scylla-operator-bot bot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Feb 19, 2025
Copy link
Contributor

@mflendrich: The label(s) priority/important-longerm cannot be applied, because the repository doesn't have them.

In response to this:

/kind cleanup
/priority important-longerm
/cc zimnx grzywin

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-sigs/prow repository.

@scylla-operator-bot scylla-operator-bot bot removed the do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. label Feb 19, 2025
@mflendrich mflendrich added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label Feb 19, 2025
@scylla-operator-bot scylla-operator-bot bot removed the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Feb 19, 2025
@mflendrich mflendrich removed the request for review from rzetelskik February 19, 2025 15:28
Copy link
Collaborator

@zimnx zimnx left a comment

Choose a reason for hiding this comment

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

/lgtm

@scylla-operator-bot scylla-operator-bot bot added the lgtm Indicates that a PR is ready to be merged. label Feb 19, 2025
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mflendrich, zimnx

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

@scylla-operator-bot scylla-operator-bot bot merged commit a6e6bbf into scylladb:master Feb 19, 2025
14 checks passed
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. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants