Repository navigation
boot-aws: drop the redundant --arch flag - #2811
Conversation
There was a problem hiding this comment.
Thank you. I can see how it makes sense as the instance-type determines the architecture. That said I think the reason why instance-type was optional is that it's easier to remember the name of the architecture than the name of an instance type that fits whatever image you're trying to boot (for those rare cases you're running it locally). Wondering what others think here. Note that this is mostly just a test utility so moving the logic from the boot-aws binary into the testlib is a lateral move imo.
Yeah... the trade off is between an extra option and logic to disambiguate and some convenience. @mmummigatti and I decided this way because it is a tool that rarely run manually and we preferred the simplicity of just having one. Something needs to be done though, because the current state is confusing (when passing both arguments accidentally). |
c801306 to
c83b813
Compare
Removed the merge commit and updated the branch with a linear history. The PR now contains only the two feature commits. |
achilleas-k
left a comment
There was a problem hiding this comment.
I agree with Sanne's comment that this is a bit of a lateral move, but I don't mind the change and this does make sense from a tool simplification perspective.
LGTM
Summary
boot-awsused--archonly to select an EC2 instance type from a hard-coded mapping ofx86_64andaarch64.This change removes
--archand makes--instance-typemandatory instead. The architecture-to-instance-type mapping is moved toimgtestlib.boot.aws_instance_type(), keeping the boot-test configuration within the test harness.Compatibility
Breaking change:
--instance-typewas previously optional and is now required for bothsetupandrun. The existing caller,cmd_boot_aws(), has been updated accordingly.