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

Update how we load settings from database #1500

Merged
merged 4 commits into from
Nov 6, 2023

Conversation

jonathangreen
Copy link
Member

Description

Load our settings from the database with full validation, rather then short-cutting that using the construct() method.

Motivation and Context

@dbernstein noted in #1495 that we had a problem in our sip2 integration where settings were not being loaded with the proper enum types from the database. This turned out to be a more pervasive problem then just for that integration, and necessitated this fix.

How Has This Been Tested?

Tested with the SIP2 code where this problem was first noted and ran unit tests.

Checklist

  • I have updated the documentation accordingly.
  • All new and existing tests passed.

Copy link

codecov bot commented Nov 3, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (500064b) 90.42% compared to head (477af0d) 90.42%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1500   +/-   ##
=======================================
  Coverage   90.42%   90.42%           
=======================================
  Files         231      231           
  Lines       29524    29524           
  Branches     6897     6897           
=======================================
+ Hits        26697    26698    +1     
+ Misses       1798     1797    -1     
  Partials     1029     1029           
Flag Coverage Δ
Api 73.84% <100.00%> (+0.05%) ⬆️
Core 60.94% <100.00%> (ø)
migration 28.53% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
core/integration/base.py 98.11% <100.00%> (+1.88%) ⬆️

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

@jonathangreen jonathangreen force-pushed the bugfix/enum-model-serialization branch from 396331e to 8083879 Compare November 3, 2023 14:42
@jonathangreen jonathangreen requested review from dbernstein and a team November 3, 2023 16:04
Copy link
Contributor

@dbernstein dbernstein left a comment

Choose a reason for hiding this comment

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

@jonathangreen : looks good. I don't fully understand the intricacies of the test code changes, but I trust that those are required by the change to base.py.

@jonathangreen jonathangreen merged commit 710219c into main Nov 6, 2023
30 checks passed
@jonathangreen jonathangreen deleted the bugfix/enum-model-serialization branch November 6, 2023 17:24
@tdilauro tdilauro added the bug Something isn't working label Nov 7, 2023
tdilauro pushed a commit that referenced this pull request Nov 14, 2023
* Update how we load settings from database.

* Make sure config data in tests validates

* More test fixes

* Mypy fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants