Skip to content

fix: glue health check should probe configured catalog_id - #142

Merged
prasadlohakpure merged 1 commit into
mainfrom
fix/glue-health-check-catalog-id
Aug 31, 2026
Merged

fix: glue health check should probe configured catalog_id#142
prasadlohakpure merged 1 commit into
mainfrom
fix/glue-health-check-catalog-id

Conversation

@prasadlohakpure

@prasadlohakpure prasadlohakpure commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Problem

The /clusters/health glue health check calls glue:GetDatabases with no CatalogId, so it always probes the default catalog for the account the task role runs in — not the catalog_id actually configured for the glue command (842676014003 in prod config). This is failing:

AccessDeniedException: User: arn:aws:sts::1226xxxxx428:assumed-role/<heimdall-aws-identity>/...
is not authorized to perform: glue:GetDatabases on resource:
arn:aws:glue:us-west-2:1226xxxxx428:catalog

The glue plugin does not have flexibility to define catalog arn on which it wants to perform health check. Bases on the role/identity assigned it will try health check default catalog within same AWS account.

Fix

Pass the command's configured CatalogId through to GetDatabases, so the health check validates access to the catalog the command actually depends on, instead of an unrelated default catalog.

Testing

  • ./build.sh --go — all commands and plugins (including glue) build cleanly.

🤖 Generated with Claude Code

Copilot AI lite review requested due to automatic review settings August 31, 2026 05:58

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.

Pull request overview

This PR updates the Glue plugin’s cluster health check so it probes the configured Glue Data Catalog (via CatalogId) instead of implicitly targeting the caller account’s default catalog, aligning the health check with production configuration and IAM scoping.

Changes:

  • Build a GetDatabases request object and conditionally attach CatalogId from the Glue command configuration.
  • Use the configured catalog when performing the /clusters/health Glue connectivity probe.

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

Comment thread internal/pkg/object/command/glue/glue.go Outdated
@prasadlohakpure
prasadlohakpure force-pushed the fix/glue-health-check-catalog-id branch from c11783d to f6d93d4 Compare August 31, 2026 06:12
The glue plugin's HealthCheck was calling glue:GetDatabases without a
CatalogId, so it always probed the default catalog for the account the
task role runs in, instead of the catalog_id configured for the glue
command. This meant the health check exercised a different Glue
catalog than the one Execute() actually uses (via GetTable), and was
failing with AccessDeniedException because heimdall-task-role has no
glue:GetDatabases grant on that unrelated default catalog.

Pass the command's configured CatalogId through to GetDatabases so the
health check validates the catalog access the command actually
depends on.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@prasadlohakpure
prasadlohakpure force-pushed the fix/glue-health-check-catalog-id branch from f6d93d4 to d186e8a Compare August 31, 2026 06:14
@prasadlohakpure
prasadlohakpure merged commit 6d8a786 into main Aug 31, 2026
7 checks passed
@prasadlohakpure
prasadlohakpure deleted the fix/glue-health-check-catalog-id branch August 31, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants