apigee / apigeelint

Static code analysis for Apigee proxy bundles to encourage API developers to use best practices and avoid anti-patterns.
Apache License 2.0
92 stars 71 forks source link

warn when LoadBalancer contains duplicate servers #469

Open dfong opened 2 hours ago

dfong commented 2 hours ago

a LoadBalancer should not have multiple Servers with the same name.

for example, i would like apigeelint to warn about this:

<LoadBalancer>
    <Server name="gateway-west"/>
    <Server name="gateway-west"/>
</LoadBalancer>

this is a bad practice at the very least. i would suggest making it a warning rather than an error, since neither the documentation nor the control plane forbids it. however, if this changes in the future, maybe apigeelint could upgrade it to an error.

DinoChiesa commented 2 hours ago

That seems like a good change to make.