Fix #911: decouple project editing from BOM size - #1488
Open
T0b121 wants to merge 1 commit into
Open
Conversation
Remove the complete BOM collection from the project metadata form. Project rename and move operations now submit only project metadata. Keep BOM management available through the paginated BOM table with separate edit and delete operations per BOM entry. Avoid loading all BOM entries for project edit history and validation. Add regression fixtures and tests for BOM imports with 100 to 1500 entries.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #911
Problem
Editing or moving a project submitted the complete BOM as part of the project metadata form.
For projects with hundreds or thousands of BOM entries, this created a very large POST request. Each BOM entry contributed multiple form fields, so PHP's default
max_input_varslimit could be reached at roughly 142 entries. This caused incomplete requests and failures such as invalid CSRF tokens.This PR does not increase PHP limits. Instead, it removes the unnecessary BOM data from project metadata operations.
Reproduction and observed behavior
I also tested the previously suggested workaround of increasing the relevant request/buffer limits. This allowed the form submission to complete, but it did not solve the underlying scalability problem.
The issue is therefore not only the request-size limit. Loading, rendering, validating, and submitting the complete BOM as part of a project metadata operation does not scale.
Changes
Screenshots
Paginated BOM table with 1501 entries
The BOM is displayed server-side paginated. The screenshot also shows a BOM entry added after the large CSV import.
Last page of the BOM table
The final page confirms that the complete BOM remains accessible without being included in the project metadata form.
Separate BOM entry editing
Each BOM entry can be edited or deleted separately, including an optional change comment.
Project metadata editing
Project metadata editing no longer renders or submits all BOM entries.
Verification
Automated:
The targeted tests cover:
Manual production-mode test:
Review note
I mainly work with Python and JavaScript for data processing and have not worked with PHP or web UI design for more than ten years. I used AI assistance while investigating and implementing this proposal.
The targeted automated tests and the manual production-mode test passed. Before merging, I would therefore especially appreciate a maintainer review of the Symfony/Doctrine conventions, the UI integration, validation behavior, and potential side effects.