Skip to content

Comments

add test for serving metrics for grpc#442

Merged
k4leung4 merged 2 commits intochainguard-dev:mainfrom
k4leung4:add-metric-test
Aug 11, 2025
Merged

add test for serving metrics for grpc#442
k4leung4 merged 2 commits intochainguard-dev:mainfrom
k4leung4:add-metric-test

Conversation

@k4leung4
Copy link
Contributor

@k4leung4 k4leung4 commented Aug 1, 2025

No description provided.

Signed-off-by: Kenny Leung <kleung@chainguard.dev>
if err != nil {
t.Fatal(err)
}
defer listener.Close()
Copy link
Member

Choose a reason for hiding this comment

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

This potentially could race because you're grabbing a port, to then defer the close in the scope of this func which then frees the port, to then try to re-listen on the port later.

Ideally we'd pass the listener through, but idk how much refactoring you want to do in this PR. 🤷

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ack'ed

added a comment, i would like to get this in as is, and if it becomes flaky, happy to refactor

Signed-off-by: Kenny Leung <kleung@chainguard.dev>
@k4leung4 k4leung4 merged commit 05cf407 into chainguard-dev:main Aug 11, 2025
13 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.

2 participants