Skip to content

fix(knowledge): carry the requested entityStatus onto the created page - #31728

Open
Vishnuujain wants to merge 6 commits into
mainfrom
fix/knowledge-page-entity-status
Open

fix(knowledge): carry the requested entityStatus onto the created page#31728
Vishnuujain wants to merge 6 commits into
mainfrom
fix/knowledge-page-entity-status

Conversation

@Vishnuujain

@Vishnuujain Vishnuujain commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

fixes: #31754

CreatePage carries entityStatus, but KnowledgePageMapper.createToEntity never copied it and the shared EntityMapper.copy does not either. The value was validated at the API boundary and then dropped before the entity was built, so every page was persisted as Unprocessed no matter what the caller asked for.

One line, matching the existing DataContractMapper precedent. Safe because EntityRepository.setDefaultStatus only fills in Unprocessed when the value is still null, so omitting it still defaults correctly.

Verified live

Creating pages with each of the seven EntityStatus values and reading them back: all seven persist; omitting the field still yields Unprocessed.

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 any POST /v1/contextCenter/pages — split out of #31723 to keep that PR scoped to openmetadata-mcp/.

Greptile Summary

The PR propagates CreatePage.entityStatus through KnowledgePageMapper and adds focused mapper tests.

  • Copies the requested status onto the created Page.
  • Covers explicit, omitted, and null status inputs at the mapper boundary.

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

Filename Overview
openmetadata-service/src/main/java/org/openmetadata/service/resources/knowledge/KnowledgePageMapper.java Propagates the create request's entity status onto the mapped Page.
openmetadata-service/src/test/java/org/openmetadata/service/resources/knowledge/KnowledgePageMapperTest.java Adds mapper tests for requested, omitted, and explicitly null status values.

Reviews (6): Last reviewed commit: "Merge branch 'main' into fix/knowledge-p..." | Re-trigger Greptile

Context used:

@Vishnuujain
Vishnuujain requested a review from a team as a code owner August 19, 2026 06:35
@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

@github-actions github-actions Bot added the safe to test Add this label to run secure Github workflows on PRs label Aug 19, 2026
@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

🔴 Playwright Results — workflow failed

Validated commit 079a83bc24a7cd193dc5b143a38baa346fd77953 in Playwright run 32465415833, attempt 1.

✅ 0 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky

Pipeline and setup failures (26)

  • Seeded fixture preparation finished with status failure.
  • The Playwright shard matrix was unexpectedly skipped.
  • Shard chromium-01 did not upload a usable Playwright results artifact.
  • Shard chromium-02 did not upload a usable Playwright results artifact.
  • Shard chromium-03 did not upload a usable Playwright results artifact.
  • Shard chromium-04 did not upload a usable Playwright results artifact.
  • Shard chromium-05 did not upload a usable Playwright results artifact.
  • Shard data-asset-rules-01 did not upload a usable Playwright results artifact.
  • Shard domain-isolation-01 did not upload a usable Playwright results artifact.
  • Shard global-state-01 did not upload a usable Playwright results artifact.
  • Shard ingestion-01 did not upload a usable Playwright results artifact.
  • Shard reindex-01 did not upload a usable Playwright results artifact.
  • Shard search-01 did not upload a usable Playwright results artifact.
  • Shard search-rbac-01 did not upload a usable Playwright results artifact.
  • Shard chromium-01 did not upload its execution status.
  • Shard chromium-02 did not upload its execution status.
  • Shard chromium-03 did not upload its execution status.
  • Shard chromium-04 did not upload its execution status.
  • Shard chromium-05 did not upload its execution status.
  • Shard data-asset-rules-01 did not upload its execution status.
  • Shard domain-isolation-01 did not upload its execution status.
  • Shard global-state-01 did not upload its execution status.
  • Shard ingestion-01 did not upload its execution status.
  • Shard reindex-01 did not upload its execution status.
  • Shard search-01 did not upload its execution status.
  • Shard search-rbac-01 did not upload its execution status.

Performance

⚪ Performance metrics unavailable; see the CI and reporting failures above.

Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
⛔ Shard chromium-01
⛔ Shard chromium-02
⛔ Shard chromium-03
⛔ Shard chromium-04
⛔ Shard chromium-05
⛔ Shard data-asset-rules-01
⛔ Shard domain-isolation-01
⛔ Shard global-state-01
⛔ Shard ingestion-01
⛔ Shard reindex-01
⛔ Shard search-01
⛔ Shard search-rbac-01

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@Vishnuujain Vishnuujain self-assigned this Aug 19, 2026
@sonarqubecloud

Copy link
Copy Markdown

@Vishnuujain
Vishnuujain added this pull request to the merge queue Aug 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — failed_checks (2026-08-20T14:40:22Z)

Blocked the queue: playwright-summary

@Vishnuujain
Vishnuujain added this pull request to the merge queue Aug 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — failed_checks (2026-08-20T21:20:07Z)

Blocked the queue: py-tests-status, py-tests-status

  • py-tests — py-tests-status, python / Verify Expected Jobs, python / Integration Tests (shard-2), python / Integration Tests (shard-2), python / Integration Tests (shard-2)
  • py-tests-postgres — py-tests-status, python / Verify Expected Jobs, python / Integration Tests (shard-2), python / Integration Tests (shard-2), python / Integration Tests (shard-2)

@gitar-bot

gitar-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Propagates the requested entityStatus through the KnowledgePageMapper and includes focused unit tests covering explicit status propagation and omitted values. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@Vishnuujain
Vishnuujain enabled auto-merge August 21, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Knowledge page creation drops the requested entityStatus

2 participants