gromero commented on a change in pull request #8738:
URL: https://github.com/apache/tvm/pull/8738#discussion_r703079083
##########
File path: apps/microtvm/reference-vm/base-box-tool.py
##########
@@ -226,18 +227,33 @@ def generate_packer_config(file_path, providers):
def build_command(args):
+ this_dir = pathlib.Path(THIS_DIR)
+ base_box_dir = this_dir / args.platform / "base-box"
+
generate_packer_config(
- os.path.join(THIS_DIR, args.platform, "base-box", PACKER_FILE_NAME),
+ os.path.join(base_box_dir, PACKER_FILE_NAME),
args.provider or ALL_PROVIDERS,
)
env = copy.copy(os.environ)
- packer_args = ["packer", "build"]
+ packer_args = ["packer", "build", "-force"]
Review comment:
@areusch Hi Andrew! Pardon, I missed you comment on this PR. Since I'm
retriggering CI for a couple PRs that were stuck due to CI issues I just
revisited it again and saw your review. Thanks.
So, `-force` will exactly do that, i.e. remove the artifacts and proceed as
in the case where no artifacts exist, hence I really considered to remove the
artifacts manually but thought that since this mechanism is already kind
implemented by packer's `build -force` I considered it would be simpler to use
it, so I don't see any advantage by removing them with rm.
In that case we're presenting to the user the options to proceed when an
artifact exist (like using `--force` in base-box-tool) so the users don't get a
"cryptic" error message from packer/base-box-tool and need to find out by
themselves what's going when base-box-tool fails. Moreover, the user won't
spend time on finding out where exactly is the artifact that needs to be
removed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]