Skip to content

Dev -> Main 병합 - #95

Merged
JangDongHo merged 38 commits into
mainfrom
dev
Sep 26, 2026
Merged

JangDongHo merged 38 commits into
mainfrom
dev

Conversation

@JangDongHo

Copy link
Copy Markdown
Member

📌 개요

  • 어떤 기능/작업인지 한 줄 요약

✨ 작업 내용

  • 주요 구현 내용 정리
  • 핵심 로직 또는 변경 사항 위주로 작성

🔥 변경 이유

  • 왜 이렇게 구현했는지

🧪 테스트

  • 정상 동작 확인
  • 예외 케이스 확인
  • (필요 시 테스트 시나리오 추가)

🔗 관련 이슈

  • close #이슈번호

JangDongHo and others added 30 commits September 25, 2026 17:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[Chore] 사용하지 않는 모니터링 스택 및 API 메트릭 제거
- DatabaseModule 활성화 및 BatchModule에 ConfigModule/TypeORM 연결
- ShuttleRepository를 route_name 기준 upsert로 구현
- ShuttleJob이 파싱 결과를 updated_at(원본 페이지 갱신 시각), last_success_at(수집 시각)과 함께 저장
- ShuttleJob 단위 테스트 추가

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
isRunning 해제를 잡 루프 안쪽 finally에서 전체 실행을 감싸는 finally로 옮겨,
모든 잡이 끝나기 전에는 다음 cron 실행이 건너뛰어지도록 함

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- app과 동일한 멀티 스테이지 구성(prod-deps/build/prod)의 batch Dockerfile 추가
- packageManager 미지정으로 corepack이 최신 pnpm을 받아 설치가 실패하던 문제를
  app과 동일한 pnpm@9.9.0 고정으로 해결

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- docker-compose.yml에 batch 서비스 추가 (API와 같은 .env 공유)
- batch-ci: PR에서 lint/test/build 검증
- batch-cd: main 반영 시 connect-gnu-batch 이미지 빌드·푸시 후 API 서버에 batch만 재배포

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[Feat] 배치 셔틀 시간표 DB 저장 및 배포 구성 추가
- scrape_run 테이블 마이그레이션 추가 (타입별 대기/실행 중 run 1개 제한 부분 유니크 인덱스)
- cron 실행 시 잡마다 run을 기록하고 성공/실패로 마무리, 같은 타입이 이미 대기/실행 중이면 건너뜀
- 10초 주기로 pending run을 FOR UPDATE SKIP LOCKED로 가져와 실행 (admin API 수동 실행용)
- 기동 시 프로세스 종료로 running에 남은 run을 실패 처리

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- GET /api/admin/scrapers: 타입별 최근 run과 최근 성공 run
- GET /api/admin/scrape-runs: type/status 필터, 커서 기반 페이지네이션
- GET /api/admin/scrape-runs/:id
- POST /api/admin/scrape-runs: pending run 등록 후 202 반환, 이미 대기/실행 중이면 409
- X-ADMIN-API-KEY 헤더를 ADMIN_API_KEY 환경변수와 비교하는 AdminApiKeyGuard 추가 (미설정 시 차단)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 응답 body에 run id가 있어 헤더가 불필요하고, 전역 prefix(/api)를 하드코딩하던 문제 제거
- @res 및 express Response 의존 제거

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- supabase db push로 마이그레이션을 적용하는 재사용 워크플로우(db-migrate.yml) 추가
- API/Batch CD에서 이미지 빌드와 병렬로 실행하고, 둘 다 성공해야 deploy 진행
- concurrency 그룹으로 두 CD의 동시 호출을 직렬화 (마이그레이션만 바꾼 경우 수동 실행)
- SUPABASE_DB_URL 시크릿(Session pooler URI) 필요

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- /api/api-docs 전용 location 블록을 삭제해 /api location에서 함께 처리

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[Feat] 수집 실행 기록 및 admin 수집 상태·수동 실행 API 추가
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
실행 기록 표가 상세 패널과 함께 좁아질 때 한글이 줄바꿈되지 않도록 표 셀 스타일도 정리한다.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pnpm-workspace.yaml에 packages 필드를 추가하고 esbuild 빌드 허용을 pnpm 9·10(onlyBuiltDependencies)과 11+(allowBuilds) 형식으로 함께 적는다.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JangDongHo and others added 8 commits September 26, 2026 00:29
[Feat] 수집 상태 확인·수동 실행 어드민 웹 추가
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
어드민 정적 파일을 current 릴리스에서 서빙하고 /api/admin/만 app으로 프록시한다.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main 반영 시 빌드 결과를 releases/<sha>로 올리고 current 링크를 원자 교체한다.
api CD는 nginx가 마운트할 admin 디렉터리를 먼저 만든다.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- admin 디렉터리는 서버에 수동으로 만들어 두고 api CD는 바꾸지 않는다
- 릴리스 전환은 activate-release.sh로 하고 최근 3개를 보존한다(롤백 가능)
- README 변경은 범위에서 뺀다

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[Docs] 어드민 배포 스펙을 실제 구현에 맞게 수정
@JangDongHo JangDongHo self-assigned this Sep 26, 2026
@coderabbitai

coderabbitai Bot commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: GNU-connect/Server-Node/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: ebbf94d1-26b1-4321-9194-df8d97540457

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@JangDongHo
JangDongHo merged commit c4dbe46 into main Sep 26, 2026
5 checks passed
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.

1 participant