Skip to content

VC-33564: Disable the dump of the config file on startup #564

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

Merged
merged 5 commits into from
Aug 26, 2024

Conversation

maelvls
Copy link
Member

@maelvls maelvls commented Aug 26, 2024

I propose to remove code that "dumps" the config file at startup.

I don't think there is a point in dumping the whole content of a file... it's super verbose and not very useful. It should at least be gated behind a --debug flag. So I propose to remove it for now. Let me know if you prefer that I move this specific change to another PR.

This partially fixes VC-33564.

The config is no longer dumped at startup. I don't think there is a
point in dumping the whole content of a file... it's super verbose and
is even hurtful as it drowns actual important errors within a flow of
log lines.

If we think that dumping the config is an important feature, it should
be gated behind a --debug flag. I propose to remove it for now.
maelvls and others added 4 commits August 26, 2024 13:17
At first, I had moved config.go and config_test.go to a separate folder
to make things a bit cleaner, but it made reviewing super hard, so I
ended up keeping them in the `agent` package.
The URL http://localhost:8080 suggested that this test was using a fake
server, and didn't indicate clearly which API (the old jetstack-secure
API or the newer Venafi Cloud Plaform API).
Testify, which we already import and that I trust, has the same
functionality. github.com/d4l3k/messagediff is a relatively small
Go project (250 stars) that hasn't been updated since Nov 11, 2020.
VC-35630: Add unit tests to the code that loads config/flags
Copy link
Contributor

@inteon inteon left a comment

Choose a reason for hiding this comment

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

The main change in this PR lives in f980359.
The rest of the PR originates from #563 (not sure why that was targeted to be merged into this branch).

Disabling the config dump on startup makes sense. Maybe at some point we want to print certain messages, but dumping the whole file seems like overkill.

LGTM

@maelvls
Copy link
Member Author

maelvls commented Aug 26, 2024

Not sure why that was targeted to be merged into this branch.

I stacked the other PR onto this one to make the reviewing experience better. I aimed to have this one reviewed and merged first, and then wanted to merge the other one.

@maelvls maelvls merged commit 6eb33e4 into master Aug 26, 2024
8 checks passed
@maelvls maelvls deleted the disable-dump-config-startup branch August 26, 2024 16:19
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