Skip to content

ENG-3924: Add info-level execution logs for paused privacy request status transitions#8251

Draft
eastandwestwind wants to merge 11 commits into
mainfrom
ENG-3924
Draft

ENG-3924: Add info-level execution logs for paused privacy request status transitions#8251
eastandwestwind wants to merge 11 commits into
mainfrom
ENG-3924

Conversation

@eastandwestwind
Copy link
Copy Markdown
Contributor

@eastandwestwind eastandwestwind commented May 21, 2026

Ticket ENG-3924

Description Of Changes

When a privacy request is paused, the status alone doesn't explain why. It could be a webhook halt, a batch email send, or an access review. This adds info-level execution logs for pause transitions so the reason is visible in the Admin UI's Activity tab.

Adds an info status to ExecutionLogStatus and creates execution log entries at the 3 pause transition points where the reason isn't obvious from status alone.

Code Changes

  • Added info = "info" to ExecutionLogStatus enum (no migration needed — string column)
  • Added add_info_execution_log() method on PrivacyRequest model
  • Added info execution logs at 3 pause transition points:
    • request_runner_service.py — request paused by webhook halt instruction (main execution path)
    • request_runner_service.py — request paused by webhook in run_webhooks_and_report_status
    • email_batch_service.py — request paused after batch email send
  • Added INFO to frontend ExecutionLogStatus enum with blue tag color
  • Added unit tests for info status and webhook halt info log

Steps to Confirm

  1. Set up a policy pre-execution webhook that returns {"halt": true}
  2. Create a privacy request — it should transition to Paused
  3. Click into the request → Activity tab
  4. Verify an Info (blue tag) entry appears with message "Request paused by webhook: {key}"
  5. Verify existing error/success/skipped execution logs are unaffected

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
    • Add a db-migration This indicates that a change includes a database migration label to the entry if your change includes a DB migration
    • Add a high-risk This issue suggests changes that have a high-probability of breaking existing code label to the entry if your change includes a high-risk change
    • Updates unreleased work already in Changelog, no new entry necessary
  • UX feedback:
    • No UX review needed
  • Followup issues:
    • No followup issues
  • Database migrations:
    • No migrations
  • Documentation:
    • No documentation updates required

eastandwestwind and others added 4 commits May 21, 2026 13:18
8 code paths transition a privacy request's status without creating an
ExecutionLog entry, making it impossible to troubleshoot stuck requests
in the UI. This adds an "info" ExecutionLogStatus and logs all status
transitions: requires_input (manual webhooks), paused (webhook halt,
batch email), awaiting_access_review, resumed from webhook, and
pre-approval not eligible.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 21, 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 May 21, 2026 12:20pm
fides-privacy-center Ignored Ignored May 21, 2026 12:20pm

Request Review

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 21, 2026

Title Lines Statements Branches Functions
admin-ui Coverage: 11%
8.54% (4053/47447) 7.59% (2094/27561) 5.82% (812/13944)
fides-js Coverage: 78%
79.17% (1977/2497) 66.25% (1249/1885) 73.31% (349/476)
privacy-center Coverage: 86%
83.95% (403/480) 81.25% (208/256) 76.13% (67/88)

eastandwestwind and others added 3 commits May 21, 2026 13:31
…ional

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove info logs from requires_input, pre_approval_not_eligible, resumed,
and awaiting_access_review transitions — those statuses are already
self-explanatory. Keep info logs only for paused transitions where the
reason (webhook halt vs batch email) is not obvious from status alone.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@eastandwestwind eastandwestwind changed the title ENG-3924: Add info-level execution logs for privacy request status transitions ENG-3924: Add info-level execution logs for paused privacy request status transitions May 21, 2026
eastandwestwind and others added 3 commits May 21, 2026 14:17
When a privacy request task dies at the worker level (OOM kill, hard
timeout, broker disconnect), no execution log is created. The on_failure
callback on DatabaseTask catches these failures, writes an error
execution log with the failure reason, and marks the request as errored.
Skips if the in-task BaseException handler already handled the error.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.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.

1 participant