Skip to content

Remove dead parse_log_line public API (DSK-136)#177

Merged
daisuke8000 merged 1 commit into
mainfrom
fix/dsk-136-parse-log-line-dead-api
Jul 5, 2026
Merged

Remove dead parse_log_line public API (DSK-136)#177
daisuke8000 merged 1 commit into
mainfrom
fix/dsk-136-parse-log-line-dead-api

Conversation

@daisuke8000

@daisuke8000 daisuke8000 commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Remove unused parse_log_line / parse_log_line_bytes from the public crate API; production streaming already uses split_log_line inline.
  • Point hot-path benchmarks at split_log_line and LogLineTimestampResolver, re-exported under the bench feature.

Test plan

  • cargo test -p rustern-core --lib source::pod_log
  • cargo bench -p rustern-core --bench hot_path --features bench --no-run

Made with Cursor

Summary by CodeRabbit

  • 新機能
    • ログ行の解析方式が更新され、行の分割とタイムスタンプ解決が分かれて扱われるようになりました。
  • 改善
    • 改行付きの入力やRFC3339形式のタイムスタンプを含むログの処理が、より安定して扱えるようになりました。
    • ベンチマーク用の処理も新しい方式に合わせて更新されました。

Drop unused parse_log_line/parse_log_line_bytes re-exports; benches
exercise split_log_line and LogLineTimestampResolver on the hot path.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 873e27f4-7a84-45c9-9b6e-363afa89a325

📥 Commits

Reviewing files that changed from the base of the PR and between 0353a36 and 76c2a68.

📒 Files selected for processing (3)
  • crates/rustern-core/benches/hot_path.rs
  • crates/rustern-core/src/lib.rs
  • crates/rustern-core/src/source/pod_log.rs

📝 Walkthrough

Walkthrough

crates/rustern-core/src/source/pod_log.rs の公開パースAPIが変更されました。parse_log_line / parse_log_line_bytes を削除し、代わりに LogLineTimestampResolver#[doc(hidden)] pub構造体)と split_log_line#[doc(hidden)] pub関数)を公開しました。lib.rs の再エクスポートも追随し、PodLogRequest を公開する一方、bench フィーチャ有効時のみ新API を公開します。ベンチマークとテストは新APIを使う形へ更新されています。

Changes

領域 変更内容
pod_log.rs parse_log_line/parse_log_line_bytes 削除、LogLineTimestampResolver/split_log_line を公開
lib.rs 再エクスポート差し替え、PodLogRequest 追加、bench限定で新API公開
hot_path.rs ベンチ処理を新API利用へ変更
テスト split_log_line ベースの検証に変更

Sequence Diagram(s)

sequenceDiagram
  participant Bench as bench_ingest_log_line
  participant Splitter as split_log_line
  participant Resolver as LogLineTimestampResolver

  Bench->>Splitter: raw bytesを渡す
  Splitter-->>Bench: (parsed, msg)を返す
  Bench->>Resolver: resolve(parsed, msg)を呼ぶ
  Resolver-->>Bench: (ts, message)を返す
Loading

重大度: Medium。公開APIの破壊的変更(parse_log_line/parse_log_line_bytes 削除)であり、外部利用者がいる場合は互換性への影響あり。#[doc(hidden)] pub での公開は実質パブリックAPIとして扱われる点に留意。ロジック自体(K8sログのタイムスタンプ解析、非同期処理経路)に実害はなさそうですが、セキュリティ・非同期影響はなし。

Possibly related issues

  • DSK-136: parse_log_line/parse_log_line_bytes を不要な公開APIとして削除し、ベンチを split_log_line ベースへ切り替えている点が一致。
  • DSK-71: pod_log のパース経路と hot_path ベンチの両方で parse_log_line* を新しい split/resolver フローへ置き換えている点が一致。
🚥 Pre-merge checks | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning 重大度: 中。Conventional Commitsの必須プレフィックスがなく、タイトル要件を満たしていません。 feat:/fix:/chore:/docs:/test:/refactor: のいずれかを先頭に付け、変更内容を具体化してください。
Description check ⚠️ Warning 重大度: 中。必須テンプレートの「概要」「変更理由」がなく、Summary/Test planのみです。 テンプレート通りに「## 概要」「## 変更理由」を追加し、各項目を簡潔に埋めてください。

Comment @coderabbitai help to get the list of available commands.

@daisuke8000
daisuke8000 merged commit 1bcf30e into main Jul 5, 2026
3 checks passed
@daisuke8000
daisuke8000 deleted the fix/dsk-136-parse-log-line-dead-api branch July 5, 2026 15:14
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.

1 participant