Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PROD-2147 Adds last_monitored and enabled attributes to MonitorConfig #4991

Merged
merged 6 commits into from
Jun 21, 2024

Conversation

erosselli
Copy link
Contributor

@erosselli erosselli commented Jun 17, 2024

Closes PROD-2147

Description Of Changes

Two new fields have been added to the MonitorConfig model:

  • last_monitored, a nullable datetime field to store the datetime when the monitor was last executed
  • enabled, a boolean non-nullable field to toggle the monitor on / off. Defaults to True.

These changes will be used by https://github.com/ethyca/fidesplus/pull/1465

Code Changes

  • Migration to add the two new columns
  • Update to the MonitorConfig model
  • Update a relevant test

Steps to Confirm

  • Run migrations
  • Check that your monitorconfig table has the columns enabled and last_monitored

You can also test that you can downgrade migration:

  • downgrade migrations to previous one
  • Check that your monitorconfig table does not have the columns enabled and last_monitored

Pre-Merge Checklist

  • All CI Pipelines Succeeded
  • 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
  • Issue Requirements are Met
  • Relevant Follow-Up Issues Created
  • Update CHANGELOG.md
  • For API changes, the Postman collection has been updated
  • If there are any 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!

Copy link

vercel bot commented Jun 17, 2024

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
fides-plus-nightly ⬜️ Ignored (Inspect) Visit Preview Jun 21, 2024 1:21pm

@erosselli erosselli force-pushed the PROD-2147-add-attributes-to-discovery-monitors branch 2 times, most recently from 9af6308 to 4ff7c08 Compare June 17, 2024 20:25
Copy link

cypress bot commented Jun 17, 2024

Passing run #8468 ↗︎

0 4 0 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

Merge 07452cf into d7a546a...
Project: fides Commit: 87fe68570e ℹ️
Status: Passed Duration: 00:36 💡
Started: Jun 21, 2024 1:32 PM Ended: Jun 21, 2024 1:32 PM

Review all test suite changes for PR #4991 ↗︎

Copy link

codecov bot commented Jun 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.56%. Comparing base (d7a546a) to head (07452cf).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4991   +/-   ##
=======================================
  Coverage   86.56%   86.56%           
=======================================
  Files         352      352           
  Lines       21874    21877    +3     
  Branches     2884     2884           
=======================================
+ Hits        18935    18938    +3     
  Misses       2433     2433           
  Partials      506      506           

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

tests/ctl/core/test_api.py Outdated Show resolved Hide resolved
@erosselli erosselli force-pushed the PROD-2147-add-attributes-to-discovery-monitors branch from 4ff7c08 to ebba34b Compare June 19, 2024 13:40
@erosselli erosselli changed the title [WIP] Adds last_monitored and is_enabled attributes to MonitorConfig PROD-2147 Adds last_monitored and enabled attributes to MonitorConfig Jun 20, 2024
@erosselli erosselli force-pushed the PROD-2147-add-attributes-to-discovery-monitors branch from a752491 to e997c2d Compare June 20, 2024 17:19
@erosselli erosselli marked this pull request as ready for review June 20, 2024 18:09
@erosselli erosselli requested a review from adamsachs June 20, 2024 18:21
Copy link
Contributor

@adamsachs adamsachs left a comment

Choose a reason for hiding this comment

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

this side of things looks good to me! one minor nit on the changelog and i do think the migration down rev needs to be bumped, but these model-level updates make sense and seem pretty straightforward! nice work on a clean update.

CHANGELOG.md Outdated Show resolved Hide resolved
@erosselli erosselli force-pushed the PROD-2147-add-attributes-to-discovery-monitors branch from d1bb182 to 07452cf Compare June 21, 2024 13:21
@erosselli erosselli merged commit d1e2ce4 into main Jun 21, 2024
42 checks passed
@erosselli erosselli deleted the PROD-2147-add-attributes-to-discovery-monitors branch June 21, 2024 14:02
Copy link

cypress bot commented Jun 21, 2024

Passing run #8470 ↗︎

0 4 0 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

PROD-2147 Adds last_monitored and enabled attributes to MonitorConfig (#4991)
Project: fides Commit: d1e2ce4f53
Status: Passed Duration: 00:34 💡
Started: Jun 21, 2024 2:13 PM Ended: Jun 21, 2024 2:13 PM

Review all test suite changes for PR #4991 ↗︎

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