-
Notifications
You must be signed in to change notification settings - Fork 0
Docs(diagram) 관리자기능/피드백루프 diagram (#58) #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+216
−0
Merged
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f0bfec3
docs(diagram): architecture diagram 작성
baekyutae 152d9de
docs(diagram): sequence diagram 작성
baekyutae f36ab51
docs(diagram): sequence diagram mermaid
baekyutae 6d2159c
docs:문서 최신화
baekyutae 3c26b38
docs(system design): 문서 변경에 따른 최신화
baekyutae a2e5d28
docs(diagram): diagram 재임베딩, 롤백 로직 보완
baekyutae 8a487b2
docs(diagram): sd-06에 sd-04 mermaid 잘못 덮어씌워진거 해결
baekyutae db36f91
docs(diagram): 롤백 정책 수정
baekyutae 792c877
Merge branch 'docs/admin-ops' into docs/58-admin-ops-diagram
baekyutae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
|
baekyutae marked this conversation as resolved.
baekyutae marked this conversation as resolved.
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
|
baekyutae marked this conversation as resolved.
|
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,190 @@ | ||
| # Git Naming Convention | ||
|
|
||
| `Biblio` 프로젝트에서 사용하는 브랜치, 커밋, PR 네이밍 규칙을 정의한다. | ||
|
|
||
| ## 목적 | ||
|
|
||
| - 작업 단위를 GitHub Issue 기준으로 일관되게 추적한다. | ||
| - 브랜치, 커밋, PR 제목만 보고 변경 목적을 빠르게 파악한다. | ||
| - Git 로그와 PR 목록을 사람이 읽기 쉽게 유지한다. | ||
|
|
||
| ## 기본 원칙 | ||
|
|
||
| - 작업 식별자는 `GitHub Issue 번호`를 사용한다. | ||
| - 브랜치와 PR 제목에는 Issue 번호를 반드시 포함한다. | ||
| - 커밋 메시지는 `Conventional Commits` 형식을 사용한다. | ||
| - 커밋 메시지의 Issue 번호 포함은 선택 사항으로 한다. | ||
| - 기본 머지 방식은 `Squash Merge`를 권장한다. | ||
|
|
||
| ## Type 규칙 | ||
|
|
||
| 다음 타입만 사용한다. | ||
|
|
||
| | Type | 의미 | 사용 예시 | | ||
| | --- | --- | --- | | ||
| | `feat` | 사용자 관점의 새로운 기능 추가 | API 추가, 검색 기능 추가 | | ||
| | `fix` | 기존 동작의 버그 수정 | 예외 처리 보완, 상태 전이 수정 | | ||
| | `refactor` | 동작 변경 없는 내부 구조 개선 | 함수 분리, 책임 재구성 | | ||
| | `docs` | 문서만 수정 | README, ADR, Spec, Runbook 수정 | | ||
| | `test` | 테스트 코드만 추가 또는 수정 | unit/integration test 보강 | | ||
| | `chore` | 설정, 의존성, CI, 스크립트 등 잡무성 변경 | lint 설정, dependency update | | ||
| | `hotfix` | 운영 이슈 대응을 위한 긴급 수정 | 장애 대응 패치 | | ||
|
|
||
| ## 브랜치 네이밍 | ||
|
|
||
| 형식: | ||
|
|
||
| ```text | ||
| <type>/<issue-number>-<short-slug> | ||
| ``` | ||
|
|
||
| 규칙: | ||
|
|
||
| - `type`은 위 표의 값 중 하나를 사용한다. | ||
| - `issue-number`는 GitHub Issue 번호만 넣는다. | ||
| - `short-slug`는 영어 소문자와 하이픈(`-`)만 사용한다. | ||
| - `short-slug`는 구현 상세보다 작업 목적을 드러내도록 작성한다. | ||
|
|
||
| 예시: | ||
|
|
||
| ```text | ||
| feat/123-video-upload | ||
| fix/241-search-timeout | ||
| refactor/198-preprocess-orchestrator | ||
| docs/310-git-naming-convention | ||
| test/322-upload-complete-idempotency | ||
| chore/415-pre-commit-hooks | ||
| hotfix/501-duplicate-callback-guard | ||
| ``` | ||
|
|
||
| ## 커밋 메시지 네이밍 | ||
|
|
||
| 형식: | ||
|
|
||
| ```text | ||
| <type>(<scope>): <summary> | ||
| ``` | ||
|
|
||
| 권장 형식: | ||
|
|
||
| ```text | ||
| <type>(<scope>): <summary> (#<issue-number>) | ||
| ``` | ||
|
|
||
| 규칙: | ||
|
|
||
| - `type`은 위 표의 값 중 하나를 사용한다. | ||
| - `scope`는 변경이 일어난 서비스 또는 모듈을 나타낸다. | ||
| - `summary`는 명령형 현재 시제로 간결하게 작성한다. | ||
| - 첫 글자는 소문자로 시작한다. | ||
| - 마침표는 붙이지 않는다. | ||
| - 하나의 커밋에는 하나의 의도만 담는다. | ||
|
|
||
| 추천 scope 예시: | ||
|
|
||
| - `core-api` | ||
| - `search-service` | ||
| - `pipeline-worker` | ||
| - `managed-embedding-endpoint` | ||
| - `repo` | ||
| - `docs` | ||
|
|
||
| 예시: | ||
|
|
||
| ```text | ||
| feat(core-api): add upload completion endpoint (#123) | ||
| fix(search-service): handle empty retrieval result (#241) | ||
| refactor(pipeline-worker): split preprocess orchestrator | ||
| docs(repo): add git naming convention | ||
| test(core-api): add upload completion idempotency cases | ||
| chore(repo): add commitlint config | ||
| hotfix(core-api): reject duplicate callback request (#501) | ||
| ``` | ||
|
|
||
| ## PR 제목 네이밍 | ||
|
|
||
| 형식: | ||
|
|
||
| ```text | ||
| <type>(<scope>): <summary> [#<issue-number>] | ||
| ``` | ||
|
|
||
| 규칙: | ||
|
|
||
| - 브랜치와 동일한 작업 목적을 유지한다. | ||
| - PR 제목만 읽어도 변경 목적이 드러나야 한다. | ||
| - PR 제목에는 반드시 GitHub Issue 번호를 포함한다. | ||
|
|
||
| 예시: | ||
|
|
||
| ```text | ||
| feat(core-api): add video upload initiation API [#123] | ||
| fix(search-service): prevent timeout on empty query [#241] | ||
| refactor(pipeline-worker): split preprocess workflow [#198] | ||
| docs(repo): define git naming convention [#310] | ||
| ``` | ||
|
|
||
| ## PR 본문 규칙 | ||
|
|
||
| PR 본문에는 아래 중 하나를 반드시 포함한다. | ||
|
|
||
| - `Closes #123` | ||
| - `Fixes #123` | ||
| - `Refs #123` | ||
|
|
||
| 권장 예시: | ||
|
|
||
| ```markdown | ||
| ## Summary | ||
| - add upload completion endpoint | ||
| - validate object existence before status transition | ||
|
|
||
| ## Issue | ||
| Closes #123 | ||
| ``` | ||
|
|
||
| ## 예외 규칙 | ||
|
|
||
| - 아주 작은 저장소 관리 작업은 `no-ticket` 브랜치를 허용할 수 있다. | ||
| - `no-ticket`은 문서 오탈자 수정, 로컬 개발 편의 스크립트 정리 등 추적 가치가 낮은 작업에만 사용한다. | ||
| - `no-ticket` 사용이 잦아지면 Issue를 먼저 생성하는 것을 기본 원칙으로 되돌린다. | ||
|
|
||
| 예시: | ||
|
|
||
| ```text | ||
| docs/no-ticket-readme-typo | ||
| chore/no-ticket-local-dev-alias | ||
| ``` | ||
|
|
||
| ## 운영 권장사항 | ||
|
|
||
| - 하나의 PR은 가능한 한 하나의 Issue만 다룬다. | ||
| - 큰 작업은 먼저 Issue로 쪼개고, 브랜치도 그 단위에 맞춰 나눈다. | ||
| - `chore`는 남용하지 않는다. 기능이면 `feat`, 버그면 `fix`, 구조 개선이면 `refactor`를 우선 사용한다. | ||
| - 운영 장애 대응이 아니면 `hotfix` 대신 일반 `fix`를 사용한다. | ||
|
|
||
| ## 빠른 예시 | ||
|
|
||
| Issue: | ||
|
|
||
| ```text | ||
| #123 Add video upload initiation API | ||
| ``` | ||
|
|
||
| 브랜치: | ||
|
|
||
| ```text | ||
| feat/123-video-upload-initiation | ||
| ``` | ||
|
|
||
| 커밋: | ||
|
|
||
| ```text | ||
| feat(core-api): add upload initiation endpoint (#123) | ||
| ``` | ||
|
|
||
| PR: | ||
|
|
||
| ```text | ||
| feat(core-api): add video upload initiation API [#123] | ||
| ``` |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
질문) 만약에 신규 모델이 배포 되고 나서 처음 요청 받아서 임베딩을 뽑아놓고 벡터 색인을 했는데, 문제가 발견되서 기존 모델로 롤백이 결정되면 어떻게 되나요?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0415
기존에는 문제가 되는 데이터들의 재색인을 롤백 완료의 기준으로 잡았는데, 마지막으로 저장된 스냅샷을 불러오는걸 롤백 완료의 기준으로 수정했습니다. 또한 롤백 진행동안 신규 데이터 작업큐를 대기시키지 않고 모델과 인덱스만 복원되면 바로 서비스가 사용 가능하게 수정하였습니다.
서비스 타겟을: notebook lm과 같이 지속적으로 영상을 쌓아두고 지식데이터베이스로 활용하는 사람으로 잡았습니다
서비스 핵심 가치는 검색 가용성 유지를 1순위로 두어 만약의 상황에 롤백을 하게되더라도 최대한 검색 기능을 유지 하는 것을 목표로 롤백 로직을 설계했습니다.
0415 롤백 로직
신규 모델로 임베딩된 데이터가 포함된 영상은 롤백 복구가 끝날 때까지 검색 범위에서 일시 제외합니다.
롤백은 모델 배포 직전에 저장한 마지막 정상 서빙 조합 스냅샷을 기준으로 수행합니다.
이 스냅샷은 당시의 active/previous 모델 버전과 인덱스 식별자를 가리키는 복원 포인터이며, 실제 모델 아티팩트와 인덱스 스냅샷은 저장소에서 복원합니다.
롤백 복원은 대상 모델 readiness와 스냅샷 인덱스 복원이 완료된 뒤 ModelRelease를 이전 정상 조합으로 되돌리는 방식으로 진행합니다.
롤백 후 문제 모델 버전으로 임베딩된 데이터는 복원된 서빙 조합에 맞게 백그라운드에서 다시 임베딩·재색인합니다.
롤백 진행 중에도 신규 업로드 요청과 일반 ingest 처리는 계속할 수 있으며, Search Service는 남아 있는 검색 가능 영상으로 검색을 계속 제공하고 일부 영상이 복구 중임을 사용자에게 고지합니다.
재임베딩과 재색인이 끝난 영상부터 검색 범위에 순차적으로 다시 포함시키며, 문제 모델로 생성된 기존 인덱스 데이터는 복구 완료 후 비동기로 정리할 수 있도록 설계했습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
기존에는 모든 영상이 색인이 완료되어야 질의가 가능했는데, 복구 시에는 일부 영상만 제거하거나, 일부 영상만으로 서비스를 제공하는 등 정책이 통일성이 부족한 것 같다는 생각이 듭니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
음... 이부분은 저도 고민이 되는 지점이였는데, 지금 내린 결정으론 모든 영상 색인 완료후 질의 가능이란 정책을 조금 수정하더라도, 복구시에 재색인 데이터를 제외한 검색서비스를 제공하고 그 영향 범위를 고지하는게, 아예 재색인이 완료될 때 까지 기다리는 것보다 검색 서비스 가용성 측면에서 좋다고 생각해서 위와 같이 설계 했습니다.