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

Handle device*Upgrade events with empty variables without crashing #2560

Conversation

johannaengland
Copy link
Contributor

I noticed that after merging #2413 when a device is new and the inventory is first run there is an error since it tries to post an AlertHistoryVariable entry with the value null, which is not allowed. This PR fixes that by changing the old and new version to N/A if it is null.

@johannaengland johannaengland self-assigned this Jan 20, 2023
@sonarqubecloud
Copy link

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

@codecov
Copy link

codecov bot commented Jan 20, 2023

Codecov Report

Merging #2560 (c541744) into master (2f4b9ae) will increase coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2560      +/-   ##
==========================================
+ Coverage   53.51%   53.54%   +0.03%     
==========================================
  Files         556      556              
  Lines       40432    40432              
==========================================
+ Hits        21638    21651      +13     
+ Misses      18794    18781      -13     
Impacted Files Coverage Δ
python/nav/ipdevpoll/shadows/__init__.py 42.64% <ø> (ø)
python/nav/ipdevpoll/pool.py 89.92% <0.00%> (+5.03%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions
Copy link

Test results

     12 files       12 suites   12m 0s ⏱️
3 204 tests 3 108 ✔️   96 💤 0
9 087 runs  8 799 ✔️ 288 💤 0

Results for commit c541744.

@lunkwill42 lunkwill42 changed the title [BUG] Handle device*Upgrade events with empty variables without crashing Jan 20, 2023
Copy link
Member

@lunkwill42 lunkwill42 left a comment

Choose a reason for hiding this comment

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

👍

@johannaengland johannaengland merged commit 6f1f637 into Uninett:master Jan 20, 2023
@johannaengland johannaengland deleted the software-upgrade-no-previous-version branch January 20, 2023 12:09
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