Skip to content

v0.5.556

@ruolin59 ruolin59 tagged this 13 Nov 01:58
## Summary

<!--- HINT: Replace #nnn with corresponding Issue number, if you are
fixing an existing issue -->

Follow-up to merged core views refactor
[#843](https://github.com/linkedin/openhouse/pull/843). Adds view
request and handler-level operation auditing while removing
request-payload redaction and view-specific log suppression. Request
audit events and default logs contain the full parsed view payload,
including SQL, schema, properties and `baseMetadataLocation`.

## Changes

- [ ] Client-facing API Changes
- [x] Internal API Changes
- [ ] Bug Fixes
- [x] New Features
- [ ] Performance Improvements
- [ ] Code Style
- [x] Refactoring
- [ ] Documentation
- [x] Tests

For all the boxes checked, please include additional details of the
changes made in this pull request.

**Internal API Changes**

- Removes the published `ServiceAuditPayloadRedactor` interface and its
`REDACTED_VALUE` constant, along with `ViewRequestPayloadRedactor`.
Consumers implementing or wiring those types must adjust.
- Custom `AuditHandler<ServiceAuditEvent>` sinks receive the complete
parsed request payload. Default audit and request-audit failure logs may
contain SQL, schema and metadata pointers. No authentication headers or
credentials are newly captured.
- View operation events use a reduced schema: timestamp, cluster,
requested database/view, authenticated user, operation type, status,
response metadata location and controlled failure code/message. They no
longer contain view UUID, old metadata location, source dialect or
session ID. `OperationStatus.UNKNOWN` and
`ViewOperationType.CREATE_OR_REPLACE` are removed.

**New Features**

- Handler-level `@Around` advice audits view create, replace and drop
outcomes. Handler-validation failures now produce failed operation
events; requests rejected before the handler and read operations do not.
- An uncertain commit is audited as `FAILED` with
`COMMIT_STATE_UNKNOWN`; this does not assert that the commit failed or
change the API's 503/no-retry behavior. Sink failures do not change the
handler outcome.
- Operation events do not include a committed property snapshot.
Submitted properties are captured by request auditing. No persistent
operation audit sink is added.

**Refactoring**

- Removes the payload-redactor extension, diagnostic policy, route
matcher and their request-log suppression branches. View operation
auditing follows the table handler-aspect pattern rather than
service-owned emission.

**Tests**

- Covers handler aspect wiring, create/replace/drop classification,
controlled failure details, sink isolation, validation boundaries and
timestamp/cluster sources. Existing request audit, HTTP safety, business
and unknown-commit behavior remain covered.

## Testing Done
<!--- Check any relevant boxes with "x" -->

- [ ] Manually Tested on local docker setup. Please include commands
ran, and their output.
- [x] Added new tests for the changes made.
- [x] Updated existing tests to reflect the changes made.
- [ ] No tests added or updated. Please explain why. If unsure, please
feel free to ask for help.
- [ ] Some other form of testing like staging or soak time in
production. Please explain.

For all the boxes checked, include a detailed description of the testing
done for the changes made in this pull request.

Executed with JDK 17:

```bash
./gradlew -I "$IS" -x CopyGitHooksTask \
  :services:common:test :services:tables:test \
  :services:common:spotlessJavaCheck :services:tables:spotlessJavaCheck \
  --console=plain
```

Result: **BUILD SUCCESSFUL in 5m 14s**, exit 0; 5 tasks executed and 53
up-to-date. The tables suite executed: **1,183 tests passed, zero
failures/errors/skips**. Common tests and both Spotless checks were
up-to-date; existing common results report 37 passing tests. `$IS` is a
local init script relocating OpenAPI generation ports; `-x
CopyGitHooksTask` accommodates a linked worktree. Docker was not run.

# Additional Information

- [x] Breaking Changes
- [ ] Deprecations
- [ ] Large PR broken into smaller PRs, and PR plan linked in the
description.

For all the boxes checked, include additional details of the changes
made in this pull request.

The published redactor API is removed and request audit sinks/default
logs receive SQL, schema and metadata pointers rather than the earlier
redacted or suppressed content. Consumers relying on the removed types
or logging behavior must adjust. View operation event fields and enum
values are reduced as described above; consumers must account for
handler-validation events and uncertain commits recorded as `FAILED`
with `COMMIT_STATE_UNKNOWN`. HTTP error-response safety remains
unchanged. This audit follow-up remains separate from the already merged
#843.

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Assets 2
Loading