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

Fix/ostree logging #1466

Merged
merged 2 commits into from
Dec 2, 2019
Merged

Fix/ostree logging #1466

merged 2 commits into from
Dec 2, 2019

Conversation

pattivacek
Copy link
Collaborator

No description provided.

By calling getCurrent() in finalizeInstall(), an error was printed that
the stored and deployed hashes did not match. That is expected in that
case. Besides, there was no reason to check the stored hash at that time
at all, so I've refactored the code to only get the hash at that time
and thus only check what we really care about.

Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
Do not be thrown off as I was about Secondaries being able to use
getCurrent() due to calling functions with the word "Primary" in the
name. They will work fine on Secondaries since Secondaries only know
about themselves.

Signed-off-by: Patrick Vacek <patrickvacek@gmail.com>
@codecov-io
Copy link

codecov-io commented Dec 2, 2019

Codecov Report

Merging #1466 into master will decrease coverage by 0.03%.
The diff coverage is 75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1466      +/-   ##
==========================================
- Coverage   80.61%   80.57%   -0.04%     
==========================================
  Files         184      184              
  Lines       11079    11081       +2     
==========================================
- Hits         8931     8929       -2     
- Misses       2148     2152       +4
Impacted Files Coverage Δ
src/libaktualizr/package_manager/ostreemanager.h 100% <ø> (ø) ⬆️
src/libaktualizr/package_manager/ostreemanager.cc 79.02% <75%> (-0.22%) ⬇️
src/libaktualizr/storage/sql_utils.h 84.5% <0%> (-1.41%) ⬇️
src/libaktualizr/storage/sqlstorage.cc 76.67% <0%> (-0.9%) ⬇️
src/libaktualizr/primary/sotauptaneclient.cc 88.79% <0%> (-0.15%) ⬇️
src/libaktualizr/storage/sqlstorage_base.cc 78.37% <0%> (+3.37%) ⬆️
src/libaktualizr/storage/sqlstorage_base.h 100% <0%> (+40%) ⬆️

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 b625d15...8e0a510. Read the comment docs.

Copy link
Contributor

@eu-siemann eu-siemann 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! I think that we maybe can do a little bit better with the naming getCurrent/getCurrentHash, but since we will likely need to revisit the logic there and naming is hard, I think it's good to go as it is.

@pattivacek
Copy link
Collaborator Author

I think that we maybe can do a little bit better with the naming getCurrent/getCurrentHash, but since we will likely need to revisit the logic there and naming is hard, I think it's good to go as it is.

Good point. I was mostly just being lazy but if we come through here again we can do better.

@pattivacek pattivacek merged commit 7c99916 into master Dec 2, 2019
@pattivacek pattivacek deleted the fix/ostree-logging branch December 2, 2019 15:58
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.

5 participants