Skip to content

[#12990] fix(catalog-glue): Include the AWS error detail in Glue failure messages - #12991

Open
diqiu50 wants to merge 3 commits into
apache:mainfrom
diqiu50:fix/12990-glue-aws-error-detail
Open

[#12990] fix(catalog-glue): Include the AWS error detail in Glue failure messages#12991
diqiu50 wants to merge 3 commits into
apache:mainfrom
diqiu50:fix/12990-glue-aws-error-detail

Conversation

@diqiu50

@diqiu50 diqiu50 commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Append the AWS error code and message to the exception GlueExceptionConverter returns from its fallback branch, leaving the recognised branches and all call sites unchanged.

Why are the changes needed?

The fallback branch reported every failure as Glue error: <object> and discarded the AWS message, so an operator hitting an AccessDeniedException could not tell which permission was missing or on which resource.

Fix: #12990

Does this PR introduce any user-facing change?

Glue error messages now carry the AWS error code and message, which name the IAM principal and resource.

How was this patch tested?

Unit tests for the enriched message, the fallbacks when AWS supplies no detail, and the unchanged branches.

…e failure messages

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QSH2qgg3eHh7acHzUkHrS4
Copilot AI lite review requested due to automatic review settings September 8, 2026 09:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Pull request overview

This PR improves the usefulness of Glue-related exception messages by including AWS-provided error codes and messages in the converter’s fallback branch, and adds unit tests to validate the enriched output and existing mappings.

Changes:

  • Enrich fallback RuntimeException messages with AWS error details (code/message) when available.
  • Add awsErrorDetail(...) helper to render best-effort AWS error information.
  • Add unit tests covering enriched messages and existing recognized exception mappings.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.

File Description
catalogs/catalog-glue/src/main/java/org/apache/gravitino/catalog/glue/GlueExceptionConverter.java Appends AWS error detail to fallback error messages and adds helper to render AWS error info safely.
catalogs/catalog-glue/src/test/java/org/apache/gravitino/catalog/glue/TestGlueExceptionConverter.java Adds unit tests validating enriched fallback messages and unchanged recognized exception mappings.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@diqiu50 diqiu50 self-assigned this Sep 8, 2026
@diqiu50 diqiu50 added the branch-1.3 Automatically cherry-pick commit to branch-1.3 label Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Code Coverage Report

Overall Project 69.66% +0.11% 🟢
Files changed 89.84% 🟢

Module Coverage
aliyun 19.74% 🔴
api 51.57% 🟢
authorization-common 85.96% 🟢
authorization-ranger 4.38% 🔴
aws 53.54% 🟢
azure 32.1% 🔴
catalog-common 25.76% 🔴
catalog-fileset 82.17% 🟢
catalog-glue 70.47% +0.54% 🟢
catalog-hive 82.96% 🟢
catalog-jdbc-common 45.09% 🟢
catalog-jdbc-doris 82.69% 🟢
catalog-jdbc-mysql 79.33% 🟢
catalog-jdbc-postgresql 83.83% 🟢
catalog-jdbc-starrocks 79.16% 🟢
catalog-kafka 76.99% 🟢
catalog-lakehouse-generic 60.88% 🟢
catalog-lakehouse-hudi 79.1% 🟢
catalog-lakehouse-iceberg 85.9% 🟢
catalog-lakehouse-paimon 84.29% 🟢
catalog-model 77.99% 🟢
cli 44.51% 🟢
client-java 77.5% 🟢
common 57.75% 🟢
core 84.29% 🟢
filesystem-hadoop3 76.48% 🟢
flink 0.0% 🔴
flink-common 53.22% 🟢
flink-runtime 0.0% 🔴
gcp 32.2% 🔴
hadoop-auth 68.0% 🟢
hadoop-common 17.84% 🔴
hive-metastore-common 53.5% 🟢
iceberg-aliyun-bundle 0.0% 🔴
iceberg-common 66.89% 🟢
iceberg-rest-server 76.59% 🟢
idp-basic 87.1% +2.41% 🟢
integration-test-common 0.0% 🔴
jobs 62.92% 🟢
lance-common 32.52% 🔴
lance-rest-server 68.12% 🟢
lineage 59.39% 🟢
optimizer 83.24% 🟢
optimizer-api 21.95% 🔴
server 89.62% 🟢
server-common 81.35% 🟢
spark 56.27% 🟢
tencent 81.78% 🟢
trino-connector 58.36% 🟢
Files
Module File Coverage
catalog-glue GlueExceptionConverter.java 100.0% 🟢
idp-basic IdpGroupDTO.java 100.0% 🟢
IdpUserDTO.java 100.0% 🟢
IdpGroupMetaBaseSQLProvider.java 100.0% 🟢
IdpUserGroupRelBaseSQLProvider.java 100.0% 🟢
IdpUserMetaBaseSQLProvider.java 100.0% 🟢
IdpGroupMetaH2Provider.java 100.0% 🟢
IdpUserMetaH2Provider.java 100.0% 🟢
IdpGroupMetaPostgreSQLProvider.java 100.0% 🟢
IdpUserMetaPostgreSQLProvider.java 100.0% 🟢
IdpUserOperations.java 100.0% 🟢
IdpRESTUtils.java 97.62% 🟢
IdpUserMetaService.java 97.06% 🟢
IdpGroupMetaService.java 95.4% 🟢
IdpUserMetaSQLProviderFactory.java 93.33% 🟢
IdpUserGroupManager.java 93.2% 🟢
IdpUserPO.java 91.67% 🟢
IdpGroupPO.java 90.0% 🟢
IdpUserGroupRelPO.java 90.0% 🟢
IdpPOConverters.java 73.33% 🟢
IdpUserWithGroupsPO.java 66.67% 🟢
IdpAuthorizationFilter.java 63.64% 🟢
IdpUser.java 58.06% 🔴
IdpGroup.java 42.86% 🔴
IdpGroupWithUsersPO.java 42.86% 🔴
IdpUserMetaMapper.java 0.0% 🔴

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch-1.3 Automatically cherry-pick commit to branch-1.3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug report] Glue catalog reports every failure as "Glue error: <object>" and discards the AWS cause

2 participants