-
Notifications
You must be signed in to change notification settings - Fork 183
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
Add unique id to default base name #1953
Conversation
The following pipelines have been queued for testing: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My only concern is resource name length (there are some pretty small restrictions for some RPs), but we won't easily know until we try it. Will also vary based on $UserName
length anyway, so 🤷♂️🚀.
I don't like this. We should fix updating RGs process instead. There are resources where there is a count limit per subscription, you would hit it very quickly while trying to debug a test-resources.json. Doesn't seem there is a scenario where you want to keep abandoning RGs. |
The idea is to have a good default experience. Since we delete resources by default, we should be able to create them by default as well without having failures. |
Having a good default experience is something I agree with. But improving how the script behaves for an existing RG would also provide that. |
Here is the existing error: New-AzADServicePrincipal: C:\Users\jolov\src\r\Azure\azure-sdk-for-net\eng\common\TestResources\New-TestResources.ps1:292 |
I think it's a recent regression from 04e9623#diff-c87aeec4653a134d00324186ecc94dc9c68f42a760ef2db255487abcee95db89 |
@scbedd any idea how we can fix this? |
We can include a random part into the principal name. That's how it worked before. Or delete and re-create a principal. |
Also, it is worth pointing out that, anecdotally, people don't remove their resources by default. This has been pretty apparent from expensive Managed HSMs and their RGs being left around long after tests were re-recorded. So if the idea was a "good default experience now that we delete RGs", I wouldn't call that the norm. Optimizing for the manual experience is, IMO, our best bet. The CI experience has been pretty stable since almost all data necessary is passed in and not calculated (except for |
I meant that our bots will delete the resources if someone created a resource with default arguments. |
Not quickly enough if you are making changes to your test-resources.json |
For that you'd probably want 48hrs instead of 120hrs. 😉 |
The following pipelines have been queued for testing: |
This isn't a new issue but while we have a strategy for cleaning up resources we don't have a good strategy for cleaning up service principals. Creating a new one here all the time seems like it will become an issue in the future. cc @benbp The change does seem like a regression from 04e9623#diff-c87aeec4653a134d00324186ecc94dc9c68f42a760ef2db255487abcee95db89 and seems like a reasonable fix, definitely like it better then the randomized basename, but I'd like @scbedd to take a look as well given he has some of the context for his change. |
Hello @azure-sdk! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Alright, it was already merged in the downstream repos, but I can create a new PR for any feedback you guys have. |
@weshaggard I think we can add a |
Now that we are automatically marking new resources for deletion, we should be able to safely ensure that the base name is unique without worrying about creating too many resources.