-
Notifications
You must be signed in to change notification settings - Fork 630
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(build): remove kotlin from project (#848)
Removes the (out of date) kotlin configuration from the project and converts the single kotlin class to java
- Loading branch information
Showing
7 changed files
with
69 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
kotlinVersion=1.3.70 | ||
orcaVersion=8.18.0 | ||
org.gradle.parallel=true | ||
spinnakerGradleVersion=8.11.0 | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
...ta-core/src/main/java/com/netflix/kayenta/events/listeners/ExecutionArchivalListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* Copyright (c) 2019 Netflix, inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License") | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package com.netflix.kayenta.events.listeners; | ||
|
||
import com.netflix.kayenta.events.CanaryExecutionCompletedEvent; | ||
import com.netflix.kayenta.security.AccountCredentials; | ||
import com.netflix.kayenta.security.AccountCredentialsRepository; | ||
import com.netflix.kayenta.storage.ObjectType; | ||
import com.netflix.kayenta.storage.StorageServiceRepository; | ||
import java.util.Objects; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; | ||
import org.springframework.context.event.EventListener; | ||
import org.springframework.stereotype.Component; | ||
|
||
@ConditionalOnProperty( | ||
name = "kayenta.default-archivers.enabled", | ||
havingValue = "true", | ||
matchIfMissing = true) | ||
@Component | ||
public class ExecutionArchivalListener { | ||
private static final Logger log = LoggerFactory.getLogger(ExecutionArchivalListener.class); | ||
|
||
private final AccountCredentialsRepository accountCredentialsRepository; | ||
private final StorageServiceRepository storageServiceRepository; | ||
|
||
public ExecutionArchivalListener( | ||
AccountCredentialsRepository accountCredentialsRepository, | ||
StorageServiceRepository storageServiceRepository) { | ||
this.accountCredentialsRepository = Objects.requireNonNull(accountCredentialsRepository); | ||
this.storageServiceRepository = Objects.requireNonNull(storageServiceRepository); | ||
log.info("Loaded ExecutionArchivalListener"); | ||
} | ||
|
||
@EventListener | ||
public void onApplicationEvent(CanaryExecutionCompletedEvent event) { | ||
var response = event.getCanaryExecutionStatusResponse(); | ||
var storageAccountName = response.getStorageAccountName(); | ||
if (storageAccountName != null) { | ||
var resolvedStorageAccountName = | ||
accountCredentialsRepository | ||
.getRequiredOneBy(storageAccountName, AccountCredentials.Type.OBJECT_STORE) | ||
.getName(); | ||
|
||
var storageService = storageServiceRepository.getRequiredOne(resolvedStorageAccountName); | ||
|
||
storageService.storeObject( | ||
resolvedStorageAccountName, | ||
ObjectType.CANARY_RESULT_ARCHIVE, | ||
response.getPipelineId(), | ||
response); | ||
} | ||
} | ||
} |
61 changes: 0 additions & 61 deletions
61
kayenta-core/src/main/java/com/netflix/kayenta/events/listeners/ExecutionArchivalListener.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters