metaflow icon indicating copy to clipboard operation
metaflow copied to clipboard

fix: Removed forward slash to prevent double slashes

Open vamagithub opened this issue 4 years ago • 10 comments

closes #684

vamagithub avatar Sep 30 '21 09:09 vamagithub

I made a slight change to this. Let me know what you think but it LGTM otherwise.

romain-intel avatar Sep 30 '21 18:09 romain-intel

One note on this though: this will be a breaking change of sorts in the sense that it may point things to a different "bucket".

romain-intel avatar Sep 30 '21 18:09 romain-intel

I made a slight change to this. Let me know what you think but it LGTM otherwise.

Thank You. rstrip solution is better than removing "/". Also if in future someone thinks of removing "/" directly from config then this change will not break.

vamagithub avatar Oct 01 '21 07:10 vamagithub

One note on this though: this will be a breaking change of sorts in the sense that it may point things to a different "bucket".

Need to check this. Can u point me in a direction where i can test this?

vamagithub avatar Oct 01 '21 07:10 vamagithub

One note on this though: this will be a breaking change of sorts in the sense that it may point things to a different "bucket".

Need to check this. Can u point me in a direction where i can test this?

Well, I am just saying that if your config had a / at the end, you will be pointing to a bucket like something//foo and now it would be something/foo which isn't the same in S3.

romain-intel avatar Oct 05 '21 17:10 romain-intel

@vamagithub Given that this change is going to be backwards incompatible, rather than making the change here, what do you think of making the change in the main_cli.py instead to ensure that any new configs that are generated, don't have any extraneous slashes?

savingoyal avatar Oct 16 '21 13:10 savingoyal

@vamagithub Given that this change is going to be backwards incompatible, rather than making the change here, what do you think of making the change in the main_cli.py instead to ensure that any new configs that are generated, don't have any extraneous slashes?

I agree, that would be better. Let me know what can i do to help.

vamagithub avatar Oct 25 '21 15:10 vamagithub

Would it be cleaner to leverage the os.path (or even s3path) module to cleanly get consistent paths?

InterferencePattern avatar Mar 29 '23 13:03 InterferencePattern

Going through older PR's, is this one still active and relevant? After a quick test I was at least unable to reproduce the original issue with trailing slashes in the config

saikonen avatar Aug 23 '23 13:08 saikonen

It is probably still valid but would be a breaking change since "foo//bar" is different than "foo/bar" in S3. It tries to "do the right thing by the user" if the user has a trailing slash in their config.

romain-intel avatar Aug 23 '23 15:08 romain-intel