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

Enhance creation of default settings #9028

Merged

Conversation

SchrodingersGat
Copy link
Member

Caching the calculation introduces a lot of complexity especially with regard to sync between processes.

The actual code to ensure all settings are in the DB takes less than a millisecond to execute (if there are no settings to build), and the API endpoints are not called often anyway. So the code can be simplified dramatically.

- Remove cache requirement
- Replaces inventree#9021
@SchrodingersGat SchrodingersGat added backport Apply this label to a PR to enable auto-backport action refactor backport-to-0.17.x Backport these changes to the 0.17.x branch labels Feb 4, 2025
@SchrodingersGat SchrodingersGat added this to the 1.0.0 milestone Feb 4, 2025
Copy link

netlify bot commented Feb 4, 2025

Deploy Preview for inventree-web-pui-preview canceled.

Name Link
🔨 Latest commit fbb2713
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/67a1f2c745927900087c4cd2

Copy link

codecov bot commented Feb 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.66%. Comparing base (138aa01) to head (fbb2713).
Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #9028   +/-   ##
=======================================
  Coverage   85.66%   85.66%           
=======================================
  Files        1176     1176           
  Lines       52012    52002   -10     
  Branches     2113     2113           
=======================================
- Hits        44555    44547    -8     
+ Misses       6913     6911    -2     
  Partials      544      544           
Flag Coverage Δ
backend 87.37% <ø> (+<0.01%) ⬆️

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

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

@SchrodingersGat SchrodingersGat merged commit 445fa45 into inventree:master Feb 4, 2025
30 checks passed
@SchrodingersGat SchrodingersGat deleted the settings-cache-fix branch February 4, 2025 11:51
github-actions bot pushed a commit that referenced this pull request Feb 4, 2025
- Remove cache requirement
- Replaces #9021

(cherry picked from commit 445fa45)
Copy link
Contributor

github-actions bot commented Feb 4, 2025

💚 All backports created successfully

Status Branch Result
0.17.x

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

SchrodingersGat added a commit that referenced this pull request Feb 4, 2025
- Remove cache requirement
- Replaces #9021

(cherry picked from commit 445fa45)

Co-authored-by: Oliver <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Apply this label to a PR to enable auto-backport action backport-to-0.17.x Backport these changes to the 0.17.x branch refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant