Skip to content

Bypass chunked uploading if chunk size exceeds file size#262

Merged
daviddavis merged 1 commit into
pulp:developfrom
daviddavis:fix262
Jun 11, 2021
Merged

Bypass chunked uploading if chunk size exceeds file size#262
daviddavis merged 1 commit into
pulp:developfrom
daviddavis:fix262

Conversation

@daviddavis
Copy link
Copy Markdown
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
Copy Markdown
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!

Comment thread pulpcore/cli/core/context.py Outdated
@daviddavis
Copy link
Copy Markdown
Contributor Author

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

@mdellweg
Copy link
Copy Markdown
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.

Comment thread pulpcore/cli/core/context.py Outdated
Comment thread pulpcore/cli/core/context.py Outdated
READ_ID = "artifacts_read"
CREATE_ID = "artifacts_create"

def upload(self, file: IO[bytes], chunk_size: int = 1000000, check_exists: bool = True) -> Any:
Copy link
Copy Markdown
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
Comment thread pulpcore/cli/core/context.py Outdated
@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