Skip to content

Add filter_label parameter to df.list_instances()#186

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/add-filter-label-parameter
Draft

Add filter_label parameter to df.list_instances()#186
Copilot wants to merge 3 commits into
mainfrom
copilot/add-filter-label-parameter

Conversation

Copy link
Copy Markdown

Copilot AI commented May 27, 2026

df.list_instances() had no way to filter by label server-side — callers had to post-filter with a WHERE clause.

Changes

  • src/monitoring.rs: Added filter_label TEXT DEFAULT NULL as a third parameter; SPI query now covers all four combinations of status_filter × filter_label with parameterized queries
  • sql/pg_durable--0.2.2--0.2.3.sql: Migration drops old 2-arg signature, creates new 3-arg one
  • sql/pg_durable--0.1.1.sql: Updated pgrx-generated baseline to match new signature
  • Cargo.toml: Version bump 0.2.2 → 0.2.3
  • USER_GUIDE.md: Added filter_label examples; updated GRANT to 3-arg signature
  • tests/e2e/sql/05_monitoring_and_explain.sql: Tests matching label, non-matching label (empty result), and combined status + label filter

Usage

-- Filter by label
SELECT * FROM df.list_instances(filter_label => 'my-job');

-- Filter by status and label
SELECT * FROM df.list_instances('completed', filter_label => 'my-job');

Copilot AI and others added 2 commits May 27, 2026 14:39
Co-authored-by: pinodeca <32303022+pinodeca@users.noreply.github.com>
Co-authored-by: pinodeca <32303022+pinodeca@users.noreply.github.com>
Copilot AI changed the title [WIP] Add filter_label parameter to list_instances function Add filter_label parameter to df.list_instances() May 27, 2026
Copilot AI requested a review from pinodeca May 27, 2026 14:43
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.

Add a filter_label parameter to list_instances function

2 participants