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

Make the size of an uploaded chunk configurable #103

Closed
lubosmj opened this issue Jul 1, 2024 · 2 comments
Closed

Make the size of an uploaded chunk configurable #103

lubosmj opened this issue Jul 1, 2024 · 2 comments

Comments

@lubosmj
Copy link
Member

lubosmj commented Jul 1, 2024

Right now, we upload data to Pulp by leveraging the default chunk size from pulp-glue (1MB, https://github.com/pulp/pulp-cli/blob/e8583642552247b9c918a4684952fbf2e40ae0f4/pulp-glue/pulp_glue/core/context.py#L48). OSTree tarballs are often 1GB+ large.

We would like to make this option configurable, or overwrite the default value to make the upload faster. This part will have to be updated:

artifact_href = PulpArtifactContext(pulp_ctx).upload(file, chunk_size)
.

@lubosmj
Copy link
Member Author

lubosmj commented Jul 4, 2024

--chunk-size is already implemented for this CLI command:

pulp ostree repository import-all --help
Usage: pulp ostree repository import-all [OPTIONS]

  Import all refs and commits from a tarball

Options:
  --file FILENAME         [required]
  --chunk-size TEXT       Chunk size to break up repository into. Defaults to
                          1MB
  --name TEXT             Name of the repository
  --repository_name TEXT  Name of a repository which contains the imported
                          commits  [required]
  --help                  Show this message and exit.

Ref:


pulp -vv ostree repository import-all --name "cli_test_ostree_repository_import_all_only" --file "repo.tar" --repository_name "repo" --chunk-size 100B
...
.uploads_update : put http://localhost:5001/pulp/api/v3/uploads/01907d47-4ccd-70f6-b782-2cc7ccac3e99/
  User-Agent: Pulp-CLI/0.23.2
  Accept-Encoding: gzip, deflate
  Accept: application/json
  Connection: keep-alive
  Correlation-ID: f54b99eb91c04c30b7dfdf26f71c4d11
  Content-Range: bytes 700-799/1016
...
.uploads_update : put http://localhost:5001/pulp/api/v3/uploads/01907d47-4ccd-70f6-b782-2cc7ccac3e99/
  User-Agent: Pulp-CLI/0.23.2
  Accept-Encoding: gzip, deflate
  Accept: application/json
  Connection: keep-alive
  Correlation-ID: f54b99eb91c04c30b7dfdf26f71c4d11
  Content-Range: bytes 800-899/1016
...

@lubosmj
Copy link
Member Author

lubosmj commented Jul 4, 2024

There is no action needed from our side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

No branches or pull requests

1 participant