#3103 retry get_next_release to avoid race condition
Merged by julian8628. Opened by mikem.
mikem/koji pr3080updates  into  master

Download 3103.patch

This is an update of PR#3080

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

This change adds retry behavior in initMavenBuild and initImageBuild when attempting to auto-increment the release. This works around the race condition case where two such calls in parallel attempt to choose the same NVR.

This involves a minor, backwards-compatible api change. The getNextRelease hub call now accepts a new optional integer parameter incr for adjusting release increment (previously it was always 1).

:thumbsup:

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

:param int incr:

How about ParameterError here instead of GenericError?

Can we use the same variable name get_next_release() uses, ie build_info instead of data? I see the get_next_build() calling code uses "data", but that's because it's copying build_info. "data" is a very generic term, and I think it makes the get_next_build() method easier to read on its own when we name this one build_info.

Metadata Update from @julian8628:
- Pull-request untagged with: testing-ready
- Pull-request tagged with: no_qe

2 new commits added

  • update unit tests
  • naming/docstring adjustments

all good suggests, Ken. Thanks!

:thumbsup:

Metadata Update from @mikem:
- Pull-request untagged with: no_qe
- Pull-request tagged with: testing-ready

Metadata Update from @jcupova:
- Pull-request untagged with: testing-ready
- Pull-request tagged with: no_qe

Metadata Update from @jcupova:
- Pull-request untagged with: testing-ready

Commit 3fc4b4a6 fixes this pull-request

Pull-Request has been merged by julian8628

Metadata