Each scheduler in tests needs its own connection registries.
This change only affects tests.
Change-Id: I2ad188cf5a72c46f7486c23ab653ff574123308b
Story: 2007192
This fixes an issue with project defining a Zuul job config that
use a file matcher:
2020-06-01 12:18:35,833 ERROR zuul.Pipeline.fedora.check: Error freezing job graph for <QueueItem 0x7f7e8e465438 for <Change 0x7f7ea0c8f748 project: fedora-infra/ansible number: 100 patchset: cb7ab828c2 updated: 1591013908 status: failure state: open> in check>
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/zuul/manager/__init__.py", line 798, in prepareItem
item.freezeJobGraph()
File "/usr/lib/python3.6/site-packages/zuul/model.py", line 2208, in freezeJobGraph
self, ppc, skip_file_matcher)
File "/usr/lib/python3.6/site-packages/zuul/model.py", line 4190, in createJobGraph
self._createJobGraph(item, ppc, ret, skip_file_matcher)
File "/usr/lib/python3.6/site-packages/zuul/model.py", line 4145, in _createJobGraph
not frozen_job.changeMatchesFiles(change):
File "/usr/lib/python3.6/site-packages/zuul/model.py", line 1678, in changeMatchesFiles
if self.file_matcher and not self.file_matcher.matches(change):
File "/usr/lib/python3.6/site-packages/zuul/change_matcher.py", line 149, in matches
if len(change.files) == 1 and self.commit_regex.match(change.files[0]):
TypeError: 'dict_keys' object does not support indexing
Change-Id: I40f503b1e3d9629472c759911b15b718e6c79cff
- Ensure to consider only CI status flags set by the related token
account. This is to avoid being triggered by another CI system voting
on the same Pull Request.
- Re-use the same status CI slot.
- Allow to set the display name of the CI system in from of
the CI status flag.
Change-Id: I12fc761e34413f4efd7c2ad60ed04bf12d5932a3
To improve consistency and remove `self.sched` and
use `self.scheds.first.sched` in all tests.
This change only touches tests.
Change-Id: I0a8c3f8ad634d1d88f3c68a11e4d5587993f4a0d
Story: 2007192
This patch removes the use of the connector system. Indeed I've
figured out that user API token can be set with the needed
rights: pull_request_merge, pull_request_flag, pull_request_comment.
In fact, the default Pagure configuration (to be set by Pagure
operators) does not allow those right. Then it is just a matter
of configuration.
Recently pagure.io and src.fedoraproject.org operators have allowed
those rights for user API token.
Thus, I think, the connectors system (to get project scoped API token)
was a complex workaround to fix a configuration issue. I don't see
any reason for a Pagure operator to not allow those rights in the
user API token. Then, with this change, it is assumed that this
driver will be used with a Pagure instance that allow those ACL
rights.
In addition, this patch add an optional mechanism to allow webhook
payload according to the source of the events. This relies on a
white list of IP addresses from which an event will be accepted.
This option should only be used for testing or debugging purpose.
This change has several benefit:
- Less API call to Pagure
- Simplify driver code base
Change-Id: Ic38a6774dc4cb9798840a2c874e2d6e9ce16a067
Threshold_reached will be None (in the API) if no minimal score
to merge PR is configured. So the value needs to be handled
as True because the threshold is by default reached in that case.
Change-Id: I103c9f601e5362f451647fb3597fa790df481dd6
Thanks to:
- https://pagure.io/pagure/pull-request/4625 event branch creation
- https://pagure.io/pagure/pull-request/4626 oldrev for branch update
This patch:
- Handles git.branch.creation and git.branch.deletion events.
- Adds support for old_commit event attribute.
It also removes unexisting stop_commit event atribute handling,
it is only end_commit.
Change-Id: I10423b654df48436bb0ad11c2043c2d67cac7780
Since https://pagure.io/pagure/issue/4400 Pagure sends an event
when a git repo is tagged. This patch brings the support
for the event.
Change-Id: I9e09cd6dd409f9442763a7d765e2ce261bb42843
When Pagure returns an API call error with EINVALIDTOK, this
patch implements a connector refresh to invalidate the
API project client cache and create a new client with the new
connector data.
This patch fixes a situation where only a Zuul restart or a token
expiration in the driver cache will force a connector (API token)
regeneration.
Change-Id: If92ea0c58ca36ab49a5c2ef251f93a3a86a5d174
This change implements event handling for pull-request.tags.added.
Tags can be used as trigger event filter or required metadata.
Change-Id: I128bbef34245932e3bbee1f848ad1c484d3ccae3
The "initial comment" is the first comment of a PR on Pagure. It
is used to provide the Depends-on stanza. Recently Pagure added the
capability to send an event when that initial comment is changed:
https://pagure.io/pagure/issue/4398
This change handles the event as a PR changed to retrigger the attached
jobs.
Change-Id: I62d4e783e94528126cd4a7d85b3e664e84758bf1
Zuul uses the command processor for most components to send commands
to a running service. We should add this to zuul-web as well starting
with the stop command. In a later change we'll add commands for
starting/stopping a repl server.
Change-Id: I1d02ec30341be0890afb332dcf9f32f10a52ead5
This change adds a Pagure driver for Zuul.
Pagure is a Github like forge https://pagure.io/pagure/.
This driver is usable starting with Pagure 5.3.
For history: first Pagure PR gated by Zuul is
https://pagure.io/test-zuul/pull-request/22
Change-Id: I1711653355ae26a3fff3bb6de3c6fca7113cdd01