uwu-tools / peribolos

Apache License 2.0
21 stars 6 forks source link

[Upstream Bug] Dry-run fails if config contains nonexistent teams #216

Closed lelia closed 1 year ago

lelia commented 1 year ago

Issue Context

This issue has already been identified and reported upstream: https://github.com/kubernetes/test-infra/issues/26542

Steps to Reproduce

  1. Create an org config YAML containing one or more GitHub Teams which don't yet exist
  2. Run Peribolos with the confirm=false flag in order to enable dry-run mode
  3. Once Peribolos reaches the nonexistent team(s), it will throw an error like this:
{"component":"unset","file":"github.com/uwu-tools/peribolos/cmd/main.go:138","func":"github.com/uwu-tools/peribolos/cmd.rootCmd","level":"fatal","msg":"Configuration failed: failed to configure cisco-ospo teams: failed to update demo-repository-maintainers members: failed to list demo-repository-maintainers(demo-repository-maintainers) members: return code not 2XX: 404 Not Found","severity":"fatal","time":"2023-04-28T21:22:49Z"}

Proposed Workarounds

Near-Term Solution

Add a WARN level log message in the relevant codepath referencing this bug.

cpanato commented 1 year ago

Thanks for the report, I will reproduce and make a fix, but if you want to push a PR I will be happy to review :)

cpanato commented 1 year ago

@lelia what is the command that you are running? trying to reproduce but I am not seeing the error :/

ahh nevermind, was able

{"component":"unset","file":"github.com/uwu-tools/peribolos/cmd/main.go:138","func":"github.com/uwu-tools/peribolos/cmd.rootCmd","level":"fatal","msg":"Configuration failed: failed to configure uwu-tools teams: failed to update fake-team members: failed to list fake-team(fake-team) members: return code not 2XX: 404 Not Found","severity":"fatal","time":"2023-05-05T20:17:54-07:00"}