What happened:
checkconfig returns an error for a valid config. More specifically, checkUnknownFields(..) returns unknown fields that are, in fact, known.
What you expected to happen:
A valid, functional configuration should be considered valid by checkconfig.
How to reproduce it (as minimally and precisely as possible):
slack_reporter field to your Prow configuration.checkconfig with --strict and/or --warnings=unknown-fields warning enabled.Please provide links to example occurrences, if any:
example
/help
Copying over from that thread ...
That is totally bizarre. I think we should reconsider the bespoke reflection-based code we have in there to check for bad fields. I don't think that it is worth the effort to maintain it over strict YAML loading as allowed by the library. The only reason I remember being given for the code as-is, was that the library only told you about one unknown field at once. At least it is more robust, I would expect. This code keeps biting us and I don't think it's given us much value...
@cjwagner @fejta
warns about org: too (peribolos)
docker run -it -v /home/afirth/git/github-automation:/tmp gcr.io/k8s-prow/checkconfig \
--plugin-config=/tmp/plugins.yaml \
--config-path=/tmp/config.yaml
{"component":"checkconfig","file":"prow/cmd/checkconfig/main.go:76","func":"main.reportWarning","level":"warning","msg":"unknown fields present in /tmp/config.yaml: orgs","time":"2020-01-15T14:20:29Z"}
On Slack consensus was reached to remove the reflection-based validation and just to use the strict YAML loading -- @afirth do you want to take a stab at that?
/cc
On Slack consensus was reached to remove the reflection-based validation and just to use the strict YAML loading -- @afirth do you want to take a stab at that?
Sure. Do we need a flag to leave the old unstrict behaviour? Looks pretty straightforward to rip out all the unknown field stuff, just not sure how others are using this
/assign @afirth
/remove-help