Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): remove circular reference from CanaryJudgeTask, CompareJudgeResultsTask, MetricSetMixerServiceTask, MonitorCanaryTask and RunCanaryTask classes identified during upgrade to spring boot 2.6.x #1022

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

@Slf4j
Expand All @@ -48,6 +49,7 @@ public class CanaryJudgeTask implements RetryableTask {
private final ObjectMapper objectMapper;
private final ExecutionMapper executionMapper;

@Lazy
@Autowired
public CanaryJudgeTask(
AccountCredentialsRepository accountCredentialsRepository,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import javax.annotation.Nonnull;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

@Slf4j
Expand All @@ -45,6 +46,7 @@ public class CompareJudgeResultsTask implements RetryableTask {
private final ObjectMapper objectMapper;
private final ExecutionMapper executionMapper;

@Lazy
@Autowired
public CompareJudgeResultsTask(
AccountCredentialsRepository accountCredentialsRepository,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import javax.annotation.Nonnull;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

@Component
Expand All @@ -47,6 +48,7 @@ public class MetricSetMixerServiceTask implements RetryableTask {
private final MetricSetMixerService metricSetMixerService;
private final ExecutionMapper executionMapper;

@Lazy
@Autowired
public MetricSetMixerServiceTask(
AccountCredentialsRepository accountCredentialsRepository,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import javax.annotation.Nonnull;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

/**
Expand All @@ -68,6 +69,7 @@ public class MonitorCanaryTask implements Task, OverridableTimeoutRetryableTask
private final AccountCredentialsRepository accountCredentialsRepository;
private final ExecutionMapper executionMapper;

@Lazy
@Autowired
public MonitorCanaryTask(
ExecutionRepository executionRepository,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import javax.annotation.Nonnull;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

/** Orca Task that tells Kayenta to execute a canary analysis / judgement */
Expand All @@ -47,6 +48,7 @@ public class RunCanaryTask implements Task {
private final ExecutionMapper executionMapper;
private final ObjectMapper kayentaObjectMapper;

@Lazy
@Autowired
public RunCanaryTask(
AccountCredentialsRepository accountCredentialsRepository,
Expand Down