Skip to content

mz-deploy: enforce database GRANT target in database mod files (DEX-45) - #37373

Open
sjwiesman wants to merge 1 commit into
MaterializeInc:mainfrom
sjwiesman:seth/dex-45-database-grant-target
Open

mz-deploy: enforce database GRANT target in database mod files (DEX-45)#37373
sjwiesman wants to merge 1 commit into
MaterializeInc:mainfrom
sjwiesman:seth/dex-45-database-grant-target

Conversation

@sjwiesman

@sjwiesman sjwiesman commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

The target-database check in a database mod file only inspected
UnresolvedObjectName::Item targets, but GRANT ... ON DATABASE x
parses the target as UnresolvedObjectName::Database. The loop therefore
never ran for a database grant, so a grant on a different database
validated cleanly. Match the Database target and compare its raw name
against the file's database.

Ticket: DEX-45

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

🤖 Generated with Claude Code

https://claude.ai/code/session_01VAcnVpSQi8ZgF5LekQRwvw

The target-database check in a database mod file only inspected
`UnresolvedObjectName::Item` targets, but `GRANT ... ON DATABASE x`
parses the target as `UnresolvedObjectName::Database`. The loop therefore
never ran for a database grant, so a grant on a different database
validated cleanly. Match the `Database` target and compare its raw name
against the file's database.

Ticket: DEX-45

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sjwiesman
sjwiesman marked this pull request as ready for review July 1, 2026 14: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.

1 participant