Skip to content

Remove string_from_ls passthrough (DSK-128)#169

Merged
daisuke8000 merged 1 commit into
mainfrom
fix/dsk-128-string-from-ls
Jul 5, 2026
Merged

Remove string_from_ls passthrough (DSK-128)#169
daisuke8000 merged 1 commit into
mainfrom
fix/dsk-128-string-from-ls

Conversation

@daisuke8000

@daisuke8000 daisuke8000 commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Remove string_from_ls and call label_selector_from_meta directly from deployment/statefulset/daemonset/replicaset/job selectors.

Test plan

  • cargo test -p rustern-core --lib discovery::workload_selector
  • Local CodeRabbit review (0 findings)

Made with Cursor

Summary by CodeRabbit

  • Bug Fixes
    • 各 workload の selector 解決処理を整理し、Deployment / StatefulSet / DaemonSet / ReplicaSet / Job で一貫したラベルセレクタ生成が行われるようになりました。
    • Job の selector が指定されている場合も、既存のフォールバック挙動は維持しつつ、より統一された方法で文字列化されます。

Call label_selector_from_meta directly at five selector sites and delete the one-line wrapper.

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: 65bba9d6-3477-4ffc-ab2d-fb463453db36

📥 Commits

Reviewing files that changed from the base of the PR and between 66c307e and eda8e4b.

📒 Files selected for processing (1)
  • crates/rustern-core/src/discovery/workload_selector.rs

📝 Walkthrough

Walkthrough

crates/rustern-core/src/discovery/workload_selector.rsにおいて、内部ラッパー関数string_from_lsを削除し、Deployment・StatefulSet・DaemonSet・ReplicaSet・Jobの各selector解決処理がlabel_selector_from_metaを直接呼び出すように変更された。生成されるラベルセレクタ文字列の内容自体は従来と同等で、呼び出し経路のみが変更されている。公開APIの変更はなし。

Changes

側面 内容
削除 string_from_ls 内部ラッパー関数
変更 Deployment/StatefulSet/DaemonSet/ReplicaSet/Job の各selector分岐で label_selector_from_meta を直接呼び出し
維持 Job の None 分岐(label_selector_for(ResourceKind::Job, workload_name))フォールバック

重大度: 低(内部関数の呼び出し経路変更のみで、ロジックや出力形式に変更なし。正しさ・非同期処理・K8sリソース挙動への影響なし)

Sequence Diagram(s)

sequenceDiagram
  participant WorkloadSelector
  participant LabelSelectorFromMeta
  WorkloadSelector->>LabelSelectorFromMeta: spec.selector, spec.template, ResourceKind, workload_name
  LabelSelectorFromMeta-->>WorkloadSelector: ラベルセレクタ文字列
Loading

Possibly related issues

  • DSK-128: string_from_ls の削除と label_selector_from_meta への直接置き換えを扱っており、本PRの変更内容と直接一致する。
🚥 Pre-merge checks | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning 重大度: 中。内容は関連していますが、指定の Conventional Commits 形式の接頭辞がなく要件を満たしません。 refactor: remove string_from_ls passthrough (DSK-128) のように Conventional Commits 形式で、72文字以内に具体化してください。
Description check ⚠️ Warning 重大度: 中。Summary/Test plan はありますが、テンプレート必須の「概要」「変更理由」セクションが不足しています。 ## 概要 と ## 変更理由 を追加し、変更内容とその理由を簡潔に埋めてください。

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

@daisuke8000
daisuke8000 merged commit dd5f550 into main Jul 5, 2026
3 checks passed
@daisuke8000
daisuke8000 deleted the fix/dsk-128-string-from-ls branch July 5, 2026 08:42
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