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

Speculative Flag inaccurate on Configuration Version List #459

Merged
merged 2 commits into from Jul 11, 2022

Conversation

straubt1
Copy link
Contributor

@straubt1 straubt1 commented Jul 8, 2022

Description

When Listing Configuration Versions, the Speculative flag was always returning false.
It appears this was due to a trailing space in the struct.

go-tfe version 1.3.0

This change removes that space and allows the function call to return accurately if the CV is speculative.

Testing plan

To replicate, create a CV that is marked as speculative, then list CV's for that workspace.

	cv, err := client.ConfigurationVersions.List(ctx, w.ID, &tfe.ConfigurationVersionListOptions{
		ListOptions: tfe.ListOptions{PageSize: 100},
		Include:     []tfe.ConfigVerIncludeOpt{},
	})

The resulting cv variable will not be marked as Speculative.

sebasslash
sebasslash previously approved these changes Jul 11, 2022
Copy link
Contributor

@sebasslash sebasslash left a comment

Choose a reason for hiding this comment

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

Good catch 👍 . Approved !

Copy link
Contributor

@sebasslash sebasslash left a comment

Choose a reason for hiding this comment

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

🏇 💨

@sebasslash sebasslash merged commit 11709cb into main Jul 11, 2022
@sebasslash sebasslash deleted the tt-cv-speculative-fix branch July 11, 2022 18:21
@github-actions
Copy link

Reminder to the contributor that merged this PR: if your changes have added important functionality or fixed a relevant bug, open a follow-up PR to update CHANGELOG.md with a note on your changes.

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.

None yet

2 participants