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

Check for practioner-set timeout during ReadDataApply #1041

Conversation

bcmdarroch
Copy link

Fixes:

To test, pull this commit into your provider's go.mod. Set any datasource timeout to 1 min. Apply.

var readTimeout = time.Minute * 1
...
Timeouts: &schema.ResourceTimeout{
	Read: &readTimeout,
},

@bcmdarroch bcmdarroch requested a review from a team as a code owner August 26, 2022 22:12
@bflad bflad added the tf-devex-triage Terraform DevEx project tracking label Aug 29, 2022
@bflad
Copy link
Member

bflad commented Oct 13, 2022

Hi again @bcmdarroch! 👋

It looks like over in #1038 the workaround of using ReadWithoutTimeout was determined. In general, not using practitioner-configurable data source timeouts would be our recommendation for this situation since it could lead to practitioner confusion or configuration ambiguity.

While this particular code change may start the resolution process should practitioner-configurable timeouts have a proper use case, there would also need to be some additional testing to ensure that this wouldn't potentially introduce unexpected panics or other unintended data source behaviors. Since those tests aren't currently included, I'm going to close this for now. If you or someone else is interested in implementing them, we'd be happy to take another look.

Thanks again!

@bflad bflad closed this Oct 13, 2022
@github-actions
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 contributions.
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 Nov 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants