Skip to content

Conversation

nrxsmith
Copy link
Contributor

@nrxsmith nrxsmith commented Jul 24, 2025

Closes ENG-1035

Description Of Changes

Adds back missing data-testid attributes in FidesJS components for development Docker builds. The issue occurred because FidesJS builds were stripping test IDs even in dev environments, making some e2e Privacy Center tests break.

The solution adds an IS_TEST build argument that preserves test IDs only for dev builds while maintaining the current behavior (stripped test IDs) for all production builds.

Code Changes

  • Dockerfile: Added ARG IS_TEST=false and ENV IS_TEST=$IS_TEST to the frontend build stage to accept and propagate the test flag
  • docker_nox.py: Modified app_info_map to conditionally pass --build-arg IS_TEST=true for fides and the privacy center when tag == "dev"

Steps to Confirm

  1. To test the Dockerfile change, you can locally build the image and pass it the IS_TEST argument. So something like: docker build --build-arg IS_TEST=true --target=prod_pc -t test-privacy-center-with-testids .
  2. As far as the nox file change, you can test most of it by adding the following before the last line
session.log(f"Generated buildx command: {' '.join(buildx_command)}")
return

That will show you the build command being run. For extra thoroughness, you could take the command, remove the ''--push" flag, and then build it locally as well.

I'll also pull down the dev image when it gets published after this is merged so I can double check.

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 (i.e. potential for performance impact or unexpected regression) that should be flagged
    • Updates unreleased work already in Changelog, no new entry necessary
  • Followup issues:
    • Followup issues created
    • 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
      • If a downgrade migration is not possible for this change, please call this out in the PR description!
    • No migrations
  • Documentation:
    • Documentation complete, PR opened in fidesdocs
    • Documentation issue created in fidesdocs
    • If there are any new client scopes created as part of the pull request, remember to update public-facing documentation that references our scope registry
    • No documentation updates required

Copy link

vercel bot commented Jul 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
fides-plus-nightly ⬜️ Ignored (Inspect) Visit Preview Jul 24, 2025 11:54pm
fides-privacy-center ⬜️ Ignored (Inspect) Jul 24, 2025 11:54pm

Copy link

codecov bot commented Jul 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.68%. Comparing base (3fe26dc) to head (5861ddb).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6382   +/-   ##
=======================================
  Coverage   86.68%   86.68%           
=======================================
  Files         453      453           
  Lines       28938    28938           
  Branches     3232     3232           
=======================================
  Hits        25086    25086           
  Misses       3136     3136           
  Partials      716      716           

☔ 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.

Copy link
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.

🚀 🚀 🚀

@nrxsmith nrxsmith merged commit b6b4530 into main Jul 25, 2025
41 checks passed
@nrxsmith nrxsmith deleted the is-test-mode branch July 25, 2025 00:22
Copy link

cypress bot commented Jul 25, 2025

fides    Run #13157

Run Properties:  status check passed Passed #13157  •  git commit b6b4530e26: Handle IS_TEST param for fides-js builds to include test ids (#6382)
Project fides
Branch Review main
Run status status check passed Passed #13157
Run duration 01m 01s
Commit git commit b6b4530e26: Handle IS_TEST param for fides-js builds to include test ids (#6382)
Committer Nate Smith
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 5
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.
View all changes introduced in this branch ↗︎

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