Skip to content

πŸ”€ :: [#832] - 이미지 λΉŒλ“œμ€‘ νƒ€μž„μ•„μ›ƒ λ°œμƒμ‹œ μ˜ˆμ™Έμ²˜λ¦¬ 적용 - #833

Merged
dolong2 merged 2 commits into
developfrom
refac/image-build
Aug 12, 2026
Merged

Conversation

@dolong2

@dolong2 dolong2 commented Aug 12, 2026

Copy link
Copy Markdown
Owner

κ°œμš”

  • 이미지 λΉŒλ“œμ€‘ νƒ€μž„μ•„μ›ƒμ΄ λ°œμƒν•˜λŠ” 경우, λ¬΄μ‹œν•˜κ³  λ‹€μŒ ν”Œλ‘œμš°λ₯Ό μ§„ν–‰ν•˜λ„λ‘ μ„€κ³„λ˜μ–΄μžˆμ–΄μ„œ. λͺ…μ‹œμ μœΌλ‘œ μ˜ˆμ™Έλ₯Ό λ°˜ν™˜ν•˜λ„λ‘ μˆ˜μ •ν•©λ‹ˆλ‹€.

μž‘μ—…λ‚΄μš©

  • 이미지 λΉŒλ“œ νƒ€μž„μ•„μ›ƒμ„ 30λΆ„μœΌλ‘œ λ³€κ²½
  • 이미지 λΉŒλ“œμ‹œ νƒ€μž„μ•„μ›ƒμ΄ λ°œμƒν•˜λ©΄ μ˜ˆμ™Έλ₯Ό λ˜μ§€λŠ” 둜직 μΆ”κ°€

체크리슀트

νƒ¬ν”Œλ¦Ώμ™Έμ— ν•„μš”ν•œ ν•­λͺ©μ΄ 있으면 μΆ”κ°€ν•΄μ£Όμ„Έμš”.

  • λ‘œμ»¬μ—μ„œ λΉŒλ“œκ°€ μ„±κ³΅ν•˜λ‚˜μš”?
  • μΆ”κ°€(μˆ˜μ •)ν•œ μ½”λ“œκ°€ μ •μƒμ μœΌλ‘œ λ™μž‘ν•˜λ‚˜μš”?
  • pr 타켓 λΈŒλžœμΉ˜κ°€ 맞게 μ„€μ •λ˜μ–΄ μžˆλ‚˜μš”?
  • prμ—μ„œ μž‘μ—…ν•  λ‚΄μš©λ§Œ μž‘μ—…λλ‚˜μš”?
  • κΈ°μ‘΄ API와 ν˜Έν™˜λ˜μ§€ μ•ŠλŠ” 사항이 μžˆλ‚˜μš”?

Summary by CodeRabbit

  • 버그 μˆ˜μ •
    • μ• ν”Œλ¦¬μΌ€μ΄μ…˜ μƒˆλ‘œκ³ μΉ¨ μž‘μ—…μ˜ 처리 μ œν•œ μ‹œκ°„μ΄ 30λΆ„μœΌλ‘œ μ—°μž₯λ˜μ—ˆμŠ΅λ‹ˆλ‹€.
    • Docker 이미지 λΉŒλ“œκ°€ μ΅œλŒ€ 30λΆ„ λ™μ•ˆ μ™„λ£Œ μ—¬λΆ€λ₯Ό ν™•μΈν•˜λ„λ‘ κ°œμ„ λ˜μ—ˆμŠ΅λ‹ˆλ‹€.
    • μ œν•œ μ‹œκ°„ λ‚΄ λΉŒλ“œκ°€ μ™„λ£Œλ˜μ§€ μ•ŠμœΌλ©΄ λͺ…ν™•ν•œ 이미지 λΉŒλ“œ μ‹€νŒ¨ 였λ₯˜κ°€ ν‘œμ‹œλ©λ‹ˆλ‹€.

@dolong2 dolong2 self-assigned this Aug 12, 2026
@dolong2 dolong2 added πŸ› Bug 버그 λ°œμƒ!! 1️⃣ Priority: 상 μš°μ„ μˆœμœ„ 상 labels Aug 12, 2026
@dolong2 dolong2 added the πŸ”¨ Refactor μ½”λ“œ λ¦¬νŒ©ν† λ§ label Aug 12, 2026
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

이미지 λΉŒλ“œ λŒ€κΈ° μ‹œκ°„μ΄ 30λΆ„μœΌλ‘œ μ—°μž₯λ˜μ—ˆμŠ΅λ‹ˆλ‹€. λΉŒλ“œκ°€ μ™„λ£Œλ˜μ§€ μ•ŠμœΌλ©΄ DockerCommandException을 λ°œμƒμ‹œν‚€κ³  κ·ΈλŒ€λ‘œ μ „λ‹¬ν•©λ‹ˆλ‹€. refresh λ©”μ„œλ“œμ˜ λΆ„μ‚° 락 μž„λŒ€ μ‹œκ°„λ„ 30λΆ„μœΌλ‘œ λ³€κ²½λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

Changes

λΉŒλ“œ 및 κ°±μ‹  μ‹œκ°„ μ œν•œ

Layer / File(s) Summary
이미지 λΉŒλ“œ μ™„λ£Œ λŒ€κΈ° 처리
src/main/kotlin/com/dcd/server/infrastructure/global/thirdparty/docker/DockerCommandExecutor.kt
이미지 λΉŒλ“œ κ²°κ³Όλ₯Ό μ €μž₯ν•©λ‹ˆλ‹€. μ™„λ£Œ λŒ€κΈ° μ‹œκ°„μ„ 30λΆ„μœΌλ‘œ μ—°μž₯ν•©λ‹ˆλ‹€. μ œν•œ μ‹œκ°„ λ‚΄ μ™„λ£Œλ˜μ§€ μ•ŠμœΌλ©΄ IMAGE_BUILD_FAILUREλ₯Ό ν¬ν•¨ν•œ DockerCommandException을 λ°œμƒμ‹œν‚΅λ‹ˆλ‹€.
κ°±μ‹  μž‘μ—… 락 μž„λŒ€ μ‹œκ°„ μ‘°μ •
src/main/kotlin/com/dcd/server/core/domain/application/service/impl/RefreshApplicationServiceImpl.kt
refresh λ©”μ„œλ“œμ˜ λΆ„μ‚° 락 μž„λŒ€ μ‹œκ°„μ„ 3λΆ„μ—μ„œ 30λΆ„μœΌλ‘œ λ³€κ²½ν•©λ‹ˆλ‹€.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

Possibly related PRs

  • dolong2/dcd#820 β€” refresh의 락 μ„€μ •κ³Ό 이미지 λΉŒλ“œ νƒ€μž„μ•„μ›ƒμ— κ΄€λ ¨λœ 변경을 λ‹€λ£Ήλ‹ˆλ‹€.

Poem

κΉ‘μΆ© λ›°λŠ” 토끼가 μ‹œκ°„μ„ λŠ˜λ Έλ„€
λΉŒλ“œλ„ 락도 μ„œλ‘λ₯΄μ§€ μ•Šλ„€
늦으면 λͺ…ν™•νžˆ μ‹€νŒ¨λ₯Ό μ•Œλ¦¬κ³ 
μ˜ˆμ™ΈλŠ” κ·ΈλŒ€λ‘œ 길을 달리넀
λ‹Ήκ·Όμ²˜λŸΌ μ„ λͺ…ν•œ 변경이라넀 πŸ‡

πŸš₯ Pre-merge checks | βœ… 5
βœ… Passed checks (5 passed)
Check name Status Explanation
Description Check βœ… Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check βœ… Passed 이미지 λΉŒλ“œ νƒ€μž„μ•„μ›ƒ λ°œμƒ μ‹œ μ˜ˆμ™Έλ₯Ό μ²˜λ¦¬ν•˜λŠ” μ£Όμš” λ³€κ²½ 사항을 λͺ…ν™•ν•˜κ²Œ μ„€λͺ…ν•©λ‹ˆλ‹€.
Docstring Coverage βœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check βœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check βœ… Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
πŸ“ Generate docstrings
  • Create stacked PR
  • Commit on current branch
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refac/image-build

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands.

@dolong2
dolong2 merged commit 6e2fbc8 into develop Aug 12, 2026
2 checks passed
@dolong2
dolong2 deleted the refac/image-build branch August 12, 2026 02:14

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/main/kotlin/com/dcd/server/infrastructure/global/thirdparty/docker/DockerCommandExecutor.kt (1)

185-197: 🎯 Functional Correctness | 🟠 Major | ⚑ Quick win

BuildResponseItem.errorλ₯Ό κ²€μ‚¬ν•˜μ„Έμš”.

awaitCompletion(30, TimeUnit.MINUTES)은 콜백 μ™„λ£Œ 여뢀와 슀트림 였λ₯˜λ§Œ κ²€μ‚¬ν•©λ‹ˆλ‹€. BuildImageResultCallback이 μ €μž₯ν•˜λŠ” Docker λΉŒλ“œ 였λ₯˜λŠ” κ²€μ‚¬ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. λ”°λΌμ„œ 였λ₯˜ 응닡 ν›„ 슀트림이 정상 μ’…λ£Œλ˜λ©΄ λΉŒλ“œ μ‹€νŒ¨κ°€ μ„±κ³΅μœΌλ‘œ 처리될 수 μžˆμŠ΅λ‹ˆλ‹€.

μ½œλ°±μ„ λ³€μˆ˜λ‘œ λ³΄κ΄€ν•˜μ„Έμš”. νƒ€μž„μ•„μ›ƒ 검사 ν›„ callback.awaitImageId()λ₯Ό ν˜ΈμΆœν•˜μ„Έμš”. 이 호좜이 λΉŒλ“œ 였λ₯˜μ™€ 이미지 IDλ₯Ό κ²€μ‚¬ν•˜μ—¬ createContainer 싀행을 λ§‰μŠ΅λ‹ˆλ‹€.

πŸ€– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/main/kotlin/com/dcd/server/infrastructure/global/thirdparty/docker/DockerCommandExecutor.kt`
around lines 185 - 197, Update the Docker image build flow to retain the
BuildImageResultCallback instance instead of creating it inline, then use that
callback for awaitCompletion. After the timeout check, call
callback.awaitImageId() so Docker build errors and a missing image ID prevent
createContainer from running; preserve the existing timeout exception behavior.

Source: MCP tools

🧹 Nitpick comments (1)
src/main/kotlin/com/dcd/server/infrastructure/global/thirdparty/docker/DockerCommandExecutor.kt (1)

194-199: 🩺 Stability & Availability | πŸ”΅ Trivial

이미지 λΉŒλ“œ μ œν•œ μ‹œκ°„κ³Ό λΆ„μ‚° 락 μž„λŒ€ μ‹œκ°„μ„ λΆ„λ¦¬ν•˜μ„Έμš”.

RefreshApplicationServiceImpl.refreshλŠ” leaseTime을 30λΆ„μœΌλ‘œ κ³ μ •ν•˜κ³ , RedissonLockAdapterλŠ” 이 값을 RLock.tryLock(waitTime, leaseTime, ...)에 μ „λ‹¬ν•©λ‹ˆλ‹€. μ–‘μˆ˜ leaseTime을 μ‚¬μš©ν•˜λ©΄ Redisson watchdog μžλ™ 갱신이 λ™μž‘ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. 전체 κ°±μ‹  μž‘μ—…μ΄ 30뢄을 μ΄ˆκ³Όν•˜λ©΄ 락이 λ§Œλ£Œλ˜μ–΄ 동일 μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ˜ 두 번째 갱신이 λ™μ‹œμ— 싀행될 수 μžˆμŠ΅λ‹ˆλ‹€. 전체 μž‘μ—… μ‹œκ°„λ³΄λ‹€ κΈ΄ μž„λŒ€ μ‹œκ°„μ„ μ‚¬μš©ν•˜κ±°λ‚˜, Redisson watchdog λ˜λŠ” λͺ…μ‹œμ μΈ 락 갱신을 μ μš©ν•˜μ„Έμš”.

πŸ€– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/main/kotlin/com/dcd/server/infrastructure/global/thirdparty/docker/DockerCommandExecutor.kt`
around lines 194 - 199, λΆ„μ‚° 락의 μž„λŒ€ μ‹œκ°„μ΄ 이미지 λΉŒλ“œ μ œν•œ μ‹œκ°„μΈ 30뢄에 묢이지 μ•Šλ„λ‘
RefreshApplicationServiceImpl.refresh의 leaseTime을 전체 κ°±μ‹  μž‘μ—…μ„ μΆ©λΆ„νžˆ ν¬ν•¨ν•˜λŠ” κ°’μœΌλ‘œ μ‘°μ •ν•˜κ±°λ‚˜
Redisson watchdog/λͺ…μ‹œμ  갱신을 μ‚¬μš©ν•˜λ„λ‘ λ³€κ²½ν•˜μ„Έμš”. RedissonLockAdapter의 RLock.tryLock 호좜이
μ„ νƒν•œ 방식에 맞게 λ™μž‘ν•˜κ²Œ ν•˜λ˜, 30뢄을 μ΄ˆκ³Όν•˜λŠ” κ°±μ‹  쀑에도 동일 μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ˜ 락이 μœ μ§€λ˜λ„λ‘ ν•˜μ„Έμš”.
πŸ€– Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/main/kotlin/com/dcd/server/core/domain/application/service/impl/RefreshApplicationServiceImpl.kt`:
- Line 22: Update the `@Lock` configuration on refresh in
RefreshApplicationServiceImpl to cover the full refresh execution time,
including the maximum image-build wait, replication, and follow-up work; since
RedissonLockAdapter does not auto-renew fixed leases, use a sufficiently long
lease or enable the supported renewal behavior, and add an integration test
proving concurrent refresh executions remain blocked until the first refresh
completes.

In
`@src/main/kotlin/com/dcd/server/infrastructure/global/thirdparty/docker/DockerCommandExecutor.kt`:
- Around line 198-199: Update the outer exception handling in execute so
DockerCommandException remains unchanged for external callers: publish the
required event, then rethrow the original exception instead of converting it to
RuntimeException. Preserve the existing buildImage catch behavior and ensure
FailureCase.IMAGE_BUILD_FAILURE follow-up handling can receive
DockerCommandException.

---

Outside diff comments:
In
`@src/main/kotlin/com/dcd/server/infrastructure/global/thirdparty/docker/DockerCommandExecutor.kt`:
- Around line 185-197: Update the Docker image build flow to retain the
BuildImageResultCallback instance instead of creating it inline, then use that
callback for awaitCompletion. After the timeout check, call
callback.awaitImageId() so Docker build errors and a missing image ID prevent
createContainer from running; preserve the existing timeout exception behavior.

---

Nitpick comments:
In
`@src/main/kotlin/com/dcd/server/infrastructure/global/thirdparty/docker/DockerCommandExecutor.kt`:
- Around line 194-199: λΆ„μ‚° 락의 μž„λŒ€ μ‹œκ°„μ΄ 이미지 λΉŒλ“œ μ œν•œ μ‹œκ°„μΈ 30뢄에 묢이지 μ•Šλ„λ‘
RefreshApplicationServiceImpl.refresh의 leaseTime을 전체 κ°±μ‹  μž‘μ—…μ„ μΆ©λΆ„νžˆ ν¬ν•¨ν•˜λŠ” κ°’μœΌλ‘œ μ‘°μ •ν•˜κ±°λ‚˜
Redisson watchdog/λͺ…μ‹œμ  갱신을 μ‚¬μš©ν•˜λ„λ‘ λ³€κ²½ν•˜μ„Έμš”. RedissonLockAdapter의 RLock.tryLock 호좜이
μ„ νƒν•œ 방식에 맞게 λ™μž‘ν•˜κ²Œ ν•˜λ˜, 30뢄을 μ΄ˆκ³Όν•˜λŠ” κ°±μ‹  쀑에도 동일 μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ˜ 락이 μœ μ§€λ˜λ„λ‘ ν•˜μ„Έμš”.
πŸͺ„ Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
βš™οΈ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 43fa1412-c48a-420c-8581-9cb41f95b3da

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 7a5002f and a673e24.

πŸ“’ Files selected for processing (2)
  • src/main/kotlin/com/dcd/server/core/domain/application/service/impl/RefreshApplicationServiceImpl.kt
  • src/main/kotlin/com/dcd/server/infrastructure/global/thirdparty/docker/DockerCommandExecutor.kt

private val queryVolumePort: QueryVolumePort
) : RefreshApplicationService {
@Lock("#application.id", waitTime = 1000 * 10, leaseTime = 1000 * 60 * 3)
@Lock("#application.id", waitTime = 1000 * 10, leaseTime = 1000 * 60 * 30)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | πŸ—οΈ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 락 κ΅¬ν˜„μ΄ leaseλ₯Ό μžλ™ κ°±μ‹ ν•˜λŠ”μ§€ ν™•μΈν•©λ‹ˆλ‹€.
rg -n -C 10 'interface LockPort|fun lock\s*\(|tryLock|leaseTime|lockPort\.lock' --glob '*.kt' . || true

# refresh 전체 μ‹€ν–‰ κ²½λ‘œμ™€ κ΄€λ ¨ ν…ŒμŠ€νŠΈλ₯Ό ν™•μΈν•©λ‹ˆλ‹€.
rg -n -C 12 'refresh\s*\(|RefreshApplicationServiceImpl|`@Lock`' --glob '*.kt' . || true

Repository: dolong2/dcd

Length of output: 44041


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- RedissonLockAdapter.kt ---'
cat -n src/main/kotlin/com/dcd/server/infrastructure/global/adapter/RedissonLockAdapter.kt

printf '%s\n' '--- RefreshApplicationServiceImpl.kt ---'
cat -n src/main/kotlin/com/dcd/server/core/domain/application/service/impl/RefreshApplicationServiceImpl.kt

printf '%s\n' '--- build timeout and lock dependencies ---'
rg -n -C 8 'buildImage|waitFor|timeout|redisson|redisson-spring' --glob '*.kt' --glob '*.gradle*' --glob 'gradle.properties' --glob 'pom.xml' .

Repository: dolong2/dcd

Length of output: 50367


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- Docker build implementation ---'
sed -n '180,215p' src/main/kotlin/com/dcd/server/infrastructure/global/thirdparty/docker/DockerCommandExecutor.kt

printf '%s\n' '--- Redisson lock configuration ---'
rg -n -C 5 'setLockWatchdogTimeout|lockWatchdogTimeout|tryLock\s*\(' \
  src/main/kotlin src/test/kotlin build.gradle.kts

printf '%s\n' '--- Deterministic lease-path check ---'
python3 - <<'PY'
from pathlib import Path

adapter = Path("src/main/kotlin/com/dcd/server/infrastructure/global/adapter/RedissonLockAdapter.kt").read_text()
service = Path("src/main/kotlin/com/dcd/server/core/domain/application/service/impl/RefreshApplicationServiceImpl.kt").read_text()
docker = Path("src/main/kotlin/com/dcd/server/infrastructure/global/thirdparty/docker/DockerCommandExecutor.kt").read_text()

print("fixed_lease_call:", "tryLock(waitTime, leaseTime, TimeUnit.MILLISECONDS)" in adapter)
print("refresh_lease_ms:", "1000 * 60 * 30" in service)
print("build_waits_for_completion:", ".awaitCompletion()" in docker)
print("build_timeout_literal_near_implementation:",
      "timeout" in docker[ docker.find("override fun buildImage"):docker.find("override fun buildImage") + 2500 ].lower())
PY

Repository: dolong2/dcd

Length of output: 7748


refresh 전체 μ‹€ν–‰ μ‹œκ°„μ„ κ³ λ €ν•˜μ—¬ 락 μž„λŒ€ μ‹œκ°„μ„ μ„€μ •ν•˜μ„Έμš”.

RedissonLockAdapterλŠ” κ³ μ •λœ leaseTime으둜 락을 νšλ“ν•˜λ©° μžλ™ 갱신을 μˆ˜ν–‰ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. 이미지 λΉŒλ“œλŠ” μ΅œλŒ€ 30λΆ„ λŒ€κΈ°ν•˜κ³ , λ³΅μ œμ™€ 후속 μž‘μ—…λ„ μ‹€ν–‰ν•˜λ―€λ‘œ 락은 refresh μ™„λ£Œ 전에 만료될 수 μžˆμŠ΅λ‹ˆλ‹€. 락 μžλ™ 갱신을 μ μš©ν•˜κ±°λ‚˜ μΆ©λΆ„νžˆ κΈ΄ μž„λŒ€ μ‹œκ°„μ„ μ„€μ •ν•˜κ³ , λ™μ‹œ refresh 싀행을 μ°¨λ‹¨ν•˜λŠ” 톡합 ν…ŒμŠ€νŠΈλ₯Ό μΆ”κ°€ν•˜μ„Έμš”.

πŸ€– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/main/kotlin/com/dcd/server/core/domain/application/service/impl/RefreshApplicationServiceImpl.kt`
at line 22, Update the `@Lock` configuration on refresh in
RefreshApplicationServiceImpl to cover the full refresh execution time,
including the maximum image-build wait, replication, and follow-up work; since
RedissonLockAdapter does not auto-renew fixed leases, use a sufficiently long
lease or enable the supported renewal behavior, and add an integration test
proving concurrent refresh executions remain blocked until the first refresh
completes.

Comment on lines +198 to +199
} catch (e: DockerCommandException) {
throw e

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ—„οΈ Data Integrity & Integration | 🟠 Major | ⚑ Quick win

DockerCommandException을 μ™ΈλΆ€ ν˜ΈμΆœμžμ—κ²Œ κ·ΈλŒ€λ‘œ μ „λ‹¬ν•˜μ„Έμš”.

buildImageμ—μ„œ μ˜ˆμ™Έλ₯Ό λ‹€μ‹œ λ˜μ Έλ„ execute의 Line 52-54κ°€ 이λ₯Ό λ‹€μ‹œ 작고 RuntimeException으둜 λ³€ν™˜ν•©λ‹ˆλ‹€. λ”°λΌμ„œ νƒ€μž„μ•„μ›ƒ μ˜ˆμ™Έκ°€ DockerCommandException으둜 ν˜ΈμΆœμžμ—κ²Œ μ „λ‹¬λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. FailureCase.IMAGE_BUILD_FAILUREλ₯Ό ν™•μΈν•˜λŠ” 후속 μ²˜λ¦¬λ„ 이 정보λ₯Ό 받을 수 μ—†μŠ΅λ‹ˆλ‹€.

νƒ€μž„μ•„μ›ƒ μ˜ˆμ™Έλ₯Ό κ·ΈλŒ€λ‘œ 전달해야 ν•œλ‹€λ©΄ μ™ΈλΆ€ catchμ—μ„œ 이벀트λ₯Ό λ°œν–‰ν•œ ν›„ throw exλ₯Ό μ‹€ν–‰ν•˜μ„Έμš”.

μˆ˜μ • μ˜ˆμ‹œ
             eventPublisher.publishEvent(
                 ChangeApplicationStatusEvent(
                     ApplicationStatus.FAILURE,
                     ex.application,
                     ex.failureCase,
                     ex.message
                 )
             )
-            throw RuntimeException("Docker command execution failed for application ${ex.application.name}")
+            throw ex
πŸ€– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/main/kotlin/com/dcd/server/infrastructure/global/thirdparty/docker/DockerCommandExecutor.kt`
around lines 198 - 199, Update the outer exception handling in execute so
DockerCommandException remains unchanged for external callers: publish the
required event, then rethrow the original exception instead of converting it to
RuntimeException. Preserve the existing buildImage catch behavior and ensure
FailureCase.IMAGE_BUILD_FAILURE follow-up handling can receive
DockerCommandException.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

πŸ› Bug 버그 λ°œμƒ!! πŸ”¨ Refactor μ½”λ“œ λ¦¬νŒ©ν† λ§ 1️⃣ Priority: 상 μš°μ„ μˆœμœ„ 상

Projects

None yet

Development

Successfully merging this pull request may close these issues.

이미지 λΉŒλ“œμ€‘ νƒ€μž„μ•„μ›ƒ λ°œμƒμ‹œ μ˜ˆμ™Έμ²˜λ¦¬

1 participant