Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

containeranalysis: connection is not shared #5217

Closed
thepwagner opened this issue Dec 14, 2021 · 1 comment · Fixed by #5220
Closed

containeranalysis: connection is not shared #5217

thepwagner opened this issue Dec 14, 2021 · 1 comment · Fixed by #5220
Labels
api: containeranalysis Issues related to the Container Analysis API. status: investigating The issue is under investigation, which is determined to be non-trivial.

Comments

@thepwagner
Copy link

Client

Grafeas

Go Environment

go version go1.17.5 darwin/arm64

Expected behavior

Documentation on containeranalysis.Client.GetGrafeasClient() states "Calling Close on either the grafeas or containeranalysis client will close the shared connection in both." source.

I expect calling close on either client to close the shared connection in both.

Actual behavior

containeranalysis.NewClient() initializes a connection pool, but it is not shared with grafeasclient source.
grafeas.NewClient() initializes an independent connection pool source.

Additional context

I think the comment should be removed, or the connection pool between these clients should be shared.

@thepwagner thepwagner added the triage me I really want to be triaged. label Dec 14, 2021
@product-auto-label product-auto-label bot added the api: containeranalysis Issues related to the Container Analysis API. label Dec 14, 2021
@codyoss codyoss added status: investigating The issue is under investigation, which is determined to be non-trivial. and removed triage me I really want to be triaged. labels Dec 16, 2021
@codyoss
Copy link
Member

codyoss commented Dec 16, 2021

@thepwagner Thanks for pointing this out. As far as I can see this has never been a true statement I will update code/docs accordingly.

codyoss added a commit to codyoss/google-cloud-go that referenced this issue Dec 16, 2021
It was documented that the embeded grafeas client shared a connection
with the main client, but it does not and never has from looking at history.
Updated the comment but also explicitly called close on the grafeas client
when the containeranalysis client is closed.

Fixes: googleapis#5217
codyoss added a commit that referenced this issue Jan 10, 2022
It was documented that the embedded grafeas client shared a connection
with the main client, but it does not and never has from looking at history.
Updated the comment but also explicitly called close on the grafeas client
when the containeranalysis client is closed.

Fixes: #5217
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: containeranalysis Issues related to the Container Analysis API. status: investigating The issue is under investigation, which is determined to be non-trivial.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants