Project

General

Profile

Refactor #31300

the user shouldn't have to specify the file size when uploading chunks

Added by Evgeni Golov over 1 year ago. Updated 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Content Uploads
Target version:
Branch:
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Currently, the workflow to upload a file to a repository is the following:
1. call content_uploads/create with file size and repo_id
2. call content_uploads/update in a loop with the content_upload_id, the actual chunk content, the offset of the chunk and the file size
3. call repositories/import_uploads
4. call content_uploads/destroy

I find the requirement to pass the file size in every chunk upload confusing. I've provided it already when I created the upload in step1, so I'd expect Katello to just reuse that value (it won't change anyways).


Related issues

Related to Foreman - Tracker #27680: API bugs that need workarounds in foreman-ansible-modulesNew

History

#1 Updated by Evgeni Golov over 1 year ago

  • Related to Tracker #27680: API bugs that need workarounds in foreman-ansible-modules added

#2 Updated by John Mitsch over 1 year ago

  • Triaged changed from No to Yes
  • Target version set to Katello 4.0.0

#3 Updated by Justin Sherrill over 1 year ago

  • Target version changed from Katello 4.0.0 to Katello 4.1.0

#4 Updated by Jonathon Turel 12 months ago

  • Target version changed from Katello 4.1.0 to Katello 4.2.0

#5 Updated by Justin Sherrill 8 months ago

  • Target version changed from Katello 4.2.0 to Katello 4.3.0

#6 Updated by Chris Roberts 6 months ago

  • Target version changed from Katello 4.3.0 to Katello 4.4.0

#7 Updated by Ian Ballou 3 months ago

  • Target version changed from Katello 4.4.0 to Katello 4.5.0

#8 Updated by Justin Sherrill 3 months ago

  • Target version changed from Katello 4.5.0 to Katello Backlog

#9 Updated by Justin Sherrill 3 months ago

from samir:

The upload chunk is an update call on the upload api in pulp3 with upload_href which takes a content_range(offset, offset + actual_chunk_size - 1, size) param as required value which needs to know the size of the file. I couldn't think of any workarounds to this other than querying the pulp api for size on upload or keeping some sort of db in katello.

https://docs.pulpproject.org/pulpcore/restapi.html#operation/uploads_update

#10 Updated by Evgeni Golov 2 months ago

it does need it, sure, but can't Katello calculate it? the same way it happens if the upload happens via the UI which does not have a "size" field ;)

Also available in: Atom PDF