Repository navigation
893 tag features into 892 - #951
nattynerdy wants to merge 5 commits into
Conversation
The unknown parent error at the Plan step named no row. Its only locator was the step number #N, which counts every step in the Plan, deletes included, and rows are not built in file order, so #N usually differs from the row. An administrator could not tell which row to fix, or tell apart several rows naming the same missing parent. ImportAction._validate_parent now builds either of its two parent errors, the stale parent error from openedx#858 or the unknown parent error, and adds the "Row N: " prefix once, at a single return. Steps that no row describes have no row and keep the unprefixed text. Co-Authored-By: Claude Opus 5.5 <[email protected]>
TagImportPlan._validate_hierarchy skipped a parent cycle made only of new tags. The per-row check then reported one of its rows as an "Unknown parent tag", although the file has a row for that parent. The hierarchy walk now reports every cycle that has a row in the file, once, on the cycle's first row. It records the 1-based rows of each reported cycle in indexed_actions["_rows_on_a_cycle"], and _validate_parent returns no unknown parent error for those rows, since every parent on a cycle is a tag of the final tree. The stale parent error is still reported for a row on a cycle. _validate_hierarchy drops its pk_of parameter, which nothing in it reads any more. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The ParentCycleError docstring said its row is 1-based "as in DuplicateFinalIdError", but that class's docstring does not state the convention. TagImportPlan._validate_no_duplicate_final_ids does, so the note now points there. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…#893) A replace import deletes every tag the file has no row for. A row whose parent_id named such a tag passed the plan, and the delete phase then promoted the row's tag to the root, so the tag silently lost its parent. The plan now checks each row against the tags it deletes. A parent_id naming a deleted tag, with no tag of the final tree holding that id, is reported on its row as DeletedParentError. A tag renamed onto the deleted id holds it in the final tree, so such a row is accepted. Changed outcome: a full replace file in which a kept tag's row names its own parent, with no row for that parent, imported successfully before and moved the tag to the root. That file is now rejected at the Plan step. Imports with replace=False delete nothing and are unaffected. Co-Authored-By: Claude Opus 5.5 <[email protected]>
) Scenarios added to TestImportAcceptanceScenarios: - a row naming a deleted parent is rejected when it moves a tag, keeps its deleted parent, creates a tag, renames a tag, spells the parent in another case, or names a tag inside a deleted chain - every row naming a deleted tag gets its own error in one pass - a kept child of a deleted tag moves under the kept tag its row names - kept tags under deleted ancestors keep their content associations - a child naming the id of a deleted holder in another case ends up under the tag renamed onto that id Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Thanks for the pull request, @nattynerdy! 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. 🔘 Update the status of your PRYour PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate. Where 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. |
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
Summary by CodeRabbit