Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

OTA-3716: Full file download If a byte range request fails #1416

Merged
merged 1 commit into from
Oct 16, 2019

Conversation

mike-sul
Copy link
Collaborator

Fallback to a full file download if a byte range request fails (a server does not support it).

Ideally, this logic should be "behind" HttpInterface interface and encapsulated in HttpClient implementation of this interface. Unfortunately, there is an additional user context for the download process that is owned by a client (DownloadMetaStruct in packagemanagerinterface.cc) which has to be managed/reset in case of download retry and which is opaque within HttpClient.

Signed-off-by: Mykhaylo Sul myk.sul@gmail.com

Copy link
Collaborator

@pattivacek pattivacek left a comment

Choose a reason for hiding this comment

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

Looks good in general, thanks!

@mike-sul mike-sul force-pushed the fix/OTA-3716/fallback-for-failed-byte-range branch from 20e45da to 8131bed Compare October 16, 2019 08:53
@codecov-io
Copy link

codecov-io commented Oct 16, 2019

Codecov Report

Merging #1416 into master will increase coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1416      +/-   ##
==========================================
+ Coverage   80.38%   80.44%   +0.05%     
==========================================
  Files         181      181              
  Lines       10637    10642       +5     
==========================================
+ Hits         8551     8561      +10     
+ Misses       2086     2081       -5
Impacted Files Coverage Δ
...tualizr/package_manager/packagemanagerinterface.cc 94.11% <100%> (+0.36%) ⬆️
src/libaktualizr/crypto/keymanager.cc 88.74% <0%> (-0.67%) ⬇️
src/libaktualizr/package_manager/ostreemanager.cc 78.7% <0%> (-0.39%) ⬇️
src/libaktualizr/primary/sotauptaneclient.cc 89.1% <0%> (-0.15%) ⬇️
src/libaktualizr/http/httpinterface.h 100% <0%> (ø) ⬆️
src/libaktualizr/storage/sqlstorage.cc 77.81% <0%> (+0.45%) ⬆️
src/aktualizr_info/main.cc 92.11% <0%> (+0.49%) ⬆️
src/libaktualizr/storage/sqlstorage_base.cc 80.4% <0%> (+1.35%) ⬆️
src/aktualizr_info/aktualizr_info_config.h 100% <0%> (+50%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a3d37b8...dc94edd. Read the comment docs.

… not supported by a server

Signed-off-by: Mykhaylo Sul <myk.sul@gmail.com>
@mike-sul mike-sul force-pushed the fix/OTA-3716/fallback-for-failed-byte-range branch from 8131bed to dc94edd Compare October 16, 2019 09:22
@mike-sul
Copy link
Collaborator Author

can it be merged ?

@lbonn lbonn merged commit 4d9358c into master Oct 16, 2019
@lbonn lbonn deleted the fix/OTA-3716/fallback-for-failed-byte-range branch October 16, 2019 12:01
@lbonn
Copy link
Contributor

lbonn commented Oct 16, 2019

Sure :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants