Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pollingContext for data disk snapshot #419

Merged
merged 1 commit into from
May 28, 2024

Conversation

dreweasland
Copy link
Contributor

With the move to the latest SDK, it appears that the polling context isn't utilized during data disk snapshot creation. This was causing the following error when a data disk snapshot was requested: the context used must have a deadline attached for polling purposes, but got no deadline

I've updated the Get call to utilize pollingContext.

Built the plugin from my forked branch and ran it and it was able to finish successfully

2024/05/24 19:49:54 packer-plugin-azure_v2.1.5_x5.0_linux_amd64 plugin: 2024/05/24 19:49:54 [DEBUG] GET https://management.azure.com/subscriptions/****/resourceGroups/****/providers/Microsoft.Compute/snapshots/****?api-version=2022-03-02
==> azure-arm.trek_image:  -> Snapshot ID : '/subscriptions/****/resourceGroups/****/providers/Microsoft.Compute/snapshots/****'

@dreweasland dreweasland requested a review from a team as a code owner May 24, 2024 19:54
Copy link

hashicorp-cla-app bot commented May 24, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@lbajolet-hashicorp lbajolet-hashicorp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @dreweasland,

Good catch and thanks for the fix, from a quick glance this looks good to me, thanks for confirming this fixes the problem in your case.

I'll let @JenGoldstrich review and merge this since she's our expert/maintainer for this plugin, but this looks good to me, approving in advance.

@JenGoldstrich
Copy link
Contributor

Hey @dreweasland Good catch and thanks for this contribution!

@JenGoldstrich JenGoldstrich merged commit 182e0b6 into hashicorp:main May 28, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants