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

Reference objects only by name+namespace #598

Merged
merged 1 commit into from
Dec 6, 2020

Conversation

nolar
Copy link
Owner

@nolar nolar commented Dec 6, 2020

Identifying the objects by partial identities or by its body is not used for long time. Let's get rid of this code, and always identify them explicitly by name & namespace, even if namespace is None (for cluster-scoped API calls).

For stricter typing, the body's name property is made more strict — it now raises if the critical field (.metadata.name) is absent while it is always expected on the objects for URLs. Objects with no name cannot be served.

Partially reverts #596 — the name cannot be absent, as it is used for URLs. No name — no URLs — the resource cannot be served.

@nolar nolar added the refactoring Code cleanup without new features added label Dec 6, 2020
@lgtm-com
Copy link

lgtm-com bot commented Dec 6, 2020

This pull request introduces 1 alert when merging 67cedbe into d5b9ac3 - view on LGTM.com

new alerts:

  • 1 for Unused import

@nolar nolar force-pushed the simplify-object-referencing branch from 67cedbe to f71af50 Compare December 6, 2020 22:03
Identifying the objects by partial identities or by its body is not used for long time. Let's get rid of this code, and always identify them explicitly by name & namespace, even if namespace is `None` (for cluster-scoped API calls).
@nolar nolar force-pushed the simplify-object-referencing branch from f71af50 to f01b4e3 Compare December 6, 2020 22:44
@nolar nolar changed the title Reference objects by mandatory name+namespace Reference objects only by name+namespace Dec 6, 2020
@nolar nolar merged commit 9fe89e9 into master Dec 6, 2020
@nolar nolar deleted the simplify-object-referencing branch December 6, 2020 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Code cleanup without new features added
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant