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

🐛 Export runtime.Client interface and cache package #11611

Merged

Conversation

sbueringer
Copy link
Member

@sbueringer sbueringer commented Dec 23, 2024

Signed-off-by: Stefan Büringer [email protected]

What this PR does / why we need it:
We introduced caching of DiscoverVariable calls in #11592.

As part of that we introduced a new CallExtensionOption parameter to the CallExtension function of the Client interface.

With this change it's now impossible for consumers to implement the Client interface for testing, because they cannot import the CallExtensionOption type.

Through this we noticed that we have dependencies from some of our exported types to internal types in general (e.g. exported ClusterClass struct to internal runtime.Client struct)

To fix this, this PR exports the runtime.Client interface with all transitive dependencies

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 23, 2024
@k8s-ci-robot k8s-ci-robot added do-not-merge/needs-area PR is missing an area label size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 23, 2024
@sbueringer
Copy link
Member Author

/test pull-cluster-api-e2e-main

@k8s-ci-robot
Copy link
Contributor

@sbueringer: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-apidiff-main 98c9f41 link false /test pull-cluster-api-apidiff-main

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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-sigs/prow repository. I understand the commands that are listed here.

@sbueringer sbueringer added the area/clusterclass Issues or PRs related to clusterclass label Dec 23, 2024
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/needs-area PR is missing an area label label Dec 23, 2024
@chrischdi
Copy link
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 23, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 59e04fc35827f2d6fffa244396a2ed4ba7a419f3

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrischdi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 23, 2024
@sbueringer
Copy link
Member Author

/cherry-pick release-1.9

@sbueringer
Copy link
Member Author

/cherry-pick release-1.8

@k8s-infra-cherrypick-robot

@sbueringer: once the present PR merges, I will cherry-pick it on top of release-1.9 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.9

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-sigs/prow repository.

@k8s-infra-cherrypick-robot

@sbueringer: once the present PR merges, I will cherry-pick it on top of release-1.8 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.8

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot merged commit eaef131 into kubernetes-sigs:main Dec 23, 2024
26 of 27 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.10 milestone Dec 23, 2024
@k8s-infra-cherrypick-robot

@sbueringer: new pull request created: #11612

In response to this:

/cherry-pick release-1.9

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-sigs/prow repository.

@k8s-infra-cherrypick-robot

@sbueringer: #11611 failed to apply on top of branch "release-1.8":

Applying: Export runtime.Client interface and cache package
Using index info to reconstruct a base tree...
M	.golangci.yml
M	controllers/alias.go
M	exp/runtime/internal/controllers/extensionconfig_controller.go
M	exp/runtime/internal/controllers/extensionconfig_controller_test.go
M	exp/runtime/internal/controllers/warmup_test.go
M	exp/topology/desiredstate/desired_state.go
M	internal/controllers/clusterclass/clusterclass_controller.go
M	internal/controllers/clusterclass/clusterclass_controller_test.go
M	internal/controllers/machine/machine_controller.go
M	internal/controllers/machine/machine_controller_test.go
M	internal/controllers/topology/cluster/cluster_controller.go
M	internal/controllers/topology/cluster/patches/engine.go
M	internal/controllers/topology/cluster/patches/external/external_patch_generator_test.go
M	main.go
M	test/extension/handlers/topologymutation/handler_integration_test.go
Falling back to patching base and 3-way merge...
Auto-merging test/extension/handlers/topologymutation/handler_integration_test.go
CONFLICT (content): Merge conflict in test/extension/handlers/topologymutation/handler_integration_test.go
Auto-merging main.go
Auto-merging internal/controllers/topology/cluster/patches/external/external_patch_generator_test.go
Auto-merging internal/controllers/topology/cluster/patches/engine.go
CONFLICT (content): Merge conflict in internal/controllers/topology/cluster/patches/engine.go
Auto-merging internal/controllers/topology/cluster/cluster_controller.go
CONFLICT (content): Merge conflict in internal/controllers/topology/cluster/cluster_controller.go
Auto-merging internal/controllers/machine/machine_controller_test.go
CONFLICT (content): Merge conflict in internal/controllers/machine/machine_controller_test.go
Auto-merging internal/controllers/machine/machine_controller.go
CONFLICT (content): Merge conflict in internal/controllers/machine/machine_controller.go
Auto-merging internal/controllers/clusterclass/clusterclass_controller_test.go
CONFLICT (content): Merge conflict in internal/controllers/clusterclass/clusterclass_controller_test.go
Auto-merging internal/controllers/clusterclass/clusterclass_controller.go
CONFLICT (content): Merge conflict in internal/controllers/clusterclass/clusterclass_controller.go
Auto-merging exp/topology/desiredstate/desired_state.go
CONFLICT (content): Merge conflict in exp/topology/desiredstate/desired_state.go
Auto-merging exp/runtime/internal/controllers/warmup_test.go
Auto-merging exp/runtime/internal/controllers/extensionconfig_controller_test.go
Auto-merging exp/runtime/internal/controllers/extensionconfig_controller.go
CONFLICT (content): Merge conflict in exp/runtime/internal/controllers/extensionconfig_controller.go
Auto-merging controllers/alias.go
CONFLICT (content): Merge conflict in controllers/alias.go
Auto-merging .golangci.yml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Export runtime.Client interface and cache package

In response to this:

/cherry-pick release-1.8

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-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/clusterclass Issues or PRs related to clusterclass cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants