Skip to content

Switch KB lookup from query to scan jobs polling#277

Open
soimkim wants to merge 1 commit into
mainfrom
scancode
Open

Switch KB lookup from query to scan jobs polling#277
soimkim wants to merge 1 commit into
mainfrom
scancode

Conversation

@soimkim

@soimkim soimkim commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Description

@soimkim soimkim self-assigned this Jun 5, 2026
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@soimkim, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 13 minutes and 54 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6cfdbe66-84eb-4b2f-848c-e25a26de9f06

📥 Commits

Reviewing files that changed from the base of the PR and between 36755c8 and cda4e94.

📒 Files selected for processing (3)
  • src/fosslight_source/_kb_client.py
  • src/fosslight_source/_scan_item.py
  • src/fosslight_source/cli.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch scancode

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 and usage tips.

@soimkim soimkim added the enhancement [PR/Issue] New feature or request label Jun 5, 2026
@soimkim

soimkim commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai, conventional style 로 commit message 추천해줘

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
gh pr view 277 --repo fosslight/fosslight_source_scanner --json title,body,files,commits

Length of output: 922


🏁 Script executed:

#!/bin/bash
gh pr diff 277 --repo fosslight/fosslight_source_scanner

Length of output: 15686



@soimkim 변경 내용을 분석해 커밋 메시지를 추천드립니다.


✅ 현재 커밋 메시지 (유지해도 무방)

feat: switch KB lookup from query to scan jobs polling

🔀 변경 단위별로 분리한다면 (3개 커밋)

변경 내용이 논리적으로 3가지로 나뉩니다:

feat(kb-client): add scan job creation and polling via /scan/jobs

_kb_client.py 신규 추가 — POST /scan/jobs로 job 생성 후 완료까지 polling, exponential backoff, timeout 처리

refactor(scan-item): replace per-file KB query with pre-fetched origin URL map

_scan_item.py_get_origin_url_from_md5_hash() 제거, set_oss_item()이 외부에서 전달받은 kb_origin_urls dict를 사용하도록 변경

refactor(cli): batch-collect MD5 hashes before KB scan job lookup

cli.py_collect_kb_file_hashes()로 해시를 먼저 모두 수집한 뒤 fetch_origin_urls_via_scan_job() 단 1회 호출하도록 merge_results() 재구성


📝 breaking change가 있다면

set_oss_item() 시그니처가 바뀌었으므로 외부에서 호출하는 곳이 있다면:

feat!: switch KB lookup from per-file query to batch scan jobs polling

BREAKING CHANGE: `set_oss_item()` no longer accepts `run_kb`, `kb_url`, `kb_token`
arguments; pass pre-fetched `kb_origin_urls` dict instead.

어떤 스타일로 정리할지 알려주시면 추가로 다듬어 드리겠습니다! 🐇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement [PR/Issue] New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant