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

Fix connection direction #7076

Merged
merged 3 commits into from
Jan 25, 2024
Merged

Fix connection direction #7076

merged 3 commits into from
Jan 25, 2024

Conversation

youngbupark
Copy link

Description

This is to fix appgraph connection direction.

Type of change

  • This pull request fixes a bug in Radius and has an approved issue (issue link required).

Fixes: #7038

Signed-off-by: Young Bu Park <[email protected]>
@@ -2,7 +2,7 @@
{
Copy link
Author

Choose a reason for hiding this comment

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

@nithyatsu @rynowak Please carefully review these test cases.

Copy link
Contributor

Choose a reason for hiding this comment

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

This one is right.

@radius-functional-tests
Copy link

radius-functional-tests bot commented Jan 25, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository youngbupark/radius
Commit ref a56ecf5
Unique ID 636a631d8b
Image tag pr-636a631d8b
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/functional/shared/recipes/<name>:pr-636a631d8b
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-636a631d8b
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-636a631d8b
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-636a631d8b
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting msgrp functional tests...
⌛ Starting samples functional tests...
⌛ Starting ucp functional tests...
⌛ Starting daprrp functional tests...
⌛ Starting shared functional tests...
⌛ Starting kubernetes functional tests...
⌛ Starting datastoresrp functional tests...
✅ msgrp functional tests succeeded
✅ datastoresrp functional tests succeeded
✅ samples functional tests succeeded
✅ kubernetes functional tests succeeded
✅ ucp functional tests succeeded
✅ daprrp functional tests succeeded
❌ shared functional test failed. Please check the logs for more details

"id": "/planes/radius/local/resourcegroups/default/providers/Applications.Core/containers/sql-ctnr"
}
],
"connections": [],
Copy link
Author

@youngbupark youngbupark Jan 25, 2024

Choose a reason for hiding this comment

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

This is correct because no other container resources refers to http route.

Copy link
Contributor

@rynowak rynowak Jan 25, 2024

Choose a reason for hiding this comment

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

I'm not really going to comment on the correctness of the HTTP route scenario. It would take extra work specific to HTTP Routes to get a useful output for this case.

We shouldn't fix it, we should complete the removal of the HTTP Route type.

Copy link
Author

Choose a reason for hiding this comment

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

If we want to make it correct, then httproute should have outbound and inbound both.

ID: &id,
Direction: &dir, //Direction is set with respect to Resource defining this connection
ID: to.Ptr(id),
Direction: to.Ptr(corerpv20231001preview.DirectionInbound), //Direction is set with respect to Resource defining this connection
Copy link
Author

Choose a reason for hiding this comment

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

Inbound connection should be Inbound not Outbound.

@@ -493,7 +492,7 @@ func connectionsFromAPIData(resource generated.GenericResource, allResources []g
// If we encounter an error processing this data, just skip "invalid" connection entry.
entries := []*corerpv20231001preview.ApplicationGraphConnection{}
for _, connection := range connections {
dir := corerpv20231001preview.DirectionInbound
dir := corerpv20231001preview.DirectionOutbound
Copy link
Author

Choose a reason for hiding this comment

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

This is the root cause of this bug.

@@ -140,6 +142,13 @@ func Test_computeGraph(t *testing.T) {
envResourceDataFile: "",
expectedDataFile: "graph-app-httproute-out.json",
},
{
name: "using httproute 2",
Copy link
Author

Choose a reason for hiding this comment

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

I am going to change test case name to more meaningful one later.

Signed-off-by: Young Bu Park <[email protected]>
Signed-off-by: Young Bu Park <[email protected]>
@radius-functional-tests
Copy link

radius-functional-tests bot commented Jan 25, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository youngbupark/radius
Commit ref 7d4e653
Unique ID 1470c91abd
Image tag pr-1470c91abd
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/functional/shared/recipes/<name>:pr-1470c91abd
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-1470c91abd
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-1470c91abd
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-1470c91abd
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting datastoresrp functional tests...
⌛ Starting msgrp functional tests...
⌛ Starting ucp functional tests...
⌛ Starting samples functional tests...
⌛ Starting kubernetes functional tests...
⌛ Starting shared functional tests...
⌛ Starting daprrp functional tests...
✅ datastoresrp functional tests succeeded
✅ msgrp functional tests succeeded
✅ kubernetes functional tests succeeded
✅ ucp functional tests succeeded
✅ daprrp functional tests succeeded
✅ shared functional tests succeeded

@youngbupark youngbupark changed the title [WIP] Fix connection direction Fix connection direction Jan 25, 2024
@youngbupark youngbupark marked this pull request as ready for review January 25, 2024 23:31
@youngbupark youngbupark requested review from a team as code owners January 25, 2024 23:31
@youngbupark youngbupark merged commit 096e202 into radius-project:main Jan 25, 2024
16 checks passed
@youngbupark youngbupark deleted the youngp/fix-connection branch January 25, 2024 23:48
willdavsmith pushed a commit to willdavsmith/radius that referenced this pull request Jan 26, 2024
# Description

This is to fix appgraph connection direction. 

## Type of change

- This pull request fixes a bug in Radius and has an approved issue
(issue link required).

Fixes: radius-project#7038

---------

Signed-off-by: Young Bu Park <[email protected]>
sk593 pushed a commit to sk593/radius that referenced this pull request Jan 29, 2024
# Description

This is to fix appgraph connection direction.

## Type of change

- This pull request fixes a bug in Radius and has an approved issue
(issue link required).

Fixes: radius-project#7038

---------

Signed-off-by: Young Bu Park <[email protected]>
Signed-off-by: sk593 <[email protected]>
willdavsmith pushed a commit to willdavsmith/radius that referenced this pull request Mar 4, 2024
# Description

This is to fix appgraph connection direction. 

## Type of change

- This pull request fixes a bug in Radius and has an approved issue
(issue link required).

Fixes: radius-project#7038

---------

Signed-off-by: Young Bu Park <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Application graph] data doesnt reflect correctly in graph for some data
2 participants