Revert "api: artifacts: Move BundleTestUpdatePayloads into chroot"
This reverts commit cb454e0444735d23845f5d092b49c6a6090534bc.
Reason for revert: causing BundleTestUpdatePayloads failures for
minios boards
Original change's description:
> api: artifacts: Move BundleTestUpdatePayloads into chroot
>
> api/gen changes to pull in:
>
> artifacts: Move BundleTestUpdatePayloads into chroot
>
> We want to run this endpoint inside the chroot, because it forks out to
> many programs that need to enter the chroot, and that's a bit unwieldy
> to do properly (i.e., plumb all the right chroot arguments) in some
> cases.
>
> The router and field_handler layers do most of the artifact (ResultPath
> and Path) translation and copying for us, so we only have to do a few
> things to place artifacts into the in-chroot tmp directory, instead of
> directly into the |result_path|.
>
> I don't convert all the other "legacy" bundle endpoints here, since
> AFAICT, they handle chroot entry properly today.
>
> BUG=b:187787264
> TEST=./run_tests
> TEST=manual build_api execution
>
> Cq-Depend: chromium:4703006
> Change-Id: I60d106bbce1e324850aec4d4fc69fdc054b5c3e2
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4701636
> Reviewed-by: Alex Klein <saklein@chromium.org>
> Tested-by: Brian Norris <briannorris@chromium.org>
> Commit-Queue: Brian Norris <briannorris@chromium.org>
BUG=b:187787264
Change-Id: Ibdc9b82f78f3ff967f02b86165d451e16601da05
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4717971
Auto-Submit: Brian Norris <briannorris@chromium.org>
Reviewed-by: Yunfan Chen <yunfanc@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Yunfan Chen <yunfanc@chromium.org>
Commit-Queue: Yunfan Chen <yunfanc@chromium.org>
diff --git a/api/controller/artifacts_unittest.py b/api/controller/artifacts_unittest.py
index 57e72df..9630a6d 100644
--- a/api/controller/artifacts_unittest.py
+++ b/api/controller/artifacts_unittest.py
@@ -692,19 +692,15 @@
)
actual = [
- os.path.basename(artifact.artifact_path.path)
+ os.path.relpath(artifact.artifact_path.path, self.archive_root)
for artifact in self.output_proto.artifacts
]
expected = ["payload1.bin", "payload2.bin"]
self.assertCountEqual(actual, expected)
actual = [
- os.path.basename(path)
- for path in osutils.DirectoryIterator(
- os.path.dirname(
- self.output_proto.artifacts[0].artifact_path.path
- )
- )
+ os.path.relpath(path, self.archive_root)
+ for path in osutils.DirectoryIterator(self.archive_root)
]
self.assertCountEqual(actual, expected)