Skip to content

ENG-2539b: Slice 0b — JiraTicketTask, pending_external status & polling skeleton#7410

Merged
eastandwestwind merged 16 commits intomainfrom
ENG-2539b/jira-ticket-task-polling-skeleton
Feb 24, 2026
Merged

ENG-2539b: Slice 0b — JiraTicketTask, pending_external status & polling skeleton#7410
eastandwestwind merged 16 commits intomainfrom
ENG-2539b/jira-ticket-task-polling-skeleton

Conversation

@eastandwestwind
Copy link
Copy Markdown
Contributor

@eastandwestwind eastandwestwind commented Feb 18, 2026

Description Of Changes

Implements the Fides OSS foundation for Jira ticket lifecycle tracking and status polling, enabling future Jira DSR integration (Slice 4 in Fidesplus).

Code Changes

  • Added pending_external to PrivacyRequestStatus enum — represents a privacy request awaiting completion by an external system (e.g., Jira)
  • Created JiraTicketTask model (src/fides/api/models/jira_ticket_task.py) with 1:1 FK to ManualTaskInstance, FK to ConnectionConfig, and Jira-specific columns (ticket_key, ticket_url, external_status, external_status_category, last_polled_at)
  • Added partial index ix_jira_ticket_task_open for efficient polling of non-done tickets
  • Created poll_jira_tickets Celery task skeleton (src/fides/service/jira/polling_task.py) with Redis locking and pluggable register_poll_service() for Fidesplus Slice 4
  • Added initiate_jira_ticket_polling() scheduler job wired from main.py startup (10-min default interval, configurable via FIDES__EXECUTION__JIRA_POLLING_INTERVAL_MINUTES)
  • Alembic migration c69ef1fecb20 for jira_ticket_task table and pending_external enum value
  • Registered JiraTicketTask model in src/fides/api/db/base.py

Steps to Confirm

  1. Confirm tests pass
  2. Verify polling task starts on boot: Check fides logs at startup for "Initiating scheduler for Jira ticket polling". The task should run every 10 minutes — confirm by looking for APScheduler's "Running job "poll_jira_tickets ..." log entry. The task is a no-op until Slice 4 registers an implementation.
Screenshot 2026-02-20 at 3 34 49 PM Screenshot 2026-02-20 at 3 40 47 PM
  1. Verify config override: Set FIDES__EXECUTION__JIRA_POLLING_INTERVAL_MINUTES=5, restart, and confirm the scheduler picks up the new interval

Made with Cursor

@eastandwestwind eastandwestwind requested a review from a team as a code owner February 18, 2026 14:29
@eastandwestwind eastandwestwind requested review from JadeCara and removed request for a team February 18, 2026 14:29
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Feb 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
fides-plus-nightly Ignored Ignored Preview Feb 24, 2026 5:39pm
fides-privacy-center Ignored Ignored Feb 24, 2026 5:39pm

Request Review

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 18, 2026

Greptile Summary

This PR adds the OSS foundation for Jira ticket lifecycle tracking: a new JiraTicketTask model with 1:1 FK to ManualTaskInstance, a pending_external privacy request status, a Celery polling task skeleton with Redis locking and pluggable service registration, and the corresponding Alembic migration. The architecture is clean — the polling task is a no-op until Fidesplus Slice 4 registers an implementation via register_poll_service().

  • The polling interval default (10 minutes) should be changed to hours to align with the existing async_polling_interval_hours convention and avoid unnecessary Jira API traffic for operations that can take days or weeks
  • The changelog has a placeholder pr: 0 that needs to be updated to 7410
  • Test file has unused imports (patch), imports inside test methods, and manual fixture cleanup that contradict repo conventions
  • The "done" magic string used for Jira status category filtering should be extracted as a named constant

Confidence Score: 3/5

  • Functionally safe to merge as a no-op skeleton, but has convention violations and a placeholder changelog PR number that should be fixed first.
  • The core architecture is well-designed and follows existing codebase patterns (scheduler wiring, Redis locking, Celery task structure). However, the polling interval uses minutes instead of the established hours convention, the changelog has a placeholder value, and the test file has several style issues. None of these are runtime-breaking, but they should be addressed before merge.
  • src/fides/config/execution_settings.py (polling interval convention), tests/service/jira/test_jira_ticket_task.py (multiple style issues), changelog/ENG-2539b-jira-ticket-task-polling.yaml (placeholder PR number)

Important Files Changed

Filename Overview
changelog/ENG-2539b-jira-ticket-task-polling.yaml Changelog entry added with pr: 0 placeholder instead of the actual PR number (7410).
src/fides/api/alembic/migrations/versions/xx_2026_02_18_1200_c69ef1fecb20_add_jira_ticket_task_and_pending_external.py Migration adds jira_ticket_task table with appropriate FKs, indexes, and pending_external enum value. Downgrade properly recreates the enum. Well-structured.
src/fides/api/models/jira_ticket_task.py New model with 1:1 FK to ManualTaskInstance, partial index for polling. The "done" magic string should be a named constant.
src/fides/config/execution_settings.py Adds jira_polling_interval_minutes with 10-minute default. Custom instruction requires polling intervals in hours for production.
src/fides/service/jira/polling_task.py Celery task skeleton with Redis locking and pluggable service registration. Follows existing codebase patterns well.
tests/service/jira/test_jira_ticket_task.py Tests cover model CRUD, relationships, and polling task registration. Has unused import (patch), imports inside test methods, and manual fixture cleanup that violates repo conventions.

Last reviewed commit: 7be2b7f

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

11 files reviewed, 6 comments

Edit Code Review Agent Settings | Greptile

@eastandwestwind eastandwestwind force-pushed the ENG-2539b/jira-ticket-task-polling-skeleton branch from 71ef09e to 3e3ef55 Compare February 19, 2026 10:16
eastandwestwind and others added 11 commits February 23, 2026 17:24
- Add pending_external to PrivacyRequestStatus enum for requests
  awaiting external system completion (e.g., Jira)
- Create JiraTicketTask model with 1:1 FK to ManualTaskInstance and
  FK to ConnectionConfig, storing Jira ticket key/URL/status
- Add partial index ix_jira_ticket_task_open for efficient polling of
  non-done tickets
- Create poll_jira_tickets Celery task with Redis locking and
  pluggable service registration for Fidesplus Slice 4
- Add initiate_jira_ticket_polling scheduler job (10-min default,
  configurable via FIDES__EXECUTION__JIRA_POLLING_INTERVAL_MINUTES)
- Wire scheduler init from main.py startup
- Alembic migration for jira_ticket_task table and pending_external
  enum value
- Tests for model CRUD, uniqueness, cascade delete, status enum,
  polling task, and config defaults

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@eastandwestwind eastandwestwind force-pushed the ENG-2539b/jira-ticket-task-polling-skeleton branch from 3e3ef55 to 21708b0 Compare February 23, 2026 16:24
Copy link
Copy Markdown
Contributor

@JadeCara JadeCara left a comment

Choose a reason for hiding this comment

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

A few comments and suggestions, but overall looking really good!

@eastandwestwind eastandwestwind added this pull request to the merge queue Feb 24, 2026
Merged via the queue into main with commit 1ca8ec1 Feb 24, 2026
53 of 54 checks passed
@eastandwestwind eastandwestwind deleted the ENG-2539b/jira-ticket-task-polling-skeleton branch February 24, 2026 19:38
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.

2 participants