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

e2e tests fail on admission check #871

Open
a13x5 opened this issue Jan 7, 2025 · 0 comments
Open

e2e tests fail on admission check #871

a13x5 opened this issue Jan 7, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@a13x5
Copy link
Collaborator

a13x5 commented Jan 7, 2025

Issue

When running e2e tests there is an error, which prevents test to run

AWS Templates [It] should work with an AWS provider [provider:cloud, provider:aws]
/home/runner/work/kcm/kcm/test/e2e/provider_aws_test.go:75

  [FAILED] failed to create ClusterDeployment
  Unexpected error:
      <*errors.StatusError | 0xc0006dcc80>: 
      admission webhook "validation.clusterdeployment.hmc.mirantis.com" denied the request: the ClusterDeployment is invalid: the template is not valid: one or more required providers are not deployed yet: [bootstrap-k0smotron control-plane-k0smotron]
      {
          ErrStatus: {
              TypeMeta: {Kind: "Status", APIVersion: "v1"},
              ListMeta: {
                  SelfLink: "",
                  ResourceVersion: "",
                  Continue: "",
                  RemainingItemCount: nil,
              },
              Status: "Failure",
              Message: "admission webhook \"validation.clusterdeployment.hmc.mirantis.com\" denied the request: the ClusterDeployment is invalid: the template is not valid: one or more required providers are not deployed yet: [bootstrap-k0smotron control-plane-k0smotron]",
              Reason: "Forbidden",
              Details: nil,
              Code: 403,
          },
      }
  occurred
  In [It] at: /home/runner/work/kcm/kcm/test/e2e/provider_aws_test.go:85 @ 01/07/25 00:05:08.459

So it appears that we're trying to create ClusterDeployment before all other components are ready.

Possible solution

Before applying ClusterDeployment we should check that all other objects (like Management, ClusterTemplate, ProviderTemplates and provider themselves) are ready. Currently we're relying on providers' Deployment status to figure that out, which isn't reliable and can't be used to detect k0rdent readiness.

P.S.: Since it was fixed before ( in #622 )it looks like the regression could be related to #847, since it significantly delays the deployment time of all components. Which actually emphasizes on how unreliable current readiness detection mechanism is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In Progress
Development

No branches or pull requests

2 participants