Skip to content

Commit 268960d

Browse files
luispolloemjburnsrobfletcherRani Horev
authoredJun 23, 2021
chore(code): Upstream changes from Netflix (#1951)
* feat(notifications): add compact notifications Squashed commit of the following: commit 046f4cb3637e80e64c21c61118e853172d733024 Author: Emily Burns <emburns@netflix.com> Date: Wed Jun 16 12:31:34 2021 -0700 fix(mj): make mj not have a header commit c2d68ed679680e55b9b021c4e76d7b41b3bc6f1e Author: Emily Burns <emburns@netflix.com> Date: Wed Jun 16 11:21:24 2021 -0700 fix(notifications): even smaller, no headers, mj commit 237ca444226e3b4ffb801f65e8c13f72a4a8e467 Author: Emily Burns <emburns@netflix.com> Date: Tue Jun 15 20:40:14 2021 -0700 feat(notifications): add compact notifications (cherry picked from commit 9b39e64db7316044b6e8e2972dd9d5e0862891c4) * fix(dgs): make task props non-nullable Squashed commit of the following: commit e3fb199e7e8b105913cb6a56bdca90eb8fd3b07b Author: Rani <rhorev@netflix.com> Date: Tue Jun 15 14:08:29 2021 -0700 fix(dgs): make tasks non-nullable (cherry picked from commit 2d17a45e5c5e3b410dcc2d63636fc9bdc59e04c2) * feat(notifications): Add MdNotification to the GraphQL API + delivery config import failed notification Squashed commit of the following: commit 483cc50de686478eeacae7fa0cdfa8ba01a0fece Author: Luis Pollo <lpollo@netflix.com> Date: Thu Jun 17 10:48:31 2021 -0700 fix(pr): Add missing indices, fix test commit b21d781b3cc304fccf7a48a5192918c56b6af4f1 Author: Luis Pollo <lpollo@netflix.com> Date: Thu Jun 17 09:10:42 2021 -0700 fix(notifications): Fixed GraphQL model commit 4da9436f44f76889fbdd984726b47c166f98aa5c Author: Luis Pollo <lpollo@netflix.com> Date: Thu Jun 17 08:52:09 2021 -0700 feat(notifications): Add dismissedAt timestamp + renames commit 184f2eec351190d7e65017d5577ff326edc5d801 Author: Luis Pollo <lpollo@netflix.com> Date: Thu Jun 17 08:32:19 2021 -0700 chore(log): Add logging around dismissible notifications commit 8507f476b4d3c59a609d871ae19199d20a67c778 Author: Luis Pollo <lpollo@netflix.com> Date: Thu Jun 17 08:27:59 2021 -0700 fix(pr): Make SqlDismissibleNotificationRepository a @bean commit 2dd5a946ee09cbd38d045bd00d8c43b8d0b8ec6f Author: Luis Pollo <lpollo@netflix.com> Date: Thu Jun 17 08:04:39 2021 -0700 chore(pr): More minor tweaks commit b16a95c6c318b1b0064a5d9c791aa72a209d42f7 Author: Luis Pollo <lpollo@netflix.com> Date: Thu Jun 17 07:50:14 2021 -0700 chore(pr): Minor tweaks commit ebc430c5524fe7e676ed659dafeeac0d128eed07 Author: Luis Pollo <lpollo@netflix.com> Date: Thu Jun 17 07:39:25 2021 -0700 fix(pr): Revert unrelated changes commit 0d0c35594f5bb0cd0b99b18a492e4d3dbb7f8d5c Author: Luis Pollo <lpollo@netflix.com> Date: Wed Jun 16 22:13:07 2021 -0700 feat(scm): Generate dismissable notification for delivery config import failure commit 5340fcc79e0cf6ad0c57c6980717554f0c281a94 Author: Luis Pollo <lpollo@netflix.com> Date: Wed Jun 16 22:12:42 2021 -0700 feat(notifications): Add GraphQL support for dismissable notifications commit 9a23bde5e499da3d658e98c34d298f9b22c38387 Author: Luis Pollo <lpollo@netflix.com> Date: Wed Jun 16 21:04:34 2021 -0700 feat(notifications): Introduce dismissable notifications (cherry picked from commit 0dfb4ab20f061f4041e96fc5cbf4ac284b824003) * fix(capacity): pass desired capacity to Orca but don't include in diff We need to always pass desired capacity when cloning a server group, but not diff on it if there are scaling policies in play. (cherry picked from commit 3f589263b46f536b0b0d187f517f52dc64b5eec7) * feat(verifications): Pass resource endpoints to verification test containers Squashed commit of the following: commit 9b49dbd4629a50db3f4653e39e68e5747fcf3be4 Author: Luis Pollo <lpollo@netflix.com> Date: Fri Jun 18 17:25:48 2021 -0700 fix(test): Fix broken test commit fcb29856c67b333c4d2f6cc5d7e88c2939cec46c Author: Luis Pollo <lpollo@netflix.com> Date: Fri Jun 18 17:11:27 2021 -0700 feat(verifications): Rename + test container endpoint vars commit 3f38c0fa91967bfae2a254083f765247c7b3128b Author: Luis Pollo <lpollo@netflix.com> Date: Fri Jun 18 09:39:55 2021 -0700 feat(verifications): Add resource endpoints to verification test containers (cherry picked from commit 63ad3de9e60015f70c67975c1e5b637601ade958) * debug(caches): Add more debug logs to application cache (cherry picked from commit 832fc83064ac7dbeaa104837d488480c7b2c6df5) * fix(certs): segment certificate cache by account (cherry picked from commit 8db40855f0a36c6048b907b0b1da2f80fc8e3ea2) * fix(network): Fix load balancer endpoint discovery + friendly resource names Squashed commit of the following: commit e9d869220e4ad2b5b82c08e1fa438a39406f0e0d Author: Luis Pollo <lpollo@netflix.com> Date: Mon Jun 21 16:00:50 2021 -0700 fix(tests): Fix tests commit 876271571141db6550d655649facb22cc0d4b00b Author: Luis Pollo <lpollo@netflix.com> Date: Sat Jun 19 08:56:57 2021 -0700 fix(network): Fix load balancer endpoint discovery + friendly resource names (cherry picked from commit 1a15a7f17518d2f2590d9f68edc7eca3270a3613) * fix(dgs): minor fixes in notifications query Squashed commit of the following: commit c786e3f7471deb104b136c90ef7278eb9ee1652f Author: Rani <rhorev@netflix.com> Date: Tue Jun 22 07:19:15 2021 +0300 fix(dgs): convert level to enum commit 2f8c17aed02b74609e59af6bede77dee75e4a277 Author: Rani <rhorev@netflix.com> Date: Tue Jun 22 07:15:53 2021 +0300 fix(dgs): make notification objects non-nullable (but keep the array nullable) (cherry picked from commit de9fc62364d5b79494c65d4c32d5d7a75e15d876) Co-authored-by: Emily Burns <emburns@netflix.com> Co-authored-by: Rob Fletcher <rfletcher@netflix.com> Co-authored-by: Rani Horev <rhorev@netflix.com>
1 parent 67ab6e2 commit 268960d

File tree

86 files changed

+2191
-500
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+2191
-500
lines changed
 

‎keel-api/src/main/kotlin/com/netflix/spinnaker/keel/api/NotificationConfig.kt

+8-1
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,14 @@
1717
*/
1818
package com.netflix.spinnaker.keel.api
1919

20+
import com.netflix.spinnaker.keel.api.NotificationDisplay.NORMAL
21+
2022
// todo eb: this does not allow you to customize the notification message, but we can add that later.
2123
data class NotificationConfig(
2224
val type: NotificationType,
2325
val address: String, // either slack channel or email address
24-
val frequency: NotificationFrequency
26+
val frequency: NotificationFrequency,
27+
val display: NotificationDisplay = NORMAL
2528
)
2629

2730
enum class NotificationFrequency {
@@ -33,3 +36,7 @@ enum class NotificationFrequency {
3336
enum class NotificationType {
3437
slack, email
3538
}
39+
40+
enum class NotificationDisplay {
41+
COMPACT, NORMAL
42+
}

‎keel-api/src/main/kotlin/com/netflix/spinnaker/keel/api/ResourceKind.kt

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ data class ResourceKind(
1111
}
1212
}
1313

14+
val friendlyName: String
15+
get() = "${group.toTitleCase()} ${kind.toTitleCase()}"
16+
1417
override fun toString(): String {
1518
return "$group/$kind@v$version"
1619
}
@@ -26,4 +29,7 @@ data class ResourceKind(
2629
?.let { (group, kind, version) -> ResourceKind(group, kind, version) }
2730
?: error("$value is not a valid resource kind")
2831
}
32+
33+
private fun String.toTitleCase() =
34+
replace('-', ' ').capitalize()
2935
}

0 commit comments

Comments
 (0)
Please sign in to comment.