This repository was archived by the owner on Dec 14, 2025. It is now read-only.
feat: add environment variable for configuring environment detection#275
Merged
feat: add environment variable for configuring environment detection#275
Conversation
Author
alexander-fenster
approved these changes
Dec 13, 2019
Codecov Report
@@ Coverage Diff @@
## master #275 +/- ##
==========================================
+ Coverage 89.93% 90.62% +0.69%
==========================================
Files 1 1
Lines 149 160 +11
Branches 35 37 +2
==========================================
+ Hits 134 145 +11
Misses 14 14
Partials 1 1
Continue to review full report at Codecov.
|
soldair
approved these changes
Dec 14, 2019
| */ | ||
| function detectGCPAvailableRetries(): number { | ||
| return process.env.DETECT_GCP_RETRIES | ||
| ? Number(process.env.DETECT_GCP_RETRIES) |
There was a problem hiding this comment.
It's ok if this ends up as a NaN right? Seems like it might do the same thing as zero anyway
Author
There was a problem hiding this comment.
I think this edge-case is okay, I mostly want this option here to allow for some directed experiments with customers. If we find that a certain number of retries works better, we might remove this configuration and try to bake retries back into the client.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This introduces a configuration variable that allows the method used to detect GCP environments,
DETECT_GCP_RETRIES, to be configured.This is based on the hypothesis that both
IPandDNSenvironment detection are sometimes failing.CC: @feywind, I would love to see if this addresses the issues you were seeing during the bootstrapping of
@google-cloud/pubsub.