Skip to content

Commit 072c0ae

Browse files
luispolloemjburnsrobfletcherRani Horev
authored andcommitted
chore(code): Upstream changes from Netflix (spinnaker#1951)
* feat(notifications): add compact notifications Squashed commit of the following: commit 046f4cb3637e80e64c21c61118e853172d733024 Author: Emily Burns <[email protected]> Date: Wed Jun 16 12:31:34 2021 -0700 fix(mj): make mj not have a header commit c2d68ed679680e55b9b021c4e76d7b41b3bc6f1e Author: Emily Burns <[email protected]> Date: Wed Jun 16 11:21:24 2021 -0700 fix(notifications): even smaller, no headers, mj commit 237ca444226e3b4ffb801f65e8c13f72a4a8e467 Author: Emily Burns <[email protected]> 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 <[email protected]> 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 <[email protected]> Date: Thu Jun 17 10:48:31 2021 -0700 fix(pr): Add missing indices, fix test commit b21d781b3cc304fccf7a48a5192918c56b6af4f1 Author: Luis Pollo <[email protected]> Date: Thu Jun 17 09:10:42 2021 -0700 fix(notifications): Fixed GraphQL model commit 4da9436f44f76889fbdd984726b47c166f98aa5c Author: Luis Pollo <[email protected]> Date: Thu Jun 17 08:52:09 2021 -0700 feat(notifications): Add dismissedAt timestamp + renames commit 184f2eec351190d7e65017d5577ff326edc5d801 Author: Luis Pollo <[email protected]> Date: Thu Jun 17 08:32:19 2021 -0700 chore(log): Add logging around dismissible notifications commit 8507f476b4d3c59a609d871ae19199d20a67c778 Author: Luis Pollo <[email protected]> Date: Thu Jun 17 08:27:59 2021 -0700 fix(pr): Make SqlDismissibleNotificationRepository a @bean commit 2dd5a946ee09cbd38d045bd00d8c43b8d0b8ec6f Author: Luis Pollo <[email protected]> Date: Thu Jun 17 08:04:39 2021 -0700 chore(pr): More minor tweaks commit b16a95c6c318b1b0064a5d9c791aa72a209d42f7 Author: Luis Pollo <[email protected]> Date: Thu Jun 17 07:50:14 2021 -0700 chore(pr): Minor tweaks commit ebc430c5524fe7e676ed659dafeeac0d128eed07 Author: Luis Pollo <[email protected]> Date: Thu Jun 17 07:39:25 2021 -0700 fix(pr): Revert unrelated changes commit 0d0c35594f5bb0cd0b99b18a492e4d3dbb7f8d5c Author: Luis Pollo <[email protected]> Date: Wed Jun 16 22:13:07 2021 -0700 feat(scm): Generate dismissable notification for delivery config import failure commit 5340fcc79e0cf6ad0c57c6980717554f0c281a94 Author: Luis Pollo <[email protected]> Date: Wed Jun 16 22:12:42 2021 -0700 feat(notifications): Add GraphQL support for dismissable notifications commit 9a23bde5e499da3d658e98c34d298f9b22c38387 Author: Luis Pollo <[email protected]> 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 <[email protected]> Date: Fri Jun 18 17:25:48 2021 -0700 fix(test): Fix broken test commit fcb29856c67b333c4d2f6cc5d7e88c2939cec46c Author: Luis Pollo <[email protected]> Date: Fri Jun 18 17:11:27 2021 -0700 feat(verifications): Rename + test container endpoint vars commit 3f38c0fa91967bfae2a254083f765247c7b3128b Author: Luis Pollo <[email protected]> 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 <[email protected]> Date: Mon Jun 21 16:00:50 2021 -0700 fix(tests): Fix tests commit 876271571141db6550d655649facb22cc0d4b00b Author: Luis Pollo <[email protected]> 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 <[email protected]> Date: Tue Jun 22 07:19:15 2021 +0300 fix(dgs): convert level to enum commit 2f8c17aed02b74609e59af6bede77dee75e4a277 Author: Rani <[email protected]> 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 <[email protected]> Co-authored-by: Rob Fletcher <[email protected]> Co-authored-by: Rani Horev <[email protected]>
1 parent f3585b0 commit 072c0ae

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
}

keel-clouddriver/src/main/kotlin/com/netflix/spinnaker/keel/clouddriver/CloudDriverCache.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ interface CloudDriverCache {
3333
fun credentialBy(name: String): Credential
3434
fun defaultKeyPairForAccount(account: String) =
3535
credentialBy(account).attributes["defaultKeyPair"] as String
36-
fun certificateByName(name: String): Certificate
36+
fun certificateByAccountAndName(account: String, name: String): Certificate
3737
fun certificateByArn(arn: String): Certificate
3838
}
3939

keel-clouddriver/src/main/kotlin/com/netflix/spinnaker/keel/clouddriver/CloudDriverService.kt

+8
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,14 @@ interface CloudDriverService {
9191
@Path("application") application: String
9292
): List<AmazonLoadBalancer>
9393

94+
@GET("/aws/loadBalancers/{account}/{region}/{name}")
95+
suspend fun getAmazonLoadBalancer(
96+
@Header("X-SPINNAKER-USER") user: String,
97+
@Path("account") account: String,
98+
@Path("region") region: String,
99+
@Path("name") name: String
100+
): List<AmazonLoadBalancer>
101+
94102
@GET("/{provider}/loadBalancers/{account}/{region}/{name}")
95103
suspend fun getClassicLoadBalancer(
96104
@Header("X-SPINNAKER-USER") user: String,

keel-clouddriver/src/main/kotlin/com/netflix/spinnaker/keel/clouddriver/MemoryCloudDriverCache.kt

+12-5
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,20 @@ class MemoryCloudDriverCache(
154154
.getOrElse { ex -> throw CacheLoadingException("Error loading subnetsByPurpose cache", ex) }
155155
}
156156

157-
private val certificatesByName: AsyncLoadingCache<String, Certificate> =
157+
private data class CertificateKey(val account: String, val name: String) {
158+
constructor(certificate: Certificate) : this(
159+
certificate.accountName,
160+
certificate.serverCertificateName
161+
)
162+
}
163+
164+
private val certificatesByAccountAndName: AsyncLoadingCache<CertificateKey, Certificate> =
158165
cacheFactory
159-
.asyncBulkLoadingCache("certificatesByName") {
166+
.asyncBulkLoadingCache("certificatesByAccountAndName") {
160167
runCatching {
161168
cloudDriver
162169
.getCertificates()
163-
.associateBy { it.serverCertificateName }
170+
.associateBy { CertificateKey(it) }
164171
}
165172
.getOrElse { ex -> throw CacheLoadingException("Error loading certificatesByName cache", ex) }
166173
}
@@ -216,9 +223,9 @@ class MemoryCloudDriverCache(
216223
subnetsByPurpose.get(Triple(account, region, purpose)).await() ?: notFound("Subnet with purpose \"$purpose\" not found in $account:$region")
217224
}
218225

219-
override fun certificateByName(name: String): Certificate =
226+
override fun certificateByAccountAndName(account: String, name: String): Certificate =
220227
runBlocking {
221-
certificatesByName.get(name).await() ?: notFound("Certificate with name $name not found")
228+
certificatesByAccountAndName.get(CertificateKey(account, name)).await() ?: notFound("Certificate with name $name not found")
222229
}
223230

224231
override fun certificateByArn(arn: String): Certificate =

keel-clouddriver/src/main/kotlin/com/netflix/spinnaker/keel/clouddriver/model/AmazonLoadBalancer.kt

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.netflix.spinnaker.keel.clouddriver.model
22

3+
import com.fasterxml.jackson.annotation.JsonAlias
34
import com.fasterxml.jackson.annotation.JsonSubTypes
45
import com.fasterxml.jackson.annotation.JsonTypeInfo
56
import com.fasterxml.jackson.annotation.JsonTypeInfo.As
@@ -25,4 +26,6 @@ interface AmazonLoadBalancer {
2526
val vpcId: String
2627
val subnets: Set<String>
2728
val scheme: String?
29+
@get:JsonAlias("dnsname")
30+
val dnsName: String
2831
}

keel-clouddriver/src/main/kotlin/com/netflix/spinnaker/keel/clouddriver/model/ApplicationLoadBalancerModel.kt

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ data class ApplicationLoadBalancerModel(
1313
override val vpcId: String,
1414
override val subnets: Set<String>,
1515
override val scheme: String?,
16+
override val dnsName: String,
1617
val idleTimeout: Int,
1718
val securityGroups: Set<String>,
1819
val listeners: List<ApplicationLoadBalancerListener>,

keel-clouddriver/src/main/kotlin/com/netflix/spinnaker/keel/clouddriver/model/Capacity.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ package com.netflix.spinnaker.keel.clouddriver.model
33
data class Capacity(
44
val min: Int,
55
val max: Int,
6-
val desired: Int?
6+
val desired: Int
77
)
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package com.netflix.spinnaker.keel.clouddriver.model
22

3-
data class Certificate(val serverCertificateName: String, val arn: String)
3+
data class Certificate(val serverCertificateName: String, val accountName: String, val arn: String)

keel-clouddriver/src/main/kotlin/com/netflix/spinnaker/keel/clouddriver/model/ClassicLoadBalancerModel.kt

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ data class ClassicLoadBalancerModel(
3030

3131
override val subnets: Set<String>,
3232
override val scheme: String?,
33+
override val dnsName: String,
3334
val idleTimeout: Int,
3435
val securityGroups: Set<String>,
3536
val listenerDescriptions: List<ClassicLoadBalancerListenerDescription>,

keel-clouddriver/src/main/kotlin/com/netflix/spinnaker/keel/clouddriver/model/NetworkLoadBalancerModel.kt

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ data class NetworkLoadBalancerModel(
99
override val vpcId: String,
1010
override val subnets: Set<String>,
1111
override val scheme: String?,
12+
override val dnsName: String,
1213
override val availabilityZones: Set<String>,
1314
val targetGroups: List<TargetGroup>
1415
) : AmazonLoadBalancer {

keel-clouddriver/src/test/kotlin/com/netflix/spinnaker/keel/clouddriver/MemoryCloudDriverCacheTest.kt

+30-10
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@ internal class MemoryCloudDriverCacheTest {
5757
)
5858

5959
val certificates = listOf(
60-
Certificate("cert-1", "arn:cert-1"),
61-
Certificate("cert-2", "arn:cert-2")
60+
Certificate("cert-1", "prod", "arn:prod:cert-1"),
61+
Certificate("cert-2", "prod", "arn:prod:cert-2"),
62+
Certificate("cert-1", "test", "arn:test:cert-1"),
63+
Certificate("cert-2", "test", "arn:test:cert-2")
6264
)
6365

6466
@Test
@@ -224,26 +226,44 @@ internal class MemoryCloudDriverCacheTest {
224226

225227
@ParameterizedTest
226228
@ValueSource(strings = ["cert-1", "cert-2"])
227-
fun `certificates are looked up from CloudDriver when requested by name`(name: String) {
229+
fun `certificates are looked up from CloudDriver when requested by account and name`(name: String) {
228230
every { cloudDriver.getCertificates() } returns certificates
229231

230-
expectThat(subject.certificateByName(name))
232+
expectThat(subject.certificateByAccountAndName("test", name))
231233
.get { serverCertificateName } isEqualTo name
232234
}
233235

236+
@ParameterizedTest
237+
@ValueSource(strings = ["prod", "test"])
238+
fun `certificates are correctly distinguished by account`(account: String) {
239+
every { cloudDriver.getCertificates() } returns certificates
240+
241+
expectThat(subject.certificateByAccountAndName(account, "cert-1")) {
242+
get { serverCertificateName } isEqualTo "cert-1"
243+
get { account } isEqualTo account
244+
}
245+
}
246+
234247
@Test
235248
fun `an unknown certificate name throws an exception`() {
236249
every { cloudDriver.getCertificates() } returns certificates
237250

238-
expectThrows<ResourceNotFound> { subject.certificateByName("does-not-exist") }
251+
expectThrows<ResourceNotFound> { subject.certificateByAccountAndName("test", "does-not-exist") }
252+
}
253+
254+
@Test
255+
fun `an unknown account for a known certificate name throws an exception`() {
256+
every { cloudDriver.getCertificates() } returns certificates
257+
258+
expectThrows<ResourceNotFound> { subject.certificateByAccountAndName("fnord", "cert-1") }
239259
}
240260

241261
@ParameterizedTest
242262
@ValueSource(strings = ["cert-1", "cert-2"])
243263
fun `subsequent requests for a certificate by name hit the cache`(name: String) {
244264
every { cloudDriver.getCertificates() } returns certificates
245265

246-
repeat(4) { subject.certificateByName(name) }
266+
repeat(4) { subject.certificateByAccountAndName("test", name) }
247267

248268
verify(exactly = 1) { cloudDriver.getCertificates() }
249269
}
@@ -256,7 +276,7 @@ internal class MemoryCloudDriverCacheTest {
256276

257277
listOf("cert-1", "cert-2")
258278
.forEach {
259-
subject.certificateByName(it)
279+
subject.certificateByAccountAndName("test", it)
260280
// this test can be vulnerable to an occasional race condition where the 2nd read misses the
261281
// cache (seemingly due to the way the bulk load works). This seems to be sufficient to
262282
// prevent it
@@ -267,7 +287,7 @@ internal class MemoryCloudDriverCacheTest {
267287
}
268288

269289
@ParameterizedTest
270-
@ValueSource(strings = ["arn:cert-1", "arn:cert-2"])
290+
@ValueSource(strings = ["arn:prod:cert-1", "arn:prod:cert-2", "arn:test:cert-1", "arn:test:cert-2"])
271291
fun `certificates are looked up from CloudDriver when requested by ARN`(arn: String) {
272292
every { cloudDriver.getCertificates() } returns certificates
273293

@@ -283,7 +303,7 @@ internal class MemoryCloudDriverCacheTest {
283303
}
284304

285305
@ParameterizedTest
286-
@ValueSource(strings = ["arn:cert-1", "arn:cert-2"])
306+
@ValueSource(strings = ["arn:prod:cert-1", "arn:prod:cert-2", "arn:test:cert-1", "arn:test:cert-2"])
287307
fun `subsequent requests for a certificate by ARN hit the cache`(arn: String) {
288308
every { cloudDriver.getCertificates() } returns certificates
289309

@@ -298,7 +318,7 @@ internal class MemoryCloudDriverCacheTest {
298318
fun `all certs are cached at once when requested by ARN`() {
299319
every { cloudDriver.getCertificates() } returns certificates
300320

301-
listOf("arn:cert-1", "arn:cert-2")
321+
listOf("arn:prod:cert-1", "arn:prod:cert-2")
302322
.forEach {
303323
subject.certificateByArn(it)
304324
// this test can be vulnerable to an occasional race condition where the 2nd read misses the

keel-core/src/main/kotlin/com/netflix/spinnaker/keel/constraints/ManualJudgementConstraintAttributes.kt

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.netflix.spinnaker.keel.constraints
22

3+
import com.netflix.spinnaker.keel.api.NotificationDisplay
4+
import com.netflix.spinnaker.keel.api.NotificationDisplay.NORMAL
35
import com.netflix.spinnaker.keel.api.artifacts.DeliveryArtifact
46
import com.netflix.spinnaker.keel.api.artifacts.PublishedArtifact
57
import com.netflix.spinnaker.keel.api.constraints.ConstraintStateAttributes
@@ -15,5 +17,7 @@ data class OriginalSlackMessageDetail(
1517
val currentArtifact: PublishedArtifact? = null,
1618
val pinnedArtifact: PublishedArtifact? = null,
1719
val deliveryArtifact: DeliveryArtifact,
18-
val targetEnvironment: String
20+
val targetEnvironment: String,
21+
val author: String? = null,
22+
val display: NotificationDisplay? = NORMAL
1923
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package com.netflix.spinnaker.keel.notifications
2+
3+
import com.netflix.spinnaker.keel.api.UID
4+
import com.netflix.spinnaker.keel.events.EventLevel
5+
import com.netflix.spinnaker.keel.events.EventLevel.ERROR
6+
import java.time.Instant
7+
8+
/**
9+
* A [DismissibleNotification] that indicates a delivery config failed to import.
10+
*/
11+
data class DeliveryConfigImportFailed(
12+
override val triggeredAt: Instant,
13+
override val application: String,
14+
val repoType: String,
15+
val projectKey: String,
16+
val repoSlug: String,
17+
val commitHash: String,
18+
override val link: String? = null,
19+
override var uid: UID? = null
20+
) : DismissibleNotification() {
21+
override val level: EventLevel = ERROR
22+
override val triggeredBy: String = "Managed Delivery"
23+
override val message: String
24+
get() {
25+
val repo = "repository $repoType/$projectKey/$repoSlug (commit ${commitHash.short})"
26+
.let { if (link != null) "[$it]($link)" else it }
27+
return "Delivery config for application $application failed to import from $repo"
28+
}
29+
30+
private val String.short: String
31+
get() = substring(0, 7)
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package com.netflix.spinnaker.keel.notifications
2+
3+
import com.fasterxml.jackson.annotation.JsonSubTypes
4+
import com.fasterxml.jackson.annotation.JsonTypeInfo
5+
import com.netflix.spinnaker.keel.api.UID
6+
import com.netflix.spinnaker.keel.events.EventLevel
7+
import com.netflix.spinnaker.keel.events.EventLevel.INFO
8+
import java.time.Instant
9+
10+
/**
11+
* A user-facing notification that can be dismissed.
12+
*/
13+
@JsonTypeInfo(
14+
use = JsonTypeInfo.Id.NAME,
15+
property = "type",
16+
include = JsonTypeInfo.As.PROPERTY
17+
)
18+
@JsonSubTypes(
19+
JsonSubTypes.Type(value = DeliveryConfigImportFailed::class),
20+
)
21+
abstract class DismissibleNotification {
22+
open val level: EventLevel = INFO
23+
abstract val triggeredAt: Instant
24+
abstract val application: String
25+
abstract val message: String
26+
open val isActive: Boolean = true
27+
open val environment: String? = null
28+
open val link: String? = null
29+
open val triggeredBy: String? = null
30+
open val dismissedBy: String? = null
31+
open val dismissedAt: Instant? = null
32+
open var uid: UID? = null // read from the database
33+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package com.netflix.spinnaker.keel.persistence
2+
3+
import com.netflix.spinnaker.keel.api.UID
4+
import com.netflix.spinnaker.keel.events.EventLevel
5+
import com.netflix.spinnaker.keel.notifications.DismissibleNotification
6+
import java.time.Instant
7+
8+
/**
9+
* Repository for [DismissibleNotification].
10+
*/
11+
interface DismissibleNotificationRepository {
12+
companion object {
13+
const val DEFAULT_MAX_NOTIFICATIONS = 10
14+
}
15+
16+
/**
17+
* Records a [DismissibleNotification].
18+
*
19+
* @return the [UID] of the newly created notification.
20+
*/
21+
fun storeNotification(notification: DismissibleNotification): UID
22+
23+
/**
24+
* Retrieves the history of [DismissibleNotification]s for [application], newest to oldest.
25+
*
26+
* @param application the name of the application.
27+
* @param onlyActive whether to filter for only notifications that are active.
28+
* @param levels optional filter for event levels. Defaults to all.
29+
* @param limit the maximum number of notifications to return.
30+
*/
31+
fun notificationHistory(
32+
application: String,
33+
onlyActive: Boolean = false,
34+
levels: Set<EventLevel> = emptySet(),
35+
limit: Int = DEFAULT_MAX_NOTIFICATIONS
36+
): List<DismissibleNotification>
37+
38+
/**
39+
* Sets [DismissibleNotification.isActive] to false in the corresponding database record.
40+
*/
41+
fun dismissNotification(notificationUid: UID, user: String): Boolean
42+
}

keel-ec2-api/src/main/kotlin/com/netflix/spinnaker/keel/api/ec2/ApplicationLoadBalancerSpec.kt

-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ data class ApplicationLoadBalancerSpec(
3434

3535
override val id: String = "${locations.account}:$moniker"
3636

37-
override val displayName = "Application Load Balancer $moniker"
38-
3937
override val dependsOn: Set<Dependency>
4038
get() = locations.regions.flatMap { region ->
4139
dependencies.securityGroupNames.map { Dependency(SECURITY_GROUP, region.name, it) }

0 commit comments

Comments
 (0)