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

Replace runtime::controller::Context with Arc #910

Merged
merged 1 commit into from
May 13, 2022

Conversation

nightkr
Copy link
Member

@nightkr nightkr commented May 13, 2022

Motivation

controller::Context was just a newtype around std::sync::Arc that was confusing, added no new features, had annoying name clashes (including with kube::config::Context) and had slightly worse ergonomics (had to use Context::get_ref() rather than there being a Deref implementation).

Solution

Replace it with using std::sync::Arc directly.

@nightkr nightkr self-assigned this May 13, 2022
@nightkr nightkr force-pushed the chore/burninate-controller-context branch from deddf97 to e70b340 Compare May 13, 2022 13:44
@nightkr nightkr requested a review from a team May 13, 2022 13:44
@nightkr nightkr added runtime controller runtime related changelog-change changelog change category for prs labels May 13, 2022
@clux clux added this to the 0.73.0 milestone May 13, 2022
clux added a commit to kube-rs/controller-rs that referenced this pull request May 13, 2022
Signed-off-by: clux <[email protected]>
@clux
Copy link
Member

clux commented May 13, 2022

Yeah, I like this a lot better. Tried it in controller-rs (kube-rs/controller-rs#29) and it simplifies things a lot not having to as_ref() everywhere and can't really see any real downsides. A small breaking change here is acceptable for the improved ergonomics.

@nightkr nightkr merged commit 0886707 into kube-rs:master May 13, 2022
@nightkr nightkr deleted the chore/burninate-controller-context branch May 13, 2022 19:49
clux added a commit to kube-rs/controller-rs that referenced this pull request May 23, 2022
* Use kube-rs/kube#910

Signed-off-by: clux <[email protected]>

* PoC Predicates for kube-rs/kube#52

Signed-off-by: clux <[email protected]>

* remove predicate stuff

Signed-off-by: clux <[email protected]>

* undo crd update

Signed-off-by: clux <[email protected]>

* build from branch

Signed-off-by: clux <[email protected]>

* kube bump

Signed-off-by: clux <[email protected]>

* bump

Signed-off-by: clux <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-change changelog change category for prs runtime controller runtime related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants