Skip to content

[Cherry-pick to branch-1.3] [#13041] fix(server): Add @ResponseMetered to JobOperations#cancelJob (#13046) - #13070

Merged
jerryshao merged 2 commits into
branch-1.3from
cherry-pick-2fc06930-to-branch-1.3
Sep 10, 2026
Merged

jerryshao merged 2 commits into
branch-1.3from
cherry-pick-2fc06930-to-branch-1.3

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Cherry-pick Information:

  • Original commit: 2fc0693
  • Target branch: branch-1.3
  • Status: ✅ Conflicts resolved

Conflicts in TestJobOperations.java were resolved by keeping only testCancelJobIsResponseMetered from the original commit. The other tests in the conflict block depend on features that are not in branch-1.3.

…#13046)

### What changes were proposed in this pull request?

I added `@ResponseMetered(name = "cancel-job", absolute = true)` on
`JobOperations#cancelJob`, next to the existing `@Timed`, same as the
other eight endpoints in that class.

### Why are the changes needed?

`cancelJob` only had `@Timed`. Without `@ResponseMetered`, the Jersey
listener never registers `gravitino-server.cancel-job.2xx-responses` (or
4xx/5xx), so `/metrics` shows cancel latency but not outcome.

Fix: #13041

### Does this PR introduce _any_ user-facing change?

No API or property changes. Cancel responses start showing up on
`/metrics` like the sibling endpoints.

### How was this patch tested?

```
./gradlew :server:test --tests org.apache.gravitino.server.web.rest.TestJobOperations.testCancelJobIsResponseMetered -PskipITs
```
# Conflicts:
#	server/src/test/java/org/apache/gravitino/server/web/rest/TestJobOperations.java
@github-actions github-actions Bot added cherry-pick Automatically opened cherry-pick PR cherry-pick-conflict Cherry-pick has conflicts; needs human resolution before merge labels Sep 10, 2026
@github-actions
github-actions Bot requested a review from jerryshao September 10, 2026 04:01
Keep only testCancelJobIsResponseMetered from the original commit; the other
tests in the conflict block depend on features not present in branch-1.3.

Co-Authored-By: Claude Opus 5 <[email protected]>
@jerryshao jerryshao changed the title [DO NOT MERGE] [Cherry-pick to branch-1.3] [#13041] fix(server): Add @ResponseMetered to JobOperations#cancelJob (#13046) [Cherry-pick to branch-1.3] [#13041] fix(server): Add @ResponseMetered to JobOperations#cancelJob (#13046) Sep 10, 2026
@jerryshao jerryshao removed the cherry-pick-conflict Cherry-pick has conflicts; needs human resolution before merge label Sep 10, 2026
@github-actions

Copy link
Copy Markdown
Author

Code Coverage Report

Overall Project 69.33% 🟢
Files changed 69.64% 🟢

Module Coverage
aliyun 19.74% 🔴
api 47.62% 🟢
authorization-common 85.96% 🟢
aws 53.54% 🟢
azure 32.1% 🔴
catalog-common 18.52% 🔴
catalog-fileset 80.51% 🟢
catalog-glue 70.29% 🟢
catalog-hive 79.42% 🟢
catalog-jdbc-clickhouse 84.7% 🟢
catalog-jdbc-common 44.83% 🟢
catalog-jdbc-doris 82.61% 🟢
catalog-jdbc-hologres 54.03% 🟢
catalog-jdbc-mysql 81.8% 🟢
catalog-jdbc-oceanbase 78.6% 🟢
catalog-jdbc-postgresql 83.89% 🟢
catalog-jdbc-starrocks 79.16% 🟢
catalog-kafka 77.27% 🟢
catalog-lakehouse-generic 59.7% 🟢
catalog-lakehouse-hudi 79.1% 🟢
catalog-lakehouse-iceberg 85.98% 🟢
catalog-lakehouse-paimon 82.17% 🟢
catalog-model 77.99% 🟢
cli 44.51% 🟢
client-java 78.31% 🟢
common 50.74% +0.03% 🟢
core 83.27% -0.01% 🟢
filesystem-hadoop3 77.3% 🟢
flink 0.0% 🔴
flink-common 50.47% 🟢
flink-runtime 0.0% 🔴
gcp 32.2% 🔴
hadoop-common 15.43% 🔴
hive-metastore-common 53.89% 🟢
iceberg-aliyun-bundle 0.0% 🔴
iceberg-common 60.69% 🟢
iceberg-rest-server 74.56% +0.29% 🟢
idp-basic 86.76% 🟢
integration-test-common 0.0% 🔴
jobs 66.17% 🟢
lance-common 26.34% 🔴
lance-rest-server 60.32% -10.97% 🟢
lineage 59.39% 🟢
optimizer 82.95% 🟢
optimizer-api 21.95% 🔴
server 89.13% -0.89% 🟢
server-common 77.2% 🟢
spark 28.57% 🔴
spark-common 45.83% 🟢
trino-connector 58.39% 🟢
Files
Module File Coverage
common ErrorResponse.java 53.16% 🔴
core PrincipalUtils.java 65.0% 🟢
iceberg-rest-server IcebergExceptionMapper.java 96.23% 🟢
lance-rest-server LanceExceptionMapper.java 74.42% 🟢
LanceRESTService.java 10.34% 🔴
server JobOperations.java 93.83% 🟢
GravitinoServer.java 64.83% 🟢

@jerryshao
jerryshao merged commit 36d654a into branch-1.3 Sep 10, 2026
36 of 37 checks passed
@jerryshao
jerryshao deleted the cherry-pick-2fc06930-to-branch-1.3 branch September 10, 2026 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick Automatically opened cherry-pick PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants