VC-33564: Disable the dump of the config file on startup#564
Merged
Conversation
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.
5d1bd87 to
f980359
Compare
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
inteon
approved these changes
Aug 26, 2024
Contributor
inteon
left a comment
There was a problem hiding this comment.
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
Member
Author
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
--debugflag. 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.