Skip to content

fix TestValidatingAdmissionPolicyCrossWorkspaceAPIBinding flaky test #3753

@olamilekan000

Description

@olamilekan000

The TestValidatingAdmissionPolicyCrossWorkspaceAPIBinding test sometimes throws an error about "default" workspace not existing.

=== Failed
=== FAIL: test/e2e/conformance TestValidatingAdmissionPolicyCrossWorkspaceAPIBinding (63.70s)
    validatingadmissionpolicy_test.go:192: Shared kcp server will target configuration "/home/prow/go/src/github.com/kcp-dev/kcp/.kcp/admin.kubeconfig"
    validatingadmissionpolicy_test.go:192: Waiting for readiness for server at https://127.0.0.1:6444/
    validatingadmissionpolicy_test.go:207: Created root:organization workspace root:e2e-workspace-f9ptd as /clusters/2x2j0qne703tbzlb on shard "shard-1"
    validatingadmissionpolicy_test.go:208: Created root:universal workspace root:e2e-workspace-f9ptd:e2e-workspace-2pfwk as /clusters/30avdkeidcvqj5jd on shard "shard-1"
    validatingadmissionpolicy_test.go:209: Created root:universal workspace root:e2e-workspace-f9ptd:e2e-workspace-vj9g7 as /clusters/12wv83trvc3wt3dq on shard "root"
    validatingadmissionpolicy_test.go:220: Install a cowboys APIResourceSchema into workspace "root:e2e-workspace-f9ptd:e2e-workspace-2pfwk"
    validatingadmissionpolicy_test.go:273: Create an APIExport for it
    validatingadmissionpolicy_test.go:294: Create an APIBinding in workspace "root:e2e-workspace-f9ptd:e2e-workspace-vj9g7" that points to the cowboybebop export
    validatingadmissionpolicy_test.go:314: Ensure cowboys are served in target workspace
    validatingadmissionpolicy_test.go:320: Installing validating admission policy into the source workspace
    validatingadmissionpolicy_test.go:371: Verifying that creating bad cowboy resource in target workspace succeeds before binding. Although, the policy is inactive without binding)
    validatingadmissionpolicy_test.go:375: Installing validating admission policy binding into the source workspace
    validatingadmissionpolicy_test.go:389: Verifying that creating bad cowboy resource in target workspace is rejected by policy in source workspace
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
I1210 15:44:06.372921   58819 bootstrap.go:188] "CRD is not established: InitialNamesAccepted: the initial names have been accepted" crd="cowboys.wildwest.dev" customresourcedefinition.workspace="1diehldct2jvdqbq" customresourcedefinition.namespace="" customresourcedefinition.name="cowboys.wildwest.dev" customresourcedefinition.apiVersion=""
I1210 15:44:06.372998   58819 bootstrap.go:196] "CRD is established" crd="cowboys.wildwest.dev" customresourcedefinition.workspace="1diehldct2jvdqbq" customresourcedefinition.namespace="" customresourcedefinition.name="cowboys.wildwest.dev" customresourcedefinition.apiVersion=""
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
I1210 15:44:06.542743   58819 bootstrap.go:188] "CRD is not established: Installing: the initial names have been accepted" crd="cowboys.wildwest.dev" customresourcedefinition.workspace="335icgjsd5z5uiqo" customresourcedefinition.namespace="" customresourcedefinition.name="cowboys.wildwest.dev" customresourcedefinition.apiVersion=""
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
I1210 15:44:11.539813   58819 bootstrap.go:188] "CRD is not established: InitialNamesAccepted: the initial names have been accepted" crd="cowboys.wildwest.dev" customresourcedefinition.workspace="335icgjsd5z5uiqo" customresourcedefinition.namespace="" customresourcedefinition.name="cowboys.wildwest.dev" customresourcedefinition.apiVersion=""
I1210 15:44:11.539888   58819 bootstrap.go:196] "CRD is established" crd="cowboys.wildwest.dev" customresourcedefinition.workspace="335icgjsd5z5uiqo" customresourcedefinition.namespace="" customresourcedefinition.name="cowboys.wildwest.dev" customresourcedefinition.apiVersion=""
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found
    validatingadmissionpolicy_test.go:399: Unexpected error when trying to create bad cowboy: namespace "default" not found

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions