Skip to content

Fix multisource clienttoken #13

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

Merged
merged 2 commits into from
Apr 24, 2025

Conversation

gitmkn
Copy link
Collaborator

@gitmkn gitmkn commented Apr 24, 2025

@Jalle19
The purpose of ClientToken is to ensure request idempotency in case the request needs to be retried. This means the value must be unique for all unique RunInstances API calls.

When building a template that references the same source multiple times (or multiple different sources), many calls to RunInstances are made. However, the same auto-generated instance name was used as ClientToken.

This changes ClientToken to be unique regardless of whether the user has supplied a unique instance_name for each source/build.

Fixes hashicorp#6

Added additional logging for the instance IDs created to ease debugging.

The purpose of ClientToken is to ensure request idempotency in case the request needs to be retried. This means the value must be unique for all unique RunInstances API calls.

When building a template that references the same source multiple times (or multiple different sources), many calls to RunInstances are made. However, the same auto-generated instance name was used as "ClientToken".

This changes ClientToken to be unique regardless of whether the user has supplied a unique "instance_name" for each source/build.

Fixes hashicorp#6
@gitmkn gitmkn merged commit 988699c into tencentcloudstack:main Apr 24, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tencentcloud-cvm Failed to wait for instance ready: instance(ins-xxxx) not exist
2 participants