-
Notifications
You must be signed in to change notification settings - Fork 592
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): Remove the circular dependency on
clouddriver
(#234)
This PR makes use of the locking support in `kork` and removes a dependency on `clouddriver:cats-redis`. Redis usage has migrated to the `RedisClientDelegate` which in theory opens us up to using dynomite at Netflix. BREAKING CHANGE Introduces a new config fiat.writeMode.syncFailureDelayMs as a means of controlling the lock delay on failure vs success of a sync. This was previously managed by redis.poll.errorIntervalSeconds.
- Loading branch information
Showing
10 changed files
with
241 additions
and
288 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
112 changes: 0 additions & 112 deletions
112
fiat-roles/src/main/java/com/netflix/spinnaker/fiat/config/CatsSchedulerConfig.java
This file was deleted.
Oops, something went wrong.
52 changes: 52 additions & 0 deletions
52
fiat-roles/src/main/java/com/netflix/spinnaker/fiat/config/LockConfig.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,52 @@ | ||
/* | ||
* Copyright 2018 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.spinnaker.fiat.config; | ||
|
||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import com.netflix.spectator.api.Registry; | ||
import com.netflix.spinnaker.kork.jedis.RedisClientDelegate; | ||
import com.netflix.spinnaker.kork.jedis.lock.RedisLockManager; | ||
import com.netflix.spinnaker.kork.lock.LockManager; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
import java.time.Clock; | ||
import java.util.Optional; | ||
|
||
@Configuration | ||
public class LockConfig { | ||
@Bean | ||
Clock clock() { | ||
return Clock.systemDefaultZone(); | ||
} | ||
|
||
@Bean | ||
LockManager redisLockManager(Clock clock, | ||
Registry registry, | ||
ObjectMapper mapper, | ||
RedisClientDelegate redisClientDelegate) { | ||
return new RedisLockManager( | ||
null, // will fall back to running node name | ||
clock, | ||
registry, | ||
mapper, | ||
redisClientDelegate, | ||
Optional.empty(), | ||
Optional.empty() | ||
); | ||
} | ||
} |
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
Oops, something went wrong.