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

Bypass chunked uploading if chunk size exceeds file size #262

Merged
merged 1 commit into from
Jun 11, 2021

Conversation

daviddavis
Copy link
Contributor

[noissue]

@daviddavis daviddavis force-pushed the fix262 branch 2 times, most recently from 3607ecd to 8098316 Compare June 2, 2021 20:19
Copy link
Member

@mdellweg mdellweg left a comment

Choose a reason for hiding this comment

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

Great idea!

pulpcore/cli/core/context.py Outdated Show resolved Hide resolved
@daviddavis
Copy link
Contributor Author

I'm debating about adding an explicit option to also bypass chunk uploading. Wdyt @mdellweg ?

@mdellweg
Copy link
Member

mdellweg commented Jun 7, 2021

I'm debating about adding an explicit option to also bypass chunk uploading. Wdyt @mdellweg ?

Then i would argue, that we'd need a force-chunks option, because large files only work as chunks. I wouldn't do either without anyone asking for it.

pulpcore/cli/core/context.py Outdated Show resolved Hide resolved
pulpcore/cli/core/context.py Outdated Show resolved Hide resolved

def upload(self, file: IO[bytes], chunk_size: int = 1000000, check_exists: bool = True) -> Any:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We're not using check_exists=False anywhere and maintaining it was making the code more and more complex.

@daviddavis daviddavis force-pushed the fix262 branch 2 times, most recently from cd2d888 to a8c8a03 Compare June 9, 2021 20:07
@daviddavis daviddavis force-pushed the fix262 branch 3 times, most recently from 27b08e2 to bc80a40 Compare June 11, 2021 17:42
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.

2 participants