[terraform] Cache client-side timeouts when a remote host is unreachable#5407
Merged
[terraform] Cache client-side timeouts when a remote host is unreachable#5407
Conversation
brrygrdn
commented
Jul 21, 2022
Contributor
Author
There was a problem hiding this comment.
I found it curious that the file parser doesn't already use Dependabot::Terraform::RegistryClient, but at a cursory read it seems like it is always going to be making unauthenticated calls so this is likely working as intended.
@jurre am I correct in thinking we intentionally do not use the terraform client here?
Member
There was a problem hiding this comment.
It's been a minute since I've worked on this, but I do think you're right yes
6bc7d5b to
1583918
Compare
landongrindheim
approved these changes
Jul 28, 2022
bdragon
approved these changes
Jul 28, 2022
Nishnha
requested changes
Aug 16, 2022
Member
Nishnha
left a comment
There was a problem hiding this comment.
#get_proxied_source is being duplicated here since it was moved to the RegistryClient in a more recent PR
Nishnha
approved these changes
Aug 17, 2022
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows up on #5142
This PR switches Terraform over to use the
Dependabot::RegistryClientso it benefits from caching of unreachable hosts.Since this gem implementsI walked that back as it just creates problems with the use of class variables and there's not a lot gained by inheritance.Dependabot::Terraform::RegistryClient, I incorporated the caching client as a base class. I have one question about the existing implementation that might require some extra changes