hashicorp / packer-plugin-azure

Packer plugin for Azure Virtual Machine Image Builders
https://www.packer.io/docs/builders/azure
Mozilla Public License 2.0
47 stars 76 forks source link

Fix v2.1.0 regression when using `custom_managed_image_name` source #402

Closed JenGoldstrich closed 2 months ago

JenGoldstrich commented 2 months ago

On v2.1.0 we switched to using go-azure-sdk base layer clients, which require a polling context, we missed one of those and there isn't a case for this in our acceptance testing currently so this was missed.

Before this change when building using a custom_managed_image_name source

azure-arm.autogenerated_1: output will be in this color.

==> azure-arm.autogenerated_1: Running builder ...
    azure-arm.autogenerated_1: Creating Azure Resource Manager (ARM) client ...
    azure-arm.autogenerated_1: ARM Client successfully created
Build 'azure-arm.autogenerated_1' errored after 957 milliseconds 28 microseconds: loading results: the context used must have a deadline attached for polling purposes, but got no deadline

==> Wait completed after 957 milliseconds 237 microseconds

==> Some builds didn't complete successfully and had errors:
--> azure-arm.autogenerated_1: loading results: the context used must have a deadline attached for polling purposes, but got no deadline

==> Builds finished but no artifacts were created.

After this change the build succeeds

Closes #401