Skip to content

grpc access logs: include passed in command parsers when validating commands#42915

Merged
yanjunxiang-google merged 6 commits intoenvoyproxy:mainfrom
AntonKanug:antonk/dns-logs-on-init
Feb 28, 2026
Merged

grpc access logs: include passed in command parsers when validating commands#42915
yanjunxiang-google merged 6 commits intoenvoyproxy:mainfrom
AntonKanug:antonk/dns-logs-on-init

Conversation

@AntonKanug
Copy link
Contributor

@AntonKanug AntonKanug commented Jan 8, 2026

Fixes: #43396

Commit Message: grpc access logs: include passed in command parsers when validating commands
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:

Fixes listener initializing errors when using custom tag substitution for dns filter logs.

delta config for type.googleapis.com/envoy.config.listener.v3.Listener rejected: Error adding/updating listener(s) listener: Not supported field in StreamInfo: QUERY_NAME

@repokitteh-read-only
Copy link

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #42915 was opened by AntonKanug.

see: more, trace.

@AntonKanug AntonKanug force-pushed the antonk/dns-logs-on-init branch 2 times, most recently from 18b765e to a903416 Compare January 8, 2026 23:48
@AntonKanug AntonKanug marked this pull request as ready for review January 9, 2026 10:25
@AntonKanug
Copy link
Contributor Author

cc @wbpcode

@AntonKanug AntonKanug force-pushed the antonk/dns-logs-on-init branch 2 times, most recently from 1d7ad8d to e3925b1 Compare January 9, 2026 12:39
@wbpcode
Copy link
Member

wbpcode commented Jan 11, 2026

Thanks for this contribution. But

  1. I think to configure DNS's related format in the listener make no sense anyway?
  2. We prefer only keep HTTP and TCP's format as built-in and to reduce the potential name conflict?

@AntonKanug
Copy link
Contributor Author

AntonKanug commented Jan 11, 2026

  1. I think to configure DNS's related format in the listener make no sense anyway?

We use a udp listener with dns filter (similar to this example)

  1. We prefer only keep HTTP and TCP's format as built-in and to reduce the potential name conflict?

whats the suggestion to fix envoy rejecting listener config due to command not being recognized in this case?

delta config for type.googleapis.com/envoy.config.listener.v3.Listener rejected: Error adding/updating listener(s) listener: Not supported field in StreamInfo: QUERY_NAME

@wbpcode
Copy link
Member

wbpcode commented Jan 24, 2026

We use a udp listener with dns filter (similar to this example)

Sorry, I didn't make it clear. I mean, at the listener level, we cannot access the single DNS query attributes anyway, right? Then, we we need to configure the DNS command that? Could we remove the UDP listener's access logger or to update listener level format?

@wbpcode
Copy link
Member

wbpcode commented Jan 28, 2026

/wait

@AntonKanug AntonKanug force-pushed the antonk/dns-logs-on-init branch 2 times, most recently from b406204 to c99ca13 Compare February 9, 2026 08:23
@AntonKanug
Copy link
Contributor Author

From slack conversation:

the issue seems to be that non built in command parsers are not taken into account when validating commands, updated PR to fix that

@yanjunxiang-google
Copy link
Contributor

yanjunxiang-google commented Feb 11, 2026

Could you please add some integration tests to reproduce the issue and verify the change?

@farmpiggie farmpiggie force-pushed the antonk/dns-logs-on-init branch 3 times, most recently from 4417392 to ae18ab9 Compare February 12, 2026 18:57
EXPECT_EQ(DNS_RESPONSE_CODE_NO_ERROR, response_ctx_->getQueryResponseCode());
}

class DnsFilterAccessLogIntegrationTest
Copy link
Contributor

@yanjunxiang-google yanjunxiang-google Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe put the new access log integration tests in a new file: dns_filter_access_log_integration_test.cc?

Otherwise LGTM!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in 20c6ad0

@AntonKanug AntonKanug changed the title dns_filter: make DNS format commands available at config initialization grpc access logs: include passed in command parsers when validating commands Feb 13, 2026
@AntonKanug
Copy link
Contributor Author

@yanjunxiang-google @wbpcode
#43457 was opened after this pr with the same changes and was merged without the integration tests 😕

cc @farmpiggie

@botengyao
Copy link
Member

Need to resolve conflicts.

And pinging @yanjunxiang-google @wbpcode for more reviews.

@wbpcode
Copy link
Member

wbpcode commented Feb 22, 2026

I think @yanavlasov didn't aware this when merge anohter PR. Sorry @AntonKanug. But the integration tests self still make sense. Could you merge main and then we can merge this new tests? Anyway, I think your problem has been resolved?
Sorry again for that because I was on a long vacation and cannot review the PR in time.

@yanjunxiang-google
Copy link
Contributor

yanjunxiang-google commented Feb 23, 2026

Agree! At this point, please merge main and commit the tests added. Thanks for the contribution! @AntonKanug

@yanjunxiang-google
Copy link
Contributor

LGTM

@RyanTheOptimist
Copy link
Contributor

Looks like this needs a main merge
/wait

AntonKanug and others added 6 commits February 28, 2026 10:08
Signed-off-by: Anton Kanugalawattage <antondilon@gmail.com>

u

Signed-off-by: Anton Kanugalawattage <antondilon@gmail.com>

format

Signed-off-by: Anton Kanugalawattage <antondilon@gmail.com>

test

Signed-off-by: Anton Kanugalawattage <antondilon@gmail.com>

update

Signed-off-by: Anton Kanugalawattage <antondilon@gmail.com>

u

Signed-off-by: Anton Kanugalawattage <antondilon@gmail.com>
Signed-off-by: Anton Kanugalawattage <antondilon@gmail.com>
Signed-off-by: Anton Kanugalawattage <antondilon@gmail.com>
Signed-off-by: Wesley Hung <whung@palantir.com>

Signed-off-by: Anton Kanugalawattage <antondilon@gmail.com>
Signed-off-by: Wesley Hung <whung@palantir.com>

Signed-off-by: Anton Kanugalawattage <antondilon@gmail.com>
Signed-off-by: Anton Kanugalawattage <antondilon@gmail.com>
@yanjunxiang-google yanjunxiang-google merged commit 0221e53 into envoyproxy:main Feb 28, 2026
29 checks passed
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.

access_logs: DNS filter access logs using custom tags in gRPC access logs fails validation

5 participants