- 
                Notifications
    
You must be signed in to change notification settings  - Fork 10
 
Open
Description
Describe the bug
If ProjectsApi.CreateGroup(ctx, newProject).Execute() gets called multiple times close together (ex. in concurrent goroutines) with the same project name, multiple projects with the same name get created.
Ex:
go func() {
	newProject := admin.NewGroupWithDefaults()
	newProject.SetName("duplicate")
	newProject.SetOrgId(atlasOrgID)
	newProject.SetRegionUsageRestrictions("NONE")
	_, _, err := atlasClient.ProjectsApi.CreateGroup(ctx, newProject).Execute()
	if err != nil {
		// One of these should fail.
	}
}()
go func() {
	newProject := admin.NewGroupWithDefaults()
	newProject.SetName("duplicate")
	newProject.SetOrgId(atlasOrgID)
	newProject.SetRegionUsageRestrictions("NONE")
	_, _, err := atlasClient.ProjectsApi.CreateGroup(ctx, newProject).Execute()
	if err != nil {
		// One of these should fail.
	}
}()
Expected behavior
Only one project gets created. Any subsequent attempts return an error.
I understand that this is most likely not an issue with the SDK itself, but I was advised by support to put the bug report here.
Desktop (please complete the following information):
- Lib Version: v20250312007.0.0
 
Metadata
Metadata
Assignees
Labels
No labels