return empty array for GetAll intead of err#1
Closed
johnrengelman wants to merge 1 commit intokelseyhightower:masterfrom
johnrengelman:empty-list
Closed
return empty array for GetAll intead of err#1johnrengelman wants to merge 1 commit intokelseyhightower:masterfrom johnrengelman:empty-list
johnrengelman wants to merge 1 commit intokelseyhightower:masterfrom
johnrengelman:empty-list
Conversation
Owner
|
@johnrengelman This will break things as we want to ensure if no match is found we return an error. Is the idea being we want an empty list in some cases? |
Author
|
Yes. For example, you have a template for HAProxy that relies on Consul returning the healthy hosts for a service. If there are none, then Consul returns an empty list which would cause an error in confd when the template is processed. But this isn't really an error condition as having no backend servers is a valid state for HAProxy. |
Author
|
Perhaps a new function that doesn't error? |
3adb8cf to
7f9c7f3
Compare
Collaborator
|
Fixed in 32a4556 |
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.
Support template processing where a key may not be available at templating time (i.e. no passing servers for a Consul service health check)
kelseyhightower/confd#102