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

Validate if the same application be deployed to two environments created in the same cluster #6367

Open
Reshrahim opened this issue Aug 2, 2022 · 2 comments

Comments

@Reshrahim
Copy link
Contributor

Reshrahim commented Aug 2, 2022

As per the current tutorial flow, there is a case where the user might do the following 

  1. Create an env1 without az provider in mycluster
  2. deploy webapp with mongo container
  3. Create an env2 with az provider in mycluster
  4. deploy webapp with Azure cosmosdb

Tried this and hitting the error 

reshmaabdulrahim@Reshmas-MacBook-Pro tutorial % rad deploy app.bicep
Building app.bicep...
/Users/reshmaabdulrahim/samples/tutorial/azure-cosmosdb.bicep(7,5) : Warning no-unused-vars: Variable "port" is declared but never used. [https://aka.ms/bicep/linter/no-unused-vars]
/Users/reshmaabdulrahim/samples/tutorial/app.bicep(67,8) : Warning explicit-values-for-loc-params: Parameter 'location' of module 'mongo' isn't assigned an explicit value, and its default value may not give the intended behavior for a location-related parameter. You should assign an explicit value to the parameter. [https://aka.ms/bicep/linter/explicit-values-for-loc-params]
Deploying Application into workspace 'tutorialenv'...

Deployment In Progress...

Failed               webapp          Applications.Core/applications
.                    mongo-module    Microsoft.Resources/deployments
Error: {
  "code": "DeploymentFailed",
  "details": [
    {
      "code": "BadRequest",
      "details": [
        {
          "code": "BadRequest",
          "details": [
            {
              "code": "InvalidProperties",
              "message": "environment must be '/planes/radius/local/resourcegroups/tutorialenv/providers/applications.core/environments/tutorialenv'."
            }
          ],
          "message": "Resource update failed because environment and application properties are read-only. The provided environment and application do not match the resource's existing environment and application values. Please use the correct values to update this resource or use a different resource name to create a new resource.",
          "target": "/planes/radius/local/resourcegroups/tutorialenv/providers/applications.core/applications/webapp"
        }
      ]
    },
    {
      "code": "OK",
      "message": ""
    }
  ]
}

Looks like the environment is not injected correctly

rad version

RELEASE VERSION BICEP COMMIT
edge 28c180f 0.7.16 28c180f

AB#6976

@rynowak
Copy link
Contributor

rynowak commented Aug 2, 2022

triage notes: we have the restriction right now that names have to be unique across the cluster. we will remove this limitation in v0.13.

@shalabhms
Copy link
Contributor

@Reshrahim , could you please check if this still exists?

@shalabhms shalabhms changed the title Can the same application be deployed to two environments created in the same cluster? Validate if the same application be deployed to two environments created in the same cluster May 1, 2023
@willtsai willtsai transferred this issue from radius-project/radius Sep 19, 2023
@willtsai willtsai transferred this issue from another repository Sep 27, 2023
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

No branches or pull requests

3 participants