Repository navigation
Fix #23445: User with Owner role unable to update Incident Status via API - #23448
Merged
Merged
Conversation
ShaileshParmar11
had a problem deploying
to
test
September 18, 2025 04:57 — with
GitHub Actions
Failure
ShaileshParmar11
had a problem deploying
to
test
September 18, 2025 04:57 — with
GitHub Actions
Failure
ShaileshParmar11
had a problem deploying
to
test
September 18, 2025 04:57 — with
GitHub Actions
Failure
ShaileshParmar11
had a problem deploying
to
test
September 18, 2025 04:57 — with
GitHub Actions
Failure
harshach
force-pushed
the
issue-23445
branch
from
September 18, 2025 05:40
016cf9b to
99d74d5
Compare
TeddyCr
previously approved these changes
Sep 18, 2025
ShaileshParmar11
had a problem deploying
to
test
September 25, 2025 04:47 — with
GitHub Actions
Failure
ShaileshParmar11
temporarily deployed
to
test
September 25, 2025 04:47 — with
GitHub Actions
Inactive
ShaileshParmar11
had a problem deploying
to
test
September 25, 2025 04:47 — with
GitHub Actions
Failure
ShaileshParmar11
had a problem deploying
to
test
September 25, 2025 04:47 — with
GitHub Actions
Failure
ShaileshParmar11
had a problem deploying
to
test
September 25, 2025 10:31 — with
GitHub Actions
Error
ShaileshParmar11
had a problem deploying
to
test
September 25, 2025 10:31 — with
GitHub Actions
Error
ShaileshParmar11
had a problem deploying
to
test
September 25, 2025 10:31 — with
GitHub Actions
Error
ShaileshParmar11
had a problem deploying
to
test
September 25, 2025 10:31 — with
GitHub Actions
Error
ShaileshParmar11
had a problem deploying
to
test
September 26, 2025 04:27 — with
GitHub Actions
Failure
ShaileshParmar11
had a problem deploying
to
test
September 26, 2025 04:27 — with
GitHub Actions
Failure
ShaileshParmar11
temporarily deployed
to
test
September 26, 2025 04:27 — with
GitHub Actions
Inactive
ShaileshParmar11
temporarily deployed
to
test
September 26, 2025 04:27 — with
GitHub Actions
Inactive
|
chirag-madlani
approved these changes
Sep 26, 2025
mohityadav766
approved these changes
Sep 26, 2025
|
Contributor
|
Failed to cherry-pick changes to the 1.9.11 branch. |
This was referenced Sep 2, 2026
Closed
Ahmad986Ferdaws
pushed a commit
to Ahmad986Ferdaws/OpenMetadata
that referenced
this pull request
Sep 5, 2026
…ead of a 500 (open-metadata#32492) * fix(dq): return 404 from the incident-status by-id endpoints instead of a 500 EntityTimeSeriesRepository.getById answers a missing row with null. Both the read and the patch handler on TestCaseResolutionStatusResource dereference that record to resolve the test case their authorization check is scoped to, so an id with no row threw a NullPointerException that the exception mapper rendered as a 500: Cannot invoke "TestCaseResolutionStatus.getTestCaseReference()" because "testCaseResolutionStatus" is null The dereference arrived with open-metadata#23448, which replaced the static authorize call with a data-driven one; before that the handler returned the null straight out and a missing row was simply an empty body. Two ids are in play on this resource: the record id on /{id} and the incident stateId on /stateId/{stateId}. TestCase.incidentId carries the stateId, so any client that feeds it to the by-id endpoint misses the record table every time and takes the 500 rather than a 404 it could handle. Resolve the record through one helper that throws EntityNotFoundException, and document the 404 on the operation so the generated spec matches. Leaves EntityTimeSeriesRepository.getById returning null: eight other resources call it and some callers depend on the null. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013D3LpP12bP6RBF2tFo5Rmn * refactor(dq): move the not-found guard onto EntityTimeSeriesRepository The guard belongs in the layer that produces the null, not in one resource. getByIdOrNotFound sits next to getById, builds its message from the repository's own entityType through CatalogExceptionMessage, and is available to every time-series resource that has to dereference the record it just read — QueryCostResource.get has the same unguarded dereference today. patch keeps its own inline check rather than routing through this. It reads the raw JSON and deliberately skips setInheritedFields; going through getById would populate testCaseReference on the original and change what the patch diff sees. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013D3LpP12bP6RBF2tFo5Rmn * test(dq): cover the PATCH by-id 404 alongside GET The PATCH handler resolves the record through the same getByIdOrNotFound guard, so it regresses to the same 500 if that guard is dropped, but only GET was asserted. Both new cases fail with 500 when the guard is removed from the handler. An empty patch is enough: the record is resolved, and the 404 thrown, before the patch is applied. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013D3LpP12bP6RBF2tFo5Rmn * fix(query): return 404 from the query-cost by-id endpoint instead of a 500 QueryCostResource.get has the same defect the incident-status handler had: it reads the record with getById, which answers a missing row with null, then dereferences it at costRecord.getQueryReference().getId() to scope the authorization check. An id with no row was a NullPointerException rendered as a 500. Route it through the getByIdOrNotFound guard added for the incident-status handlers, and document the 404 on the operation. Also renames the path-param variable from testCaseResolutionStatusId to id. The handler was copied from TestCaseResolutionStatusResource and kept the original name; the wire contract is unaffected since the @PathParam value is already "id". Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013D3LpP12bP6RBF2tFo5Rmn --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This branch was previously deployed
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.



… API
Describe your changes:
Fixes
I worked on ... because ...
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>