diff options
author | Jon Marius Venstad <venstad@gmail.com> | 2021-05-12 08:33:39 +0200 |
---|---|---|
committer | Jon Marius Venstad <venstad@gmail.com> | 2021-05-12 08:33:39 +0200 |
commit | db725dee74154f70d97c8a3de91bfbae9e8438b9 (patch) | |
tree | 024ad479b785ea5830edfa1537ba2c3cf99563b3 /controller-server | |
parent | 82f6ea0f659f75171992a53b3608705e1a7c2234 (diff) |
Print "deploy / test" only when both are present for a zone
Diffstat (limited to 'controller-server')
3 files changed, 29 insertions, 36 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/deployment/Badges.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/deployment/Badges.java index 006da9f4439..61b8ffc4b89 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/deployment/Badges.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/deployment/Badges.java @@ -139,7 +139,7 @@ public class Badges { Run run = runs.get(i); if (run.id().type().isProduction() && run.id().type().isTest()) { int j = i; - while (!runs.get(j - 1).id().type().zone(system).equals(run.id().type().zone(system))) + while ( ! runs.get(j - 1).id().type().zone(system).equals(run.id().type().zone(system))) runs.set(j, runs.get(--j)); runs.set(j, run); } @@ -174,7 +174,7 @@ public class Badges { addText(texts, text, x + (dx - (isTest ? xPad : 0)) / 2, textWidth); // Add "deploy" when appropriate - if ( ! run.id().type().isTest()) { + if ( ! run.id().type().isTest() && test != null) { String deploy = "deploy"; textWidth = widthOf(deploy); addText(texts, deploy, x + dx + textWidth / 2, textWidth); diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/deployment/BadgeApiTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/deployment/BadgeApiTest.java index 21d8030dbee..ebde4671859 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/deployment/BadgeApiTest.java +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/deployment/BadgeApiTest.java @@ -28,7 +28,6 @@ public class BadgeApiTest extends ControllerContainerTest { ApplicationPackage applicationPackage = new ApplicationPackageBuilder().systemTest() .parallel("us-west-1", "aws-us-east-1a") .test("us-west-1") - .test("aws-us-east-1a") .region("ap-southeast-1") .test("ap-southeast-1") .region("eu-west-1") @@ -41,7 +40,6 @@ public class BadgeApiTest extends ControllerContainerTest { .runJob(JobType.productionUsWest1) .runJob(JobType.productionAwsUsEast1a) .runJob(JobType.testUsWest1) - .runJob(JobType.testAwsUsEast1a) .runJob(JobType.productionApSoutheast1) .failDeployment(JobType.testApSoutheast1); application.submit(applicationPackage) diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/deployment/responses/overview.svg b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/deployment/responses/overview.svg index 0ddd91d4008..7b9fc7c22b8 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/deployment/responses/overview.svg +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/deployment/responses/overview.svg @@ -1,4 +1,4 @@ -<svg xmlns='http://www.w3.org/2000/svg' width='913.3539000000001' height='20' role='img' aria-label='Deployment Status'> +<svg xmlns='http://www.w3.org/2000/svg' width='845.1567000000001' height='20' role='img' aria-label='Deployment Status'> <title>Deployment Status</title> <linearGradient id='light' x2='0' y2='100%'> <stop offset='0' stop-color='#fff' stop-opacity='.5'/> @@ -39,21 +39,20 @@ <animate attributeName='x2' values='-10%;250%;120%;-10%' dur='6s' repeatCount='indefinite' /> </linearGradient> <clipPath id='rounded'> - <rect width='913.3539000000001' height='20' rx='3' fill='#fff'/> + <rect width='845.1567000000001' height='20' rx='3' fill='#fff'/> </clipPath> <g clip-path='url(#rounded)'> - <rect x='907.3539000000001' rx='3' width='9' height='20' fill='url(#shadow)'/> - <rect x='870.3061' rx='3' width='43.0478' height='20' fill='url(#run-on-success)'/> - <polygon points='772.1412 0 772.1412 20 877.8061 20 885.8061 0' fill='#00ff48'/> - <rect x='772.1412' rx='3' width='141.2127' height='20' fill='url(#shade)'/> - <rect x='772.1412' rx='3' width='9' height='20' fill='url(#shadow)'/> - <rect x='735.0934' rx='3' width='43.0478' height='20' fill='#bf103c'/> - <polygon points='611.279 0 611.279 20 742.5934 20 750.5934 0' fill='#00ff48'/> - <rect x='611.279' rx='3' width='166.86219999999997' height='20' fill='url(#shade)'/> - <rect x='611.279' rx='3' width='9' height='20' fill='url(#shadow)'/> - <rect x='574.2312' rx='3' width='43.0478' height='20' fill='#00ff48'/> - <polygon points='449.0446 0 449.0446 20 581.7312 20 589.7312 0' fill='url(#run-on-success)'/> - <rect x='449.0446' rx='3' width='168.2344' height='20' fill='url(#shade)'/> + <rect x='839.1567000000001' rx='3' width='9' height='20' fill='url(#shadow)'/> + <rect x='802.1089000000001' rx='3' width='43.0478' height='20' fill='url(#run-on-success)'/> + <polygon points='703.9440000000001 0 703.9440000000001 20 809.6089000000001 20 817.6089000000001 0' fill='#00ff48'/> + <rect x='703.9440000000001' rx='3' width='141.2127' height='20' fill='url(#shade)'/> + <rect x='703.9440000000001' rx='3' width='9' height='20' fill='url(#shadow)'/> + <rect x='666.8962' rx='3' width='43.0478' height='20' fill='#bf103c'/> + <polygon points='543.0818 0 543.0818 20 674.3962 20 682.3962 0' fill='#00ff48'/> + <rect x='543.0818' rx='3' width='166.86219999999997' height='20' fill='url(#shade)'/> + <rect x='543.0818' rx='3' width='9' height='20' fill='url(#shadow)'/> + <rect x='439.0446' rx='3' width='110.0372' height='20' fill='url(#run-on-success)'/> + <rect x='449.0446' rx='3' width='100.0372' height='20' fill='url(#shade)'/> <rect x='449.0446' rx='3' width='9' height='20' fill='url(#shadow)'/> <rect x='411.9968' rx='3' width='43.0478' height='20' fill='#00ff48'/> <polygon points='314.5789 0 314.5789 20 419.4968 20 427.4968 0' fill='url(#run-on-failure)'/> @@ -67,8 +66,8 @@ <rect width='168.7498' height='20' fill='#5a5a5a'/> <rect x='-6.0' rx='3' width='174.7498' height='20' fill='url(#shade)'/> <rect width='2' height='20' fill='url(#left-light)'/> - <rect x='911.3539000000001' width='2' height='20' fill='url(#right-shadow)'/> - <rect width='913.3539000000001' height='20' fill='url(#light)'/> + <rect x='843.1567000000001' width='2' height='20' fill='url(#right-shadow)'/> + <rect width='845.1567000000001' height='20' fill='url(#light)'/> </g> <g fill='#fff' text-anchor='middle' font-family='Verdana,Geneva,DejaVu Sans,sans-serif' text-rendering='geometricPrecision' font-size='10'> <svg x='8.5' y='3.0' width='16.0' height='16.0' viewBox='0 0 150 150'> @@ -105,21 +104,17 @@ <text x='437.52070000000003' y='13' fill='#fff' textLength='19.047800000000002'>test</text> <text x='502.5632' y='14' fill='#000' fill-opacity='.3' textLength='78.0372'>aws-us-east-1a</text> <text x='502.0632' y='13' fill='#fff' textLength='78.0372'>aws-us-east-1a</text> - <text x='566.1565' y='14' fill='#000' fill-opacity='.3' textLength='33.1494'>deploy</text> - <text x='565.6565' y='13' fill='#fff' textLength='33.1494'>deploy</text> - <text x='600.2551' y='14' fill='#000' fill-opacity='.3' textLength='19.047800000000002'>test</text> - <text x='599.7551' y='13' fill='#fff' textLength='19.047800000000002'>test</text> - <text x='664.1115' y='14' fill='#000' fill-opacity='.3' textLength='76.66499999999999'>ap-southeast-1</text> - <text x='663.6115' y='13' fill='#fff' textLength='76.66499999999999'>ap-southeast-1</text> - <text x='727.0187' y='14' fill='#000' fill-opacity='.3' textLength='33.1494'>deploy</text> - <text x='726.5187' y='13' fill='#fff' textLength='33.1494'>deploy</text> - <text x='761.1173' y='14' fill='#000' fill-opacity='.3' textLength='19.047800000000002'>test</text> - <text x='760.6173' y='13' fill='#fff' textLength='19.047800000000002'>test</text> - <text x='812.14895' y='14' fill='#000' fill-opacity='.3' textLength='51.015499999999996'>eu-west-1</text> - <text x='811.64895' y='13' fill='#fff' textLength='51.015499999999996'>eu-west-1</text> - <text x='862.2314' y='14' fill='#000' fill-opacity='.3' textLength='33.1494'>deploy</text> - <text x='861.7314' y='13' fill='#fff' textLength='33.1494'>deploy</text> - <text x='896.33' y='14' fill='#000' fill-opacity='.3' textLength='19.047800000000002'>test</text> - <text x='895.83' y='13' fill='#fff' textLength='19.047800000000002'>test</text> + <text x='595.9143' y='14' fill='#000' fill-opacity='.3' textLength='76.66499999999999'>ap-southeast-1</text> + <text x='595.4143' y='13' fill='#fff' textLength='76.66499999999999'>ap-southeast-1</text> + <text x='658.8215' y='14' fill='#000' fill-opacity='.3' textLength='33.1494'>deploy</text> + <text x='658.3215' y='13' fill='#fff' textLength='33.1494'>deploy</text> + <text x='692.9201' y='14' fill='#000' fill-opacity='.3' textLength='19.047800000000002'>test</text> + <text x='692.4201' y='13' fill='#fff' textLength='19.047800000000002'>test</text> + <text x='743.9517500000001' y='14' fill='#000' fill-opacity='.3' textLength='51.015499999999996'>eu-west-1</text> + <text x='743.4517500000001' y='13' fill='#fff' textLength='51.015499999999996'>eu-west-1</text> + <text x='794.0342' y='14' fill='#000' fill-opacity='.3' textLength='33.1494'>deploy</text> + <text x='793.5342' y='13' fill='#fff' textLength='33.1494'>deploy</text> + <text x='828.1328000000001' y='14' fill='#000' fill-opacity='.3' textLength='19.047800000000002'>test</text> + <text x='827.6328000000001' y='13' fill='#fff' textLength='19.047800000000002'>test</text> </g> </svg> |