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

apigee lint failing if targets/default.xml has HealthMonitor #320

Closed satishbkodali closed 2 years ago

satishbkodali commented 2 years ago

apigeelint failing if proxy is doing loadbalancing and health montior is failing. This is happening in later

image

sample target.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TargetEndpoint name="default">
    <Description/>
    <FaultRules/>
    <PreFlow name="PreFlow">
        <Request/>
        <Response/>
    </PreFlow>
    <PostFlow name="PostFlow">
        <Request/>
        <Response/>
    </PostFlow>
    <Flows/>
     <HTTPTargetConnection>
        <LoadBalancer>
            <Algorithm>RoundRobin</Algorithm>
            <Server name="target-east"/>
            <Server name="target-south"/>
            <MaxFailures>2</MaxFailures>
            <ServerUnhealthyResponse>
                <ResponseCode>502</ResponseCode>
            </ServerUnhealthyResponse>
        </LoadBalancer>
        <Properties>
            <Property name="connect.timeout.millis">120000</Property>
        </Properties>
        <Path>/basepath</Path>
        <HealthMonitor>
            <IsEnabled>true</IsEnabled>
            <IntervalInSec>5</IntervalInSec>
            <HTTPMonitor>
                <Request>
                    <ConnectTimeoutInSec>10</ConnectTimeoutInSec>
                    <SocketReadTimeoutInSec>30</SocketReadTimeoutInSec>
                    <Port>443</Port>
                    <Verb>GET</Verb>
                    <Path>/basepath/health</Path>
                </Request>
                <SuccessResponse>
                    <ResponseCode>200</ResponseCode>
                </SuccessResponse>
            </HTTPMonitor>
        </HealthMonitor>
    </HTTPTargetConnection>
</TargetEndpoint>

@ssvaidyanathan @DinoChiesa

ssvaidyanathan commented 2 years ago

@satishbkodali - please provide the version you are using

satishbkodali commented 2 years ago

@ssvaidyanathan 2.22.0

ssvaidyanathan commented 2 years ago

Fixed and released in v2.23.0