zuul/zuul
James E. Blair 319bbacfa1 Fix loading_errors bug
This corrects an error
  Error in dynamic layout
  Traceback (most recent call last):
    File "/usr/local/lib/python3.8/site-packages/zuul/manager/__init__.py", line 625, in _loadDynamicLayout
      relevant_errors = self._findRelevantErrors(item,
    File "/usr/local/lib/python3.8/site-packages/zuul/manager/__init__.py", line 517, in _findRelevantErrors
      parent_layout.loading_errors.error_keys) or
  AttributeError: 'NoneType' object has no attribute 'loading_errors'

which can be caused when the following conditions are met:

* Tenant A is listed first.
* Tenant A holds projects A and B.
* Project B references a config object defined in project A.
* Tenant A loads without errors.
* Tenant B holds projects B and C.
* Tenant B has a standing configuration error due to the unknown
  reference to an object in project A from project B.
* Two or more changes to project C which cause dynamic
  configurations to be created are enqueued in a pipeline.
* The merge job for the second change finishes before the first.

This is because:

We cache configuration objects if they load without error in
their first tenant; that means that they can show up as errors in
later tenants, but as long as those other tenants aren't
proposing changes to that repo, it doesn't matter.  But it does
mean that every dynamic reconfiguration in this tenant will see
errors and will execute the code path that compares the new
dynamic configuration to the previous one to see if they are
relevant.

If a merge job for a dynamic config change arrives out of order,
we will compare it to the previous configuration to determine if
they are relevant, but since the previous layout had not been
calculated yet, the exception above was hit.

The solution is to indicate that the layout for the later change
is not ready until the layout for the previous change is.

Change-Id: Ibe1392a494d42b65080ab7e42f116db3869548ff
2020-05-14 14:05:30 -07:00
..
ansible Fix unused argument triggering flake8 2020-05-12 11:20:44 +02:00
cmd Don't exit zuul-web when signals are received 2020-05-04 10:07:28 -07:00
connection Annotate some logs in the scheduler with event id 2019-05-17 06:06:11 +02:00
driver Merge "pagure: Make use of the new project webhook/token endpoint" 2020-05-13 19:37:40 +00:00
execution_context Add wrapper driver execution context 2017-08-18 16:35:12 -07:00
executor Replace preexec_fn argument in executor popen call 2020-05-12 09:42:05 +02:00
lib Deprecate ansible 2.7 2020-05-13 06:40:14 +00:00
manager Fix loading_errors bug 2020-05-14 14:05:30 -07:00
merger Merge "Remove unused function prune in merger" 2020-05-12 22:50:13 +00:00
reporter Support file comments via Github checks API 2020-02-19 14:01:41 +01:00
source Annotate canMerge check with event id 2019-07-12 12:34:57 +02:00
sphinx Add zuul-sphinx as a requirement 2017-08-07 14:56:17 -07:00
trigger Annotate logs in the zuul driver with event ids 2019-05-17 06:06:11 +02:00
web Don't exit zuul-web when signals are received 2020-05-04 10:07:28 -07:00
__init__.py Initial commit. 2012-05-29 14:49:32 -07:00
_setup_hook.py Revert "Create zuul/web/static on demand" 2019-06-04 09:57:04 -07:00
change_matcher.py Match tag items against containing branches 2020-03-06 13:29:18 -08:00
configloader.py Add serial pipeline manager 2020-04-29 14:59:15 -07:00
exceptions.py web: add tenant and project scoped, JWT-protected actions 2019-07-10 12:11:14 +02:00
model.py Ignore source_context and description in job changes 2020-05-07 14:01:38 -07:00
nodepool.py Store a list of held nodes per held build in hold request 2019-10-24 13:39:16 -04:00
rpcclient.py Add client_id to RPC client 2020-01-28 10:16:19 +01:00
rpclistener.py Authorization rules: add templating 2020-02-21 09:37:35 +00:00
scheduler.py Don't reconfigure the tenant on tag creation 2020-05-07 19:18:22 +02:00
version.py Report git sha in status page version 2018-04-27 10:21:43 -07:00
zk.py Add TLS support for ZooKeeper 2020-03-18 14:47:37 -07:00