백엔드 Docker 빌드 실패로 배포가 막히던 문제를 수정한다.
테스트 컴파일 오류(RsiThresholdCrossSignalTest)와 -DskipTests 한계를 해결해 StrategyConditionThresholdNormalizer가 실제 서버 이미지에 포함되도록 한다. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+1
-1
@@ -22,7 +22,7 @@ RUN mvn -f backend/pom.xml dependency:go-offline -q 2>/dev/null || true
|
|||||||
|
|
||||||
# 소스 빌드
|
# 소스 빌드
|
||||||
COPY backend/src ./backend/src
|
COPY backend/src ./backend/src
|
||||||
RUN mvn -f backend/pom.xml package -DskipTests -q
|
RUN mvn -f backend/pom.xml package -Dmaven.test.skip=true -q
|
||||||
|
|
||||||
# ── 2단계: 실행 ──────────────────────────────────────────────────────────────
|
# ── 2단계: 실행 ──────────────────────────────────────────────────────────────
|
||||||
FROM eclipse-temurin:21-jre-alpine AS production
|
FROM eclipse-temurin:21-jre-alpine AS production
|
||||||
|
|||||||
@@ -132,11 +132,13 @@ class RsiThresholdCrossSignalTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static BarSeries buildOscillatingSeries(int count) {
|
private static BarSeries buildOscillatingSeries(int count) {
|
||||||
BaseBarSeriesBuilder builder = new BaseBarSeriesBuilder()
|
Duration period = Duration.ofMinutes(3);
|
||||||
|
BarSeries s = new BaseBarSeriesBuilder()
|
||||||
.withName("test")
|
.withName("test")
|
||||||
.withBarBuilderFactory(new TimeBarBuilderFactory(Duration.ofMinutes(3)))
|
.withBarBuilderFactory(new TimeBarBuilderFactory())
|
||||||
.withNumFactory(DoubleNumFactory.getInstance());
|
.withNumFactory(DoubleNumFactory.getInstance())
|
||||||
BarSeries s = builder.build();
|
.build();
|
||||||
|
TimeBarBuilderFactory factory = new TimeBarBuilderFactory();
|
||||||
Instant t = Instant.parse("2024-01-01T00:00:00Z");
|
Instant t = Instant.parse("2024-01-01T00:00:00Z");
|
||||||
double price = 100;
|
double price = 100;
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
@@ -146,8 +148,13 @@ class RsiThresholdCrossSignalTest {
|
|||||||
double h = price + 1.5;
|
double h = price + 1.5;
|
||||||
double l = price - 1.5;
|
double l = price - 1.5;
|
||||||
double c = price;
|
double c = price;
|
||||||
s.addBar(t, o, h, l, c, 1000);
|
factory.createBarBuilder(s)
|
||||||
t = t.plus(Duration.ofMinutes(3));
|
.timePeriod(period)
|
||||||
|
.endTime(t.plus(period))
|
||||||
|
.openPrice(o).highPrice(h).lowPrice(l).closePrice(c)
|
||||||
|
.volume(1000)
|
||||||
|
.add();
|
||||||
|
t = t.plus(period);
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import {
|
|||||||
type EditorConditionState,
|
type EditorConditionState,
|
||||||
} from './strategyConditionSerde';
|
} from './strategyConditionSerde';
|
||||||
import { getStartCandleTypes, normalizeStartCandleType } from './strategyStartNodes';
|
import { getStartCandleTypes, normalizeStartCandleType } from './strategyStartNodes';
|
||||||
|
import { normalizeLogicRootForPersistence } from './strategyConditionNormalize';
|
||||||
import type { LogicNode } from './strategyTypes';
|
import type { LogicNode } from './strategyTypes';
|
||||||
import type { StrategyFlowLayoutStore } from './strategyEditorLayoutStorage';
|
import type { StrategyFlowLayoutStore } from './strategyEditorLayoutStorage';
|
||||||
|
|
||||||
@@ -211,8 +212,8 @@ export async function persistStrategyEditorState(
|
|||||||
id: strategyId,
|
id: strategyId,
|
||||||
name,
|
name,
|
||||||
description,
|
description,
|
||||||
buyCondition: encodedBuy,
|
buyCondition: encodedBuy ? normalizeLogicRootForPersistence(encodedBuy) : encodedBuy,
|
||||||
sellCondition: encodedSell,
|
sellCondition: encodedSell ? normalizeLogicRootForPersistence(encodedSell) : encodedSell,
|
||||||
flowLayout,
|
flowLayout,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user