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

Fix typo in aws_medialive_channel documentation #33410

Merged
merged 5 commits into from
Dec 12, 2023

Conversation

justinretzolk
Copy link
Member

@justinretzolk justinretzolk commented Sep 11, 2023

Description

This PR fixes a typo in the aws_medialive_channel documentation, so that the docs match the underlying schema.

Important

As called out in the comments below, the field in the SDK is actually FailoverConditions, as the docs currently list. If I'm not mistaken, making that change would be considered breaking, so I'm interested in input on which way to go with this.

Relations

Closes #33407
Closes #33550

References

Schema

Output from Acceptance Testing

N/a, docs

@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/XS Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/medialive Issues and PRs that pertain to the medialive service. labels Sep 11, 2023
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Sep 11, 2023
@gbw
Copy link
Contributor

gbw commented Sep 11, 2023

Looks like the schema should be updated to match docs. https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/medialive/types#AutomaticInputFailoverSettings

@justinretzolk
Copy link
Member Author

Hey @gbw 👋 Nice catch! I agree with you that updating the schema to more accurately match the SDK is probably the better way to go about this. I think that would be classified as a breaking change, so I'll wait on one of the provider team folks to chime in as well to see how they'd like to go about it.

@gbw
Copy link
Contributor

gbw commented Sep 11, 2023

Sounds good to me. Just for reference the flatten/expand for this type was only just added in 5.16.0.

Copy link
Member

@jar-b jar-b left a comment

Choose a reason for hiding this comment

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

LGTM 👍

For arguments which are arrays in the AWS API, but represented as blocks in the AWS Provider, we often adopt singular versions of the attribute name for improved readability. In this instance,

resource "aws_medialive_channel" "example" {
  # this would be nested in a real configuration, but for simplicity is represented as a root argument here
  failover_condition {
    # condition 1
  }
  failover_condition {
    # condition 2  
  }
}

Reads slightly better than having multiple blocks titled failure_conditions

resource "aws_medialive_channel" "example" {
  failover_conditions {
    # condition 1
  }
  failover_conditions {
    # condition 2  
  }
}

In this case my personal opinion is that the documentation update is sufficient.

@gbw
Copy link
Contributor

gbw commented Sep 12, 2023

Please update the other failure_conditions references in support of this change.

@gbw
Copy link
Contributor

gbw commented Sep 12, 2023

Thanks for the context @jar-b. I think this case is a little odd since within a failure conditions block multiple conditions can be set (i.e. audio, input, and/or video).

@evelynhathaway
Copy link

I don't think this is a typo in the documentation, or at least not only the documentation. The field doesn't work because half of the code uses the the old value and half uses the new value.

We've the opportunity to pick the pluralization that we want here since I don't think this field ever worked, so would not be a breaking change in my book.

See my comment on a related issue #33550 (comment)

@gbw
Copy link
Contributor

gbw commented Oct 11, 2023

@justinretzolk could you add this change or would you prefer a separate pull request to fix?

Copy link

github-actions bot commented Nov 8, 2023

Thank you for your contribution! 🚀

A new usage of AWS SDK for Go V1 was detected. Please prefer AWS SDK for Go V2 for all net-new services. If this is an enhancement or bug fix to an existing AWS SDK Go V1 based resource, this comment can be safely ignored.

For additional information refer to the AWS SDK for Go Versions page in the contributor guide.

@justinretzolk
Copy link
Member Author

Hey @gbw @evelynhathaway 👋 Thank you for the additional input here! I've pushed additional changes to address those points as well.

@justinretzolk justinretzolk requested a review from jar-b November 8, 2023 18:09
@justinretzolk justinretzolk merged commit 353ea31 into main Dec 12, 2023
@justinretzolk justinretzolk deleted the d-medialive_channel-typo branch December 12, 2023 16:51
@github-actions github-actions bot added this to the v5.31.0 milestone Dec 12, 2023
github-actions bot pushed a commit that referenced this pull request Dec 12, 2023
Copy link

This functionality has been released in v5.31.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/medialive Issues and PRs that pertain to the medialive service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
5 participants