Skip to content

fix: fix the namespace empty with resource override list#1054

Merged
zhiying-lin merged 4 commits intoAzure:mainfrom
ryanzhang-oss:fix-override
Feb 26, 2025
Merged

fix: fix the namespace empty with resource override list#1054
zhiying-lin merged 4 commits intoAzure:mainfrom
ryanzhang-oss:fix-override

Conversation

@ryanzhang-oss
Copy link
Contributor

Description of your changes

  1. fix the namespace empty with resource override list.
  2. further unify the CRO/RO flow
  3. fix test issues

I have:

  • Run make reviewable to ensure this PR is ready for review.

How has this code been tested

Special notes for your reviewer

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
v1 "k8s.io/api/core/v1"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wonder why it's better to name it corev1?

Copy link
Contributor

Choose a reason for hiding this comment

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

v1 is quite common as the k8 api package.

Without looking at the actual import path, we don't know what's the package. corev1 is quite commonly used in our repo now.
So it's easier to figure out it stands for "k8s.io/api/core/v1"

Name: namespaceName,
},
}
Expect(k8sClient.Delete(ctx, namespace)).Should(SatisfyAny(Succeed(), &utils.NotFoundMatcher{}))
Copy link
Contributor

Choose a reason for hiding this comment

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

i find the utils.NotFoundMatcher can be replaced by "WithTransform(errors.IsNotFound, BeTrue())" when working on the atm features

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good to know but I think we can keep this matcher in this repo

"github.com/google/go-cmp/cmp"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
v1 "k8s.io/api/core/v1"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
v1 "k8s.io/api/core/v1"
corev1 "k8s.io/api/core/v1"

@zhiying-lin
Copy link
Contributor

need to add e2e tests for RO, with same name but different namespace name, (it can be in a separate PR)

@zhiying-lin zhiying-lin merged commit 3ae2d54 into Azure:main Feb 26, 2025
12 checks passed
@ryanzhang-oss ryanzhang-oss deleted the fix-override branch April 22, 2025 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants