8000 feat: GithubIdChange 시 Spring API 호출하여 github_login_username 동기화 by lmatarodo · Pull Request #469 · SKKU-OSP/SKKU-OSP · GitHub
[go: up one dir, main page]

Skip to content

feat: GithubIdChange 시 Spring API 호출하여 github_login_username 동기화 - #469

Merged
lmatarodo merged 1 commit into
developfrom
feat/sync-github-id-to-spring
Apr 8, 2026
Merged

lmatarodo merged 1 commit into
developfrom
feat/sync-github-id-to-spring

Conversation

@lmatarodo
Copy link
Copy Markdown
Contributor

📌 PR 개요
OSP에서 사용자의 GitHub ID(username)를 변경할 때, Spring DB와 동기화하지 않아 VIEW 기반 화면에서 데이터가 누락되는 문제를 수정합니다.

🛠 작업 내용
GithubIdChangeView에서 OSP 테이블 업데이트 완료 후 Spring PATCH API(/api/v1/github-account/{studentId}/username) 호출하여 github_account.github_login_username 동기화
Spring API 호출 실패 시 경고 로그만 남기고 OSP 업데이트는 정상 완료되도록 격리 (Spring 장애가 github_id 변경 전체를 롤백시키지 않도록)
common/views.py에 django.conf.settings import 추가
🔗 연관된 이슈
없음

❓ 기타 의견
문제 배경
OSP와 Spring은 같은 DB를 공유하지 않고, VIEW(v_github_repo_commits 등)를 통해 연동됩니다. VIEW는 Spring의 github_account.github_login_username을 JOIN 조건으로 사용하는데, OSP가 자체 테이블만 업데이트하면 Spring 쪽 원본이 구버전 username을 유지해 VIEW 조회 시 데이터 누락이 발생합니다.

Spring 측 작업
feat/github-account-username-update-api 브랜치에서 PATCH /api/v1/github-account/{studentId}/username 엔드포인트를 추가했습니다. 해당 PR과 함께 배포되어야 합니다.

github_id 변경 시 OSP 테이블만 업데이트하면 Spring DB와 불일치가 발생하여
VIEW(v_github_repo_commits 등) 기반 화면에서 데이터 누락이 생기는 문제 수정.
OSP 업데이트 완료 후 Spring PATCH API를 호출하여 github_account.github_login_username도 함께 변경.
Spring API 호출 실패 시 경고 로그만 남기고 OSP 업데이트는 정상 완료되도록 격리.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@lmatarodo
lmatarodo requested a review from Curamy April 8, 2026 05:50
@Curamy Curamy 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.

okay

@lmatarodo
lmatarodo merged commit 9fac45c into develop Apr 8, 2026
@lmatarodo
lmatarodo deleted the feat/sync-github-id-to-spring branch April 8, 2026 07:01
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.

2 participants

0