-
Notifications
You must be signed in to change notification settings - Fork 0
๐ :: [#717] - ๋ณผ๋ฅจ ๋ง์ดํธ API ์ถ๊ฐ #718
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
Conversation
Walkthrough์ปจํ ์ด๋ ์์ฑ ๋ช ๋ น์ ์ ํ๋ฆฌ์ผ์ด์ ์ ๋ณผ๋ฅจ ๋ง์ดํธ ํ๋๊ทธ(-v ...)๋ฅผ ์กฐ๋ฆฝํด ์ถ๊ฐํ๊ณ , ๋ณผ๋ฅจ์ ์ ํ๋ฆฌ์ผ์ด์ ์ ๋ง์ดํธํ๋ ์๋ก์ด ์ ์ค์ผ์ด์คยท์๋ํฌ์ธํธ(POST /{workspaceId}/volume/{volumeId}/mount)์ saveMount ์์ํ ๊ฒฝ๋ก๋ฅผ ๋์ ํ๋ค. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User as ํด๋ผ์ด์ธํธ
participant Web as VolumeWebAdapter
participant UC as MountVolumeUseCase
participant QV as QueryVolumePort
participant QA as QueryApplicationPort
participant CV as CommandVolumePort
participant EP as ApplicationEventPublisher
User->>Web: POST /{wsId}/volume/{volumeId}/mount\n?applicationId=...\nbody: {mountPath, readOnly}
Web->>UC: execute(volumeId, applicationId, reqDto)
UC->>UC: workspace ํ์ธ
UC->>QV: findById(volumeId)
UC->>QA: findById(applicationId)
UC->>CV: saveMount(VolumeMount)
UC-->>EP: publish(DeployApplicationEvent([applicationId]))
UC-->>Web: ์๋ฃ
Web-->>User: 200 OK
sequenceDiagram
autonumber
participant Deploy as DeployApplicationUseCase
participant CCS as CreateContainerService
participant QV as QueryVolumePort
participant Docker as Docker CLI
Deploy->>CCS: createContainer(application, externalPort)
activate CCS
CCS->>QV: findAllMountByApplication(application)
QV-->>CCS: [VolumeMount...]
CCS->>Docker: docker create ... -v volumeName:mountPath[:ro] ... -p ...
CCS->>Docker: docker network connect ...
deactivate CCS
Estimated code review effort๐ฏ 3 (Moderate) | โฑ๏ธ ~25 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touchesโ Passed checks (3 passed)
โจ Finishing touches
๐งช Generate unit tests
๐ Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ๐ Files selected for processing (1)
๐ง Files skipped from review as they are similar to previous changes (1)
โฐ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
Tip ๐ฎ Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
Caution
Some comments are outside the diff and canโt be posted inline due to platform limitations.
โ ๏ธ Outside diff range comments (1)
src/test/kotlin/com/dcd/server/core/domain/application/service/CreateContainerServiceImplTest.kt (1)
24-37: ๋ชฉ ์ธํ ์์ ์ค๋ฅ ๋ฐ ๋คํธ์ํฌ ๋ฌธ์์ด ๋ถ์ผ์น๋ก ์ธํ ์ทจ์ฝ/ํ๋ ์ดํค ํ ์คํธ
- Stubbing์ด ํธ์ถ ์ดํ์ ์ด๋ฃจ์ด์ง๋๋ค(Line 26). ํธ์ถ ์ ์ ์ธํ ํด์ผ ํฉ๋๋ค.
- ๋ณธ ์๋น์ค๋
workspace.networkName์ ์ฌ์ฉํ์ง๋ง ๊ธฐ๋ ๋ฌธ์์ด์title.replace(' ', '_')๋ก ๊ฒ์ฆํฉ๋๋ค(Line 31). ์ค์ ๊ตฌํ๊ณผ ๋ถ์ผ์นํฉ๋๋ค.์๋์ ๊ฐ์ด ์์ ํด ์ฃผ์ธ์.
- `when`("service๋ฅผ ์คํํ ๋") { - createContainerService.createContainer(application, application.externalPort) - every { queryVolumePort.findAllMountByApplication(application) } returns listOf() + `when`("service๋ฅผ ์คํํ ๋") { + every { queryVolumePort.findAllMountByApplication(application) } returns listOf() + createContainerService.createContainer(application, application.externalPort) then("์ปจํ ์ด๋๋ฅผ ์คํํ๋ ๋ช ๋ น์ ์คํํด์ผํจ") { verify { commandPort.executeShellCommand( - "docker create --network ${application.workspace.title.replace(' ', '_')} " + + "docker create --network ${application.workspace.networkName} " + "--name ${application.containerName} " + "-p ${application.externalPort}:${application.port} ${application.containerName}:latest" ) }
๐งน Nitpick comments (14)
src/test/kotlin/com/dcd/server/core/domain/application/usecase/DeployApplicationUseCaseTest.kt (2)
37-39: MockkBean ์ฃผ์ ์ ์ ์ . ๋ค๋ง ๋จ๊ณ ์์์ ์คํจ ๊ฒฝ๋ก๋ ํจ๊ป ๋ณด์ฅํ์ธ์
- ์ ์: ๋ฐฐํฌ ๋จ๊ณ์ ํธ์ถ ์์๋ฅผ ๋ช ์์ ์ผ๋ก ๊ฒ์ฆํด ํ๊ท๋ฅผ ๋ฐฉ์งํ์ธ์.
- ์ ์: ๋น๋ ์คํจ ์ createContainerService๊ฐ ํธ์ถ๋์ง ์์์ ๊ฒ์ฆํ๋ ๋ค๊ฑฐํฐ๋ธ ์ผ์ด์ค๋ฅผ ์ถ๊ฐํ์ธ์.
์์:
coVerifyOrder { commandPort.executeShellCommand("docker rm ${result.containerName}") commandPort.executeShellCommand("docker rmi ${result.containerName}") commandPort.executeShellCommand("git clone ${result.githubUrl} '${result.name}'") commandPort.executeShellCommand("cd ./'${result.name}' && docker build -t ${result.containerName}:latest .") createContainerService.createContainer(result, result.externalPort) commandPort.executeShellCommand("rm -rf '${result.name}'") } // ๋น๋ ์คํจ ๋ค๊ฑฐํฐ๋ธ ์ผ์ด์ค(๊ฐ๋ต) coEvery { commandPort.executeShellCommand("cd ./'${result.name}' && docker build -t ${result.containerName}:latest .") } throws RuntimeException("build failed") shouldThrow<Exception> { deployApplicationUseCase.execute(targetApplicationId) } coVerify(exactly = 0) { createContainerService.createContainer(any(), any()) }์ํ์๋ฉด ์ ์๋๋ฆฌ์ค๋ฅผ ํฌํจํ ํ ์คํธ ์ถ๊ฐ ํจ์น๋ฅผ ๋๋ฆฌ๊ฒ ์ต๋๋ค.
71-71: ์์ ํธ์ถ์ ๋จ 1ํ๋ก ์ ํํด ์ค๋ณต ์์ฑ ํ๊ท ๋ฐฉ์ง์ ํ๋ ํฅ์์ ์ํด ํธ์ถ ํ์๋ฅผ ๋ช ์ํ์ธ์.
๋ค์๊ณผ ๊ฐ์ด ์์ ๊ถ์ฅ:
- coVerify { createContainerService.createContainer(result, result.externalPort) } + coVerify(exactly = 1) { createContainerService.createContainer(result, result.externalPort) }src/main/kotlin/com/dcd/server/presentation/domain/volume/data/request/MountVolumeRequest.kt (1)
5-9: ์ ๋ ฅ๋จ ์ต์ ํจํด ๊ฒ์ฆ ์ถ๊ฐ ์ ์๋น์ฆ๋์ค ๋ ์ด์ด์์ ์ต์ข ๊ฒ์ฆํ๋๋ผ๋, ํ๋ฆฌ๋ฐธ๋ฆฌ๋ฐ์ด์ ์ผ๋ก ๊ฒฝ๋ก ํจํด์ ์ ํํ๋ฉด UX์ ๋ณด์์ ๋์์ ๊ฐ์ ํ ์ ์์ต๋๋ค.
์ ์ฉ ์์:
import jakarta.validation.constraints.NotBlank +import jakarta.validation.constraints.Pattern data class MountVolumeRequest( @field:NotBlank - val mountPath: String, + @field:Pattern(regexp = "^(?:/[^\\s:]+)+$", message = "Invalid mount path") + val mountPath: String, val readOnly: Boolean, )src/main/kotlin/com/dcd/server/persistence/volume/VolumePersistenceAdapter.kt (1)
31-33: ์ค๋ณต ๋ง์ดํธ ๋ฐ ๋ฌด๊ฒฐ์ฑ ๋ณด์ฅ ๋ฐฉ์ ํ์๋จ์ save๋ (vol, app, mountPath) ์ค๋ณต ์ฝ์ ์ ํ์ฉํ ์ ์์ต๋๋ค. DB ๋ ๋ฒจ Unique ์ ์ฝ ๋ฐ/๋๋ upsert(idempotent) ์ฒ๋ฆฌ๋ฅผ ๊ถ์ฅํฉ๋๋ค. ํธ๋์ญ์ ๊ฒฝ๊ณ์์ ์ฒ๋ฆฌ๋๋์ง๋ ํ์ธํด ์ฃผ์ธ์.
์:
- UNIQUE(volume_id, application_id, mount_path)
- ์กด์ฌ ์ ๋ฌด์/๊ฐฑ์ ์ ์ฑ ์ ์
src/test/kotlin/com/dcd/server/core/domain/volume/usecase/MountVolumeUseCaseTest.kt (4)
31-33: ๋ถํ์ํ MockkBean ์ ๊ฑฐ ์ ์
@MockkBean CommandPort๋ ๋ณธ ํ ์คํธ์์ ์ฌ์ฉ๋์ง ์์ต๋๋ค. ๋ถํ์ํ ๋น ์ฃผ์ ์ ์ปจํ ์คํธ ๋ก๋ฉ ์๊ฐ์ ๋๋ฆฝ๋๋ค. ์ ๊ฑฐ๋ฅผ ๊ถ์ฅํฉ๋๋ค.- @MockkBean(relaxed = true) - private val commandPort: CommandPort,
53-57: ํ ์คํธ ๊ฐ ๋ฐ์ดํฐ ์ค์ผ ๋ฐฉ์ง
findAll().size shouldBe 1๋จ์ธ์ ์ด์ ํ ์คํธ ์์ฌ ๋ฐ์ดํฐ์ ๋ฏผ๊ฐํฉ๋๋ค. ๊ฐ ์ปจํ ์ด๋/ํ ์คํธ ์ ์volumeMountRepository.deleteAll()๋ก ์ ๋ฆฌํ์ธ์.beforeContainer { + volumeMountRepository.deleteAll() val targetWorkspace = queryWorkspacePort.findById("d57b42f5-5cc4-440b-8dce-b4fc2e372eff")!! workspaceInfo.workspace = targetWorkspace }Also applies to: 64-67
71-72: ID ํ์ ์ผ๊ด์ฑ ๊ฒํ
first.application.id.toString()๋น๊ต๋ ํ์ ๋ถ์ผ์น์ ์ ํธ์ ๋๋ค. ์ ํ๋ฆฌ์ผ์ด์ ID๋ฅผ ์ ๊ตฌ๊ฐ(UUID โ๏ธ String)์์ ์ผ๊ด๋๊ฒ ๋ค๋ฃจ๋๋ก ์ ๋ ฌ์ ๊ฒํ ํด์ฃผ์ธ์(์: ์น ๋ ์ด์ด๋ UUID ๋ฐ๊ณ ์ ์ค์ผ์ด์ค๋ UUID ์ฌ์ฉ).
89-94: ์คํ์ ์์ "์๋ฌ๊ฐ ๋ฐ์ํํด์ผํจ" โ "์๋ฌ๊ฐ ๋ฐ์ํด์ผํจ".
- then("์๋ฌ๊ฐ ๋ฐ์ํํด์ผํจ") { + then("์๋ฌ๊ฐ ๋ฐ์ํด์ผํจ") {src/test/kotlin/com/dcd/server/presentation/domain/volume/VolumeWebAdapterTest.kt (2)
56-56: MockK verifier์์ ๋ถํ์ํ ์บ์คํ ์ ๊ฑฐ
any() as Type๋์ ์ ๋ค๋ฆญany<Type>()์ฌ์ฉ์ด ๊ฐ๊ฒฐํ๊ณ ์์ ํฉ๋๋ค.- verify { createVolumeUseCase.execute(any() as CreateVolumeReqDto) } + verify { createVolumeUseCase.execute(any<CreateVolumeReqDto>()) } ... - verify { updateVolumeUseCase.execute(testVolumeId, any() as UpdateVolumeReqDto) } + verify { updateVolumeUseCase.execute(testVolumeId, any<UpdateVolumeReqDto>()) } ... - verify { mountVolumeUseCase.execute(testVolumeId, testApplicationId, any() as MountVolumeReqDto) } + verify { mountVolumeUseCase.execute(testVolumeId, testApplicationId, any<MountVolumeReqDto>()) }Also applies to: 91-91, 144-145
51-53: ํ ์คํธ ์ค๋ช ์คํ์ ๋ค๋ฌ๊ธฐ
- "์๋ต๋์ด์ฌํจ" โ "์๋ต๋์ด์ผํจ"
- "๋ ํ๋์" โ "๋ํ๋์ด"
- then("์ํ์ฝ๋๊ฐ OK๊ฐ ์๋ต๋์ด์ฌํจ") { + then("์ํ์ฝ๋๊ฐ OK๊ฐ ์๋ต๋์ด์ผํจ") { ... - then("์ ์ค์ผ์ด์ค์ ์๋ต์ด ๋ ํ๋์ ๋ฐํ๋์ด์ผํจ") { + then("์ ์ค์ผ์ด์ค์ ์๋ต์ด ๋ํ๋์ด ๋ฐํ๋์ด์ผํจ") { ... - then("์ ์ค์ผ์ด์ค์ ์๋ต์ด ๋ ํ๋์ ๋ฐํ๋์ด์ผํจ") { + then("์ ์ค์ผ์ด์ค์ ์๋ต์ด ๋ํ๋์ด ๋ฐํ๋์ด์ผํจ") {Also applies to: 106-108, 125-127
src/main/kotlin/com/dcd/server/presentation/domain/volume/VolumeWebAdapter.kt (2)
86-87:applicationId์ ํจ์ฑ ๊ฐํ์ฟผ๋ฆฌ ํ๋ผ๋ฏธํฐ์ ๋ํ ์ต์ ์ ํจ์ฑ ๋ณด์ฅ์ ์ถ๊ฐํ์ธ์. (์: ๊ณต๋ฐฑ ๊ธ์ง, UUID ํํ ๊ถ์ฅ) ํ์ฌ๋ ๋น ๋ฌธ์์ด๋ ํต๊ณผํฉ๋๋ค.
+import jakarta.validation.constraints.NotBlank ... - @RequestParam applicationId: String, + @RequestParam @NotBlank applicationId: String,์ถ๊ฐ๋ก, ๊ฐ๋ฅํ๋ค๋ฉด
applicationId: UUID๋ก ๋ฐ๊ณ ๋ด๋ถ์์.toString()๋ณํํ๋๋ก ์ผ๊ด์ฑ ํ๋ณด๋ฅผ ์ ์ํฉ๋๋ค.
88-90: ์์ฑ์ฑ ์์ ์ HTTP ์๋ต ์ฝ๋ ์ฌ๊ฒํ๋ง์ดํธ ์์ฑ์ ์์ ์์ฑ ์ฑ๊ฒฉ์ ๋๋ค.
200 OK๋์204 No Content๋๋201 Created(+ Location ํค๋)๋ฅผ ๊ณ ๋ คํ์ธ์. ๊ธฐ์กด API ์ผ๊ด์ฑ ์ ์ง๊ฐ ์ฐ์ ์ด๋ผ๋ฉด ๊ทธ๋๋ก ๋ฌ๋ ๋ฌด๋ฐฉํฉ๋๋ค.- mountVolumeUseCase.execute(volumeId, applicationId, mountVolumeRequest.toDto()) - .run { ResponseEntity.ok().build() } + mountVolumeUseCase.execute(volumeId, applicationId, mountVolumeRequest.toDto()) + .run { ResponseEntity.noContent().build() }src/main/kotlin/com/dcd/server/core/domain/volume/usecase/MountVolumeUseCase.kt (2)
25-47: ๋ง์ดํธ ๊ฒฝ๋ก ๊ฒ์ฆ ๋ฐ ์ค๋ณต ๋ฐฉ์ง(๋ฉฑ๋ฑ์ฑ) ์ถ๊ฐ ์ ์
- ์ ๋ ฅ ๊ฒ์ฆ: ๋น์ด์์ง ์๊ณ , ์ ๋ ๊ฒฝ๋ก(
/์์), ๋ฃจํธ(/) ๊ธ์ง,..๊ธ์ง ๋ฑ ์ต์ ๊ท์น์ ์ ์ค์ผ์ด์ค ๋ ์ด์ด์์ ๊ฐ์ ํ์ธ์. (๋๋ฉ์ธ init ๋์ ๋น์ฆ๋์ค ๋ ์ด์ด ์ ํธ โ ๊ณผ๊ฑฐ ๋ฌ๋๊ณผ ์ผ์น)- ์ค๋ณต ๋ฐฉ์ง: ๋์ผ ์ ํ๋ฆฌ์ผ์ด์ ์ ๋์ผ
mountPath์ค๋ณต ์์ฑ ๋ฐฉ์ง(์ ์ ์ฒดํฌ + DB ์ ๋ํฌ ํค).class MountVolumeUseCase( @@ ) { fun execute(volumeId: UUID, applicationId: String, mountVolumeReqDto: MountVolumeReqDto) { + require(mountVolumeReqDto.mountPath.isNotBlank()) { "mountPath must not be blank" } + require(mountVolumeReqDto.mountPath.startsWith("/") && mountVolumeReqDto.mountPath.length > 1) { + "mountPath must be an absolute, non-root path" + } + require(!mountVolumeReqDto.mountPath.contains("..")) { "mountPath must not contain '..'" } @@ - val volumeMount = VolumeMount( + // TODO: ์ค๋ณต ์กด์ฌ ์ ๋ฉฑ๋ฑ ์ฒ๋ฆฌ(๋ฌด์ ๋๋ AlreadyExists ์์ธ) + val volumeMount = VolumeMount( id = UUID.randomUUID(), application = application, volume = volume, mountPath = mountVolumeReqDto.mountPath, readOnly = mountVolumeReqDto.readOnly )DB ์ธก๋ฉด์์๋
(application_id, mount_path)์ ๋ํฌ ์ธ๋ฑ์ค๋ฅผ ๊ถ์ฅํฉ๋๋ค.
49-51: ์ด๋ฒคํธ ๋ฐํ ํ์ด๋ฐ(ํธ๋์ญ์ ์ปค๋ฐ ํ) ํ์ธํ์ฌ ์ฆ์ ๋ฐํ์ ๋๋ค. ๋ฆฌ์ค๋๊ฐ
@TransactionalEventListener(phase = AFTER_COMMIT)๊ฐ ์๋๋ผ๋ฉด, ์ปค๋ฐ ์คํจ ์ ๋ถ์ผ์น๊ฐ ์๊ธธ ์ ์์ต๋๋ค. ์ปค๋ฐ ์ดํ ๋ฐํ์ ๋ณด์ฅํ๋๋ก ๋ฆฌ์ค๋ ์ค์ ์ ํ์ธํ๊ฑฐ๋, after-commit ํ ์ ์ฌ์ฉํ์ธ์.์์ ์กฐ์น:
- ๋ฆฌ์ค๋์
@TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT)์ ์ฉ ์ฌ๋ถ ํ์ธ- ๋๋
TransactionSynchronizationManager.registerSynchronization(...afterCommit { publish })์ฌ์ฉ
๐ Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
๐ Files selected for processing (13)
src/main/kotlin/com/dcd/server/core/domain/application/service/impl/CreateContainerServiceImpl.kt(1 hunks)src/main/kotlin/com/dcd/server/core/domain/volume/dto/request/MountVolumeReqDto.kt(1 hunks)src/main/kotlin/com/dcd/server/core/domain/volume/spi/CommandVolumePort.kt(1 hunks)src/main/kotlin/com/dcd/server/core/domain/volume/usecase/MountVolumeUseCase.kt(1 hunks)src/main/kotlin/com/dcd/server/infrastructure/global/config/SecurityConfig.kt(1 hunks)src/main/kotlin/com/dcd/server/persistence/volume/VolumePersistenceAdapter.kt(1 hunks)src/main/kotlin/com/dcd/server/presentation/domain/volume/VolumeWebAdapter.kt(4 hunks)src/main/kotlin/com/dcd/server/presentation/domain/volume/data/extension/VolumeRequestExtension.kt(2 hunks)src/main/kotlin/com/dcd/server/presentation/domain/volume/data/request/MountVolumeRequest.kt(1 hunks)src/test/kotlin/com/dcd/server/core/domain/application/service/CreateContainerServiceImplTest.kt(1 hunks)src/test/kotlin/com/dcd/server/core/domain/application/usecase/DeployApplicationUseCaseTest.kt(4 hunks)src/test/kotlin/com/dcd/server/core/domain/volume/usecase/MountVolumeUseCaseTest.kt(1 hunks)src/test/kotlin/com/dcd/server/presentation/domain/volume/VolumeWebAdapterTest.kt(4 hunks)
๐งฐ Additional context used
๐ง Learnings (2)
๐ Common learnings
Learnt from: dolong2
PR: dolong2/dcd#703
File: src/main/kotlin/com/dcd/server/core/domain/volume/model/Volume.kt:1-12
Timestamp: 2025-09-01T14:52:42.625Z
Learning: dolong2 prefers to implement validation logic (such as path validation for Volume.physicalPath) in the business logic layer rather than in domain model init blocks, keeping domain models as simple data containers.
๐ Learning: 2025-09-04T14:59:15.319Z
Learnt from: dolong2
PR: dolong2/dcd#710
File: src/main/kotlin/com/dcd/server/core/domain/volume/service/impl/DeleteDockerVolumeServiceImpl.kt:13-18
Timestamp: 2025-09-04T14:59:15.319Z
Learning: dolong2 addressed command injection vulnerability in volume deletion by adding validation in the volume creation service (CreateDockerVolumeServiceImpl) using NAME_SAFE_REGEX pattern, preferring to validate at the source rather than in the deletion service for better security and fail-fast behavior.
Applied to files:
src/main/kotlin/com/dcd/server/core/domain/application/service/impl/CreateContainerServiceImpl.kt
โฐ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build and Test
๐ Additional comments (6)
src/test/kotlin/com/dcd/server/core/domain/application/usecase/DeployApplicationUseCaseTest.kt (2)
7-7: CreateContainerService ์์กด์ฑ ์ํฌํธ ์ ์ ์ ์ค์ผ์ด์ค ์์์ ํ ์คํธ๋ก ๋ณด์ฅํ๋ ๋ฐฉํฅ์ด ๋ง์ต๋๋ค.
22-22: ํด๋น ๋ณ๊ฒฝ์ ๋ํ ์ฝ๋ฉํธ ์๋ต์ ์ ๋ถ์์์ ๊ฒฝ๊ณ ๊ฐ ์๋ค๋ฉด ์ถ๊ฐ ์กฐ์น ๋ถํ์ํฉ๋๋ค.
src/main/kotlin/com/dcd/server/infrastructure/global/config/SecurityConfig.kt (1)
107-107: ๋ง์ดํธ ์๋ํฌ์ธํธ ์ธ์ฆ ์ถ๊ฐ ์ ์ (๊ธฐ์กด ์ ์ฑ ๊ณผ ์ผ๊ด). ๊ถํ ๋ชจ๋ธ์ ์ถํ ์ ๊ฒ ๊ถ์ฅ๋ค๋ฅธ ๋ณผ๋ฅจ API์ ๋์ผํ๊ฒ authenticated๋ก ๋ง์ถ ์ OK. ์ํฌ์คํ์ด์ค ๋ฉค๋ฒ์ญ/ROLE ๊ธฐ๋ฐ ์ธ๋ถ ๊ถํ์ด ํ์ํ๋ค๋ฉด ์ถํ ์ธ๊ฐ ๊ท์น ํ์ฅ ๊ณ ๋ คํด ์ฃผ์ธ์.
ํ์ฌ๋ ์ธ์ฆ๋ง ์๊ตฌํฉ๋๋ค. ์ํฌ์คํ์ด์ค ๋ฆฌ์์ค ์ ๊ทผ ๊ถํ ์ฒดํฌ๊ฐ ๋ณ๋ ํํฐ/์ด๋๋ฐ์ด์ ๋ก ์ด๋ฏธ ์ ์ฉ๋๋์ง ํ์ธ ๋ถํ๋๋ฆฝ๋๋ค.
src/main/kotlin/com/dcd/server/core/domain/volume/spi/CommandVolumePort.kt (2)
4-4: ์ API ์ถ๊ฐ(LGTM) โ ๋๋ฉ์ธ ๋ชจ๋ธ ์์กด์ฑ ์ ์
VolumeMount๋ฅผ ํฌํธ์ ๋ ธ์ถํ๋ ๊ฒฐ์ ์ ํฉ๋ฆฌ์ ์ ๋๋ค. ๋๋ฉ์ธ ์ค์ฌ ํ๋ฆ๊ณผ ์ผ๊ด๋ฉ๋๋ค.
11-11: ๋ชจ๋ ๊ตฌํ์ฒด ๋๊ธฐํ ํ์ธ โ saveMount ๊ตฌํ ๋ฐ์ ์ฌ๋ถ
rg ์คํ ๊ฒฐ๊ณผ saveMount๋ฅผ ์ค๋ฒ๋ผ์ด๋ํ ๊ตฌํ์ฒด๋ src/main/kotlin/com/dcd/server/persistence/volume/VolumePersistenceAdapter.kt:31 ํ ๊ณณ๋ฟ์ ๋๋ค. ๋ค๋ฅธ ์ด๋ํฐ(ํ ๋ชจ๋ ํฌํจ)๊ฐ ์๋ค๋ฉด ๋์ผ ์๊ทธ๋์ฒ๋ก ๊ตฌํ์ ์ถ๊ฐํ์ธ์.src/main/kotlin/com/dcd/server/presentation/domain/volume/data/extension/VolumeRequestExtension.kt (1)
22-26: ๋งคํ ํจ์ ์ ์ (๋ณํ ๋๋ฝ ์์)ํ๋ 1:1 ๋งคํ์ด ์ ํํฉ๋๋ค.
๊ฐ์
์์ ๋ด์ฉ
์ฒดํฌ๋ฆฌ์คํธ
Summary by CodeRabbit
์ ๊ธฐ๋ฅ
๋ณด์
๋ฌธ์
ํ ์คํธ