Make implicitly dependent feature explicitly depend on each other #1551
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
By running an invocation of cargo hack, we found a number of compile issues when using unusual feature combinations, and these are largely rectified by making intended feature pairings explicit.
New Feature Dependencies
rustls-tls
+openssl-tls
now depend onclient
oauth
+oidc
+gzip
+socks5
+http-proxy
+unstable-client
now depend onclient
unstable-runtime
now depend onruntime
Testing Feasibility / cargo hack on CI
Because each feature basically doubles the amount of tests, we do actually need to restrict the input space from the raw
powerset
a bit. Without restrictions (skippingoidc
+oauth
mandatory), we get:11370
feature combinations>1h
duration locally (my CPU sits mostly sitting idle in context switches)>60G
of artifacts intarget
However, with grouping of commonly additive features, we can basically halve the number of tests per grouping. A moderately aggressive grouping of small client features (
socks5
+http-proxy
+gzip
), smaller core features (admission
+jsonpatch
+derive
) and client features (client
+kubelet-debug
) we get:624
feature combinations5m
duration locally on a blank cache / 8m duration on GHA with cache6G
of artifacts intarget
So, kind of works on CI. Have included it as a test on
main
only (and this branch explicitly as a PoC).Limitations
kube
.oauth
/oidc
:: should depend on a tls stack but we cannot make that choiceWe do have fallback
compile_error
s for oidc and oauth, but I have not found a way to tellhack
to model this without just excluding them.