Skip to content

Conversation

@matmair
Copy link
Contributor

@matmair matmair commented Dec 17, 2025

Replaces individual metadata endpoints with a generic endpoint and a bunch of permanent redirects. Obviously a breaking change.
This:

  • reduces the amount of duplicated endpoints doing the same things and the required tests too
  • removes the necessity to declare new endpoints for every metadata-supporting model
  • is plugin friendly as models defined in those can also use the new endpoint

Requires a change to the client libary - inventree/inventree-python#285

@matmair matmair added this to the 2.0.0 milestone Dec 17, 2025
@matmair matmair self-assigned this Dec 17, 2025
@matmair matmair added plugin Plugin ecosystem api Relates to the API breaking Indicates a major update or change which breaks compatibility labels Dec 17, 2025
@netlify
Copy link

netlify bot commented Dec 17, 2025

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

Name Link
🔨 Latest commit fa03f9f
🔍 Latest deploy log https://app.netlify.com/projects/inventree-web-pui-preview/deploys/695c5af4cb6bba0008318503

@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

❌ Patch coverage is 88.60759% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.16%. Comparing base (025f6ff) to head (fa03f9f).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11035      +/-   ##
==========================================
- Coverage   88.18%   88.16%   -0.03%     
==========================================
  Files        1290     1290              
  Lines       58142    58145       +3     
  Branches     1969     1969              
==========================================
- Hits        51273    51264       -9     
- Misses       6378     6390      +12     
  Partials      491      491              
Flag Coverage Δ
backend 89.46% <88.60%> (-0.03%) ⬇️

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

Components Coverage Δ
Backend Apps 92.01% <100.00%> (-0.02%) ⬇️
Backend General 93.48% <100.00%> (ø)
Frontend 70.85% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@matmair matmair changed the title WIP refactor(backend): reduce surface by unifying metadata endpoints refactor(backend): reduce surface by unifying metadata endpoints Jan 5, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 6, 2026

CodSpeed Performance Report

Merging #11035 will not alter performance

Comparing matmair:reduce-metadata-endpoints (fa03f9f) with master (025f6ff)1

Summary

✅ 2 untouched

Footnotes

  1. No successful run was found on master (97ea76a) during the generation of this report, so 025f6ff was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@matmair
Copy link
Contributor Author

matmair commented Jan 6, 2026

@SchrodingersGat this is ready for review, the needed change for the API client is already proposed inventree/inventree-python#285

You can see the passing test with that branch in https://github.com/inventree/InvenTree/actions/runs/20733404036/job/59525935718

@matmair matmair marked this pull request as ready for review January 6, 2026 00:47
@SchrodingersGat
Copy link
Member

@matmair this does look a lot cleaner.

To confirm what you are doing here - all metadata is accessed via /api/metadata/pk/ - but the existing URLs all continue to work via redirect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Relates to the API breaking Indicates a major update or change which breaks compatibility plugin Plugin ecosystem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants