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 1801447: Fix for invalid edges, do not allow connection to knative revisions #4276

Merged
merged 1 commit into from Feb 14, 2020

Conversation

jeff-phillips-18
Copy link
Member

@jeff-phillips-18 jeff-phillips-18 commented Feb 10, 2020

Fixes:
https://issues.redhat.com/browse/ODC-3014

Analysis / Root cause:
Connections from non-knative workloads to knative objects resulted in edges with invalid targets.
We should no be allowing visual connectors to knative revisions.

Solution Description:
Check the edges for valid source and target. Remove any edges that have and invalid source or target. Do not allow creation of connectors to knative revisions.

Browser conformance:

  • Chrome
  • Firefox
  • Safari
  • Edge

cc @openshift/team-devconsole-ux @serenamarie125

@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 Feb 10, 2020
@openshift-ci-robot
Copy link
Contributor

@jeff-phillips-18: This pull request references Bugzilla bug 1801447, 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.

In response to this:

Bug 1801447: Fix for invalid edges, do not allow connection to knative revisions

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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 10, 2020
@openshift-ci-robot openshift-ci-robot added the component/dev-console Related to dev-console label Feb 10, 2020
@serenamarie125
Copy link
Contributor

@jeff-phillips-18 are we disallowing both Knative services & Revisions?

@sahil143
Copy link
Contributor

/retest

Copy link
Contributor

@sahil143 sahil143 left a comment

Choose a reason for hiding this comment

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

Looks good to me.
verified locally.
waiting for frontend build to pass for lgtm

Comment on lines +745 to +750
// create links from data, only include those which have a valid source and target
const allNodes = [...nodes, ...groupNodes];
const edges = dataModel.graph.edges
.filter((d) => {
return allNodes.find((n) => n.id === d.source) && allNodes.find((n) => n.id === d.target);
})
Copy link
Contributor

Choose a reason for hiding this comment

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

In what situation do we have edges without valid source or target?

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 occurred when we allowed (mistakenly) connections to knative revisions or for a node to itself. While those situations have been taken care of, this change safe guards against other potential similar situations that could occur.

@jeff-phillips-18
Copy link
Member Author

@serenamarie125 Yes, there was no current support for connection to a knative service and we do not want connections to revisions. If we want to add support for knative services as visual connector targets, we could add that .

@serenamarie125
Copy link
Contributor

No need, just asking! Thanks Jeff

@andrewballantyne
Copy link
Contributor

/kind bug

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Feb 12, 2020
@openshift-ci-robot
Copy link
Contributor

@jeff-phillips-18: This pull request references Bugzilla bug 1801447, which is valid.

In response to this:

Bug 1801447: Fix for invalid edges, do not allow connection to knative revisions

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.

@christianvogt
Copy link
Contributor

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 13, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christianvogt, jeff-phillips-18

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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 13, 2020
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

4 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit ff9b0ff into openshift:master Feb 14, 2020
@openshift-ci-robot
Copy link
Contributor

@jeff-phillips-18: All pull requests linked via external trackers have merged. Bugzilla bug 1801447 has been moved to the MODIFIED state.

In response to this:

Bug 1801447: Fix for invalid edges, do not allow connection to knative revisions

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.4 milestone Feb 17, 2020
@jeff-phillips-18 jeff-phillips-18 deleted the edge-error branch December 2, 2020 13:37
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/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/dev-console Related to dev-console kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants