-
Notifications
You must be signed in to change notification settings - Fork 43
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
Revert default config #2822
Revert default config #2822
Conversation
)" This reverts commit 76e4d37.
… struct fields (mindersec#2633)" This reverts commit c571835.
I get that this was done to maybe fix production immediately. But isn't the logically correct thing to remove What's the point of having |
The symptom (which we apparently don't have test coverage for) was that the I think we need to figure out a different way to configure this, and add a test that will prevent the misconfiguration from causing crashing servers. We also have an action item to investigate why our alerting didn't immediately complain when we had crashing servers, so we only noticed it several hours later. |
(But, as it is, the values in |
I think the right answer is to remove those (ignored) defaults, and then add a complaint if they sneak back in... |
Going through this code again, I think the exciting thing that got missed in #2633 is that if you skip calling Since this just bit us, I'll be working on a set of patches to roll this safely forward again. Did you need the ability to clear out the defaults from the structs that you added in #2633, or were you just trying to be complete? |
Right, with that, we dropped the ability to set things using env variables for struct fields with For testing, if possible, I'd suggest having a test that replicates non-confidential server configuration options to ensure that the input configuration gives the expected complete (all options) output. That way, we can bridge some gaps between SAAS and OSS.
I sort of needed that. The problem is that types like db connection are shared by multiple fields, and having the same defaults doesn't make sense. So zeroing them using |
Another issue was the EEA, which ended configured with a zero value in the aggregator interval. Which ended up effectively disabling the lock. We really need better testing in general. |
See #2836 for a fix to flag the
I think the test added in #2836 effectively does this, for EEA. I'm not sure that testing each option's pass-through in all configurations is going to be a good use of effort -- as an example, Coveralls currently reports 60% coverage for Maybe it makes sense to extend the
I think the two PRs above (particularly #2839) should cover your use case. |
Summary
Revert the change which takes into account the
{}
default value in a config field.We were running into an issue where the SQL port was defaulted to
0
, rather than the expected5432
value.https://github.com/stacklok/minder/blob/6186d553c6bb6eb83aedd9679bdb2b744ad7ddb8/internal/config/common.go#L38
Change Type
Mark the type of change your PR introduces:
Testing
Outline how the changes were tested, including steps to reproduce and any relevant configurations.
Attach screenshots if helpful.
Review Checklist: