Conversation
config/tls_test.go
Outdated
| t.Fatal("parsed TLS config doesn't match expected") | ||
| } | ||
|
|
||
| workdir := t.TempDir() |
There was a problem hiding this comment.
This is a Golang 1.15 feature, but I notice that this project is still stuck on the ancient Go 1.12 (not sure why, but I tried my best within the constraints).
I assumed that this was fine to break that constraint given that this is just test code
|
Sorry for the delay in reviewing this PR.
Why not pull in the I agree that the functionality added in this PR is useful (exporting zrepl prometheus metrics over TLS) but I don't want to maintain a
Ah, I see, the
|
|
I'm happy to rework this and pull in If you're happy with that, then I'll change it up- let me know |
|
Hmm, I guess I'll have to bump a lot of dependencies first. I will do that in a separate PR, but to unblock you, just do whatever bumping you need to do to pull in the exporter-toolkit. I'll rebase your PR when I'm done. |
|
For the record, WIP branch with dependency updates here: #819 |
|
FYI, #819 was merged a couple of days ago, so, minimum Go version is 1.22 now. Also, I restructured the repository and moved virtually all of the code into Are you still planning to work on this? |
|
Thanks for the update. Yes, I plan to pick this up at some point when time allows |
Add a TLSConfig struct/library to configure a simple TLS/HTTPS server with most basic toggles that most users would want. This is based on the structure that the prometheus/exporter-toolkit web-config uses. Notably this does not make use of either of the two existing TLS configuration structures that exist as both are specific in their usage and neither are suitable for generally configuring a TLS server. Signed-off-by: Joe Groocock <me@frebib.net>
10f767e to
e3a907b
Compare
|
Dropping the TLSConfig struct made this patch a lot smaller. So small in fact that I'm having a hard time believing it 😆 Testing it now |
|
Seems like it's gonna need some more work. Even ignoring the subtle differences I introduced, it doesn't seem to accept my config Seems to be some side-effect of the strict unmarshaling? |
|
Transitioning this back to draft state, please reopen and ping me once ready. |
|
Looks like the problem is zrepl's custom YAML decoder: zrepl/yaml-config@3fc339b We could revert this patch to the initial implementation and carry the burden of having to re-implement
I guess we found a reason why 😁 Alternatively we could change zrepl to use the upstream go-yaml implementation, or maybe revert edit: one more option I think might be viable (and maybe a reasonable middle-ground) is to reimplement the TLSConfig struct just for unmarshaling, then copy all fields into the As-is, I don't see any other ways forward. Let me know what you want to do @problame |
|
Apologies for letting this sit for so long, life got in the way.
This sounds acceptable, let me know if you want to pick this up, or close this PR if you (understandably) lost interest in contributing. |
Add a TLSConfig struct/library to configure a simple TLS/HTTPS server with most basic toggles that most users would want. This is based on the structure that the prometheus/exporter-toolkit web-config uses.
Notably this does not make use of either of the two existing TLS configuration structures that exist as both are specific in their usage and neither are suitable for generally configuring a TLS server.