Skip to content

Feat/jobs tag filter#110

Open
Divyansh Maheshwari (divyansh1010x) wants to merge 4 commits into
mainfrom
feat/jobs-tag-filter
Open

Feat/jobs tag filter#110
Divyansh Maheshwari (divyansh1010x) wants to merge 4 commits into
mainfrom
feat/jobs-tag-filter

Conversation

@divyansh1010x

Copy link
Copy Markdown

Summary

Adds the ability to filter the Jobs list by one or more tag key/value pairs (e.g. owner:#dev-core, dag_id:sales_etl) directly from the Jobs filter panel.

The backend already supports the ?tags=key:value,key:value query param (exact match per tag, AND semantics across tags), so this PR is frontend-only, it adds the UI and wires it into the existing filter flow.

Testing

1. Seed jobs with known tags

Paste this whole block into a terminal. It creates 4 jobs with distinct, predictable tags (auth header is X-Heimdall-User):

API=http://127.0.0.1:9090/api/v1
seed() {  # seed <name> <tag> [tag...]
  local name=$1; shift; local t=""
  for x in "$@"; do t="${t:+$t,}\"$x\""; done
  curl -s -X POST "$API/job" -H "X-Heimdall-User: tester" -H 'Content-Type: application/json' \
    -d "{\"name\":\"$name\",\"version\":\"1.0.0\",\"context\":{},\"tags\":[$t],\"command_criteria\":[\"type:ping\"],\"cluster_criteria\":[\"type:localhost\"]}" \
    >/dev/null && echo "  created $name -> $*"
}

echo "Seeding..."
seed tagdemo-a owner:#dev-core env:prod    task_id:extract
seed tagdemo-b owner:#dev-core env:staging task_id:extract
seed tagdemo-c owner:#data-eng env:prod    task_id:load
seed tagdemo-d owner:#data-eng env:prod    task_id:extract
echo "Done."

2. Verify in the UI

Enter key and value in separate fields and verify its working.

Add a repeatable key/value tag filter to the Jobs page filter panel.
Tag pairs are serialized to the backend's `tags=key:value,key:value`
query param (already supported), matched exactly with AND semantics
across pairs. Works alongside the existing filters.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 16, 2026 06:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment thread web/src/modules/Jobs/TagFilter.tsx Outdated
Co-authored-by: gauravwarale <131575530+gauravwarale@users.noreply.github.com>
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.

3 participants