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

feat: add attribute queue_status to resource azuredevops_build_definition #916

Merged

Conversation

jan-mrm
Copy link
Contributor

@jan-mrm jan-mrm commented Nov 2, 2023

All Submissions:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My code follows the code style of this project.
  • I ran lint checks locally prior to submission.
  • Have you checked to ensure there aren't other open PRs for the same update/change?

What about the current behavior has changed?

added queue_status as new attribute in resource azuredevops_build_definition to enable the use to configure the setting of the pipeline. Prior the pipeline was always enabled. With this PR enabled is the default and additional paused and disabled are allowed to be set too.

Issue Number: #915

closes #915

Does this introduce a change to go.mod, go.sum or vendor/?

  • Yes
  • No

Does this introduce a breaking change?

  • Yes
  • No

Any relevant logs, error output, etc?

(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)

Other information

Copy link
Collaborator

@xuzhang3 xuzhang3 left a comment

Choose a reason for hiding this comment

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

@jan-mrm AccTest failed, you need add queue_status to the data source too.

=== CONT  TestAccBuildDefinition_with_path_DataSource
panic: Invalid address to set: []string{"queue_status"}

goroutine 1511 [running]:
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).Set(0xc000ac6e80, {0x12aa477, 0xc}, {0x10ee840, 0xc00028f730})
        D:/workspace/GolandProjects/terraform-provider-azuredevops/vendor/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema/resource_data.go:230 +0x2b5
github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/service/build.flattenBuildDefinition(0xc00044fb80?, 0xc000a8f8c0, {0xc000d163c0, 0x24})
        D:/workspace/GolandProjects/terraform-provider-azuredevops/azuredevops/internal/service/build/resource_build_definition.go:541 +0x425

@jan-mrm
Copy link
Contributor Author

jan-mrm commented Nov 6, 2023

@xuzhang3 thanks, I added it. I didn't notice that the same flatten function was used in the data source as well.

@jan-mrm jan-mrm requested a review from xuzhang3 November 6, 2023 10:19
@jan-mrm jan-mrm requested a review from xuzhang3 November 7, 2023 08:26
@xuzhang3
Copy link
Collaborator

xuzhang3 commented Nov 8, 2023

=== RUN   TestAccBuildDefinition_DataSource
=== PAUSE TestAccBuildDefinition_DataSource
=== RUN   TestAccBuildDefinition_with_path_DataSource
=== PAUSE TestAccBuildDefinition_with_path_DataSource
=== RUN   TestAccBuildDefinition_Basic
=== PAUSE TestAccBuildDefinition_Basic
=== RUN   TestAccBuildDefinition_PathUpdate
=== PAUSE TestAccBuildDefinition_PathUpdate
=== RUN   TestAccBuildDefinition_WithVariables
=== PAUSE TestAccBuildDefinition_WithVariables
=== RUN   TestAccBuildDefinition_Schedules
=== PAUSE TestAccBuildDefinition_Schedules
=== CONT  TestAccBuildDefinition_DataSource
=== CONT  TestAccBuildDefinition_PathUpdate
=== CONT  TestAccBuildDefinition_Schedules
=== CONT  TestAccBuildDefinition_Basic
=== CONT  TestAccBuildDefinition_with_path_DataSource
=== CONT  TestAccBuildDefinition_WithVariables
--- PASS: TestAccBuildDefinition_with_path_DataSource (48.00s)
--- PASS: TestAccBuildDefinition_Schedules (50.15s)
--- PASS: TestAccBuildDefinition_Basic (52.16s)
--- PASS: TestAccBuildDefinition_DataSource (55.34s)
--- PASS: TestAccBuildDefinition_PathUpdate (64.73s)
--- PASS: TestAccBuildDefinition_WithVariables (83.51s)
PASS
ok      github.com/microsoft/terraform-provider-azuredevops/azuredevops/internal/acceptancetests        89.840s

@xuzhang3 xuzhang3 merged commit 92f0e7e into microsoft:main Nov 8, 2023
@jan-mrm
Copy link
Contributor Author

jan-mrm commented Nov 15, 2023

do you have an estimation when the next release will be published? 🙂

@xuzhang3
Copy link
Collaborator

@jan-mrm New version will be available in the early Dec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

azuredevops_build_definition: add possibility to enable/pause/disable
2 participants