Skip to content

[#70] [Feat] 실패한 DocumentConversionJob 재시도 API 구현 - #72

Open
snowballourown wants to merge 2 commits into
mainfrom
feature/70-failded-Document-Conversion
Open

snowballourown wants to merge 2 commits into
mainfrom
feature/70-failded-Document-Conversion

Conversation

@snowballourown

Copy link
Copy Markdown
Collaborator

변경 내용

PDF 변환에 실패한 DocumentVersion을 Word 재업로드 없이 다시 변환할 수 있도록 재시도 API를 추가했습니다.

  • POST /api/v1/workspaces/{workspaceId}/documents/{documentId}/versions/{documentVersionId}/conversion-retry
  • 워크스페이스 멤버이면서 DocumentVersion 업로더인 회원만 요청 가능
  • 기존 DocumentConversionJob의 FAILED 상태를 PENDING으로 변경
  • DocumentVersion ID·버전 번호와 DocumentUpload·원본 StoreFile 유지
  • 문서·버전의 소속 관계와 원본 파일 연결 검증
  • FAILED 이외 상태의 요청은 409로 거부
  • 동시 재시도 요청 중 하나만 접수하도록 DB 잠금 적용
  • 성공 시 본문 없는 202 Accepted 반환
  • API 설명 문서 추가: docs/api/document-conversion-retry.md

재시도 접수 후 기존 스케줄러와 DocumentConversionWorker가 변환을 처리합니다.
FAILED를 자동으로 반복 처리하지 않으며, 사용자가 API를 호출할 때만 재시도합니다.

검증

관련 자동화 테스트 109개가 통과했습니다.

  • 인증·CSRF·업로더 권한·경로 ID 검증
  • 상태와 원본 파일 연결 검증
  • 동시 재시도 및 버전 삭제와의 경합
  • 재시도 후 기존 DocumentVersion에 PDF와 페이지 수 연결
  • 재실패 시 자동 반복 처리 방지
  • 재시도 트랜잭션 롤백 시 FAILED 유지
  • 기존 변환 작업자와 삭제 API 동작 확인

별도 임시 MySQL DB에서 검증했습니다.
S3·Gotenberg 연동은 모의 처리했으며 실제 재변환은 검증하지 않았습니다.

후속 작업

  • 화면의 재시도 버튼 연결
  • 실패 단계·원인 기록
  • 서버 중단으로 PROCESSING에 남은 작업 복구

관련 이슈

Closes #70

@snowballourown snowballourown self-assigned this Nov 19, 2026
@snowballourown snowballourown linked an issue Nov 19, 2026 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 616abcfc-1a45-437c-b7b1-54c2d1c23226
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@snowballourown snowballourown changed the title [#][Feat] 실패한 DocumentConversionJob 재시도 API 구현 [#70][Feat] 실패한 DocumentConversionJob 재시도 API 구현 Nov 19, 2026
@snowballourown snowballourown changed the title [#70][Feat] 실패한 DocumentConversionJob 재시도 API 구현 [#70] [Feat] 실패한 DocumentConversionJob 재시도 API 구현 Nov 19, 2026
@sonarqubecloud

Copy link
Copy Markdown

@snowballourown
snowballourown added this pull request to stack #75 November 20, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] 실패한 DocumentConversionJob 재시도 API 구현

1 participant