Skip to content

increase character limits on all link fields to 2000 - #9131

Merged
SchrodingersGat merged 19 commits into
inventree:masterfrom
simonkuehling:increase_link_character_max_lengths
Mar 4, 2025
Merged

SchrodingersGat merged 19 commits into
inventree:masterfrom
simonkuehling:increase_link_character_max_lengths

Conversation

@simonkuehling

Copy link
Copy Markdown
Contributor

fixes #9106

@netlify

netlify Bot commented Feb 21, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for inventree-web-pui-preview ready!

Name Link
🔨 Latest commit eb4fae8
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/67c6faa736fdc800085f6232
😎 Deploy Preview https://deploy-preview-9131--inventree-web-pui-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 97 (🟢 up 1 from production)
Accessibility: 89 (no change from production)
Best Practices: 92 (no change from production)
SEO: 78 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov

codecov Bot commented Feb 21, 2025 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 87.25664% with 72 lines in your changes missing coverage. Please review.

Project coverage is 86.19%. Comparing base (8cee2e3) to head (eb4fae8).
Report is 215 commits behind head on master.

Files with missing lines Patch % Lines
...rontend/src/components/buttons/PrintingActions.tsx 35.29% 20 Missing and 2 partials ⚠️
src/backend/InvenTree/users/test_migrations.py 31.25% 11 Missing ⚠️
src/backend/InvenTree/users/models.py 86.53% 7 Missing ⚠️
...venTree/plugin/builtin/labels/inventree_machine.py 75.00% 4 Missing ⚠️
src/backend/InvenTree/report/models.py 84.00% 4 Missing ⚠️
src/backend/InvenTree/users/serializers.py 93.93% 4 Missing ⚠️
src/frontend/src/components/details/Details.tsx 71.42% 2 Missing and 2 partials ⚠️
src/frontend/src/functions/auth.tsx 82.60% 4 Missing ⚠️
...end/InvenTree/plugin/builtin/labels/label_sheet.py 0.00% 3 Missing ⚠️
src/frontend/src/hooks/UseForm.tsx 66.66% 0 Missing and 2 partials ⚠️
... and 5 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9131      +/-   ##
==========================================
+ Coverage   86.09%   86.19%   +0.09%     
==========================================
  Files        1182     1199      +17     
  Lines       52177    52566     +389     
  Branches     2187     2216      +29     
==========================================
+ Hits        44921    45307     +386     
  Misses       6698     6698              
- Partials      558      561       +3     
Flag Coverage Δ
backend 88.05% <90.41%> (-0.01%) ⬇️
pui ∅ <81.50%> (∅)

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

Copy link
Copy Markdown
Member

@simonkuehling nice solution here :) I tried and failed to fix this limitation ages ago, glad that you have now worked it out!

@SchrodingersGat

Copy link
Copy Markdown
Member

@simonkuehling the database migrations here are in conflict with the latest from master - you will need to:

  1. Merge in the code from origin/master
  2. Update (renumber) your migrations
  3. Ensure that the references inside the migrations are updated to match the new migration history

@simonkuehling

Copy link
Copy Markdown
Contributor Author

@SchrodingersGat I updated the branch accordingly - i think I made a rebase instead of a merge accidentally, though... should I clean this up first, or it ok like this?

@SchrodingersGat

Copy link
Copy Markdown
Member

@simonkuehling interesting now the CI is failing with this error:

MySQLdb.DataError: (1406, "Data too long for column 'link' at row 1")

https://github.com/inventree/InvenTree/actions/runs/13630520894/job/38097147371?pr=9131

SchrodingersGat and others added 4 commits March 4, 2025 13:03
* Remove placeholder components

- No function
- Cleanup for 1.0.0

* Remove Placeholder.tsx
* Add user profile

* fix choice set

* ensure primary_group is valid

* add missing migrations

* fix tests

* merge migrations

* add migration test

* add new model to ruleset

* ensure changed to the m2m conenction also validate primary grups

* move signals

* fix import?

* patch user language through

* use set methods correctly

* bump api

* refactoring to make debugging and extending easier

* fix dum recurrsion problem

* fix user pk lookup

* rename migration

* add user and group page

* cleanup

* add hoverCard for user / owner / group render

* include owner_model in owner responses

* move user serializers to users

* add profile to list

* add brief serializer for profiles

* ensure profile is present in most apis

* extend rendered data

* store and observe langauge in profile

* reduce unneeded complexity

* enable access to full profle (including internal fields) in me serializer

* move theme to a single object

* persist theme settings

* fix radius lookup

* remove debug message

* fix filter

* remove unused field

* remove image fields

* add setting to control showing profiles

* fix settings

* update test

* fix theme reload

* Add contact UI

* Add profile edit screen

* fix test

* Add testing for user theme panel

* fix var name

* complete coverage of theme

* Add test for new pages

* make test more reliable in strict mode

* remove step

* fix ref

* add verbose names

* fix used setting

* extend tests

* fix permissions

* fix lookup

* use lookup to enuse ursls stay valid

* update migrations

* Add position field

* fix permissions
* Update report generation progress

* Add shim task for offloading report printing

* Cleanup

* Add detail endpoints for label and report outputs

* Display report printing progress in UI

* Implement similar for label printing

* Reduce output for CI

* Add plugin slug

* Bump API version

* Ensure it works with machine printing

* Fix null comparison

* Fix SKU link

* Update playwright tests

* Massively reduce log output when printing
@simonkuehling
simonkuehling requested a review from matmair as a code owner March 4, 2025 13:03
@simonkuehling

Copy link
Copy Markdown
Contributor Author

@SchrodingersGat I think I fixed it - the test that @matmair fixed was passing the link_url > 2000 chars test, but failing the link_url == 2000 chars check afterwards

@SchrodingersGat

Copy link
Copy Markdown
Member

@simonkuehling great work here, thanks for taking charge of this one :)

@SchrodingersGat
SchrodingersGat merged commit d96f0d7 into inventree:master Mar 4, 2025
@SchrodingersGat SchrodingersGat added this to the 1.0.0 milestone Mar 4, 2025
@SchrodingersGat SchrodingersGat added the migration Data or schema migrations label Mar 4, 2025
@SchrodingersGat

SchrodingersGat commented Mar 5, 2025 •

Copy link
Copy Markdown
Member

It appears that after merging this the API schema comparison check is failing:

It looks like potentially the length fields are trying to reset to 200?

@matmair any thoughts on how to address this one?

@matmair

matmair commented Mar 5, 2025

Copy link
Copy Markdown
Member

Was the api schema correctly changed?

matmair added a commit to matmair/InvenTree that referenced this pull request Mar 5, 2025
The API version was not corretly changed in inventree#9131 - this fixes it.

Fixes inventree#9242
@matmair

matmair commented Mar 5, 2025

Copy link
Copy Markdown
Member

@SchrodingersGat fixed in #9243

@matmair

matmair commented Mar 5, 2025

Copy link
Copy Markdown
Member

We should not be merging anything if the central schema is incorrect. That might lead to hard-to-debug changes if inadvertently something else was also changed in the PRs as it is very hard to spot

matmair added a commit that referenced this pull request Mar 5, 2025
The API version was not corretly changed in #9131 - this fixes it.

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

Labels

migration Data or schema migrations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FR] Increase character count for external Links as Attachments (currently 200 chars only)

4 participants