kcp
kcp copied to clipboard
bug: "resource" vs. "object" confusion in apis/apis
Describe the bug
The general rule in Kubernetes code is that the word "resource" means a kind or type of API object rather than an individual one, while the word "object" is used when an individual API object is meant. I know this is surprising to outsiders, since HTTP defines a "resource" to be anything with a URL or URI. But it is a convention that is fairly strongly followed in the Kubernetes code base (sadly, less so in the user-facing documentation), and it would help to continue following it here.
Following are some places that currently use the word "resource" where individual API objects are meant.
- https://github.com/kcp-dev/kcp/blob/5897550e91823a959ed89997e7c13c24ed718265/pkg/apis/apis/v1alpha1/types_apiexport.go#L205 --- this sentence uses the word "resource" twice, making it really difficult to understand until you twig to the fact that the same word is being used for two different things.
- https://github.com/kcp-dev/kcp/blob/5897550e91823a959ed89997e7c13c24ed718265/pkg/apis/apis/v1alpha1/types_apiexport.go#L213 and all references to this field.
- https://github.com/kcp-dev/kcp/blob/5897550e91823a959ed89997e7c13c24ed718265/pkg/apis/apis/v1alpha1/types_apiexport.go#L224 and all references to this type.
Steps To Reproduce
Read the docs
Expected Behaviour
Terminology consistent with the predominant usage in Kubernetes code.
Additional Context
No response
Issues go stale after 90d of inactivity.
After a furter 30 days, they will turn rotten.
Mark the issue as fresh with /remove-lifecycle stale
.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen
.
Mark the issue as fresh with /remove-lifecycle rotten
.
/close
@kcp-ci-bot: Closing this issue.
In response to this:
Rotten issues close after 30d of inactivity. Reopen the issue with
/reopen
. Mark the issue as fresh with/remove-lifecycle rotten
./close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.