Skip to content

ENG-3481: Assessment template versioning schema + new templates#7969

Merged
galvana merged 7 commits intomainfrom
eng-3481-update-assessment-templates
Apr 21, 2026
Merged

ENG-3481: Assessment template versioning schema + new templates#7969
galvana merged 7 commits intomainfrom
eng-3481-update-assessment-templates

Conversation

@galvana
Copy link
Copy Markdown
Contributor

@galvana galvana commented Apr 20, 2026

Ticket ENG-3481

Description Of Changes

Add template versioning support to the assessment_template schema and seed new/updated assessment templates.

Templates are now versioned on three axes:

  • assessment_type: template family (e.g., us_ca_cpra_risk_assessment)
  • version: regulatory version string (e.g., US-CA-CPPA-RA-2025-09-23)
  • fides_revision: Ethyca iteration count within that regulatory version (integer)

Only one template per assessment_type is is_active=true at a time. Existing assessments linked to old templates are preserved and continue to work via their template_id FK.

Code Changes

  • Add fides_revision (Integer), is_managed (Boolean), parent_template_id (nullable FK) columns to assessment_template
  • Remove deprecated key column
  • Add unique constraint uq_assessment_template_type_version_revision on (assessment_type, version, fides_revision)
  • Add CPRA v2025 template (47 questions, 16 sections) - deactivates old v2024
  • Add EU AI Act FRIA v2026 template (24 questions, 6 sections) - deactivates old v2024
  • Add UK ICO ROPA template (42 questions, 15 sections) - new
  • Add IE DPC ROPA template (41 questions, 15 sections) - new
  • Add FR CNIL ROPA template (38 questions, 16 sections) - new

Steps to Confirm

See fidesplus PR for end-to-end verification: https://github.com/ethyca/fidesplus/pull/3439

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:
    • Ensure that your downrev is up to date with the latest revision on main
    • Ensure that your downgrade() migration is correct and works
  • Documentation:
    • No documentation updates required

Add template versioning support with fides_revision, is_managed, and
parent_template_id columns. Remove deprecated key column. Add unique
constraint on (assessment_type, version, fides_revision).

New/updated templates:
- CPRA v2025: Updated to reflect final CPPA rules (47 questions, 16 sections)
- EU AI Act FRIA v2026: Updated for Article 27 obligations (24 questions, 6 sections)
- UK ICO ROPA: New (42 questions, 15 sections)
- IE DPC ROPA: New (41 questions, 15 sections)
- FR CNIL ROPA: New (38 questions, 16 sections)

Old CPRA and FRIA versions are deactivated (is_active=false), preserving
existing assessments linked to them.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@galvana galvana requested a review from a team as a code owner April 20, 2026 19:02
@galvana galvana requested review from erosselli and removed request for a team April 20, 2026 19:02
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 20, 2026

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

Project Deployment Actions Updated (UTC)
fides-plus-nightly Ready Ready Preview, Comment Apr 20, 2026 11:11pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
fides-privacy-center Ignored Ignored Apr 20, 2026 11:11pm

Request Review

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@galvana galvana requested review from thabofletcher and removed request for erosselli April 20, 2026 19:06
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.04%. Comparing base (b5b98e6) to head (c4c0dfa).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7969   +/-   ##
=======================================
  Coverage   85.04%   85.04%           
=======================================
  Files         631      631           
  Lines       41213    41217    +4     
  Branches     4807     4807           
=======================================
+ Hits        35049    35054    +5     
  Misses       5070     5070           
+ Partials     1094     1093    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

galvana and others added 3 commits April 20, 2026 12:28
Add fides_revision, is_managed, parent_template_id columns.
Remove deprecated key column.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix downgrade to restore single unique index (not constraint + non-unique index)
- Add partial unique index uq_assessment_template_active_type ensuring
  only one active template per assessment_type at DB level

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Column("is_active").is_(True) doesn't type-check in Index kwargs.

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

@thabofletcher thabofletcher left a comment

Choose a reason for hiding this comment

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

Approved when tests pass

@galvana galvana added this pull request to the merge queue Apr 21, 2026
Merged via the queue into main with commit a52d50a Apr 21, 2026
68 of 69 checks passed
@galvana galvana deleted the eng-3481-update-assessment-templates branch April 21, 2026 00:20
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