Skip to content

refactor(backend-parser): remove unused legacy query generator wrapper functions across audit log tasks - #1005

Merged
kyasbal merged 1 commit into
GoogleCloudPlatform:mainfrom
kyasbal:push-vmuvpyovvtty
Sep 15, 2026
Merged

kyasbal merged 1 commit into
GoogleCloudPlatform:mainfrom
kyasbal:push-vmuvpyovvtty

Conversation

@kyasbal

@kyasbal kyasbal commented Sep 15, 2026

Copy link
Copy Markdown
Member

Summary

Removes 12 unused legacy string-based query generator wrapper functions (Generate*Query / generate*Query) across Google Cloud audit log inspection tasks that were called exclusively in unit tests.

Details

  • Removed unused Generate*Query / generate*Query functions from production code across 11 audit log inspection packages:
    • googlecloudlogcomposerapiaudit
    • googlecloudlogcomputeapiaudit
    • googlecloudlogcsm (Istio access logs & Traffic Director logs)
    • googlecloudloggkeapiaudit
    • googlecloudloggkeautoscaler
    • googlecloudlogk8saudit
    • googlecloudlogk8snode
    • googlecloudlogmulticloudapiaudit
    • googlecloudlognetworkapiaudit
    • googlecloudlogonpremapiaudit
    • googlecloudlogserialport
  • Updated all corresponding unit tests to invoke .GenerateCloudLoggingQuery() directly on Generate*StructuredQuery(...) results, eliminating redundant test-only shims and aligning with KHI development guidelines.
  • Renamed unit test functions (TestGenerate*QueryIsValid -> TestGenerate*StructuredQueryIsValid) to accurately match the structured query generators under test.
@kyasbal
kyasbal requested a review from RyuSA as a code owner September 15, 2026 07:38
@kyasbal kyasbal added the area:backend-parser Log parsers and log timeline mapper tasks label Sep 15, 2026
@kyasbal
kyasbal requested a review from jyane as a code owner September 15, 2026 07:38
@kyasbal kyasbal added the type:refactor Code refactoring without behavioral change label Sep 15, 2026

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request removes several legacy, non-structured query generation functions (such as GenerateComposerAuditQuery, GenerateComputeAPIQuery, and others) across various Google Cloud logging task packages, aligning with the repository's policy of not retaining legacy shims or wrappers. The corresponding unit tests have been updated to directly call the structured query generators and invoke GenerateCloudLoggingQuery() on them. There are no review comments, so I have no feedback to provide.

@kyasbal
kyasbal enabled auto-merge September 15, 2026 07:41
@kyasbal
kyasbal added this pull request to the merge queue Sep 15, 2026
Merged via the queue into GoogleCloudPlatform:main with commit e08788a Sep 15, 2026
17 checks passed
@kyasbal
kyasbal deleted the push-vmuvpyovvtty branch September 15, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:backend-parser Log parsers and log timeline mapper tasks type:refactor Code refactoring without behavioral change

1 participant