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

🐛 Correctly serve APIBindings in the APIExport virtual workspace #2189

Merged
merged 1 commit into from
Oct 21, 2022

Conversation

ncdc
Copy link
Member

@ncdc ncdc commented Oct 14, 2022

Summary

Fix bug in the APIExport virtual workspace that prevented it from including APIBindings for the APIExport when there wasn't a permission claim for APIBindings.

Switch from checking APIBinding phase for determining what actions to perform to instead always trying to resolve desired state.

Add e2e test for APIBindings with/without permission claims in the APIExport virtual workspace.

Related issue(s)

Fixes #1421
Fixes: #2181


t.Logf("Verifying APIExport 1 serves APIBindings 1|1, 1|2, and 2|1")
verifyBindings(workspace1, "export1", func(bindings []apisv1alpha1.APIBinding) error {
// "workspace1|binding1", "workspace2|binding1", "workspace1|binding2")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can do

@ncdc
Copy link
Member Author

ncdc commented Oct 14, 2022

Hit kcp-dev/contrib-tmc#89 flake

@nrb
Copy link
Contributor

nrb commented Oct 14, 2022

Looking through issues, it looks like this PR fixes #1421, is that the case?

@ncdc
Copy link
Member Author

ncdc commented Oct 14, 2022

Looking through issues, it looks like this PR fixes #1421, is that the case?

Thanks, couldn't find it quickly

@mjudeikis
Copy link
Contributor

mjudeikis commented Oct 19, 2022

Fixes: #2181
Tested with checkout

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 19, 2022
Switch from checking APIBinding phase for determining what actions to
perform to instead always trying to resolve desired state.

Fix bug in the APIExport virtual workspace that prevented it from
including APIBindings for the APIExport when there wasn't a permission
claim for APIBindings.

Add e2e test for APIBindings with/without permission claims in the
APIExport virtual workspace.

Signed-off-by: Andy Goldstein <[email protected]>
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 19, 2022
Copy link
Contributor

@stevekuznetsov stevekuznetsov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to reconciler structure seems good

@@ -139,11 +139,11 @@ var (

someOtherWidgetsAPIResourceSchema = &apisv1alpha1.APIResourceSchema{
ObjectMeta: metav1.ObjectMeta{
Name: "another.widgets.other.io",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the meaning of this change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is meant to be the conflicting schema, and it needs to be in the same API group. The conflict test cases passed before because they were relying on the getCRD behavior defined below to return a widgets.kcp.dev CRD (the conflict checker now uses a schema instead of a CRD).

@stevekuznetsov
Copy link
Contributor

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 20, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 20, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: stevekuznetsov

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 20, 2022
@ncdc
Copy link
Member Author

ncdc commented Oct 21, 2022

Tunnel flake
/retest

@openshift-merge-robot openshift-merge-robot merged commit c5c5e3c into kcp-dev:main Oct 21, 2022
@kcp-ci-bot kcp-ci-bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Nov 23, 2023
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/apiexports lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: workloads APIBinding stays failed if fails Make APIBinding readible in APIExport VirtualWorkspace
6 participants