Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge in #8

Merged
merged 226 commits into from
Dec 6, 2017
Merged
Changes from 1 commit
Commits
Show all changes
226 commits
Select commit Hold shift + click to select a range
4f3eaa1
feat(pipeline_template): Re-save dependent pipelines on template save…
robzienert Sep 8, 2017
7682efb
chore(expressions): Allow to override global spel version at pipeline…
jeyrschabu Sep 8, 2017
45138bb
feat(fastproperties): allow individual stage overrides via trigger (#…
anotherchrisberry Sep 8, 2017
18e9d7c
fix(gradle): Pin jedis version (#1609)
robzienert Sep 8, 2017
df5a1fa
fix(fastproperty): do not override context on monitor stage (#1610)
anotherchrisberry Sep 8, 2017
7b7733c
fix(events): start/end pipeline events broke because of missing toStr…
robfletcher Sep 11, 2017
6745adb
fix(timeout): stage timeout overrides cumulative task durations (#1605)
emjburns Sep 13, 2017
83a3183
chore(licenses): fix license config and add missing license headers
robfletcher Sep 14, 2017
027dd74
fix(pipeline_templates): load parent templates when inlining template…
danielpeach Sep 15, 2017
86c8e1b
fix(pipeline_template): Multiple fixes from integration suite (#1616)
robzienert Sep 15, 2017
4a149cd
chore(queue): removed envelope handling code we don't use
robfletcher Sep 14, 2017
ec5be3b
refactor(queue): queue now uses message hash as the message id
robfletcher Sep 14, 2017
4161311
chore(queue): renamed things to make intent clearer
robfletcher Sep 14, 2017
a0089d2
feat(pipeline_template): Convert to pipeline template endpoint (#1615)
robzienert Sep 15, 2017
92d7270
feat(pipeline_template): Jinja rendering in triggers, params and noti…
robzienert Sep 18, 2017
bdc8757
refactor(metrics): more configurable metrics wiring for thread pools
robfletcher Sep 15, 2017
a40d508
chore(core): simpler handling of parallel stages
robfletcher Sep 5, 2017
7ce0f61
fix(queue): re-prioritize message on queue if an identical one is pushed
robfletcher Sep 15, 2017
417504d
fix(metrics): missed migrator in refactor of thread pool metrics (#1625)
robfletcher Sep 19, 2017
5ea1ce8
feat(cluster-match): implement general purpose cluster matching rule …
anotherchrisberry Sep 19, 2017
2097d5c
fix(canary): target canary cleanup server groups by create date (#1612)
anotherchrisberry Sep 19, 2017
65e322c
fix(pipeline_template): config level stage replacement (#1622)
emjburns Sep 19, 2017
c57a06a
feat(queue): Add queue shovel for migrating backends (#1624)
robzienert Sep 19, 2017
f05e602
feat(redis_migration): log if there are still pending orchestrations/…
asher Sep 19, 2017
cbab4cc
fix(pipeline_template): root-level configs mapped if undefined (#1623)
robzienert Sep 19, 2017
77ff216
fix(queue): Fix stupid spring wiring (#1628)
robzienert Sep 19, 2017
be6e239
feat(servergroup): allow ad-hoc entity tags on deployments (#1627)
anotherchrisberry Sep 20, 2017
413a968
chore(oortService): expose /serverGroups endpoint (#1630)
anotherchrisberry Sep 20, 2017
98b1ebf
perf(rollingpush): Avoid unnecessarily searching for instance ids (#1…
ajordens Sep 20, 2017
5484b6c
refactor(tag-generator): include server group coordinates in generate…
anotherchrisberry Sep 20, 2017
6dacba2
fix(pipeline_template): Allow conditional stages inside of partials (…
robzienert Sep 20, 2017
50b708e
feat(pipeline_template): Allow granular inheritance control on params…
robzienert Sep 20, 2017
ae66a6b
fix(stages/bakery): Fix bake stage, ensure deploymentDetails is added…
christopherthielen Sep 20, 2017
5d66215
feat(pipeline_template): Jinja rendering in partials (#1637)
jervi Sep 21, 2017
d0b3574
fix(managed_pipeline): validation of variable types, integration test…
emjburns Sep 21, 2017
59d9b1b
refactor(pipeline_template): Support multiple MPT schema versions (#1…
robzienert Sep 21, 2017
d7b8150
tests(pipeline_templates): integrations tests and removing unique ID …
emjburns Sep 21, 2017
f46015b
feat(pipeline_template): Support template-less configurations (#1636)
robzienert Sep 22, 2017
9fa25b4
fix(timeouts): some tasks inherit stage timeout override (#1640)
emjburns Sep 25, 2017
eee8380
fix(pipeline_template): Regression in deserializing tempalted pipelin…
robzienert Sep 25, 2017
d62e000
fix(pipeline_template): Check for correct paramConfig field during re…
robzienert Sep 25, 2017
b641c49
fix(web): Enforce limit of pipelines when using previous redis conn (…
robzienert Sep 26, 2017
7bc62e9
fix(redis_migration): fix logging of pending work (#1647)
asher Sep 26, 2017
0d9a2f1
feat(artifacts): Add receivedArtifacts to Pipeline model. (#1648)
jtk54 Sep 27, 2017
ca4fa9c
feat(job): decrease job timout and make overridable (#1649)
emjburns Sep 27, 2017
fd1fa9f
fix(web): Enforce limit on previous redis for app pipelines endpoint …
robzienert Sep 27, 2017
c837a6d
fix(pipeline_template): Do not store state in error handler lol (#1651)
robzienert Sep 27, 2017
e4e2ffd
Revert "feat(artifacts): Add receivedArtifacts to Pipeline model. (#1…
robzienert Sep 28, 2017
8d8dc93
fix(web): Revert take calls; unexpected upstream behaviors (#1654)
robzienert Sep 28, 2017
947c10f
fix(rollbacks): support for tolerating some instance failures (#1643)
asher Sep 29, 2017
c4d53c3
feat(stage context): Get all stage results in a list (#1655)
lwander Oct 2, 2017
3ed1a15
refactor(clouddriver): monitor clouddriver tasks every 5 seconds (#1639)
anotherchrisberry Oct 2, 2017
788b3c4
feat(context): Adds trigger contents to stage context (#1659)
lwander Oct 3, 2017
aab0207
feat(clouddriver): Support sharding read-only requests by `user` (#1641)
ajordens Oct 4, 2017
e3cbdb4
feat(moniker): Use a cluster's moniker if available. (#1664)
andrewbackes Oct 4, 2017
333af99
chore(expressions): Cleanup some noisy logs (#1666)
jeyrschabu Oct 5, 2017
0535df1
fix(mine): Search stage definition builders directly instead of depen…
Oct 3, 2017
f7189c4
fix(web): Return correct num executions with dual redis (#1668)
robzienert Oct 5, 2017
7675499
perf(build): Removing orca-queue-sqs; unused, unsupported
robzienert Oct 5, 2017
9084eb7
feat(core): Deploy manifest stage & task (#1674)
lwander Oct 6, 2017
8a5ce6f
feat(pipeline): Resolve received and expected artifacts in trigger. (…
jtk54 Oct 6, 2017
18c1913
fix(expressions): Include evaluation summary in v2 (#1673)
jeyrschabu Oct 6, 2017
e40c242
fix(execution windows): don't add duplicate execution windows to para…
robfletcher Oct 6, 2017
d7b7396
fix(queue): treat waiting pipelines queue as FIFO if keepWaitingPipel…
anotherchrisberry Oct 8, 2017
60f0e3f
feat(pipeline_template): Add marker support to disable rendered value…
robzienert Oct 9, 2017
3c89a96
feat(get_commits): Display SCM changes in pipeline-triggered pipeline…
jervi Oct 10, 2017
fe30fc4
fix(pipeline_template): Propagate nested render errors (#1679)
robzienert Oct 10, 2017
edc707b
feat(moniker): Allow moniker field to pass through to StageData and T…
andrewbackes Oct 11, 2017
f5e8c9a
fix(queue): don't keep pushing dead messages indefinitely
robfletcher Sep 28, 2017
4f2589e
feat(qa): dry run pipelines
robfletcher Sep 21, 2017
9a60076
add executionId to MDC (#1682)
asher Oct 11, 2017
05049ae
fix(rrb): RRB should determine resize percentages at runtime (#1681)
ajordens Oct 12, 2017
7c4eccc
Oort get server groups (#1680)
andrewbackes Oct 12, 2017
2603640
fix(pipeline_template): Fixing regression in test harness (#1686)
robzienert Oct 12, 2017
8ba231e
feat(pipeline_template): PipelineIdTag checks context for variables d…
jonsie Oct 12, 2017
622452b
fix(log): ensure executionId is cleaned up from MDC (#1685)
asher Oct 12, 2017
6c5765b
feat(stages): make FAILED_CONTINUE bubble up from synthetic stages
robfletcher Oct 12, 2017
90fd8f2
feat(moniker): Use moniker for instance check task (#1689)
andrewbackes Oct 13, 2017
dd9b7e0
feat(moniker): Use monikers within server-group tasks (#1693)
andrewbackes Oct 13, 2017
2f20277
fix(log) ensure MDC cleanup occurs in correct thread (#1698)
asher Oct 13, 2017
0085587
fix(pipeline_template): Do not treat markdown lists as YAML alias (#1…
robzienert Oct 13, 2017
917a415
feat(artifacts): simplify artifact matching (#1696)
lwander Oct 13, 2017
c67cbf7
feat(core): Force cache refresh manifest task (#1687)
lwander Oct 13, 2017
d9fddf3
feat(moniker): use moniker over frigga in ScaleToClusterResize
andrewbackes Oct 14, 2017
83b8d81
chore(imports): remove unused frigga import
andrewbackes Oct 14, 2017
675bd09
core(manifest): Delete manifest op (#1700)
lwander Oct 16, 2017
1c632d3
feat(artifacts): Check if default artifact was intended (#1701)
lwander Oct 16, 2017
1d7f004
feat(rrb): Support for running a pipeline between scale up and disabl…
ajordens Oct 16, 2017
b71d7a9
fix(dryrun): need injected property class to support list of values
robfletcher Oct 16, 2017
8699a19
Use moniker in DetermineHealthProvidersTask (#1702)
andrewbackes Oct 17, 2017
958be83
feat(moniker): Use moniker for Job stages. (#1699)
andrewbackes Oct 17, 2017
47d6323
chore(dependencies): updating spinnaker-depenencies (#1707)
emjburns Oct 17, 2017
895f64c
feat(queue): update delivery time on runtask (#1676)
emjburns Oct 17, 2017
79f1f73
feat(logging): ops controller annotation + logstashEncoder dep (#1692)
asher Oct 17, 2017
19635f5
fix(dryrun): log dry run activity
robfletcher Oct 17, 2017
f86de36
Properly cast Moniker from context
andrewbackes Oct 17, 2017
e01058b
feat(polling): remove polling for wait, manual judgement, and executi…
emjburns Oct 18, 2017
c29ec72
feat(entitytags): Include previous server group image details (#1705)
ajordens Oct 18, 2017
9dadd41
fix(entitytags): Do not fetch previous server group for Titus (#1712)
ajordens Oct 18, 2017
8df5b40
fix(gae): Support new ExpectedArtifact in GAE deploy. (#1706)
jtk54 Oct 18, 2017
b1e32b4
fix(polling): update time left calculation (#1713)
emjburns Oct 18, 2017
d0c89df
fix(dryrun): send dry run notification correctly
robfletcher Oct 18, 2017
03c5dba
fix(propertyFiles): change wording of error message to indicate that …
tomaslin Oct 18, 2017
9a442c9
fix(fastproperties): always clean up properties marked for rollback (…
anotherchrisberry Oct 19, 2017
e2990b8
feat(core): implement noop stage (#1719)
anotherchrisberry Oct 19, 2017
45ddb81
fix(dryrun): remove pipeline config it for dry runs
robfletcher Oct 19, 2017
c6a0f45
feat(rollback): Support rolling back to a server group that no longer…
ajordens Oct 19, 2017
3ce9456
fix(runJob): retry fetching property files if not found (#1721)
anotherchrisberry Oct 19, 2017
d9d9fdf
fix(executionWindow): revert to polling (#1722)
emjburns Oct 19, 2017
96922f3
fix(canary): gentle canary cleanup (#1711)
asher Oct 19, 2017
e426094
fix(rollback): Propagate `interestingHealthProviderNames` (#1723)
ajordens Oct 19, 2017
a812161
fix(dryrun): let Echo remove the pipelineConfigId
robfletcher Oct 20, 2017
b0e472c
fix(dryrun): ignore certain keys in context
robfletcher Oct 20, 2017
12e27f2
fix(cancel): cancel during wait stage (#1726)
emjburns Oct 20, 2017
19591a6
fix(logging): updating timeout message w/ timeout value (#1728)
emjburns Oct 21, 2017
0dc3f83
fix(dryrun): strip nested nulls when comparing context
robfletcher Oct 23, 2017
ca83613
fix(rrb): Only inject pipeline stage if applicaton + pipelineId prese…
ajordens Oct 23, 2017
74e47b4
fix(tasks): stop using 'shared' task state (#1731)
emjburns Oct 24, 2017
f814551
fix(dryrun): try to cope with values that are sometimes floats or ints
robfletcher Oct 24, 2017
bf38072
fix(manual judgment): switching back to polling to respect timeout ov…
emjburns Oct 24, 2017
63787d8
fix(exec window): leave shared state alone (#1737)
emjburns Oct 24, 2017
1a0ed90
Attempt to use moniker before frigga (#1697)
andrewbackes Oct 25, 2017
a24986c
feat(moniker): Use moniker for Rollingpush tasks. (#1703)
andrewbackes Oct 25, 2017
61e91ad
feat(moniker): Pass moniker to cleanup stages. (#1732)
andrewbackes Oct 25, 2017
af8b6e1
feat(moniker): Use moniker for app name over frigga in flex (#1736)
andrewbackes Oct 25, 2017
fdebdd0
feat(manualJudgment): allow standard notification types for manual ju…
anotherchrisberry Oct 25, 2017
7a8ef54
fix(dryrun): ignore additional context field
robfletcher Oct 25, 2017
02c133e
fix(mahe): do not clean up properties that have been updated (#1741)
anotherchrisberry Oct 27, 2017
0d63986
fix(mahe): fix property extraction on cleanup (#1743)
anotherchrisberry Oct 27, 2017
f496530
fix(deploy): avoid crossing the streams in parallelized deploys
robfletcher Oct 26, 2017
22c9eb4
fix(expressions): stop stripping null context values
robfletcher Oct 27, 2017
57b9627
fix(mahe): send correct query to determine if fast property exists (#…
anotherchrisberry Oct 27, 2017
5c63931
fix(canary): fix cleanup of unhealthy canaries with multiple clusters…
asher Oct 27, 2017
14c9b02
fix(security): Prevent webhook users from spoofing authed user
andrewbackes Oct 27, 2017
5005140
fix(moniker): hotfix canary deploy stages
cfieber Oct 27, 2017
a0af1b1
fix(mahe): check property structure on cleanup (#1752)
anotherchrisberry Oct 28, 2017
ba3f32d
fix(fastproperties): Processing expressions in property override (#1754)
jeyrschabu Oct 29, 2017
d608366
fix(triggers): ensure canceling pipeline sends ExecutionComplete even…
asher Oct 29, 2017
00bcd36
feat(core): Wait for manifest stable task (#1755)
lwander Oct 30, 2017
5aef52c
fix(context): stop looking for properties in trigger until we can fig…
robfletcher Oct 30, 2017
20b2847
fix(titus): Tag titus server groups with previous image metadata (#1758)
ajordens Oct 31, 2017
c71b37b
chore(canary-v2): Update to new json-based initiate canary entrypoint…
Oct 31, 2017
c0ab79c
fix(front50): Keep front50 optional (#1760)
lwander Oct 31, 2017
24e8c37
Revert "fix(deploy): avoid crossing the streams in parallelized deploys"
robfletcher Oct 31, 2017
ca4b8ae
fix(canary-v2): Avoid naming collision between mine/kayenta tasks. (#…
Nov 1, 2017
6b91aa8
feat(orca) Place produced artifacts in stage output (#1441)
brujoand Nov 1, 2017
172fb57
feat(artifacts): Resolve expectedArtifact by ids in trigger. (#1763)
jtk54 Nov 1, 2017
6eac402
fix(trafficguards): adds retry logic to validateClusterStatus (#1759)
asher Nov 1, 2017
940bf69
fix(front50): Don't try to run dependent pipelines that are disabled
christopherthielen Nov 2, 2017
5fefb46
chore(dependencies): Bump spinnaker-dependencies to 0.120.1 (#1765)
ajordens Nov 2, 2017
3476e5e
fix(pipeline_template): Resave all pipelines on template update (#1766)
robzienert Nov 2, 2017
fd39a60
fix(rollingpush): Ensure `waitTaskState` is cleared between iteration…
ajordens Nov 2, 2017
ce296b7
feat(moniker): Use moniker in TrafficGuard. (#1727)
andrewbackes Nov 2, 2017
5ac3bf5
fix(core): `DetachInstancesTask` should have traffic guards (#1768)
ajordens Nov 3, 2017
48b1efd
fix(orca/canary): Don't presume array present (#1770)
dotdotdotpaul Nov 3, 2017
130a5e5
chore(gradle): Avoid running tests on master/release branch (#1769)
ajordens Nov 4, 2017
3b452a2
fix(manifest): Fix delete behavior (#1774)
lwander Nov 4, 2017
57856b1
chore(gradle): Avoid running junit platform tests on master/release b…
ajordens Nov 4, 2017
5aa1af3
feat(core): Add correlation ids to orchestrations (#1748)
robzienert Nov 5, 2017
8dec2f5
fix(canary): fix wait task after baseline asg disable (#1771)
asher Nov 6, 2017
891f695
fix(pipeline_template): Deal with whitespace in jinja module kv pairs…
robzienert Nov 6, 2017
bd5daed
fix(web): Make trigger map mutable (#1776)
robzienert Nov 6, 2017
77ab312
Fixes restarting ACA task stages (#1777)
robfletcher Nov 7, 2017
6f09711
Use StageContext consistently without breaking strategies (#1772)
robfletcher Nov 7, 2017
9e0d5b4
fix(front50): Avoid canceling an already canceled child pipeline (#1779)
ajordens Nov 7, 2017
15ab8b9
fix(log): clarify missing custom strategy error (#1780)
asher Nov 7, 2017
52823d6
fix(trafficguards): Fix Moniker usage in instance termination (#1781)
ajordens Nov 8, 2017
631e144
fix(mpt): don't NPE on stages without a when (#1783)
danielpeach Nov 8, 2017
86eb5e6
feat(pipeline_template): Render configuration for templated pipelines…
jervi Nov 8, 2017
b37d3e4
fix(netflix): do not send property value when looking up existing pro…
anotherchrisberry Nov 8, 2017
23802ef
refactor(model): Unify execution subtypes
robfletcher Nov 8, 2017
5ac87de
fix(web): Reverting needless method sig refactor from #1718 (#1786)
robzienert Nov 8, 2017
6185d3b
fix(core): s/orchestrationLauncher/executionLauncher (#1787)
ajordens Nov 9, 2017
4311e00
fix(queue): custom de/serializer so we can migrate queue values slowly
robfletcher Nov 9, 2017
7c17d88
chore(logging): shut up spammy logs in integration tests
robfletcher Nov 9, 2017
f752ad6
fix(core): Support wait before scaling down in red/black (#1789)
ajordens Nov 9, 2017
ca1ecbd
fix(metrics): derive executionType tag from type not class name
robfletcher Nov 9, 2017
dca0858
fix(*): fix startup failure if pipeline templates are not enabled (#1…
danielpeach Nov 9, 2017
d7b5454
fix(pipeline trigger): fix error when parsing parent pipeline with no…
robfletcher Nov 9, 2017
2fecc2c
chore(dependencies): upgrade Spring and Jackson
robfletcher Nov 9, 2017
f749322
chore(dependencies): simpler defaulting of execution type
robfletcher Nov 9, 2017
b0cdc44
fix(tags): stop dumb failures in cleaning up astrid tags
robfletcher Nov 9, 2017
352568a
fix(triggers): typo in previous fix
robfletcher Nov 10, 2017
436b3c0
fix(notifications): send correct notification type on pipeline events…
anotherchrisberry Nov 10, 2017
5b787fa
feat(clouddriver/aws): Allow finding SG vpc IDs by name (#1784)
robzienert Nov 13, 2017
816b4e7
feat(pagerduty): Support multiple applications and keys directly (#1797)
Nov 14, 2017
7421105
fix(mort): Flippy-floppy equalsIgnoreCase to avoid NPE (#1800)
robzienert Nov 14, 2017
d023edb
fix(pagerduty): Fix paging by keys only (#1801)
Nov 14, 2017
30977fb
feat(provider/kubernetes): undo rollout stage (#1802)
lwander Nov 15, 2017
3e953ac
feat(provider/kubernetes): scale manifest (#1803)
lwander Nov 15, 2017
168f09d
chore(dependencies): dependency updates
cfieber Nov 15, 2017
eeb5247
feat(provider/kuberntes): pause/resume rollout (#1806)
lwander Nov 15, 2017
bc6c062
chore(core): Use `RetrySupport` from `kork-exceptions` (#1807)
ajordens Nov 17, 2017
eb20375
feat(pagerduty): Automatically append 'from' to the details map (#1808)
Nov 17, 2017
1ed2be4
feat(manifest): more robust status handling (#1809)
lwander Nov 17, 2017
279d758
fix(kubernetes/rollback) Pass cloudProvider to tasks so it doesn't de…
andrewbackes Nov 17, 2017
1d866b7
fix(moniker): Use the correct moniker when applying source server gro…
andrewbackes Nov 17, 2017
c09e650
feat(canary-v2): Add region attributes to kayenta stage. (#1813)
Nov 20, 2017
67109c3
fix(trafficguards): debug logging when no enabled asgs found (#1814)
asher Nov 22, 2017
5f0c6fa
chore(dependencies): bump Kotlin to 1.1.60
robfletcher Nov 27, 2017
3c6544d
chore(dependencies): bump JUnit
robfletcher Nov 27, 2017
9ab868f
fix(alerts): fix formatting of log message for global context alert
robfletcher Nov 27, 2017
65c6145
fix(timeouts): prevent stageTimeoutMs ending up in outputs/global
robfletcher Nov 27, 2017
12b7827
Xenial builds (#1819)
brandonnelson3 Nov 28, 2017
728f197
chore(dependencies): update to latest spinnaker-dependencies version
cfieber Nov 28, 2017
0afc14a
refactor(expressions): Remove v1 SPEL code (#1817)
jeyrschabu Nov 29, 2017
52e50c4
chore(dependencies): bump Mockito and Hamkrest
robfletcher Nov 27, 2017
a5bb0dd
fix(fastproperties): prevent FP stuff getting written to global context
robfletcher Nov 28, 2017
392ff92
chore(dependencies): bump Kotlin to 1.2
robfletcher Nov 29, 2017
8fedbaf
fix(templates): Tolerate all thrown failures on execution lookup. (#1…
jtk54 Nov 29, 2017
8eed431
feat(provider/kubernetes): insert artifacts during deploy (#1823)
lwander Nov 29, 2017
8cdd337
Make WaitForClusterDisableTask configurable in yml (#1824)
yue9944882 Nov 30, 2017
1f3daf1
fix(core): Missing closing brace (#1826)
andrewbackes Nov 30, 2017
b5c2c82
chore(systemd_logs): Remove unneeded log redirection. (#1825)
brandonnelson3 Nov 30, 2017
461e244
feat(artifacts): support 'use prior execution' (#1827)
lwander Dec 1, 2017
b0376a9
fix(fastproperties): correct separation of context and output values …
robfletcher Dec 1, 2017
f629c71
chore(mahe): remove mahe (#1830)
anotherchrisberry Dec 1, 2017
0e64253
fix(expressions): expressions can reference prior stage outputs (#1828)
robfletcher Dec 1, 2017
5a08d04
feat(provider/kubernetes): deploy from artifact (#1831)
lwander Dec 4, 2017
0ebe707
feat(pipeline_template) Add strategyId tag to render ids by applicati…
jonsie Dec 5, 2017
e13a4df
fix(moniker): fix cluster if detail is set to empty via SpEL (#1832)
asher Dec 5, 2017
ea13423
fix(job): retry on call to clouddriver for job status (#1834)
emjburns Dec 6, 2017
47869ec
feat(pipeline_template) Allow partials to be injected from template c…
rfarrjr Dec 6, 2017
26798ea
Merge branch 'master' of github.com:spinnaker/orca into merge-in
dkirillov Dec 6, 2017
865a789
Removed a method that was added twice during the merge.
dkirillov Dec 6, 2017
e4b7877
Implemented getRegion for EcsImageDetails.
dkirillov Dec 6, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
perf(rollingpush): Avoid unnecessarily searching for instance ids (sp…
…innaker#1633)

If a `serverGroupName` or `asgName` is available on the stage context,
there is no need to lookup each instance id individually.

Also, `getServerGroup()` is more efficient than `getServerGroupFromCluster()`
when dealing with clusters containing multiple server groups.
ajordens authored Sep 20, 2017
commit 98b1ebf974403ae1b3965d53cd143a7c0b6ef9c1
Original file line number Diff line number Diff line change
@@ -49,7 +49,10 @@ class TerminateInstanceAndDecrementServerGroupTask extends AbstractCloudProvider

List<TerminatingInstance> remainingInstances = instanceSupport.remainingInstances(stage)

def serverGroupName = stage.context.serverGroupName ?: stage.context.asgName

trafficGuard.verifyInstanceTermination(
serverGroupName,
[stage.context.instance] as List<String>,
account,
Location.region(stage.context.region as String),
Original file line number Diff line number Diff line change
@@ -49,7 +49,10 @@ class TerminateInstancesTask extends AbstractCloudProviderAwareTask implements T

List<TerminatingInstance> remainingInstances = instanceSupport.remainingInstances(stage)

def serverGroupName = stage.context.serverGroupName ?: stage.context.asgName

trafficGuard.verifyInstanceTermination(
serverGroupName,
stage.context.instanceIds as List<String>,
account,
Location.region(stage.context.region as String),
Original file line number Diff line number Diff line change
@@ -46,13 +46,24 @@ public TrafficGuard(OortHelper oortHelper, Optional<Front50Service> front50Servi
this.front50Service = front50Service.orElse(null);
}

public void verifyInstanceTermination(List<String> instanceIds, String account, Location location, String cloudProvider, String operationDescriptor) {
public void verifyInstanceTermination(String serverGroupNameFromStage,
List<String> instanceIds,
String account,
Location location,
String cloudProvider,
String operationDescriptor) {
Map<String, List<String>> instancesPerServerGroup = new HashMap<>();
instanceIds.forEach(instanceId -> {
for (String instanceId : instanceIds) {
String serverGroupName = serverGroupNameFromStage;
if (serverGroupName == null) {
Optional<String> resolvedServerGroupName = resolveServerGroupNameForInstance(instanceId, account, location.getValue(), cloudProvider);
serverGroupName = resolvedServerGroupName.orElse(null);
}

Optional<String> resolvedServerGroupName = resolveServerGroupNameForInstance(instanceId, account, location.getValue(), cloudProvider);
resolvedServerGroupName.ifPresent(name -> instancesPerServerGroup.computeIfAbsent(name, serverGroup -> new ArrayList<>()).add(instanceId));
});
if (serverGroupName != null) {
instancesPerServerGroup.computeIfAbsent(serverGroupName, serverGroup -> new ArrayList<>()).add(instanceId);
}
}

instancesPerServerGroup.entrySet().forEach(entry -> {
String serverGroupName = entry.getKey();
Original file line number Diff line number Diff line change
@@ -42,7 +42,10 @@ class DisableInstancesTask implements CloudProviderAware, Task {
String cloudProvider = getCloudProvider(stage)
String account = getCredentials(stage)

def serverGroupName = stage.context.serverGroupName ?: stage.context.asgName

trafficGuard.verifyInstanceTermination(
serverGroupName,
stage.context.instanceIds as List<String>,
account,
Location.region(stage.context.region as String),
Original file line number Diff line number Diff line change
@@ -42,7 +42,14 @@ class WaitForNewUpInstancesLaunchTask implements RetryableTask {
@Override
TaskResult execute(Stage stage) {
StageData stageData = stage.mapTo(StageData)
def response = oortService.getServerGroupFromCluster(stageData.application, stageData.account, stageData.cluster, stage.context.asgName as String, stage.context.region as String, stageData.cloudProvider ?: 'aws' )

// similar check in `AbstractInstancesCheckTask`
def response = oortService.getServerGroup(
stageData.application,
stageData.account,
stage.context.region as String,
stage.context.asgName as String
)

Map serverGroup = objectMapper.readValue(response.body.in(), Map)

Original file line number Diff line number Diff line change
@@ -231,8 +231,9 @@ class TrafficGuardSpec extends Specification {
given:
addGuard([account: "test", location: "us-east-1", stack: "foo"])
targetServerGroup.instances = [[name: "i-1", healthState: "Up"], [name: "i-2", healthState: "Down"]]

when:
trafficGuard.verifyInstanceTermination(["i-1"], "test", location, "aws", "x")
trafficGuard.verifyInstanceTermination(null, ["i-1"], "test", location, "aws", "x")

then:
thrown(IllegalStateException)
@@ -249,8 +250,9 @@ class TrafficGuardSpec extends Specification {
addGuard([account: "test", location: "us-east-1", stack: "foo"])
targetServerGroup.instances = [[name: "i-1", healthState: "Up"], [name: "i-2", healthState: "Down"]]
otherServerGroup.instances = [[name: "i-1", healthState: "Down"]]

when:
trafficGuard.verifyInstanceTermination(["i-1"], "test", location, "aws", "x")
trafficGuard.verifyInstanceTermination(null, ["i-1"], "test", location, "aws", "x")

then:
thrown(IllegalStateException)
@@ -267,8 +269,9 @@ class TrafficGuardSpec extends Specification {
addGuard([account: "test", location: "us-east-1", stack: "foo"])
targetServerGroup.instances = [[name: "i-1", healthState: "Up"], [name: "i-2", healthState: "Down"]]
otherServerGroup.instances = [[name: "i-1", healthState: "Up"]]

when:
trafficGuard.verifyInstanceTermination(["i-1"], "test", location, "aws", "x")
trafficGuard.verifyInstanceTermination(null, ["i-1"], "test", location, "aws", "x")

then:
notThrown(IllegalStateException)
@@ -285,8 +288,9 @@ class TrafficGuardSpec extends Specification {
addGuard([account: "test", location: "us-east-1", stack: "foo"])
targetServerGroup.instances = [[name: "i-1", healthState: "Up"], [name: "i-2", healthState: "Up"]]
otherServerGroup.instances = [[name: "i-1", healthState: "Down"]]

when:
trafficGuard.verifyInstanceTermination(["i-1", "i-2"], "test", location, "aws", "x")
trafficGuard.verifyInstanceTermination(null, ["i-1", "i-2"], "test", location, "aws", "x")

then:
thrown(IllegalStateException)
@@ -303,8 +307,9 @@ class TrafficGuardSpec extends Specification {
given:
addGuard([account: "test", location: "us-east-1", stack: "foo"])
targetServerGroup.instances = [[name: "i-1"]]

when:
trafficGuard.verifyInstanceTermination(["i-1"], "test", location, "aws", "x")
trafficGuard.verifyInstanceTermination(null, ["i-1"], "test", location, "aws", "x")

then:
notThrown(IllegalStateException)
@@ -314,6 +319,21 @@ class TrafficGuardSpec extends Specification {
0 * _
}

void "should avoid searching for instance ids when server group provided"() {
given:
addGuard([account: "test", location: "us-east-1", stack: "foo"])
targetServerGroup.instances = [[name: "i-1"]]

when:
trafficGuard.verifyInstanceTermination("app-foo-v001", ["i-1"], "test", location, "aws", "x")

then:
notThrown(IllegalStateException)
1 * front50Service.get("app") >> application
1 * oortHelper.getTargetServerGroup("test", "app-foo-v001", location.value, "aws") >> (targetServerGroup as TargetServerGroup)
0 * _
}

private void addGuard(Map guard) {
applicationDetails.putIfAbsent("trafficGuards", [])
applicationDetails.get("trafficGuards") << guard
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@ class WaitForNewUpInstancesLaunchTaskSpec extends Specification {
def response = task.execute(stage)

then:
1 * oortService.getServerGroupFromCluster(application, account, cluster, serverGroup, region, cloudProvider) >> oortResponse
1 * oortService.getServerGroup(application, account, region, serverGroup) >> oortResponse
response.status == expectedStatus