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

OTA-4174: IP-Secondary: match Director's and Imagerepo's targets #1513

Closed
wants to merge 3 commits into from

Conversation

pattivacek
Copy link
Collaborator

Cherry-pick of fc6eafd from #1500 to address a possible bug. Still requires some further investigation and review, but I think we might need this sooner than the rest of that PR.

  • Each target listed in Director's target file should have corresponding match in ImageRepo's one
  • Test for the use-case if IP Secondary Director's target file and ImageRepo's one have different number of targets
  • Separate the ostree specific tests from non-ostree one in the IP Secondary Verification test suite

@codecov-io
Copy link

codecov-io commented Jan 9, 2020

Codecov Report

Merging #1513 into master will decrease coverage by 0.07%.
The diff coverage is 91.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1513      +/-   ##
==========================================
- Coverage   80.85%   80.77%   -0.08%     
==========================================
  Files         184      184              
  Lines       11182    11186       +4     
==========================================
- Hits         9041     9036       -5     
- Misses       2141     2150       +9
Impacted Files Coverage Δ
src/libaktualizr/uptane/directorrepository.h 100% <ø> (ø) ⬆️
src/aktualizr_secondary/aktualizr_secondary.cc 58.4% <100%> (ø) ⬆️
src/libaktualizr/uptane/imagesrepository.h 100% <100%> (ø) ⬆️
src/libaktualizr/uptane/directorrepository.cc 93.33% <85.71%> (-1.01%) ⬇️
src/libaktualizr/storage/sqlstorage_base.h 60% <0%> (-40%) ⬇️
src/libaktualizr/storage/sqlstorage_base.cc 75% <0%> (-3.38%) ⬇️
src/libaktualizr/storage/sql_utils.h 84.72% <0%> (-1.39%) ⬇️
src/libaktualizr/utilities/types.h 83.92% <0%> (-0.29%) ⬇️
src/libaktualizr/storage/sqlstorage.cc 76.33% <0%> (-0.23%) ⬇️
src/libaktualizr/primary/sotauptaneclient.cc 88.81% <0%> (-0.14%) ⬇️
... and 3 more

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 45f5416...02423b8. Read the comment docs.

@pattivacek
Copy link
Collaborator Author

Unfortunately, my first attempt at testing this failed failed with these errors on the Secondary when I sent it an update:

Failed to update director metadata:
Invalid number of targets (should be one): 0

Also seeing this repeatedly on the Primary: Getting the manifest key of a secondary, which is annoying.

@pattivacek pattivacek force-pushed the fix/secondary-verification branch from 47f3ad6 to 324f988 Compare January 9, 2020 13:49
pattivacek and others added 3 commits January 10, 2020 12:31
Co-Authored-By: Mykhaylo Sul <myk.sul@gmail.com>
Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
- Each target listed in Director's target file should have corresponding match in ImageRepo's one
- Test for the use-case if IP Secondary Director's target file and ImageRepo's one have different number of targets
- Separate the ostree specific tests from non-ostree one in the IP Secondary Verification test suite

Signed-off-by: Mike Sul <ext-mykhaylo.sul@here.com>
Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
Also include the serial to make it somewhat more useful.

Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
@pattivacek pattivacek force-pushed the fix/secondary-verification branch from 324f988 to 02423b8 Compare January 10, 2020 11:34
@pattivacek
Copy link
Collaborator Author

Doesn't work and seems unnecessary after all.

@pattivacek pattivacek closed this Jan 10, 2020
@pattivacek pattivacek deleted the fix/secondary-verification branch July 13, 2020 15:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants