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

GetObjectTagging is not keeping tags list order #79

Open
mniewrzal opened this issue Jan 18, 2024 · 0 comments
Open

GetObjectTagging is not keeping tags list order #79

mniewrzal opened this issue Jan 18, 2024 · 0 comments

Comments

@mniewrzal
Copy link
Contributor

mniewrzal commented Jan 18, 2024

Minio implementation is encoding GetObjectTagging results without keeping the same order as input keys. It's not a big problem but because of that some ceph tests are flaky (e.g. test_get_obj_tagging). Test to describe issue:

func TestTags(t *testing.T) {
	tt, err := tags.NewTags(map[string]string{
		"0": "0",
		"1": "1",
	}, true)
	require.NoError(t, err)

	var bytesBuffer bytes.Buffer
	e := xml.NewEncoder(&bytesBuffer)
	err = e.Encode(tt)
	require.NoError(t, err)

	require.Equal(t, "<Tagging><TagSet><Tag><Key>0</Key><Value>0</Value></Tag><Tag><Key>1</Key><Value>1</Value></Tag></TagSet></Tagging>", bytesBuffer.String())
}

https://github.com/storj/minio/blob/main/cmd/object-handlers.go#L3555

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant