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

Don't call save on devices, links, or LOSes unnecessarily #819

Merged
merged 8 commits into from
Jan 31, 2025

Conversation

WillNilges
Copy link
Collaborator

@WillNilges WillNilges commented Jan 30, 2025

Closes #790

This prevents the UISP import script from calling save on our objects unnecessarily, which should stop the history tables from ballooning like they do.

See https://django-simple-history.readthedocs.io/en/3.8.0/utils.html#clean-duplicate-history for more info

  • Write Tests?

@WillNilges
Copy link
Collaborator Author

Confirmed this test fails on main and works on my branch.

Copy link

codecov bot commented Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.90%. Comparing base (008b68e) to head (901bb6f).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #819      +/-   ##
==========================================
+ Coverage   94.88%   94.90%   +0.01%     
==========================================
  Files          89       89              
  Lines        3816     3825       +9     
==========================================
+ Hits         3621     3630       +9     
  Misses        195      195              

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

Copy link
Member

@Andrew-Dickinson Andrew-Dickinson left a comment

Choose a reason for hiding this comment

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

I think we're gonna be unhappy with how spammy the UISP id rotation slack messages are, but we can try it

src/meshapi/util/uisp_import/sync_handlers.py Outdated Show resolved Hide resolved
@WillNilges WillNilges merged commit ef01882 into main Jan 31, 2025
12 checks passed
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.

History entries are created for most models when not making any changes
2 participants