Hi Everyone,
I have been working on a small tool named protron [1] that listens to pagure
pull-request messages, triggers a build and report build status as well as
taskotron/resultsdb test results to the pull-request.
Since protron kicks off the koji build, it knows its task identifier and keeps
it in memory so that it can later recognize a koji build it kicked versus a koji
build from something/someone else.
However, taskotron/resultsdb message do not include the koji task it was running
the tests against. So protron queries koji taskinfo <id> to get the package
nevr this task was about and keep then that info in memory to recognize
taskotron messages of interest.
In our regular workflow this isn't a problem because of the nevra restriction on
koji is such that we cannot build the same package twice, but with the PR model
coming to dist-git, we will need to somehow lift that constraint. There could
very well be two persons or two systems proposing a pull-requests doing the same
update (say the-new-hotness bumps foo to 1.2.3 while missing something, while a
contributor comes by and do the same update to 1.2.3 with the rebase of the
patch or so), both PRs will be building foo-1.2.3 and this will confuse protron:
to which PR corresponds foo-1.2.3?
If the PR are created with sufficient time in between, this will not be a
problem, the newer PR will override the info in memory of the old one.
However, if the two PRs are created sufficiently close to one another (so that
the tests for the first PR aren't finished running), this will be an issue.
To avoid this, one way would be to add to the taskotron message sent the task id
of the build taskotron was testing.
Would this be something that is doable?
Thanks in advance,
Pierre