In coercing this test to run, it's clear there are a number of "TODO"
items in zuul.launcher.server.LaunchServer that seem simple enough but
that I don't really understand. I've filled in enough to make the test
pass, but I am not at all confident that this is actually the way we
want this to work long-term.
get_running_jobs also had to be extended to add tenants. I have to
wonder if we should change the payload to return the tenants somehow.
Change-Id: If91cb662ceef8e1d7660974df07b821720f210d4
Story: 2000773
Task: 3414
The order of operations for this one has changed a bit due to the
different interactions with launchers. We run one less operation now
because the first release actually does do the full launch-dance and
incur a single retry before we enter the loop of retries. Because of
that, our history is one less, and the number of times we force retry is
one less.
Change-Id: I6d7d8d0f7e49a11e926667fbe772535ebdd35e89
Story: 2000773
Task: 3413
This test is making sure that when something terrible goes wrong in the
launcher and it just returns 'None', the scheduler retries.
During refactoring of the launcher, some of the logic that handled this
special case of run_error was removed. Also the launcher wasn't properly
handling a return of None and would have failed with a TypeError instead
of sending a failure to the zuul client.
Change-Id: I6b063ba913bf72087d2cc027f08e02304310c2be
Story: 2000773
Task: 3403
This re-enables the ability for projects to define their own merging
behavior via the project merge-mode option.
It re-enables and reworks the old v2.5 test_build_configuration test, which
was written against the cherry-pick merge mode. Prior to this patch, all
merges were hard-coded to use the merge-recovery mode, so two new tests are
also added here to test those configurations as well.
Change-Id: Ief9430b3a3c33b0c9d7ebf3fd0361166e2a5a1af
Story: 2000785
Task: 3309
Enable a couple of the basic state requirement tests together. These are
really simple and it doesn't seem like they really each need there own
tests classes.
Change-Id: Iee2293ccc1b7fb0cd5fc3ab0d373b3cd600aed3c
When freezing a job tree for a change, we apply each matching
job definition in order to create the final, frozen version of
the job for the change. We would do this even if no jobs other
than the one defined in the project-pipeline job tree matched.
This would mean that a job whose global definition had a
restriction such as irrelevant-files, skip-if, or branch might
be run desipite that restriction if the entry in the
project-pipeline job tree for that job did not include a similar
restriction. Those entries are meant to modify jobs defined
elsewhere (possibly adding restrictions of their own) but are not
intended to *broaden* existing jobs, or even fully define them.
To correct this, ensure that the change matches not only the
entry in the project-pipeline job tree, but also at least one
globally defined variant of the job in question.
Change-Id: I36585b8cacfe3c20260dc754a6f246842cb0fdc8
Story: 2000804
Task: 3387
In all cases, the launcher-merger updates the repos involved in a
job before running it. If there are pre-merge changes, it then
merges those changes into the repos. If the job does not involve
pre-merge changes, then nothing further needs to happen. Avoid
attempting to merge changes which are already merged in this case.
Change-Id: Ie0c0d258b4edad4afc3b569f8ea222523bc769c1
This re-enables test_success_pattern. This job parameter has been renamed to
success-url and the test has been reworked and renamed accordingly.
Change-Id: I4ef00923ed916d08e4edb3a24fcb2e25bca823b0
Story: 2000773
Task: 3380
So that we can minimize the special casing of the internal 'noop'
job, automatically instantiate it in each layout.
Change-Id: Iee4111e481bd604f56c7791f3c35fd30e9741528
This requires some updating of how merger data construction gets
handled between Refs and Changes.
Change-Id: Icd81a95565ab137b98d6a8ac52e262487d412534
Story: 2000773
Task: 3389
Re-enable the requirement-email layout tests that ensure a specific user
within a user with a specific email approved a change.
Change-Id: Ic94ff3570fd88fa7293b399b2d686941fe85d687
Re-enable the requirement-username layout tests that ensure a specific
user or regex approved a test.
Change-Id: Idbe86bbb79977c3678c82c7e38f4dfe74b746088
Re-enable the requirement-older-than tests that ensure a specific user has had
an approve for a certain amount of time.
Change-Id: Id733f824311bbc752251d0f6406f49917c23bc13
Re-enable the requirement-newer-than layout tests that ensure a specific
user within a specific time approved a request.
Change-Id: I8ae870257db06e3e9958e151bcf4791c87f4ec71
Skip individual tests in test_requirements rather than the whole class
so we can start activating them.
Change-Id: Ie00e15fcc96509b9f6f90a2cea23ad8a805f8199
This includes forward-porting changes to launcher/server.py with the
exception of the pre/post playbooks changes which will be done in a
follow up commit as they have deviated.
Change-Id: I13aa229c1460b748745babe178c0a745e52f841c
We have decided to rename the 'password' auth to 'secrets' on the
zuulv3 spec.
The idea is that we will both encrypt the user and password using
PKCS1, also allowing to have more than one secrets.
This change modifies the model to meet new spec requirements.
Change-Id: Ief78ac27732f30b17d7995a3e2032e33e7979ca9
Skip-if has been removed in favor of irrelevant-files and the branch
matchers. This refactors the tests that used to be used for skip-if to
cover irrelevant-files.
There may still be need to cover the other types of matchers.
The 'test_parse_skip_if' has just been removed as it wasn't really
covering anything not also covered by the functional tests.
Change-Id: I3a4080426c4dc680ed656e18f26597e3d1b7d759
Story: 2000773
Task: 3378
This ensures the state of the queue, not the builds, so we cannot use
FakeBuild.hasChanges. This is unique, so there doesn't seem to be any
need to genericize the operation.
Change-Id: I13532f4038170ac4539f1d0131dd4a06e6ffd8ac
Story: 2000773
Task: 3377
There is a bug (https://github.com/ansible/ansible/issues/18281) in the
ansible synchronize module that causes any retry attempt at
synchronizing to fail because the paths get munged resulting in invalid
paths. Unfortunately this also means that the error message we get is
not for the first failed sync attempt but for the last making it hard to
debug why things failed in the first place.
Address this by not attempting to retry until ansible is fixed. This way
we get accurate error messages more quickly (as we don't retry over and
over and generate a bad error message at the end).
Change-Id: I545c44b11f37576edc8768a3ed78962ff870995f
In re-enabling test_zuul_refs and refactoring it to use
FakeBuild.hasChanges, a weakness was discovered in hasChanges where it
would not check the repositories of all the changes one is looking for.
After fixing that, the test passes and others should be able to be
refactored in the same way.
Change-Id: Iaf647412d2518c079c8b42ed670919f4e8ca0b63
Story: 2000773
Task: 3296
Now that zuul is supports multi tenants, we need to update our json
too. Also enable unit tests for it too.
Change-Id: I8dbac9090aab705aa32d4af3c9995b37e96174b6
Signed-off-by: Paul Belanger <pabelanger@redhat.com>