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

refactor: rewrite Extension in TypeScript #1164

Merged
merged 13 commits into from
Jun 24, 2023
Merged

Conversation

trim21
Copy link
Contributor

@trim21 trim21 commented May 31, 2023

API result of ListObjectsV2WithMetadata doesn't match go sdk, CommonPrefixes result are stored as objects, is this expected? or it's a bug?

  if (xmlobj.CommonPrefixes) {
    toArray(xmlobj.CommonPrefixes).forEach((commonPrefix) => {
      result.objects.push({ prefix: sanitizeObjectKey(toArray(commonPrefix.Prefix)[0]), size: 0 })
    })
  }
type ListBucketResult struct {
	// A response can contain CommonPrefixes only if you have
	// specified a delimiter.
	CommonPrefixes []CommonPrefix
	// Metadata about each object returned.
	Contents  []ObjectInfo
...
}

https://github.com/minio/minio-go/blob/68418bf9a5bb03337c8349523a5b188feb5ff2be/api-s3-datatypes.go#L201-L203

@trim21 trim21 marked this pull request as ready for review May 31, 2023 09:56
@trim21 trim21 changed the title typescript extension refactor: rewrite Extension in TypeScript May 31, 2023
@prakashsvmx
Copy link
Member

API result of ListObjectsV2WithMetadata doesn't match go sdk, CommonPrefixes result are stored as objects, is this expected? or it's a bug?

@trim21
This should be fine. because, it is just an internal sdk representation/handling. the consumer only expects ObjectInfo rows in the stream (the end result).

I have tested and verified ( for the following important cases)

  • nextContinuationToken:,
  • isTruncated:true|false

prakashsvmx
prakashsvmx previously approved these changes Jun 12, 2023
Copy link
Member

@prakashsvmx prakashsvmx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested. LGTM 👍

@trim21
Copy link
Contributor Author

trim21 commented Jun 21, 2023

@kaankabalak please?

@kaankabalak
Copy link
Contributor

@kaankabalak please?

Hi @trim21, would it be possible to address the conflicts?

@trim21
Copy link
Contributor Author

trim21 commented Jun 23, 2023

@kaankabalak done

prakashsvmx
prakashsvmx previously approved these changes Jun 23, 2023
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

Successfully merging this pull request may close these issues.

3 participants