-
Notifications
You must be signed in to change notification settings - Fork 60
Add a separate API call to send the device manifest #1176
Conversation
This looks fine, but can you explain the context a bit more? And we should probably add an item to the actions.md list, although it's probably about time to revisit if that list is actually useful anymore considering that the requirements management process seems to be ignoring it. |
ff5af28
to
2ba62e3
Compare
Codecov Report
@@ Coverage Diff @@
## master #1176 +/- ##
==========================================
- Coverage 77.97% 77.91% -0.06%
==========================================
Files 170 170
Lines 9998 10003 +5
==========================================
- Hits 7796 7794 -2
- Misses 2202 2209 +7
Continue to review full report at Codecov.
|
2ba62e3
to
be3d936
Compare
I've added a sub-item to the |
Precisely! |
@@ -122,6 +122,12 @@ std::future<result::Install> Aktualizr::Install(const std::vector<Uptane::Target | |||
return api_queue_.enqueue(task); | |||
} | |||
|
|||
std::future<bool> Aktualizr::SendManifest(const Json::Value &custom) { | |||
auto promise = std::make_shared<std::promise<bool>>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Funny that no code analyzer is complaining about an unused variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably more difficult to flag that realiably in C++, because it could just rely on side effects of constructors and destructors. For example, a mutex guard is typically not referenced outside its declaration.
be3d936
to
76b939f
Compare
Might not be strictly necessary, but can you change the |
How would it look like right now, with all the other calls |
@lbonn Could you explain why |
The three calls you mentioned won't include the custom data supplied to |
@lbonn Right, but that doesn't prevent a user from sending the manifest with custom data again, does it? |
Sure but I'm worried that it would be ignored by backend. Would be good (but maybe impractical?) if the custom data would be sent along with all attempts after the call to |
I don't think we should try to be extra smart here and send potentially outdated custom data each time to the backend. In my view, it is better to be explicit and don't interact with the custom data in any way. |
28b580e
to
f3aa796
Compare
Sure we can merge it now. Just that it doesn't sound easy to use reliably in this state. Or should we have a way to inhibit other manifest sends, so that the user has really full control on that? |
Signed-off-by: Anton Gerasimov <anton.gerasimov@here.com> Signed-off-by: Eugene Smirnov <evgenii.smirnov@here.com>
Signed-off-by: Anton Gerasimov <anton.gerasimov@here.com> Signed-off-by: Eugene Smirnov <evgenii.smirnov@here.com>
Signed-off-by: Eugene Smirnov <evgenii.smirnov@here.com>
Signed-off-by: Eugene Smirnov <evgenii.smirnov@here.com>
f3aa796
to
2a8efdc
Compare
@lbonn That would be a more consistent approach IMO. But, to be honest, I'm still not sure if this is what we want. I've added a description of this (inconsistent?) behavior to the API call description, so we can later return to this problem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I agree that there is some inconsistency with the custom metadata, but if we don't know what will be most useful for potential users of this feature, we shouldn't guess and add more complexity that might not be useful. I'd vote leaving it as is; the comment in aktualizr.h is good.
Cool, I'm merging it then, thank you @lbonn and @patrickvacek! |
No description provided.