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

Move static state to non-static #3875

Closed
shawkins opened this issue Feb 17, 2022 · 4 comments · Fixed by #3966
Closed

Move static state to non-static #3875

shawkins opened this issue Feb 17, 2022 · 4 comments · Fixed by #3966
Assignees
Milestone

Comments

@shawkins
Copy link
Contributor

Is your task related to a problem? Please describe

Adapters and Handlers are currently static, which creates problematic references to things like classloaders.

Describe the solution you'd like

They should be moved to state on the KubernetesClientBuilder or whatever we eventually settle on for that construct.

Describe alternatives you've considered

No response

Additional context

No response

@manusa
Copy link
Member

manusa commented Mar 10, 2022

After 3858 the change can be achieved by switching Adapters and Handlers from utility to regular instantiable classes.

@shawkins shawkins self-assigned this Mar 10, 2022
@shawkins
Copy link
Contributor Author

Switching Adapters to be non-static is straight-forward - especially if we ignore being able to directly call register/unregister.

Handlers is much more involved - it has a lot more usage and from places that don't currently have a reference to the client.

@manusa
Copy link
Member

manusa commented Mar 11, 2022

TBH I only checked the Adapters part. Maybe we can split the issue in 2.

@shawkins
Copy link
Contributor Author

shawkins commented Mar 11, 2022

I think I should work this after #3955 as it will be another large change - we'll either have to expand or remove the ClientContext.

shawkins added a commit to shawkins/kubernetes-client that referenced this issue Mar 22, 2022
- converting openshift clients to extension api
- removing extension adapters as extension client adapters can act as
their own factories
- correcting namespaced/plural for several openshift resources to remove
their operations
@shawkins shawkins linked a pull request Mar 22, 2022 that will close this issue
11 tasks
shawkins added a commit to shawkins/kubernetes-client that referenced this issue Mar 24, 2022
shawkins added a commit to shawkins/kubernetes-client that referenced this issue Mar 24, 2022
manusa pushed a commit that referenced this issue Mar 24, 2022
- converting openshift clients to extension api
- removing extension adapters as extension client adapters can act as
their own factories
- correcting namespaced/plural for several openshift resources to remove
their operations
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 a pull request may close this issue.

2 participants