Skip to content

Commit

Permalink
chore(upstream): Port upstream changes from Netflix (#2067)
Browse files Browse the repository at this point in the history
* fix(auth): instantiate filter correctly

(cherry picked from commit 7465b7b82602b0efb4607c509b670d8653b96b65)

* Merge pull request #571 in SPKR/keel-nflx from fix-java-toolchain to master

Squashed commit of the following:

commit 12b0c032bdbf9dd4e8158a729d74d376c82f5851
Author: Rob Fletcher <[email protected]>
Date:   Thu Sep 16 17:07:42 2021 -0700

    fix(build): make oss build also use the same toolchain

commit d87f0d89a9a81c8799e9fd7212d90007da48ed5e
Author: Danny Thomas <[email protected]>
Date:   Fri Sep 17 09:40:58 2021 +1000

    Nebula 8.1.0

commit 95f97331db80ac456586685694cf115f95f841f8
Author: Rob Fletcher <[email protected]>
Date:   Wed Sep 15 15:42:21 2021 -0700

    fix(build): make sure we build with Java 11

(cherry picked from commit fd26a11b42ff67d9a666f1eb06db5642f9bba7bd)

* feat(scheduler): tuneable batch size for checking

Squashed commit of the following:

commit b0232ff14b74f324a3564d917514e8df36a6c7f0
Author: Emily Burns <[email protected]>
Date:   Fri Sep 17 10:03:42 2021 -0700

    feat(scheduler): tuneable batch size for checking

(cherry picked from commit e7c767f16458fd9d679263afc416ba087a120f85)

* fix(notifications): use the correct branch for notifications

Squashed commit of the following:

commit 9ff29f3c0f414eb9c6ed440de88990850abbf0f0
Author: Rani <[email protected]>
Date:   Fri Sep 17 12:42:47 2021 -0700

    fix(pr): moved branch selection logic

commit de34f34a44e8815d3a421ef7018454e014721bea
Author: Rani <[email protected]>
Date:   Thu Sep 16 15:04:09 2021 -0700

    fix(pr): added tests

commit 46c9ed6a71a13d415413a4eb3cb8643f2f0e2858
Author: Rani <[email protected]>
Date:   Thu Sep 16 12:56:24 2021 -0700

    fix(notifications): use the correct branch for notifications

(cherry picked from commit cb16c974b41f573cddf24b3d82f1b5b5624233cf)

* feat(dgs): added a new boolean to the schema that indicates if preview environments are configured

Squashed commit of the following:

commit 15dbc86497c7f2a3981da5f347e941bb9faaff66
Author: Rani <[email protected]>
Date:   Tue Sep 21 08:42:37 2021 -0700

    feat(preview-envs): added a new boolean to the schema that indicates if preview environments are configured

commit 5be000c28eb7274fb833d6fb6de083a5a690af0c
Author: Rani <[email protected]>
Date:   Tue Sep 21 08:41:51 2021 -0700

    fix(dgs): moved processedConfig to a separate fetcher as it might be heavy for big configs

(cherry picked from commit d1aeefc4c4d53f15fd42af59b98a3dfd0f089236)

* feat(imdsv2): controlled and instumented rollout of IMDSv2

(cherry picked from commit cf796a4461767badabfc6e75cc0776a8144d2e57)

* fix(imdsv2): bad column reference in query

(cherry picked from commit 251aa614a28d95c428001eab91d5a5537196647d)

* fix(imdsv2): actually translate IMDSv2 setting in spec to desired low-level state

(cherry picked from commit 9f898ba1fd040a2ef7cbccfe13fe76c866bcc4c1)

* fix(slack): Fix Slack callback handling

Squashed commit of the following:

commit 43834b9b0afc437eff15024c99333321bfb81f02
Author: Luis Pollo <[email protected]>
Date:   Tue Sep 21 09:29:06 2021 -0700

    test(slack): Enable running Slack callback tests with Netflix classpath

commit 892669bac3d49757880a362f967e167cb2152d7f
Author: Luis Pollo <[email protected]>
Date:   Mon Sep 20 23:09:15 2021 -0700

    refactor(slack): Rename SlackAppController to SlackAppServlet

commit 13f271a7377f28a7015fab416ceca4a7ffd9511c
Author: Luis Pollo <[email protected]>
Date:   Mon Sep 20 17:44:46 2021 -0700

    fix(slack): Fix Slack callback handling

(cherry picked from commit a5f435a6daa18f63c4daf30f450ad7bc8f6a9a49)

* chore(cluster): abstract construction of upsert stages

Squashed commit of the following:

commit 132bc6c7e9d57db28c2cb76deddf22ea7053bcd0
Author: Emily Burns <[email protected]>
Date:   Tue Sep 21 14:52:42 2021 -0700

    fix(test): rewrite tests using different framework

commit 97fd19ce6f77544cdf5bac5c3bcb4769d857b0a4
Author: Emily Burns <[email protected]>
Date:   Tue Sep 21 10:12:33 2021 -0700

    fix(test): add more combined tests

commit 198ab954849820414e53ab0fa86302dd7139dd82
Author: Emily Burns <[email protected]>
Date:   Fri Sep 17 15:46:55 2021 -0700

    fix(PR): fix refs for titus

commit 01dfa7c5e05b56af287d6289250c9c57e9899153
Author: Emily Burns <[email protected]>
Date:   Wed Sep 15 12:08:19 2021 -0700

    chore(cluster): abstract construction of upsert stages

(cherry picked from commit cfea585213160b1a0bb07514af66ab7fc1ee9bf3)

* fix(imdsv2): get current state of IMDSv2 flag

(cherry picked from commit 469f8c60e0aa189034c3c8b839cfb40b85ca2b65)

* feat(preview-envs): Allow users to override FP email via notifications

(cherry picked from commit 2cd00f332a847bcd4e1cb61616de5259267a2b7d)

* fix(dgs): improve error message when git repo details are incorrect

Squashed commit of the following:

commit 611c3ed7218aed38d333bb8820e28287ac00b40f
Author: Rani <[email protected]>
Date:   Tue Sep 21 08:30:30 2021 -0700

    fix(dgs): improve error message when git repo details are incorrect

(cherry picked from commit d56dc01d391fc8a22bcb85189dd02dc572ccb83f)

* fix(database): standardize table name

(cherry picked from commit 9efbfe376a3a1a46f15c4e9caa73664129e1f760)

* fix(delete): Fix pipeline behavior for multi-stage delete tasks

(cherry picked from commit 00ebd9df5ebf6dc42652e3e980718fb2282e18be)

* chore(imdsv2): added a missing test case (to reassure myself it worked)

(cherry picked from commit c02af67f1baf28d819f29ada53af81dad6cdeee5)

* fix(preview-envs): Fix moniker in destroyServerGroup

(cherry picked from commit c49f18b4c45aad05c62cf098a99e0567f98a4e1a)

* feat(resolvers): extracted a base class for rollout-capable resolvers

(cherry picked from commit 4225e253b48ff61c2425a3407d7844ffbb36e86a)

* feat(resolvers): add column to capture rollout state

(cherry picked from commit 76153101685bfc3261a2a170c72a740fcafc5412)

* fix(resolvers): fixed typo in migration

(cherry picked from commit 98cbc9a90ee0aefc7c48e29fa3dfc350e45ec8b2)

* feat(reports): Allow loading app cache from disk for local testing

(cherry picked from commit a67491d070c8b0ee561e39bda211433ad004f06f)

* feat(imdsv2): IMDSv2 resolver for Titus clusters

(cherry picked from commit 5055ce2aae4f5f6e3f5dc94a0c3464ac70289b9c)

* fix(import): invalidate the cache before fetching the app by name

Squashed commit of the following:

commit 1d3bbd296b5bca6eccecb57d7bcf1f06500643ce
Author: Rani <[email protected]>
Date:   Wed Sep 29 20:10:11 2021 -0700

    fix(pr): renaming

commit 09812c9aeb5f56124d3ebbf26f8024ce6da1817e
Author: Rani <[email protected]>
Date:   Wed Sep 29 10:06:58 2021 -0700

    fix(import): invalidate the cache before fetching the app by name

(cherry picked from commit 8533bc724aca404acccfd65524fa392dd145b7fb)

* refactor(resolvers): Moved some of the Arrow Optics declarations into a common place for reuse

(cherry picked from commit 40c4aff2006224493111667b425d5612745868f7)

* fix(imdsv2): Wire up the Titus IMDSv2 resolver

(cherry picked from commit 724d29d2bd2c6d666c2d1406f1f81053086962df)

* fix(imdsv2): Fix bean name collision in IMDSv2 resolvers

(cherry picked from commit 0a65d0ff7e5be41c40ae3140201a80482d86a6e1)

* fix(notifications): explicit specify the notification branch

Squashed commit of the following:

commit b28ca2ed8b31f149adb35b17a8b670d954704383
Author: Rani <[email protected]>
Date:   Wed Sep 29 20:56:30 2021 -0700

    fix(pr): updated the tests to include prMerged event

commit a73bea12f59bd5c42269c83e1a2f5ac1c092bcad
Author: Rani <[email protected]>
Date:   Wed Sep 29 20:50:30 2021 -0700

    fix(notifications): explicit specify the notification branch

(cherry picked from commit 10ca32f0ec7addc3bac74d53443abde3cb4f5971)

* Merge pull request #598 in SPKR/keel-nflx from unpinMessage to master

Squashed commit of the following:

commit d609eb75fdefeb9499f837d3acdd17e8ab52e793
Author: Gal Yardeni <[email protected]>
Date:   Thu Sep 30 14:38:28 2021 -0700

    fix(unpinning): change message and rename

commit 0eb7dfe2c457a4e30c233fc5d3f755f9a7e89dc6
Author: Gal Yardeni <[email protected]>
Date:   Wed Sep 29 15:27:17 2021 -0700

    fix(unpinning): fix unpinning message if pinned version is the same as current

(cherry picked from commit c1d5f14c2f4a1825ef1c8670dbefffee7aaf1bdd)

* fix(actuation): Properly trigger recheck of resources when a version is pinned or marked as bad

Squashed commit of the following:

commit 973291edc1604574858ef3db49a027de19c0f04a
Author: Rani Horev <[email protected]>
Date:   Thu Sep 30 22:47:56 2021 +0000

    fix(pr): update test title

commit 404f0721e70a1238456a74be372ac7b5907d8851
Author: Rani <[email protected]>
Date:   Thu Sep 30 15:32:22 2021 -0700

    fix(pr): fixed tests and add some more

commit bd1fe2672b3fe0b90ed8debe62464641da323e42
Author: Rani <[email protected]>
Date:   Wed Sep 29 16:52:10 2021 -0700

    fix(actuation): trigger recheck of resources when a version is pinned or marked as bad

(cherry picked from commit d4c694acbb894833f3c8b2773da45907633c2892)

* feat(imdsv2): Removed the fast property that controls retries as it's redudant now we have status

(cherry picked from commit 2c3c6c432ba66645c18492da3003ac45f660f43e)

* fix(imdsv2): If user fixes IMDSv2 rollout after it failed, we should record success

(cherry picked from commit 25119a5fe7101c5807e5a00066b8f344f9cf2c92)

* fix(dgs): move resources to be under the artifact directly

Squashed commit of the following:

commit 00e726dd7d5731bf304958ca5764e679d41902ee
Author: Rani <[email protected]>
Date:   Fri Oct 1 12:15:22 2021 -0700

    fix(dgs): move resources to be under the artifact directly

(cherry picked from commit d029fb8abd0c015d40bd89e0391c4a04c7b45587)

* fix(preview-envs): Revisit resource renaming

Squashed commit of the following:

commit 06ee91a3d19b2303299209ed0f003fb9bc1a37c7
Author: Luis Pollo <[email protected]>
Date:   Thu Sep 30 16:45:05 2021 -0700

    fix(preview-envs): Revisit resource renaming

(cherry picked from commit 851b42c044464a8233dd222715ba5774c9bc910a)

* Revert "fix(preview-envs): Revisit resource renaming"

This reverts commit 851b42c044464a8233dd222715ba5774c9bc910a.

(cherry picked from commit 1b71bff344db2bc10262f4b64bf964ed739ae0dd)

* fix(build): make build compatible with Java 8 tooling

(cherry picked from commit b2946dba9c9d1e52301e6cc3b1c3a157cc2b506d)

* chore(logs): Fix logging of authenticated user

(cherry picked from commit f2831239516bfa62a8bcfa166f12c1ccb74c62dc)

* fix(build): put io.spinnaker.package plugin back in to see if that's what's breaking auth

(cherry picked from commit 1a8718ff514530faffbb90af91267cc5318efa85)

* fix(auth): desperately hoping this fixes auth

(cherry picked from commit 32b4ba00ee664c7c7795c15081a0994ad444eee7)

* chore(build): Align kork/fiat coordinates on com.spinnaker.netflix.{}.internal

Squashed commit of the following:

commit b59e5329982e47c151004efc0f492774d7db5bfd
Author: Adam Jordens <[email protected]>
Date:   Wed Oct 6 17:28:04 2021 -0700

    chore(build): Align kork/fiat coordinates on com.spinnaker.netflix.{}.internal

commit 000d61d09c3d57b08468712cb48326393cafc3f9
Author: Adam Jordens <[email protected]>
Date:   Wed Oct 6 17:27:58 2021 -0700

    Update dependency lock

(cherry picked from commit 524b762e51596694a77edfa338af8caa87d9d8d8)

* chore(build): see if we can get the build buildable on Java 8

(cherry picked from commit 5ba3bf9848d2464cf0417c0a45144cf9e922496d)

* fix(preview-envs): Revisit resource renaming

Squashed commit of the following:

commit 99c72734c58f436b3c2e808304549cb2866f10a5
Author: Luis Pollo <[email protected]>
Date:   Thu Oct 7 10:09:06 2021 -0700

    fix(preview-envs): Fix loss of updated metadata in preview resources

commit 879fd912ec7288c4b2ec87d939cb9fc515c0cb5e
Author: Luis Pollo <[email protected]>
Date:   Wed Oct 6 09:27:50 2021 -0700

    fix(preview-envs): Fix moniker suffix logic

commit 83bc075bda24c016ef535c3b2e7fe340f704bd3a
Author: Luis Pollo <[email protected]>
Date:   Fri Oct 1 22:33:23 2021 +0000

    fix(preview-envs): Revisit resource renaming

    Squashed commit of the following:

    commit 06ee91a3d19b2303299209ed0f003fb9bc1a37c7
    Author: Luis Pollo <[email protected]>
    Date:   Thu Sep 30 16:45:05 2021 -0700

        fix(preview-envs): Revisit resource renaming

(cherry picked from commit a8d17ed21cdfca9a8cf52fbc980c0a53750b5395)

* chore(logs): Add more debug logs around delivery config import

(cherry picked from commit 7d505253c28996ffdc0dccf7788142e37629d782)

* fix(resourceTasks): load tasks from task tracking rep

Squashed commit of the following:

commit ca07cf691411b2470ee9a3eae5e9f559153c7c97
Author: Emily Burns <[email protected]>
Date:   Thu Oct 7 16:20:54 2021 -0700

    chore(pr): move resource stuff to separate fetcher

commit eed03eaa40c09e0e8d7c2c49de06337d484e0141
Author: Emily Burns <[email protected]>
Date:   Thu Oct 7 16:14:18 2021 -0700

    fix(pr): return running and last batch of completed

commit 68bead2822b3d74feb1a58ea2a6487889abca873
Author: Emily Burns <[email protected]>
Date:   Thu Oct 7 12:56:49 2021 -0700

    chor(PR): fetch latest batch of tasks

commit 02d16c6b553eae474e786929e5c7fac5f25b40ad
Author: Emily Burns <[email protected]>
Date:   Thu Oct 7 11:29:17 2021 -0700

    fix(resourceTasks): load tasks from task tracking rep

(cherry picked from commit 2b906f754059e9f055649076583acdef83cd246c)

* feat(constraint): restart constraint evaluation

Squashed commit of the following:

commit f13378aadd5a020cd89c698b883a96e1521154e1
Author: Rani <[email protected]>
Date:   Fri Oct 8 12:28:37 2021 -0700

    fix(pr): fixed tests

commit 03ebc275a81d7eafdb3177501def46dff727eaa2
Author: Rani <[email protected]>
Date:   Fri Oct 8 11:59:26 2021 -0700

    fix(pr): added reference and simplify delete query

commit cda6c956199ebf4e6484312010b7d31a87575582
Author: Rani <[email protected]>
Date:   Thu Oct 7 20:40:39 2021 -0700

    feat(constraint): restart constraint evaluation

(cherry picked from commit 4feeca513d33cd4f3e4acfa8b5fdaa8c71e5751d)

* Merge pull request #617 in SPKR/keel-nflx from currentVersion to master

Squashed commit of the following:

commit 09f4c783ead79715799654ae800e76d92086d7eb
Merge: d9bda5c41 729313f24
Author: Gal Yardeni <[email protected]>
Date:   Fri Oct 8 13:37:40 2021 -0700

    Merge branch 'currentVersion' of ssh://stash.corp.netflix.com:7999/spkr/keel-nflx into currentVersion

commit d9bda5c41c2b526ab742177506f2510092cabfc2
Author: Gal Yardeni <[email protected]>
Date:   Fri Oct 8 13:36:57 2021 -0700

    feat(latestVersion): adding latest version + bug fixes

commit be24e4c1a55dba90863c42b572586b1e8b36bd95
Author: Gal Yardeni <[email protected]>
Date:   Thu Oct 7 13:58:56 2021 -0700

    feat(latestVersion): adding latest version + bug fixes

commit a0a14f31072eb5afed2897d3c6d9bf19873e3468
Author: Gal Yardeni <[email protected]>
Date:   Wed Oct 6 21:19:34 2021 -0700

    feat(latestVersion): add latest approved version of an artifact

commit 729313f24f87ef46b01b3395ecc714ddb0f492f3
Author: Gal Yardeni <[email protected]>
Date:   Fri Oct 8 13:36:57 2021 -0700

    feat(latestVersion): adding latest version + bug fixes

commit b3140d16f0eed00aca669fab84895177e178feac
Author: Gal Yardeni <[email protected]>
Date:   Thu Oct 7 14:04:37 2021 -0700

    feat(latestVersion): adding latest version + bug fixes

commit e707108ab9f34e99e6cad187b7bd52e1a44d6185
Merge: 1121e4cf0 afffa4f4c
Author: Gal Yardeni <[email protected]>
Date:   Thu Oct 7 13:59:47 2021 -0700

    feat(latestVersion): adding latest version + bug fixes

commit 1121e4cf0ff542dde60236f38b6f3b95978cbe17
Author: Gal Yardeni <[email protected]>
Date:   Thu Oct 7 13:58:56 2021 -0700

    feat(latestVersion): adding latest version + bug fixes

commit be603f5d50505246776a4cb51bb45a7d68f163a2
Author: Gal Yardeni <[email protected]>
Date:   Wed Oct 6 21:19:34 2021 -0700

    feat(latestVersion): add latest approved version of an artifact

commit afffa4f4cd35070ffb0d4dfcd70a8d10ce085757
Author: Gal Yardeni <[email protected]>
Date:   Wed Oct 6 21:19:34 2021 -0700

    feat(latestVersion): add latest approved version of an artifact

(cherry picked from commit 12b26f1388d2931901bba3137d579b5a2b8bcfb2)

* fix(tasks): order sql query before fetching

Squashed commit of the following:

commit 7d6e559d77de00019f321fe324e3889ed60cb57c
Author: Emily Burns <[email protected]>
Date:   Fri Oct 8 14:08:52 2021 -0700

    fix(tasks): order sql query before fetching

(cherry picked from commit 67ed2626670bad03c40f2244bde1c8484f6e668c)

* feat(artifacts): specify which artifact is it on MJ notification

Squashed commit of the following:

commit f5da4b94a00d2cb88f97d5a45a89d67b7eb12cc8
Author: Gal Yardeni <[email protected]>
Date:   Mon Oct 11 13:45:37 2021 -0700

    feat(artifacts): change the message location

commit 6b3683ef05ca9189667bf16334dee0d8bbe0a083
Author: Gal Yardeni <[email protected]>
Date:   Mon Oct 11 10:22:23 2021 -0700

    feat(artifacts): specify which artifact is it on MJ notification

(cherry picked from commit 71cbd7ed12a6c7105e96b9fc39fa49fdec1e2300)

* feat(ops): cancel relevant in flight tasks pin/veto

Squashed commit of the following:

commit 2beabdca39bcd1880509a521e092cf2a1d6408e9
Author: Emily Burns <[email protected]>
Date:   Mon Oct 11 14:02:52 2021 -0700

    fix(pr): add user to cancel task

commit eb8fa9813bcc67c5829ecfa081fd6cdaa01164a8
Author: Emily Burns <[email protected]>
Date:   Fri Oct 8 10:55:09 2021 -0700

    feat(ops): cancel relevant in flight tasks pin/veto

(cherry picked from commit 6df3fde2709b896ffd47a4d1d5b6ddd7cf9224cd)

* fix(ALBs): ensure listener actions are sorted consistently to avoid false deltas

(cherry picked from commit 69226341309f2a27373e0288a064037f657f113b)

* chore(verification): add logs and make batch size fast prop-able

Squashed commit of the following:

commit 461d7571f1b6cfd44d8ae7101dff6fd360832898
Author: Emily Burns <[email protected]>
Date:   Tue Oct 12 13:35:07 2021 -0700

    chore(verification): add logs and make batch size fast prop-able

(cherry picked from commit 81b433a2c3d87896d2c6783ce6b3ee0a181b460d)

* chore(batch-size): increase default batch size to 5, fast prop post deploy

Squashed commit of the following:

commit 6a03e98d8e9d5828a9c790f1abb490f1b06b22f6
Author: Emily Burns <[email protected]>
Date:   Tue Oct 12 16:12:29 2021 -0700

    chore(batch-size): increase default batch size to 5, fast prop post deploy

(cherry picked from commit d29c8f2a8cd8bc7eade66e46257db43c7ae78aaa)

* feat(compareLink): show which changeset were deployed as a part of the MJ message

Squashed commit of the following:

commit 96b5fe54e3839e8cc1ff7ba0ab170a1e8c8d801d
Author: Gal Yardeni <[email protected]>
Date:   Tue Oct 12 16:28:41 2021 -0700

    feat(compareLink): fix condition

commit bbee2d6d34bf3e2e92d36a5522b234dfed031e4d
Author: Gal Yardeni <[email protected]>
Date:   Tue Oct 12 16:27:21 2021 -0700

    feat(compareLink): fix condition

commit d33cab79dd6260147843e6987b022ce5b5e00e25
Author: Gal Yardeni <[email protected]>
Date:   Tue Oct 12 16:01:23 2021 -0700

    feat(compareLink): update message

commit c57ac986243e301c8ce7de99ef07258eae77bd3b
Author: Gal Yardeni <[email protected]>
Date:   Tue Oct 12 11:47:42 2021 -0700

    feat(compareLink): calculate link only if approved

commit 2bdb23140c0d335fc6f2c8abf74797630502bd25
Author: Gal Yardeni <[email protected]>
Date:   Tue Oct 12 11:26:35 2021 -0700

    feat(compareLink): show which changeset were deployed as a part of the MJ message

(cherry picked from commit cc4ff9705deb6e6c9ccc3d0b64dc09f790e129da)

* feat(rollout): add managed rollout option for clusters

Squashed commit of the following:

commit 9b63140e6e9ebee331e4a64b328bc686cdfff7ac
Author: Emily Burns <[email protected]>
Date:   Wed Oct 13 10:36:52 2021 -0700

    fix(PR): feedback updates

commit 2a9ee44ac6d2a03e7008d60cf8369614ed1628e7
Author: Emily Burns <[email protected]>
Date:   Mon Oct 11 11:30:45 2021 -0700

    fix(PR): fix tests

commit b45540927cd6186b3404419b9ec1148a601d1e28
Author: Emily Burns <[email protected]>
Date:   Mon Oct 11 10:37:48 2021 -0700

    feat(PR): move managedRollout to spec level, refators

commit 0a00606c00d28587d1f7b0ab932960c50db3393e
Author: Emily Burns <[email protected]>
Date:   Thu Oct 7 09:25:58 2021 -0700

    feat(rollout): add managed rollout option for clusters

(cherry picked from commit 72cde8ec7b4acc13869c6552bb14eae0ce174a09)

* chore(test): fix test for managed rollout

Squashed commit of the following:

commit ec6c0eb5860dc53d34bad163b17c434cab74b8c2
Author: Emily Burns <[email protected]>
Date:   Wed Oct 13 13:32:21 2021 -0700

    chore(test): fix test for managed rollout

(cherry picked from commit 77bce15e4acc5c1fdf66426a7c0e92a327402b3f)

* feat(export): First stab at exporting pipelines

Squashed commit of the following:

commit 349be9edb3a75ec48f8ccca0d2f98dc0b60a14f8
Author: Luis Pollo <[email protected]>
Date:   Thu Oct 14 09:58:58 2021 -0700

    feat(export): Improve error handling, add test script

commit 8026169d9ff31967929bf10c24af08c18be132df
Author: Luis Pollo <[email protected]>
Date:   Wed Oct 13 18:06:08 2021 -0700

    refactor(export): Dedupe environment and artifacts

commit 88480fb0565ca0addeff4832bbc62b061e14165b
Author: Luis Pollo <[email protected]>
Date:   Tue Oct 12 18:41:38 2021 -0700

    feat(export): Address feedback on processing of triggers

commit a640407d3240863926406d0b28792d9a9ba33d25
Author: Luis Pollo <[email protected]>
Date:   Tue Oct 12 17:50:07 2021 -0700

    refactor(export): Refactor export from pipelines to leverage existing export support

commit e818b22040d99518d63b1b967953b4939885b13b
Author: Luis Pollo <[email protected]>
Date:   Mon Oct 11 18:09:02 2021 -0700

    chore(pr): Address review feedback

commit 6d58c4e648088811c6c630a51cf65f0d46e5c67c
Author: Luis Pollo <[email protected]>
Date:   Mon Oct 11 14:00:38 2021 -0700

    feat(export): First stab at exporting pipelines

(cherry picked from commit 9802d705f0a61a9aeead6c1e31ee02c65aa404c2)

* feat(tasks): get only one batch of tasks

Squashed commit of the following:

commit 6a557f2a351aafcb29d8c3008e297cbd3ed40198
Author: Emily Burns <[email protected]>
Date:   Wed Oct 13 15:39:19 2021 -0700

    feat(tasks): get only one batch of tasks

(cherry picked from commit 4447d393bb532e3c1f164a5da9d5a6ebf4be26d3)

* fix(ALBs): nested rule actions need to be serialized the same as default actions

(cherry picked from commit 250bdfd7a73c60ad782a5b594db11d770876c316)

* feat(preview-envs): Create preview environment artifacts automatically

Squashed commit of the following:

commit 202b50efd0ef59dde4e81f0ed91191ab529d435b
Author: Luis Pollo <[email protected]>
Date:   Thu Oct 14 17:04:33 2021 -0700

    feat(preview-envs): Create preview environment artifacts automatically

(cherry picked from commit 48dbf906e80aca6995a7936866c895190e6acf2c)

* fix(task): load only 30s batch for all task

Squashed commit of the following:

commit 906af21f8421f2eb584e65774182b514cc105641
Author: Emily Burns <[email protected]>
Date:   Mon Oct 18 10:04:31 2021 -0700

    fix(task): load only 30s batch for all task

(cherry picked from commit 0cb19d58cf8393e0e53f34795fba8741bf423d11)

* chore(dgs): Migrate to match the reggie schema format

Squashed commit of the following:

commit cacd4334d8cec18b8a97286bc51d7b1126ab5ae9
Author: Rani <[email protected]>
Date:   Mon Oct 18 15:09:06 2021 -0700

    fix(pr): fix tests

commit f0211aa15fd05140add2f7651154e600db73b24d
Author: Rani <[email protected]>
Date:   Mon Oct 18 14:25:11 2021 -0700

    chore(pr): added some basic testing to verify both queries are working properly

commit 5d1a800f1e2b7507ce0b8386fadbb274ecaae309
Author: Rani <[email protected]>
Date:   Mon Oct 18 14:24:38 2021 -0700

    chore(dgs): removed unused vars

commit 8b4ef5961b7b76c2655d08b987987b2d31cbecf1
Author: Rani <[email protected]>
Date:   Fri Oct 15 11:27:38 2021 -0700

    fix(pr): missing prefix

commit f119b5f06a2c0e2e06113d4eff3c1167e46bd70b
Author: Rani <[email protected]>
Date:   Fri Oct 15 11:12:08 2021 -0700

    fix(pr): missing underscore

commit ba2f7a88f85804aa861011743765b6dc193844e3
Author: Rani <[email protected]>
Date:   Thu Oct 14 21:27:22 2021 -0700

    chore(dgs): duplicate schema and all queries and mutations

commit d7de84dabf53badd78f3e6beee5a9f9f09bf0210
Author: Rani <[email protected]>
Date:   Thu Oct 14 21:26:57 2021 -0700

    chore(web): update dgs version and locks

(cherry picked from commit 890203f593259cc7e25642e5482b47b4f7c03569)

* feat(rollback): rollback to a server group if one exists with no diff

Squashed commit of the following:

commit 749c21b78dda3a36650507c00033efbf15cb03f9
Author: Emily Burns <[email protected]>
Date:   Mon Oct 18 16:11:36 2021 -0700

    fix(PR): handle ec2 suspend processes

commit d85e5f71063ae343a085511ebf0e991c31be9bcf
Author: Emily Burns <[email protected]>
Date:   Mon Oct 18 09:24:43 2021 -0700

    fix(PR): address feedback

commit a6514f9470725d625dbd5f4ba03b7326a5d4f379
Author: Emily Burns <[email protected]>
Date:   Fri Oct 15 15:09:04 2021 -0700

    fix(PR): ignore capacity when looking at diff for rollback

commit cc3d3e7dfe5cf3b9e43d821bd32fb0c522199180
Author: Emily Burns <[email protected]>
Date:   Fri Oct 15 14:29:13 2021 -0700

    feat(rollback): rollback to a server group if one exists with no diff

(cherry picked from commit 30cc9b91cf87414455d92efdd470f87ced6130bb)

* fix(build) Remove buoy dependency

The buoy dependency was introduced in:

    09156c9
    feat(rollout): add managed rollout option for clusters

Remove the dependency in order to be compatible with oss

* Revert "chore(build): Align kork/fiat coordinates on com.spinnaker.netflix.{}.internal"

This reverts commit 6f7a545.

* Revert "Merge pull request #571 in SPKR/keel-nflx from fix-java-toolchain to master"

This reverts commit 9adc94d.

* Revert "fix(auth): instantiate filter correctly"

This reverts commit fc68652.

* fix(dependencies) Restore spinnakerGradleVersion

Restore spinnakerGradleVersion. Otherwise, spring properties fail to
load. Likely related to spring boot version.

See: spinnaker/spinnaker-gradle-project#184

* Revert "chore(build): see if we can get the build buildable on Java 8"

This reverts commit ba83149.

* fix(exception): Move from UnsupportedOperationException to TODO

* Revert "feat(preview-envs): Allow users to override FP email via notifications"

This reverts commit dec4851.

* Revert "fix(slack): Fix Slack callback handling"

This reverts commit db018a9.

---------

Co-authored-by: Rob Fletcher <[email protected]>
Co-authored-by: Emily Burns <[email protected]>
Co-authored-by: Rani Horev <[email protected]>
Co-authored-by: Luis Pollo <[email protected]>
Co-authored-by: Gal Yardeni <[email protected]>
  • Loading branch information
6 people committed Sep 21, 2023
1 parent 8215b7d commit 92915bc
Show file tree
Hide file tree
Showing 162 changed files with 11,550 additions and 3,448 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ org.gradle.parallel=true
testContainersVersion=1.15.3
okHttpVersion=4.5.0
resilience4jVersion=1.5.0
spinnakerGradleVersion=8.26.0
spinnakerGradleVersion=8.23.0

# Used to control whether to spin up docker to run liquibase before jooq
buildingInDocker=false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ abstract class ClusterDeployStrategy {

companion object {
val DEFAULT_WAIT_FOR_INSTANCES_UP: Duration = Duration.ofMinutes(30)
const val RED_BLACK_STRATEGY = "red-black"
const val HIGHLANDER_STRATEGY = "highlander"
const val NONE_STRATEGY = "none"
const val ROLLING_PUSH_STRATEGY = "rolling-push"
}
}

Expand All @@ -28,7 +32,7 @@ data class RedBlack(
// The order of this list is important for pauseTime based staggers
override val stagger: List<StaggeredRegion> = emptyList()
) : ClusterDeployStrategy() {
override val strategy = "red-black"
override val strategy = RED_BLACK_STRATEGY

override val isStaggered: Boolean
get() = stagger.isNotEmpty()
Expand All @@ -37,13 +41,13 @@ data class RedBlack(
data class Highlander(
override val health: DeployHealth = AUTO
) : ClusterDeployStrategy() {
override val strategy = "highlander"
override val strategy = HIGHLANDER_STRATEGY
}

data class NoStrategy(
override val health: DeployHealth = AUTO
): ClusterDeployStrategy() {
override val strategy = "none"
override val strategy = NONE_STRATEGY
}

data class RollingPush(
Expand All @@ -54,7 +58,7 @@ data class RollingPush(
val totalRelaunches: Int? = null,
val terminationOrder: TerminationOrder? = null
): ClusterDeployStrategy() {
override val strategy = "rolling-push"
override val strategy = ROLLING_PUSH_STRATEGY
}

enum class TerminationOrder {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package com.netflix.spinnaker.keel.api


/**
* When managed rollout is enabled, we will deploy with a ManagedRollout stage instead of
* the normal deploy stage.
*/
data class ManagedRolloutConfig(
val enabled: Boolean = false,
val selectionStrategy: SelectionStrategy? = null
)

// duplication of com.netflix.buoy.sdk.model.SelectionStrategy
// so that we don't add another dependency into this module
enum class SelectionStrategy {
ALPHABETICAL, OFF_PEAK
}
15 changes: 15 additions & 0 deletions keel-api/src/main/kotlin/com/netflix/spinnaker/keel/api/Moniker.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,19 @@ data class Moniker(
detail == null -> "$app-$stack"
else -> "$app-${stack.orEmpty()}-$detail"
}

/**
* @return The [Moniker] with an updated [Moniker.detail] field containing as much of the specified
* [suffix] as possible while respecting max length constraints on resource names.
*/
fun withSuffix(suffix: String, maxNameLength: Int = 32): Moniker {
// calculates the truncation point in the detail field based on how many characters are left of the
// max name length after removing the current detail and accounting for empty stack and detail (which
// cause extra dashes to be added to the name)
var truncateAt = (maxNameLength - toName().length - suffix.length - 1)
if (stack == null) --truncateAt
if (detail == null) --truncateAt else truncateAt += detail!!.length
val updatedDetail = listOfNotNull(detail?.take(truncateAt), suffix).joinToString("-")
return copy(detail = updatedDetail)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,21 @@ data class Resource<out T : ResourceSpec>(
else -> null
}

/**
* Adds the specified [suffix] to the resource [id] and all properties of the [spec] derived from it.
*/
fun deepRename(suffix: String): Resource<T> {
val updatedSpec = spec.deepRename(suffix)
return copy(
spec = updatedSpec as T,
metadata = metadata + mapOf(
// this is so the resource ID is updated with the new name (which is in the spec)
"id" to updatedSpec.id,
"application" to application
)
)
}

// TODO: this is kinda dirty, but because we add uid to the metadata when persisting we don't really want to consider it in equality checks
override fun equals(other: Any?): Boolean {
if (this === other) return true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ interface ResourceSpec {
* form the fully-qualified resource id.
*
* This can be a property that is part of the spec, or derived from other properties. If the
* latter remember to annotate the overridden property with
* [com.fasterxml.jackson.annotation.JsonIgnore].
* latter, remember to annotate the overridden property with [com.fasterxml.jackson.annotation.JsonIgnore].
*/
val id: String

Expand All @@ -30,4 +29,14 @@ interface ResourceSpec {
* other fields.
*/
val displayName: String

/**
* Applies the given [suffix] to the resource [id], and to all aggregate properties of the spec
* whose names are derived from the [id].
*
* @return a copy of the original [ResourceSpec] with the modified identifiers.
*/
@JvmDefault
fun deepRename(suffix: String): ResourceSpec =
throw TODO("Not implemented")
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,24 @@ interface TaskLauncher {
resource = resource,
description = description,
correlationId = correlationId,
stages = listOf(job)
stages = listOf(job),
artifactVersion = null
)

suspend fun submitJob(
resource: Resource<*>,
description: String,
correlationId: String,
stages: List<Job>
stages: List<Job>,
artifactVersion: String? = null
): Task

fun submitJobAsync(
resource: Resource<*>,
description: String,
correlationId: String,
stages: List<Map<String, Any?>>
stages: List<Map<String, Any?>>,
artifactVersion: String? = null
): CompletableFuture<Task>

suspend fun submitJob(
Expand All @@ -43,7 +46,8 @@ interface TaskLauncher {
correlationId: String? = null,
stages: List<Job>,
artifacts: List<Map<String, Any?>> = emptyList(),
parameters: Map<String, Any> = emptyMap()
parameters: Map<String, Any> = emptyMap(),
artifactVersion: String? = null
): Task =
submitJob(
user = user,
Expand All @@ -56,7 +60,8 @@ interface TaskLauncher {
stages = stages,
type = SubjectType.CONSTRAINT,
artifacts = artifacts,
parameters = parameters
parameters = parameters,
artifactVersion = artifactVersion
)

/**
Expand All @@ -76,7 +81,8 @@ interface TaskLauncher {
stages: List<Job>,
type: SubjectType,
artifacts: List<Map<String, Any?>> = emptyList(),
parameters: Map<String, Any> = emptyMap()
parameters: Map<String, Any> = emptyMap(),
artifactVersion: String? = null
): Task

suspend fun correlatedTasksRunning(correlationId: String): Boolean
Expand All @@ -85,4 +91,9 @@ interface TaskLauncher {
* @return The [TaskExecution] matching the [taskId].
*/
suspend fun getTaskExecution(taskId: String): TaskExecution

/**
* Cancels the given tasks as the provided user identity
*/
suspend fun cancelTasks(taskIds: List<String>, user: String)
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ abstract class DeliveryArtifact {
/** Filters for the artifact origin in source control. */
open val from: ArtifactOriginFilter? = null

/** Whether this artifact was created for a preview environment. */
open val isPreview: Boolean = false

@get:ExcludedFromDiff
val filteredByBranch: Boolean
get() = from?.branch != null
Expand Down Expand Up @@ -155,5 +158,14 @@ abstract class DeliveryArtifact {
.map { (it.spec as? ArtifactReferenceProvider)?.artifactReference }
.contains(reference)

/**
* returns the resource ids using the artifact in the environment
*/
fun resourcesUsing(environment: Environment) =
environment
.resources
.filter { reference == (it.spec as? ArtifactReferenceProvider)?.artifactReference }
.map { it.id }

override fun toString() = "${type.toUpperCase()} artifact $name (ref: $reference)"
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ data class PublishedArtifact(
name: String,
type: String,
version: String,
reference: String? = null,
status: ArtifactStatus? = null,
createdAt: Instant? = null,
gitMetadata: GitMetadata? = null,
Expand All @@ -43,7 +44,7 @@ data class PublishedArtifact(
) : this(
name = name,
type = type.toLowerCase(),
reference = name,
reference = reference?: name,
version = version,
metadata = (metadata ?: emptyMap()) + mapOf(
"releaseStatus" to status?.name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface ConstraintRepository {

fun getConstraintStateById(uid: UID): ConstraintState?

fun deleteConstraintState(deliveryConfigName: String, environmentName: String, type: String)
fun deleteConstraintState(deliveryConfigName: String, environmentName: String, reference: String, version: String, type: String): Int

fun constraintStateFor(application: String): List<ConstraintState>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class ArtifactListener(
launch {
val lastStoredVersions = repository.artifactVersions(artifact, artifactRefreshConfig.limit)
val currentVersions = lastStoredVersions.map { it.version }
log.debug("Last recorded versions of $artifact: $currentVersions")
log.debug("Last recorded versions of $artifact: $currentVersions")

val artifactSupplier = artifactSuppliers.supporting(artifact.type)
val latestAvailableVersions = artifactSupplier.getLatestArtifacts(artifact.deliveryConfig, artifact, artifactRefreshConfig.limit)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@ data class LaunchTemplateData(
val keyName: String,
val iamInstanceProfile: IamInstanceProfile,
val monitoring: InstanceMonitoring,
val ramDiskId: String?
val ramDiskId: String?,
val metadataOptions: Map<String, String> = emptyMap()
)

data class IamInstanceProfile(
Expand Down
Loading

0 comments on commit 92915bc

Please sign in to comment.