Azure / deployment-environments

Sample infrastructure-as-code templates to get started with Azure Deployment Environments service.
MIT License
67 stars 210 forks source link

Not all projects from same DevCenter are selectable in the Dev Portal #21

Closed lopezleandro03 closed 8 months ago

lopezleandro03 commented 10 months ago

Hi,

I have deployed a DevCenter configured to use ADE using this Azure Developer CLI template:

https://github.com/lopezleandro03/azd-devcenter

This IaC provisions 3 projects with 3 environments each and set the same project members across all projects. However, in the Dev Portal I can only select the first project. The expected behavior would be to see a dropdown with all my projects.

image image

Same RBAC roles applied to all projects. This seems to be a bug.

Any guidance? Thanks.

ericaguthan commented 10 months ago

Hi @lopezleandro03

One reason that the project may not appear on the Dev Portal is if the project is in a failed state. You can check if this is true by selecting either of the missing projects in the Azure Portal and clicking on "JSON view" on its overview page.

lopezleandro03 commented 10 months ago

Hi @ericaguthan, it's all good in the JSON view.

"provisioningState": "Succeeded"

The same IaC was used to deploy another project that is visible. Same user account with the same RBAC roles applied at the project level. All projects belong to the same DevCenter.

ericaguthan commented 10 months ago

Hi @lopezleandro03,

Another reason that projects might not show in this view is if there are no project environment types configured. I recommend validating that the IAC template successfully created Project Environment Types on the missing projects, and opening a support request to investigate further if things look good there.

KarsonAlford commented 9 months ago

This is happening for us also. I think there may be multiple reasons that the DevCenter gets out of synch with the DevPortal. Here is a way that seemed to consistently cause the issue.

  1. Grant access to a user to the Project/EnvironmentType.
  2. Have that user create an environment in the DevPortal.
  3. Remove access to the Project/EnvironmentType for that user.
  4. Have the user log out and log back into the DevPortal.
  5. Grant access to the user to the Project/EnvironmentType.
  6. Have the user log out and log back into the DevPortal.

After step 3 (and you wait a few minutes) the environment disappears from the Project/Environments list in DevCenter. After step 5 (and you wait a few minutes) the environment reappears in Project/Environments list in DevCenter. After step 6 (and you wait a few minutes) the user can create new environments but cannot see the environment created in step 2. Also after step 6, if the user creates another environment then logs out and back in again that environment also doesn't show up.

j-rewerts commented 8 months ago

@KarsonAlford Does waiting resolve the issue? The way we check for permissions in our API does involve a cache. This means you can get cached results for a bit after updating permissions.

I've been able to reproduce this, but the issue always goes away after 15-20 minutes.

j-rewerts commented 8 months ago

@lopezleandro03 Are you still seeing issues?

KarsonAlford commented 8 months ago

@KarsonAlford Does waiting resolve the issue? The way we check for permissions in our API does involve a cache. This means you can get cached results for a bit after updating permissions.

I've been able to reproduce this, but the issue always goes away after 15-20 minutes.

No waiting did not resolve the issue. However, this was affecting us a month ago and during the troubleshooting DevCenter was getting updates that may affect this behavior. We are no longer using DevCenters so I am not sure it this is still occuring.

j-rewerts commented 8 months ago

Closing, but feel free to open again if this issue persists.