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

Bug 1883591: Support ServiceBinding breaking api changes #6792

Merged

Conversation

divyanshiGupta
Copy link
Contributor

@divyanshiGupta divyanshiGupta commented Sep 30, 2020

Jira: https://issues.redhat.com/browse/ODC-4928

Analysis / Root cause:
Service Binding Operator (starting with v0.2.0) has changed API (CRD) redhat-developer/service-binding-operator#608 that is not supported in OCP 4.6 and hence service-binding is not working.

Solution Description:
Refactor code based on the latest API changes. Also fix failing unit tests accordingly

Gifs:
Create service-binding using:

  1. Binding connector
    Peek 2020-09-30 16-32

  2. Import YAML
    Peek 2020-09-30 16-35

PR Test setup:
Install community version of Service Binding from OperatorHub using the beta channel.

@openshift-ci-robot openshift-ci-robot added the component/dev-console Related to dev-console label Sep 30, 2020
@divyanshiGupta divyanshiGupta changed the title Support ServiceBinding breaking api changes Bug 1883591: Support ServiceBinding breaking api changes Sep 30, 2020
@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. label Sep 30, 2020
@openshift-ci-robot
Copy link
Contributor

@divyanshiGupta: This pull request references Bugzilla bug 1883591, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1883591: Support ServiceBinding breaking api changes

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/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Sep 30, 2020
@christianvogt
Copy link
Contributor

@divyansh42 can we add support for both SBR and SB CRDs?
Keep old and new models.
Create a new feature flag for the SB.
Fetch both SBR and SB for topology and visualize them in the same way.
On creation, if the SB feature flag is set, create the SB, otherwise create the SBR.

How much additional work is needed to do the above?

@divyanshiGupta
Copy link
Contributor Author

divyanshiGupta commented Sep 30, 2020

@divyansh42 can we add support for both SBR and SB CRDs?
Keep old and new models.
Create a new feature flag for the SB.
Fetch both SBR and SB for topology and visualize them in the same way.
On creation, if the SB feature flag is set, create the SB, otherwise create the SBR.

How much additional work is needed to do the above?

@christianvogt Shouldnt it be that the user can only install the operator from particular channels on particular OCP versions. For example version < = 4.5 operator will be installed using alpha channel and for version > 4.5 operator will be installed using beta channel. Here https://issues.redhat.com/browse/ODC-4928 there are some comments regarding having a single channel so I assume for particular versions we will have respective single channels.

And say if in future we have a new CRD so then we will support three CRDs for service-binding?

@christianvogt
Copy link
Contributor

After discussing this further we will go with updating support for the new SB and dropping SBR in 4.6.

@christianvogt
Copy link
Contributor

I've tested the the changes and creation and visualization of the SB work as expected.
/lgtm
/approve

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christianvogt, divyanshiGupta

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-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 30, 2020
@openshift-merge-robot openshift-merge-robot merged commit 736043b into openshift:master Sep 30, 2020
@openshift-ci-robot
Copy link
Contributor

@divyanshiGupta: All pull requests linked via external trackers have merged:

Bugzilla bug 1883591 has been moved to the MODIFIED state.

In response to this:

Bug 1883591: Support ServiceBinding breaking api changes

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/test-infra repository.

@spadgett spadgett added this to the v4.6 milestone Oct 2, 2020
@christianvogt
Copy link
Contributor

/cherry-pick release-4.5

New SBO has been promoted to be the default for 4.5 as well.

@openshift-cherrypick-robot

@christianvogt: #6792 failed to apply on top of branch "release-4.5":

Applying: Support ServiceBinding breaking api changes
Using index info to reconstruct a base tree...
M	frontend/packages/dev-console/src/components/topology/__tests__/service-binding-test-data.ts
M	frontend/packages/dev-console/src/components/topology/__tests__/topology-test-data.ts
A	frontend/packages/dev-console/src/components/topology/operators/actions/serviceBindings.ts
A	frontend/packages/dev-console/src/components/topology/operators/operator-resources.ts
M	frontend/packages/dev-console/src/components/topology/operators/operators-data-transformer.ts
A	frontend/packages/dev-console/src/components/topology/operators/operatorsTopologyPlugin.ts
M	frontend/packages/dev-console/src/plugin.tsx
Falling back to patching base and 3-way merge...
Auto-merging frontend/packages/dev-console/src/plugin.tsx
CONFLICT (modify/delete): frontend/packages/dev-console/src/components/topology/operators/operatorsTopologyPlugin.ts deleted in HEAD and modified in Support ServiceBinding breaking api changes. Version Support ServiceBinding breaking api changes of frontend/packages/dev-console/src/components/topology/operators/operatorsTopologyPlugin.ts left in tree.
Auto-merging frontend/packages/dev-console/src/components/topology/operators/operators-data-transformer.ts
CONFLICT (content): Merge conflict in frontend/packages/dev-console/src/components/topology/operators/operators-data-transformer.ts
CONFLICT (modify/delete): frontend/packages/dev-console/src/components/topology/operators/operator-resources.ts deleted in HEAD and modified in Support ServiceBinding breaking api changes. Version Support ServiceBinding breaking api changes of frontend/packages/dev-console/src/components/topology/operators/operator-resources.ts left in tree.
CONFLICT (modify/delete): frontend/packages/dev-console/src/components/topology/operators/actions/serviceBindings.ts deleted in HEAD and modified in Support ServiceBinding breaking api changes. Version Support ServiceBinding breaking api changes of frontend/packages/dev-console/src/components/topology/operators/actions/serviceBindings.ts left in tree.
Auto-merging frontend/packages/dev-console/src/components/topology/__tests__/topology-test-data.ts
CONFLICT (content): Merge conflict in frontend/packages/dev-console/src/components/topology/__tests__/topology-test-data.ts
Auto-merging frontend/packages/dev-console/src/components/topology/__tests__/service-binding-test-data.ts
CONFLICT (content): Merge conflict in frontend/packages/dev-console/src/components/topology/__tests__/service-binding-test-data.ts
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Support ServiceBinding breaking api changes
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-4.5

New SBO has been promoted to be the default for 4.5 as well.

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/test-infra 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. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/dev-console Related to dev-console lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants