Repository navigation
feat: GithubIdChange 시 Spring API 호출하여 github_login_username 동기화 - #469
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 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과 함께 배포되어야 합니다.