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

Fix SeedDB edit netbox regression #2761

Merged
merged 3 commits into from Nov 24, 2023

Conversation

lunkwill42
Copy link
Member

This fixes a regression that appeared once deprecated attributes were removed from the Netbox model in #2754 . The regression causes SeedDB to crash when making changes to Netbox objects.

We had no tests in place to detect this issue, which also was not discovered by other linting tools, since the attribute accesses are dynamic.

This also adds a simple test to ensure the audit logging comparison doesn't crash.

(this regression was only on master, it never made it into a release)

Audit logging netbox changes started crashing once deprecated
attributes were removed.
These attributes/properties have been deprecated for some time, and
have now been removed.  This caused this comparison function to crash
SeedDB when audit logging changes to netbox objects.
Copy link

sonarcloud bot commented Nov 24, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link

codecov bot commented Nov 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4785f07) 55.65% compared to head (365d268) 55.66%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2761   +/-   ##
=======================================
  Coverage   55.65%   55.66%           
=======================================
  Files         567      567           
  Lines       41224    41224           
=======================================
+ Hits        22942    22946    +4     
+ Misses      18282    18278    -4     

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

Copy link

Test results

     12 files       12 suites   12m 0s ⏱️
3 285 tests 3 285 ✔️ 0 💤 0
9 330 runs  9 330 ✔️ 0 💤 0

Results for commit 365d268.

Copy link
Contributor

@johannaengland johannaengland left a comment

Choose a reason for hiding this comment

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

Good that we caught this before the release 😅

@lunkwill42 lunkwill42 merged commit fbf4cfd into Uninett:master Nov 24, 2023
12 checks passed
@lunkwill42 lunkwill42 deleted the bugfix/auditlog-netbox-change branch November 24, 2023 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants