• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

elastic / cloudbeat / 6262955177
76%

Build:
DEFAULT BRANCH: main
Ran 21 Sep 2023 02:23PM UTC
Jobs 1
Files 144
Run time 5s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Sep 2023 02:17PM UTC coverage: 76.043%. Remained the same
6262955177

push

github

web-flow
Azure ARM: Fix Role Assignment race condition (#1360)

This fixes an error with Azure:
> PrincipalNotFound
> Principal {principalId} does not exist in the directory {tenantId}.
> Check that you have the correct principal ID. If you are creating this
> principal and then immediately assigning a role, this error might be
> related to a replication delay. In this case, set the role assignment
> principalType property to a value, such as ServicePrincipal, User, or
> Group.  See https://aka.ms/docs-principaltype
https://learn.microsoft.com/en-us/azure/role-based-access-control/troubleshooting?tabs=armtemplate#symptom---unable-to-assign-a-role-using-a-service-principal-with-azure-cli

Here, I am following the recommended solution by Azure:
> If you're creating a new user or service principal using the REST API
> or ARM template, set the principalType property when creating the role
> assignment using the Role Assignments - Create API.

Additionally, I am re-naming the role assignment to be based on the
resource group and deployment name. This means that there will be one
unique role assignment name per deployment and no conflicts should be
caused at the subscription level. The previous name,
`guid(uniqueString('cloudbeatRoleAssignment'))` deterministically
returns the same name every time for these reasons:
1. `guid()` is deterministic:
> The returned value isn't a random string, but rather the result of a
> hash function on the parameters. The returned value is 36 characters
> long. It isn't globally unique.
https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-functions-string#guid
2. `uniqueString()` is also just a hash function:
> The returned value isn't a random string, but rather the result of a
> hash function. The returned value is 13 characters long
https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-functions-string#uniquestring

As an additional note, role a... (continued)

5104 of 6712 relevant lines covered (76.04%)

9.88 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6262955177.1 21 Sep 2023 02:23PM UTC 0
76.04
GitHub Action Run
Source Files on build 6262955177
Detailed source file information is not available for this build.
  • Back to Repo
  • 8b5a8b88 on github
  • Prev Build on main (#6262507441)
  • Next Build on main (#6272885433)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc