Skip to content

[Backport] Call machine func (#9191) - #9298

Merged
SchrodingersGat merged 1 commit into
inventree:0.17.xfrom
SchrodingersGat:machine-fix-backport
Mar 14, 2025
Merged

SchrodingersGat merged 1 commit into
inventree:0.17.xfrom
SchrodingersGat:machine-fix-backport

Conversation

@SchrodingersGat

Copy link
Copy Markdown
Member
  • Force label printing to background worker

  • Refactor "check_reload" state of machine registry

  • In line with plugin registry
  • More work can be done here (i.e. session caching)
  • Better handling of call_plugin_function

  • Wrapper for calling machine function

  • Use AttributeError instead

  • Simplify function offloading

  • Check plugin registry hash when reloading machine registry

  • Cleanup

  • Fixes

  • Adjust unit test

  • Cleanup

  • Allow running in foreground if background worker not running

  • Simplify call structure

* Force label printing to background worker

* Refactor "check_reload" state of machine registry

- In line with plugin registry
- More work can be done here (i.e. session caching)

* Better handling of call_plugin_function

* Wrapper for calling machine function

* Use AttributeError instead

* Simplify function offloading

* Check plugin registry hash when reloading machine registry

* Cleanup

* Fixes

* Adjust unit test

* Cleanup

* Allow running in foreground if background worker not running

* Simplify call structure
@SchrodingersGat SchrodingersGat added enhancement This is an suggested enhancement or new feature plugin Plugin ecosystem labels Mar 14, 2025
@SchrodingersGat SchrodingersGat added this to the 0.17.9 milestone Mar 14, 2025
@codecov

codecov Bot commented Mar 14, 2025 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 65.15152% with 23 lines in your changes missing coverage. Please review.

Project coverage is 84.33%. Comparing base (75420fc) to head (3736ebe).
Report is 37 commits behind head on 0.17.x.

Files with missing lines Patch % Lines
src/backend/InvenTree/machine/registry.py 59.57% 19 Missing ⚠️
src/backend/InvenTree/plugin/registry.py 57.14% 3 Missing ⚠️
src/backend/InvenTree/machine/machine_type.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           0.17.x    #9298      +/-   ##
==========================================
- Coverage   84.35%   84.33%   -0.02%     
==========================================
  Files        1200     1201       +1     
  Lines       54858    54923      +65     
  Branches     2098     2100       +2     
==========================================
+ Hits        46273    46322      +49     
- Misses       8066     8086      +20     
+ Partials      519      515       -4     
Flag Coverage Δ
backend 86.03% <65.15%> (-0.05%) ⬇️
pui ∅ <ø> (∅)

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SchrodingersGat
SchrodingersGat merged commit af0a282 into inventree:0.17.x Mar 14, 2025
@SchrodingersGat
SchrodingersGat deleted the machine-fix-backport branch March 14, 2025 02:40
@SchrodingersGat SchrodingersGat added the bug Identifies a bug which needs to be addressed label Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Identifies a bug which needs to be addressed enhancement This is an suggested enhancement or new feature plugin Plugin ecosystem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant