Skip to content

audit: add missing audit log entry for ALTER TABLE ADD COLUMN#36449

Open
def- wants to merge 3 commits into
MaterializeInc:mainfrom
def-:audit-log-alter-add-column
Open

audit: add missing audit log entry for ALTER TABLE ADD COLUMN#36449
def- wants to merge 3 commits into
MaterializeInc:mainfrom
def-:audit-log-alter-add-column

Conversation

@def-
Copy link
Copy Markdown
Contributor

@def- def- commented May 7, 2026

The Op::AlterAddColumn handler was missing an audit log entry, unlike every other ALTER operation. This adds an AlterAddColumnV1 event that records the table ID, column name, column type, and nullability.

Introduced in #30470.

Nightly: https://buildkite.com/materialize/nightly/builds/16364

@def- def- requested a review from a team as a code owner May 7, 2026 05:37
@def- def- requested a review from aljoscha May 7, 2026 05:38
@def- def- force-pushed the audit-log-alter-add-column branch from cda2efc to a54c295 Compare May 7, 2026 13:58
The `Op::AlterAddColumn` handler was missing an audit log entry, unlike
every other ALTER operation. This adds an `AlterAddColumnV1` event that
records the table ID, column name, column type, and nullability.

Introduced in MaterializeInc#30470.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@def- def- force-pushed the audit-log-alter-add-column branch from a54c295 to 3cf5c0c Compare May 8, 2026 01:05
@def- def- changed the title audit: add missing audit log entry for ALTER TABLE ADD COLUMN audit: add missing audit log entry for ALTER TABLE ADD COLUMN May 8, 2026
…ERVAL)

`Op::AlterSourceTimestampInterval` previously updated the catalog item
without writing to `mz_audit_events`, leaving an observability/compliance
gap for a change that materially affects ingestion latency. Mirror the
`AlterRetainHistory` shape: add an `AlterSourceTimestampIntervalV1` event
variant (id, old_interval, new_interval), have
`CatalogItem::update_timestamp_interval` return the previous value, and
call `add_to_audit_log` from the op handler.

The new variant rides on the existing v82 -> v83 migration alongside
`AlterAddColumnV1`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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