[Issue] HashConflictOnDifferentRoleAssignmentIds error for Core bicep file
diberry opened this issue · comments
- Make sure you've installed the latest version using instructions in the wiki
Output from azd version
Run azd version
and copy and paste the output here:
azd version 1.9.0 (commit 651394c)
Describe the bug
Description of issue you're seeing...
The deployment of the sample repo shouldn't hit this error.
To Reproduce
Steps to reproduce the behavior...
I don't know if this happens every time but since I'm just supposed to be able to azd up - there shouldn't be any fix I have to do.
- azd auth login
- azd up
- results
- @pamelafox pointed me to the role.bicep file's code to generate the guid.
@diberry ➜ /workspaces/azure-search-openai-demo (main) $ azd up
? Enter a new environment name: diberry-py-chat
(✓) Done: Downloading Bicep
? Select an Azure Subscription to use: 23. Azure Dev Platform Services Content Team (2123cb08-23fa-4a80-afec-4ec9e015433f)
? Select an Azure location to use: 44. (US) East US 2 (eastus2)
? Enter a value for the 'documentIntelligenceResourceGroupLocation' infrastructure parameter: 3. (US) West US 2 (westus2)
? Enter a value for the 'openAiResourceGroupLocation' infrastructure parameter: 9. (US) East US 2 (eastus2)
Packaging services (azd package)
(✓) Done: Packaging service backend
- Package Output: /tmp/azure-search-openai-demo-backend-azddeploy-1715207795.zip
Checking if authentication should be setup...
Loading azd .env file from current environment...
AZURE_USE_AUTHENTICATION is not set, skipping authentication setup.
Provisioning Azure resources (azd provision)
Provisioning Azure resources can take some time.
Subscription: Azure Dev Platform Services Content Team (2123cb08-23fa-4a80-afec-4ec9e015433f)
Location: East US 2
You can view detailed progress in the Azure Portal:
https://portal.azure.com/#view/HubsExtension/DeploymentDetailsBlade/~/overview/id/%2Fsubscriptions%2F2123cb08-23fa-4a80-afec-4ec9e015433f%2Fproviders%2FMicrosoft.Resources%2Fdeployments%2Fdiberry-py-chat-1715207802
(✓) Done: Resource group: rg-diberry-py-chat
(✓) Done: App Service plan: plan-uped7lbvfhdsm
(✓) Done: Log Analytics workspace: log-uped7lbvfhdsm
(✓) Done: Azure OpenAI: cog-uped7lbvfhdsm
(✓) Done: Storage account: stuped7lbvfhdsm
(✓) Done: Application Insights: appi-uped7lbvfhdsm
(✓) Done: Document Intelligence: cog-di-uped7lbvfhdsm
(✓) Done: Portal dashboard: dash-uped7lbvfhdsm
(✓) Done: Search service: gptkb-uped7lbvfhdsm
(✓) Done: App Service: app-backend-uped7lbvfhdsm
| =| Creating/Updating resources
ERROR: error executing step command 'provision': deployment failed: failing invoking action 'provision', error deploying infrastructure: deploying to subscription:
Deployment Error Details:
HashConflictOnDifferentRoleAssignmentIds: A hash conflict was encountered for the role Assignment ID. Please use a new Guid.
TraceID: bba916d63a752327c6e22415b019f3d1
Expected behavior
The core files need to generate unique GUIDs to get around this issue.
Environment
Information on your environment:
* Language name and version
* IDE and version : [e.g. Visual Studio 16.3] - Codespaces only
Additional context
Add any other context about the problem here.
My ideas:
- We should probably add principalType to guid() as that could differ between roles that otherwise share same characteristics
- That wasnt Dina's issue though, I don't believe, I think Dina just ran into a hash collision? So maybe we should add uniqueString to the end of the guid?