zuul/tests/unit
Simon Westphahl 305d4dbab9
Handle dependency limit errors more gracefully
When the dependency graph exceeds the configured size we will raise an
exception. Currently we don't handle those exceptions and let them
bubble up to the pipeline processing loop in the scheduler.

When this happens during trigger event processing this is only aborting
the current pipeline handling run and the next scheduler will continue
processing the pipeline as usual.

However, in case where the item is already enqueued this exception can
block the pipeline processor and lead to a hanging pipeline:

ERROR zuul.Scheduler: Exception in pipeline processing:
Traceback (most recent call last):
  File "/opt/zuul/lib/python3.11/site-packages/zuul/scheduler.py", line 2370, in _process_pipeline
    while not self._stopped and pipeline.manager.processQueue():
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/zuul/lib/python3.11/site-packages/zuul/manager/__init__.py", line 1800, in processQueue
    item_changed, nnfi = self._processOneItem(
                         ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/zuul/lib/python3.11/site-packages/zuul/manager/__init__.py", line 1624, in _processOneItem
    self.getDependencyGraph(item.changes[0], dependency_graph, item.event,
  File "/opt/zuul/lib/python3.11/site-packages/zuul/manager/__init__.py", line 822, in getDependencyGraph
    self.getDependencyGraph(needed_change, dependency_graph,
  File "/opt/zuul/lib/python3.11/site-packages/zuul/manager/__init__.py", line 822, in getDependencyGraph
    self.getDependencyGraph(needed_change, dependency_graph,
  File "/opt/zuul/lib/python3.11/site-packages/zuul/manager/__init__.py", line 822, in getDependencyGraph
    self.getDependencyGraph(needed_change, dependency_graph,
  [Previous line repeated 8 more times]
  File "/opt/zuul/lib/python3.11/site-packages/zuul/manager/__init__.py", line 813, in getDependencyGraph
    raise Exception("Dependency graph is too large")
Exception: Dependency graph is too large

To fix this, we'll handle the exception and remove the affected item.
We'll also handle the exception during enqueue and ignore the trigger
event in this case.

Change-Id: I210c5fa4c568f2bf03eedc18b3e9c9a022628dc3
2024-03-19 14:37:26 +01:00
..
__init__.py Move tests into test/unit 2017-01-24 10:18:38 -08:00
test_auth.py Fix JWT auth test and alembic migration 2023-05-16 10:30:11 -07:00
test_bubblewrap.py Only check bwrap execution under the executor 2023-05-17 13:45:23 -07:00
test_change_matcher.py Add configuration support for negative regex 2023-08-28 15:03:58 -07:00
test_circular_dependencies.py Revise decision to not deduplicate noop jobs 2024-03-04 15:35:18 +01:00
test_client.py Add --keep-config-cache option to delete-state command 2024-02-02 12:09:52 -08:00
test_cmd.py Revert "Revert "Add the process environment to zuul.conf parser"" 2019-11-02 09:10:18 +09:00
test_component_registry.py Increase timeouts in TestComponentRegistry (#2) 2024-02-14 12:59:39 -08:00
test_configloader.py Fix validate-tenants isolation 2024-01-31 14:58:45 -08:00
test_connection.py Merge "Replace special characters in MQTT topic" 2024-03-12 14:32:49 +00:00
test_cross_crd.py Improve error reporting for circular dependencies 2023-09-29 11:35:00 +02:00
test_daemon.py Remove unecessary shebang and exec bit 2018-07-26 07:12:24 +00:00
test_database.py Zuul-Web: substring search for builds, buildsets 2024-03-12 13:58:01 +01:00
test_default_config.py Add type check for zuul conf 2018-12-10 19:24:50 +08:00
test_dependson.py Be more liberal with Depends-On: parsing 2021-08-30 15:59:51 +10:00
test_disk_accountant.py Optionally disable disk_limit_per_job 2019-02-22 08:10:59 +01:00
test_encryption.py Use nested tempfile fixture for cleanups 2018-02-06 15:18:45 -08:00
test_event_queues.py Include job_uuid in BuildRequests/Events 2024-01-08 08:54:56 -08:00
test_executor.py Produce consistent merge commit shas 2024-02-26 16:32:46 -08:00
test_gerrit.py Report topic to jobs as zuul.topic 2024-03-08 11:30:45 -07:00
test_gerrit_awskinesis.py Replace mock_kinesis with mock_aws 2024-01-29 22:01:05 +00:00
test_gerrit_crd.py Report per-branch cyclic-dependency conflicts 2022-03-21 12:54:02 -07:00
test_gerrit_gcloud_pubsub.py Add gcloud pubsub support to Gerrit driver 2023-08-02 14:50:28 -07:00
test_gerrit_kafka.py Add Kafka support to Gerrit 2023-07-15 14:41:23 -07:00
test_gerrit_legacy_crd.py Report per-branch cyclic-dependency conflicts 2022-03-21 12:54:02 -07:00
test_git_driver.py Fix more file opening ResourceWarnings 2023-02-07 17:12:15 -08:00
test_github_crd.py Add some github configuration deprecations 2024-02-29 16:37:47 -08:00
test_github_driver.py Allow rerequested action for Github triggers 2024-03-14 14:48:05 +01:00
test_github_requirements.py Add GitHub pipeline trigger requirements 2023-04-28 11:46:33 -07:00
test_gitlab_driver.py Check blocking_discussions_resolved in gitlab driver 2024-01-24 20:35:28 +00:00
test_global_semaphores.py Add global semaphore support 2022-05-31 15:14:34 -07:00
test_inventory.py Replace Ansible 6 with Ansible 9 2024-02-15 16:20:45 -08:00
test_lib_ansible.py Validate ansible extra packages 2020-05-08 09:03:10 +02:00
test_merger_repo.py Only return the latest config for project-branch 2024-03-05 09:01:57 +01:00
test_model.py Finish circular dependency refactor 2024-02-09 07:39:40 -08:00
test_model_upgrade.py Remove most model_api backwards-compat handling 2024-02-09 07:39:55 -08:00
test_multi_driver.py Limit scheduler count to 1 for other github related tests 2021-11-30 08:58:23 -08:00
test_nodepool.py Include job_uuid in NodeRequests 2023-12-20 10:44:04 -08:00
test_openstack.py Support overlapping repos and a flat workspace scheme 2021-04-29 17:56:24 -07:00
test_pagure_driver.py Add commit_id to zuul vars 2023-07-19 15:16:17 -07:00
test_prometheus.py Add readiness/liveness probes to prometheus server 2021-12-09 07:37:29 -08:00
test_push_reqs.py Make test setup_config more pure 2020-02-28 11:50:22 +01:00
test_reporting.py Address SqlAlchemy Removed in 2.0 Warnings 2023-01-30 11:49:30 -08:00
test_requirements.py Add configuration warnings 2023-07-20 17:24:19 -07:00
test_scheduler.py Merge "Add job name back to node request data" 2024-03-11 10:12:16 +00:00
test_serial.py Make fake test Gerrit merger more realistic 2020-04-29 15:00:05 -07:00
test_sos.py Finish circular dependency refactor 2024-02-09 07:39:40 -08:00
test_ssh_agent.py Add SSH Agent Primitives and usage 2017-05-26 09:52:22 -07:00
test_stack_dump.py Fix stack_dump_handler test 2024-03-01 14:25:39 -08:00
test_streaming.py Tidy some auth exceptions 2023-10-25 13:08:46 -07:00
test_strings.py Cleanup empty secrets dirs when deleting secrets 2021-10-19 09:38:21 -07:00
test_supercedent.py Ignore circular dependencies in supercedent pipelines 2024-03-04 10:50:23 -08:00
test_timer_driver.py Finish circular dependency refactor 2024-02-09 07:39:40 -08:00
test_tracing.py Finish circular dependency refactor 2024-02-09 07:39:40 -08:00
test_v3.py Handle dependency limit errors more gracefully 2024-03-19 14:37:26 +01:00
test_web.py Zuul-Web: substring search for builds, buildsets 2024-03-12 13:58:01 +01:00
test_web_urls.py Remove rpcclient from connection test fixtures 2022-01-17 12:49:28 -08:00
test_yamlutil.py Use cyaml when reading/writing Ansible 2023-08-22 16:15:19 -07:00
test_zk.py Replace Ansible 6 with Ansible 9 2024-02-15 16:20:45 -08:00
test_zuultrigger.py Honor independent pipeline requirements for non-live changes 2023-01-17 09:37:24 -08:00