-
Notifications
You must be signed in to change notification settings - Fork 61
OTA-2418: Remove example.com URL from automated garage-sign usage #1169
Conversation
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.
Thanks! So the real test here will be to bitbake some images without the URL set with your new meta-updater branch, and then use this fixed version of garage-deploy to copy them to another account, and then verify that a device can update successfully with the copied objects in the second account. Does that make sense? I seem to recall that being the thing that broke way back when, and hopefully it'll work this time.
src/libaktualizr/uptane/tuf.cc
Outdated
if (custom_uri != "https://example.com/") { | ||
uri_ = std::move(custom_uri); | ||
} | ||
uri_ = std::move(custom_uri); |
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.
Unfortunately we probably have to keep this special rule in place for backwards compatibility. I wish we could remove it but it will break things if we do.
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.
All tests passed, so I am wondering what are the things it will break ?
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.
There are thousands of objects in production/SIT whose Target metadata lists a URL as "example.com". If someone were to use a version of libaktualizr that has my recent fix to actually use that URL field but does not know to special-case and ignore that specific URL, they won't be able to update to those targets any more.
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.
thanks for explanation.
target_json["custom"]["uri"] = "https://example.com/"; | ||
target_json["length"] = 1; | ||
Uptane::Target target("fake_file", target_json); | ||
|
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.
We'll have to keep this test case, too.
Codecov Report
@@ Coverage Diff @@
## master #1169 +/- ##
=======================================
Coverage 77.88% 77.88%
=======================================
Files 170 170
Lines 10052 10052
=======================================
Hits 7829 7829
Misses 2223 2223
Continue to review full report at Codecov.
|
Signed-off-by: Mike Sul <ext-mykhaylo.sul@here.com>
f0ed5e3
to
16bfc5e
Compare
Updated according to the comments. |
Signed-off-by: Mike Sul ext-mykhaylo.sul@here.com
Verification steps:
make check & make qa
Bitbaking and running 'happy path' scenarios on qemu, see this PR advancedtelematic/meta-updater#510 for more details.