Skip to content

[project] 프로젝트 수정 승인 시 datagsm 프로젝트 이름 중복 오류 해결#91

Merged
ZaMan0806 merged 2 commits into
developfrom
fix/project-conflict-name
Jun 9, 2026
Merged

[project] 프로젝트 수정 승인 시 datagsm 프로젝트 이름 중복 오류 해결#91
ZaMan0806 merged 2 commits into
developfrom
fix/project-conflict-name

Conversation

@ZaMan0806

Copy link
Copy Markdown
Collaborator

개요

EveryGSM에 등록·승인된 프로젝트를 수정 후 관리자가 승인할 때, datagsm에 동일 이름으로 다시 등록(POST)을 시도하여 409 CONFLICT (이미 존재하는 프로젝트 이름입니다.)가 발생합니다. datagsm에는 프로젝트 수정 API가 없어, "이미 있으면 매핑·없으면 생성" 전략으로 해결합니다.

작업 내용

  • AdminApproveProjectService.registerToDatagsm 수정
    • createProject 호출 전 datagsm에 동일 이름 프로젝트가 있는지 조회(getProjects(projectName=...))하여, 있으면 그 id를 externalProjectId로 매핑하고 생성을 생략
    • 동일 이름이 없을 때만 createProject 호출
    • createProject 응답 id가 null이면 예외를 던져 externalProjectId 없이 APPROVED가 커밋되던 근본 결함 차단
  • 조회용 DataGsmOpenApiClient 의존성 주입 추가

체크리스트

  • 로컬에서 정상적으로 빌드 및 실행이 되는지 확인했습니다.
  • 코드 컨벤션(포맷팅, 네이밍 등)을 준수했습니다.
  • 불필요한 주석, 디버그 로그, 임시 코드를 제거했습니다.

기타

  • 이 PR은 [project] 프로젝트 삭제 시 자기참조 외래키 위반 해결 #90 (프로젝트 삭제 시 자기참조 외래키 위반 해결) 위에 쌓인 stacked PR입니다. base 머지 후 자동으로 develop으로 재조정됩니다.
  • external_project_id가 null인 채 APPROVED된 기존 데이터는, 다음 수정 승인 시 datagsm 조회를 통해 자동으로 매핑됩니다.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request updates AdminApproveProjectService to check for existing projects in datagsm by title before registering them, mapping the existing ID if found. It also adds a null check for the registered project's ID. The review feedback suggests adding safety checks to prevent potential NullPointerExceptions when calling external APIs: specifically, checking if the response from datagsmApiClient.createProject is null before retrieving its ID, and ensuring the response and project list from dataGsmOpenApiClient are not null before streaming.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread .pr-tmp/pr_changed_files.txt Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 파일들은 지워주세요

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제거하였습니다.

@ZaMan0806 ZaMan0806 force-pushed the fix/project-conflict-name branch from 71da06f to 98869f3 Compare June 8, 2026 14:06
wwwcomcomcomcom
wwwcomcomcomcom previously approved these changes Jun 9, 2026

@wwwcomcomcomcom wwwcomcomcomcom left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

승인 시 동일 이름 프로젝트가 datagsm에 이미 존재하면 ID를 재사용하고 생성을 생략하는 방식이 올바릅니다. null 체크 및 예외 처리도 적절합니다. LGTM

Base automatically changed from fix/project-foreign-key to develop June 9, 2026 03:07
@ZaMan0806 ZaMan0806 dismissed wwwcomcomcomcom’s stale review June 9, 2026 03:07

The base branch was changed.

ZaMan0806 added 2 commits June 9, 2026 12:08
생성 전 datagsm에 동일 이름이 있으면 그 id를 매핑하고 createProject를 생략
@ZaMan0806 ZaMan0806 force-pushed the fix/project-conflict-name branch from 98869f3 to 8d28b4e Compare June 9, 2026 03:08
@ZaMan0806 ZaMan0806 merged commit 8fbddec into develop Jun 9, 2026
1 check passed
@ZaMan0806 ZaMan0806 deleted the fix/project-conflict-name branch June 9, 2026 03:20
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.

4 participants