Skip to content

GetObjectTagging is not keeping tags list order #79

Description

@mniewrzal

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/eb9c3875df54210b47a60fb92a069449131fcfc9/cmd/object-handlers.go#L3555

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions