fix(knowledge): carry the requested entityStatus onto the created page - #31728
fix(knowledge): carry the requested entityStatus onto the created page#31728Vishnuujain wants to merge 6 commits into
Conversation
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
🔴 Playwright Results — workflow failedValidated commit ✅ 0 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky Pipeline and setup failures (26)
Performance⚪ Performance metrics unavailable; see the CI and reporting failures above.
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
|
🚦 Removed from the merge queue —
|
🚦 Removed from the merge queue —
|
Code Review ✅ ApprovedPropagates the requested entityStatus through the KnowledgePageMapper and includes focused unit tests covering explicit status propagation and omitted values. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |



fixes: #31754
CreatePagecarriesentityStatus, butKnowledgePageMapper.createToEntitynever copied it and the sharedEntityMapper.copydoes not either. The value was validated at the API boundary and then dropped before the entity was built, so every page was persisted asUnprocessedno matter what the caller asked for.One line, matching the existing
DataContractMapperprecedent. Safe becauseEntityRepository.setDefaultStatusonly fills inUnprocessedwhen the value is still null, so omitting it still defaults correctly.Verified live
Creating pages with each of the seven
EntityStatusvalues and reading them back: all seven persist; omitting the field still yieldsUnprocessed.Tests
Two: a requested status reaches the entity, and an absent one is left for the repository default.
Found while testing MCP's
create_article, but it is a general mapper bug on anyPOST /v1/contextCenter/pages— split out of #31723 to keep that PR scoped toopenmetadata-mcp/.Greptile Summary
The PR propagates
CreatePage.entityStatusthroughKnowledgePageMapperand adds focused mapper tests.Page.Confidence Score: 4/5
The PR is not yet safe to merge because an omitted entityStatus can still be persisted as Approved instead of receiving the repository's Unprocessed default.
The mapper copies a generated non-null default before repository preparation, while the omission test merely mirrors that request value and therefore does not prevent the previously reported incorrect persisted status.
Files Needing Attention: openmetadata-service/src/main/java/org/openmetadata/service/resources/knowledge/KnowledgePageMapper.java; openmetadata-service/src/test/java/org/openmetadata/service/resources/knowledge/KnowledgePageMapperTest.java
Important Files Changed
Reviews (6): Last reviewed commit: "Merge branch 'main' into fix/knowledge-p..." | Re-trigger Greptile
Context used: