fix: enforce MAX_BLOCKS_PER_CONTENT_LIBRARY when creating containers#38801
fix: enforce MAX_BLOCKS_PER_CONTENT_LIBRARY when creating containers#38801Chessing234 wants to merge 1 commit into
Conversation
|
Thanks for the pull request, @Chessing234! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Submit a signed contributor agreement (CLA)
If you've signed an agreement in the past, you may need to re-sign. Once you've signed the CLA, please allow 1 business day for it to be processed. 🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
46e4db8 to
b6101a9
Compare
|
Hi @Chessing234! Welcome, and thank you for this contribution! In order for your CLA check to turn green, you'll need to submit a CLA form. If you are contributing as an individual, please fill out the individual CLA form here. If you are contributing on behalf of an organization, please have your manager reach out to oscm@axim.org so you may be added to your org's existing entity agreement. Please let me know if you have any questions. Thanks! |
Hi @Chessing234! Just checking in on this to see if you plan to pursue the pull requests you've drafted. Thanks! |
|
@Chessing234 |
|
@Chessing234 it looks like there are some failing checks, can you have a look? Please note that we use conventional commits across Open edX projects, I see some failures here. You can read about the details here. Can you please amend your commit messages to follow our standard? |
|
Thanks — I'll align the commit messages to conventional commits. CLA is still pending on my side. |
Container creation bypassed the draft-count limit that already applies to component creation, allowing empty units/sections past the library cap. Co-authored-by: Cursor <cursoragent@cursor.com>
763c966 to
6394ab1
Compare
|
@e0d Commit messages are now conventional ( CLA still needs signing on my side before that check can go green. |
|
Pulled the master merge and fixed the conventional-commit / commitlint failure. CLA still pending on my side. |
Summary
create_container()did not checkMAX_BLOCKS_PER_CONTENT_LIBRARYbefore adding a draft container, so users at the component limit could still create empty units/sections. This adds the same draft-count guard used invalidate_can_add_block_to_library().Fixes #37697
Test plan
MAX_BLOCKS_PER_CONTENT_LIBRARYto a low value (e.g. 5)BlockLimitReachedErroris raisedMade with Cursor