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

JVS client cannot be initialized with raw JVS client config directly #297

Closed
yolocs opened this issue Sep 15, 2022 · 4 comments
Closed

JVS client cannot be initialized with raw JVS client config directly #297

yolocs opened this issue Sep 15, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@yolocs
Copy link
Contributor

yolocs commented Sep 15, 2022

TL;DR

We provide a raw JVS config to initialize a JVS client

https://github.com/abcxyz/lumberjack/blob/main/clients/go/pkg/auditopt/config.go#L262

It will fail because the new config defaulting logic in JVS client requires the use envconfig. Constructing a JVSConfig directly won't set defaults.

Expected behavior

No response

Observed behavior

No response

Environment Details

See above

Additional information

No response

@yolocs yolocs added the bug Something isn't working label Sep 15, 2022
@yolocs yolocs self-assigned this Sep 15, 2022
@sethvargo
Copy link
Contributor

@yolocs do you think jvs should provide a NewClient option that initializes things?

@yolocs
Copy link
Contributor Author

yolocs commented Sep 15, 2022

Probably. Although I don't necessarily see it as "lacking option" problem since the raw config is already kind of an option. I see it more as a "lacking a lib to load config with defaults" problem.
See context in abcxyz/jvs#104. Maybe it's a good idea to add that to pkg.

@yolocs
Copy link
Contributor Author

yolocs commented Sep 15, 2022

Send a PR for the idea: abcxyz/pkg#33

@yolocs
Copy link
Contributor Author

yolocs commented Sep 19, 2022

PR in pkg merged. Will create a new issue to adopt the new lib in lumberjack

@yolocs yolocs closed this as completed Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants