Skip to content
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

azqueue Create() behavior does not match the method's documentation #20683

Closed
eduardodbr opened this issue Apr 22, 2023 · 1 comment · Fixed by #20697
Closed

azqueue Create() behavior does not match the method's documentation #20683

eduardodbr opened this issue Apr 22, 2023 · 1 comment · Fixed by #20697
Assignees
Labels
AzQueue Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Storage Storage Service (Queues, Blobs, Files)

Comments

@eduardodbr
Copy link

eduardodbr commented Apr 22, 2023

Bug Report

  • github.com/Azure/azure-sdk-for-go/sdk/storage/azqueue v0.1.0
  • go version go1.20.3 darwin/arm64

The documentation for (q *QueueClient) Create() states If a queue with the same name already exists, the operation fails.. However, if a queue with the same name already exists it does not fail or return any error.

When creating a new queue, azure API returns 201 after creating it, but if it already exists it returns 204. I was expecting the method's documentation to be more clear about not returning an error or return 409 QueueAlreadyExists.

To reproduce:

        connStr := "" // update this
	queueName := "test"
	client, err := azqueue.NewServiceClientFromConnectionString(connStr, nil)
	if err != nil {
		panic(err)
	}
	queueClient := client.NewQueueClient(queueName)
	resp, err := queueClient.Create(context.Background(), &azqueue.CreateOptions{})
	if err != nil {
		panic(err)
	}
	resp, err = queueClient.Create(context.Background(), &azqueue.CreateOptions{})
	if err != nil {
		panic(err)
	}
@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-triage Workflow: This issue needs the team to triage. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Storage Storage Service (Queues, Blobs, Files) labels Apr 22, 2023
@jhendrixMSFT jhendrixMSFT removed the needs-team-triage Workflow: This issue needs the team to triage. label Apr 24, 2023
@github-actions github-actions bot added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Apr 24, 2023
@tasherif-msft tasherif-msft self-assigned this Apr 24, 2023
@tasherif-msft
Copy link
Contributor

Hi @eduardodbr, good catch, we will correct our documentation to reflect the behavior.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AzQueue Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants