-
Notifications
You must be signed in to change notification settings - Fork 338
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
fix: Some CRDs missing status sub-resource #1809
fix: Some CRDs missing status sub-resource #1809
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1809 +/- ##
=======================================
Coverage 37.12% 37.12%
=======================================
Files 93 93
Lines 7886 7886
=======================================
Hits 2928 2928
Misses 4568 4568
Partials 390 390 ☔ View full report in Codecov by Sentry. |
ginkgo.It("check ApisixClusterConfig status is recorded", func() { | ||
// create ApisixClusterConfig resource | ||
clusterConfigName := "cluster-config-name" | ||
assert.Nil(ginkgo.GinkgoT(), s.NewApisixClusterConfig(clusterConfigName, true, true), "create cluster config error") |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did u mean I lose e2e-test for this api(beta3)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing out!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it is for apiV2. You are correct. I think you can undo it.
clusterConfigName := "cluster-config-name"
|
||
// status should be recorded as successfulen | ||
output, err := s.GetOutputFromString("acc", clusterConfigName, "-o", "yaml") | ||
assert.Nil(ginkgo.GinkgoT(), err, "Get output of ApisixPluginConfig resource") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert.Nil(ginkgo.GinkgoT(), err, "Get output of ApisixPluginConfig resource") | |
assert.Nil(ginkgo.GinkgoT(), err, "Get output of ApisixClusterConfig resource") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tks, I will fix it!
@@ -275,6 +275,20 @@ wrw7im4TNSAdwVX4Y1F4svJ2as5SJn5QYGAzXDixNuwzXYrpP9rzA2s= | |||
assert.Contains(ginkgo.GinkgoT(), output, `status: "False"`, "status.conditions.status is recorded") | |||
}) | |||
|
|||
ginkgo.It("check ApisixClusterConfig status is recorded", func() { | |||
// create ApisixClusterConfig resource | |||
clusterConfigName := "apisix-cluster-config" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, since you pass in "default" name to config, you can rmv this clusterConfigName := "apisix-cluster-config"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May I know the reason why I should remove this? I didn't pass in any other value for the config name besides 'apisix-cluster-config'. Is there anything else that I'm missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I apologize for overlooking the fact that the sample on the official website specifies the use of the default
value as the default value for metadata.name
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues @Chever-John. It's alright. I am also learning with you. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your previous guidance, it helped me a lot. I was stuck creating a test environment before, but now I can work on this issue more efficiently:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad that you have achieved more than half way through this PR. 💪🏻 I can see CRD missing status sub-resource for ApisixClusterConfig is working but ApisixConsumer has some warnings now.
Please make CI happy first, thanks |
@AlinsRan need re-run the ci |
e2e-test ci should must be corrected in v2 when test suit-cluster.
@@ -234,8 +234,19 @@ wrw7im4TNSAdwVX4Y1F4svJ2as5SJn5QYGAzXDixNuwzXYrpP9rzA2s= | |||
}) | |||
|
|||
//TODO: ApisixGlobal | |||
//TODO: ApisixConsumer CRD missing status definition | |||
//TODO: ApisixClusterConfig CRD missing status definition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also need to add a test case for the status of ApisixClusterConfig.
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 30 days if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions. |
could you please merge the latest code from master branch? |
Sure. Pleased to do that~ Let me continue the previous work. |
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 30 days if no further activity occurs. If you think that's incorrect or this pull request should instead be reviewed, please simply write any comment. Even if closed, you can still revive the PR at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions. |
@Chever-John There are merge conflicts. Are you still working on this? |
Signed-off-by: Ashish Tiwari <ashishjaitiwari15112000@gmail.com>
Type of change:
What this PR does / why we need it:
There are currently several resources in our custom resources that lack an observation configuration for the status sub-resource. And an e2e test file for this function. This PR aims to address these issues and completes the designs and corresponding e2e test files.
Closely linked to issue #1784.
Pre-submission checklist: