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

[WIP] e2e: wait for cluster to be ready #1546

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

karlkfi
Copy link
Contributor

@karlkfi karlkfi commented Feb 10, 2025

No description provided.

Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from karlkfi. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@karlkfi karlkfi requested review from sdowell and removed request for tiffanny29631 and Camila-B February 11, 2025 00:38
@@ -139,6 +144,9 @@ func upsertCluster(t testing.NTB, cluster Cluster, opts *ntopts.New) (bool, erro
if err := cluster.Create(); err != nil {
return true, err
}
if err := cluster.WaitForReady(); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there evidence that suggests this is needed? We currently wait for all operations on the cluster to complete during the Create call above

Copy link
Contributor

Choose a reason for hiding this comment

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

Just ran the tests locally on GKE and ran into the same issue where this doesn't wait for the cluster to be ready. This wasn't an issue before, perhaps there was a change to the GKE operations during cluster creation.

@@ -260,6 +265,33 @@ func createGKECluster(t testing.NTB, name string) error {
return listAndWaitForOperations(context.Background(), t, name)
Copy link
Contributor

Choose a reason for hiding this comment

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

The listAndWaitForOperations call at the end of createGKECluster and getGKECredentials is currently intended to serve as a readiness check. I'd suggest either:

  1. Instead of surfacing a new WaitForReady interface method, replace the listAndWaitForOperations calls with waitForReadyGKECluster, assuming listAndWaitForOperations is insufficient to determine readiness.
  2. Keep the new WaitForReady interface method but remove the existing readiness checks built in to createGKECluster/getGKECredentials

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants