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

Naming a gateway with the same name as a container causes an error #7149

Open
1 task
AaronCrawfis opened this issue Feb 7, 2024 · 3 comments
Open
1 task
Labels
bug Something is broken or not working as expected triaged This issue has been reviewed and triaged

Comments

@AaronCrawfis
Copy link
Contributor

AaronCrawfis commented Feb 7, 2024

Steps to reproduce

Create a file named app.bicep with the following contents:

import radius as rad

param environment string

resource app 'Applications.Core/applications@2023-10-01-preview' = {
  name: 'myapp'
  properties: {
    environment: environment
  }
}

resource backend_container 'Applications.Core/containers@2023-10-01-preview' = {
  name: 'backend'
  properties: {
    application: app.id
    container: {
      image: 'ghcr.io/radius-project/samples/demo:latest'
      ports: {
        web: {
          containerPort: 3000
        }
      }
    }
  }
}

resource backend_gateway 'Applications.Core/gateways@2023-10-01-preview' = {
  name: 'backend'
  properties: {
    application: app.id
    routes: [
      {
        path: '/'
        destination: 'http://${backend_container.name}:3000'
      }
    ]
  }
}

Deploy the file with rad deploy app.bicep

Observed behavior

See this error:

rad deploy .\app.bicep
Building .\app.bicep...
Deploying template '.\app.bicep' into environment 'default' from workspace 'default'...

Deployment In Progress...

Completed            backend         Applications.Core/containers
Completed            myapp           Applications.Core/applications
...                  backend         Applications.Core/gateways
Error: {
  "code": "DeploymentFailed",
  "message": "At least one resource deployment operation failed. Please see the details for the specific operation that failed.",
  "target": "/planes/radius/local/resourceGroups/default/providers/Microsoft.Resources/deployments/rad-deploy-63b8b915-1bbf-41f3-ba54-e5a93992cb3e",
  "details": [
    {
      "code": "ResourceDeploymentFailure",
      "message": "Failed",
      "target": "/planes/radius/local/resourceGroups/default/providers/Applications.Core/gateways/backend",
      "details": [
        {
          "code": "Internal",
          "message": "Error - Type: IncludeError, Status: True, Reason: RootIncludesRoot, Message: root httpproxy cannot include another root httpproxy\n"
        }
      ]
    },
    {
      "code": "OK",
      "message": "",
      "target": "/planes/radius/local/resourceGroups/default/providers/Applications.Core/containers/backend"
    },
    {
      "code": "OK",
      "message": "",
      "target": "/planes/radius/local/resourceGroups/default/providers/Applications.Core/applications/myapp"
    }
  ]
}

Desired behavior

I expect the deployment to succeed.

Workaround

Name the gateway something else, like backendgw

rad Version

rad version
RELEASE VERSION BICEP COMMIT
0.30.0 v0.30.0 0.30.0 f5a4a55

Operating system

Windows 11

Additional context

This is most likely caused by how we create countour resources under the hood for gateways

Would you like to support us?

  • Yes, I would like to support you

AB#11136

@AaronCrawfis AaronCrawfis added the bug Something is broken or not working as expected label Feb 7, 2024
@radius-triage-bot
Copy link

👋 @AaronCrawfis Thanks for filing this bug report.

A project maintainer will review this report and get back to you soon. If you'd like immediate help troubleshooting, please visit our Discord server.

For more information on our triage process please visit our triage overview

Copy link

azure-boards bot commented Feb 7, 2024

✅ Successfully linked to Azure Boards work item(s):

@shalabhms shalabhms added the triaged This issue has been reviewed and triaged label Feb 8, 2024
@radius-triage-bot
Copy link

👍 We've reviewed this issue and have agreed to add it to our backlog. Please subscribe to this issue for notifications, we'll provide updates when we pick it up.

We also welcome community contributions! If you would like to pick this item up sooner and submit a pull request, please visit our contribution guidelines and assign this to yourself by commenting "/assign" on this issue.

For more information on our triage process please visit our triage overview

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken or not working as expected triaged This issue has been reviewed and triaged
Projects
None yet
Development

No branches or pull requests

2 participants