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

blob.ParseURL() parses wrong for azurite url with custom hostname #23793

Open
PaulKC opened this issue Nov 21, 2024 · 2 comments
Open

blob.ParseURL() parses wrong for azurite url with custom hostname #23793

PaulKC opened this issue Nov 21, 2024 · 2 comments
Assignees
Labels
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 needs-team-triage Workflow: This issue needs the team to triage. Storage Storage Service (Queues, Blobs, Files)

Comments

@PaulKC
Copy link

PaulKC commented Nov 21, 2024

Bug Report

Using the blob.ParseURL() in azblob return wrong information if azurite is used with a custom hostname e.g. in a docker compose setup.

Used version:
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.5.0

package main

import (
	"fmt"
	"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/blob"
)

func main() {
	parts, err := blob.ParseURL("http://azurite:10000/devstoreaccount1/container/test.csv")
	if err != nil {
		fmt.Println("could not parse url")
		return
	}
	fmt.Printf("Host: %s, Container: %s, Blob: %s", parts.Host, parts.ContainerName, parts.BlobName)
}

Outputs:
Host: azurite:10000, Container: devstoreaccount1, Blob: container/test.csv
instead of
Host: azurite:10000, Container: container, Blob: test.csv

This was fixed in the .NET sdk in Azure/azure-sdk-for-net#13124

I believe it is also the root cause for #23496

@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-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 Service Attention Workflow: This issue is responsible by Azure service team. Storage Storage Service (Queues, Blobs, Files) labels Nov 21, 2024
Copy link

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

@jhendrixMSFT jhendrixMSFT removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. labels Nov 21, 2024
@github-actions github-actions bot added the needs-team-triage Workflow: This issue needs the team to triage. label Nov 21, 2024
@tanyasethi-msft
Copy link
Member

Hi @PaulKC ,
Thank you for reporting this, we are looking into this issue and will get back to you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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 needs-team-triage Workflow: This issue needs the team to triage. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

No branches or pull requests

4 participants