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

[storage] Swift and S3 driver does not have the same upload behaviour #91

Closed
EtienneM opened this issue Aug 26, 2019 · 0 comments · Fixed by #92
Closed

[storage] Swift and S3 driver does not have the same upload behaviour #91

EtienneM opened this issue Aug 26, 2019 · 0 comments · Fixed by #92
Labels
question Further information is requested

Comments

@EtienneM
Copy link
Member

When using the Upload method, on Swift we remove the prefix / (https://github.com/Scalingo/go-utils/blob/master/storage/swift.go#L120):

func (s *Swift) fullPath(path string) string {
	return strings.TrimLeft(s.cfg.Prefix+"/"+path, "/")
}

But we don't do the same with S3. Hence for the same code, when I switch from one driver to another I don't have the same upload behaviour. It's annoying as with s3cmd, here is what I saw:

╰─$ s3cmd ls s3://auditlogs-development                                                                                                     
                       DIR   s3://auditlogs-development//

Then I need to write the following to see my upload:

╰─$ s3cmd ls s3://auditlogs-development//           
                       DIR   s3://auditlogs-development//2019-08-26/

It confused me...

@Soulou Don't you think we should have the same behaviour for both? Do you prefer to remove this behaviour from Swift or add it to S3?

@EtienneM EtienneM added the question Further information is requested label Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant