#4396 channel defaults
Merged by mikem. Opened by mikem.
mikem/koji channel-defaults  into  master

Download 4396.patch

Currently, we use the channel param to make_task() as both a user override mechanism a way for the call handler to adjust the default.

Channel is always ultimately determined by policy, but the policy cannot distinguish between the user passing a channel override for a maven task and the call handler indicating that the default should be "maven" instead of "default".

This PR adds a separate mechanism for specifying the default and alters call handlers to use that instead (but still use channel for user overrides).

Fixes https://pagure.io/koji/issue/4399

Unfortunately this is not quite backwards compatible. There's the (minor) api change for the default values for some calls, but more importantly having these calls pass default_channel=foo instead of channel=foo could easily yield different results in the channel policy. Granted, this is the point, but the results could be surprising to admins.

~~So, marking this as a draft for now. I'm not sure what the best way forward is. Perhaps it would help to add some sort of compat config option that would cause the hub to still treat these defaults as overrides.~~

2 new commits added

  • add unit tests
  • compat option for previous behavior

1 new commit added

  • empty commit for testing

4 new commits added

  • add unit tests
  • compat option for previous behavior
  • update api data for new defaults
  • separate channel default from overrides

rebased onto 2df628b41f6f725912bac7fac20a3b39296b47e8

@julian8628

:thumbsup:

Metadata Update from @julian8628:
- Pull-request tagged with: testing-basic

Metadata Update from @mfilip:
- Pull-request tagged with: testing-done

rebased onto ff1b2b2f6b4244ad2718039cb2221b0c8b64464e

Commit 58440960 fixes this pull-request

Pull-Request has been merged by mikem

Metadata