summaryrefslogtreecommitdiff
path: root/zuul
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Add "draft" github pipeline requirement"Zuul2022-10-132-11/+35
|\
| * Add "draft" github pipeline requirementJames E. Blair2022-10-102-11/+35
| | | | | | | | | | | | | | | | | | | | | | | | This adds the "draft" PR status as a pipeline requirement to the GitHub driver. It is already used implicitly in dependent pipelines, but this will allow it to be added explicitly to other pipelines (for example, check). This also fixes some minor copy/pasta errors in debug messages related to github pipeline requirements. Change-Id: I05f8f61aee251af24c1479274904b429baedb29d
* | Merge "Add timer driver debugging"Zuul2022-10-131-0/+13
|\ \
| * | Add timer driver debuggingJames E. Blair2022-10-131-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | Some test failures originate due to an apscheduler thread that is still running. Add some debugging to the timer driver to try to help identify if there is a problem with the start/stop sequence. Change-Id: Idcaf7ac0adfff737d88d2f42fcc4e1305bfea607
* | | Merge "Fix shutdown race in timer driver"Zuul2022-10-132-4/+8
|\ \ \ | |/ /
| * | Fix shutdown race in timer driverJames E. Blair2022-10-132-4/+8
| |/ | | | | | | | | | | | | | | | | | | | | | | If a reconfiguration happens after the timer connection is stopped, we should not restart the apscheduler; that can lead to zombie threads. We should not perferm a reconfiguration after stopping the connection anyway, so to correct that, change the shutdown sequence so that we stop the layout update thread before we stop the connections. Change-Id: If9c387dfc42fcba7de3969d81cf2c7917d7e4fa3
* | Merge "Correctly (de-)serialize the topic of a change"Zuul2022-10-131-0/+2
|\ \
| * | Correctly (de-)serialize the topic of a changeSimon Westphahl2022-10-131-0/+2
| |/ | | | | | | | | | | | | | | A change's topic so far was not stored in with the change in Zookeeper. Due to that the Gerrit dependencies-by-topic feature wasn't working in a multi-scheduler setup. Change-Id: I815e90607d839886921b61625075b3df96ca0bbd
* | Deprecate Ansible 5, make Ansible 6 the defaultJames E. Blair2022-10-111-1/+2
|/ | | | | | | Ansible 5 is no longer supported and 6 is available and working. Deprecate Ansible 5. Change-Id: I8c152f7c0818bccd07f50e85bef9a82ddb863a68
* Merge "End node request span when result event is sent"Zuul2022-10-101-4/+4
|\
| * End node request span when result event is sentSimon Westphahl2022-10-071-4/+4
| | | | | | | | | | | | | | | | The node request span needs to be ended whenever we add a result event to the pipeline. Before we only did that when iterating over the node requests after we've won the nodepool election. Change-Id: I0276d5498b243522540657352a733d663ae71918
* | Merge "configloader: Fix error report for job nodesets"Zuul2022-10-081-4/+10
|\ \ | |/ |/|
| * configloader: Fix error report for job nodesetsIan Wienand2022-10-031-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a job nodeset, you do not need a "name", but some of the error logic assumes it. This leads to a rather confusing error return; for example something like job: ... nodeset: nodes: [] groups: - name: a_group nodes: - a_node_that_does_not_exist leads to Zuul encountered a syntax error while parsing its configuration in the repo opendev/system-config on branch master. The error was: 'name' when really it is trying to tell you is that "this_node_not_defined" isn't defined, but it tries to de-reference the name of the nodeset: and fails. This keeps track of the anonymous nodeset flag and if set, then rewords the error to make sense in the job context; for example it will now say: Zuul encountered a syntax error while parsing its configuration in the repo org/project on branch master. The error was: In the nodeset the group "a_group" contains a node named "a_node_that_does_not_exist" which is not defined in the nodeset. The error appears in the following job stanza: job: name: test job nodeset: nodes: [] groups: - name: a_group nodes: - a_node_that_does_not_exist Test cases are added to cover the updated messages. Change-Id: Ia24e66ba9b97618636023cb61d7c82aa7306d678
* | Merge "Store parent span context with span info"Zuul2022-10-071-1/+15
|\ \
| * | Store parent span context with span infoSimon Westphahl2022-10-061-1/+15
| | | | | | | | | | | | Change-Id: Idb9b673542c2054f7bbae094ad5702a472197fe1
* | | Merge "Don't trace merge jobs that we don't lock"Zuul2022-10-061-7/+10
|\ \ \ | |/ / |/| |
| * | Don't trace merge jobs that we don't lockJames E. Blair2022-10-051-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We get a trace from every merger (including executors) for every merge job because we start the trace before attempting the lock. So essentially, we get one trace from the merger that runs the job, and one trace from every other merger indicating that it did not run the job. This is perhaps too much detail for us. While it's true that we can see the response times of every system component here, it may be sufficient to have only the response time of the first merger. This will reduce the noise in trace visualizations significantly. Change-Id: I88c56f00c060eae9316473f4a4e222a0db97e510
* | | Merge "Include tenant and pipeline in QueueItem span"Zuul2022-10-061-0/+2
|\ \ \ | |/ /
| * | Include tenant and pipeline in QueueItem spanJames E. Blair2022-10-051-0/+2
| | | | | | | | | | | | | | | | | | | | | This (especially the pipeline name) may help us narrow down what we're looking for when there are multiple queueitems for an event. Change-Id: I4e5c53d6379f6501730fab6d599a37c0965f2287
* | | Correct exit routine in web, mergerJames E. Blair2022-10-054-21/+45
|/ / | | | | | | | | | | | | | | | | | | Change I216b76d6aaf7ebd01fa8cca843f03fd7a3eea16d unified the service stop sequence but omitted changes to zuul-web. Update zuul-web to match and make its sequence more robust. Also remove unecessary sys.exit calls from the merger. Change-Id: Ifdebc17878aa44d57996e4bdd46e49e6144b406b
* | Merge "Trace Zuul trigger events"Zuul2022-10-042-16/+35
|\ \
| * | Trace Zuul trigger eventsSimon Westphahl2022-09-302-16/+35
| | | | | | | | | | | | | | | | | | | | | | | | Start a span when creating Zuul trigger events when a change is merged or enqueued. The span will be linked to the span of the queue item that was enqueued or merged. Change-Id: I3870ef2755136a9e8684494da69aefc5f426728e
* | | Merge "Trace timer trigger events"Zuul2022-10-041-2/+9
|\ \ \ | |/ /
| * | Trace timer trigger eventsSimon Westphahl2022-09-301-2/+9
| | | | | | | | | | | | Change-Id: I01a4d954889def1fbb1c304742a031c6c1b4e06f
* | | Merge "Trace Git connection events"Zuul2022-10-041-2/+5
|\ \ \ | |/ /
| * | Trace Git connection eventsSimon Westphahl2022-09-301-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | The connection event span is created when we generate the trigger events. Contrary to the other drivers there is no pre-processing step and therefore no span. Change-Id: I9067ff9b47085d7f08017ff70955227fdd3a5b41
* | | Merge "Trace Pagure connection events"Zuul2022-10-041-5/+21
|\ \ \ | |/ /
| * | Trace Pagure connection eventsSimon Westphahl2022-09-301-5/+21
| | | | | | | | | | | | Change-Id: I4f031d9ab4e1a25bc14807a4251e3fab922038c5
* | | Merge "Trace Gitlab connection events"Zuul2022-10-041-5/+21
|\ \ \ | |/ /
| * | Trace Gitlab connection eventsSimon Westphahl2022-09-301-5/+21
| | | | | | | | | | | | Change-Id: I75e27fd0c2efd79f817318b5cae8d76c1483d744
* | | Merge "Trace Gerrit connection events"Zuul2022-10-041-10/+29
|\ \ \ | |/ /
| * | Trace Gerrit connection eventsSimon Westphahl2022-09-301-10/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | Creates the first span when adding a connection event to the queue that is then linked to the span for the event pre-processing. The pre-processing span is implicitly propagated via the trigger event. Change-Id: Id6790695d6c440c5576db75b859a25ef089f1d46
* | | Merge "Trace received Github events"Zuul2022-10-042-6/+36
|\ \ \ | |/ /
| * | Trace received Github eventsSimon Westphahl2022-09-302-6/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We'll create a span when zuul-web receives a Github webhook event which is then linked to the span for the event pre-processing step. The pre-processing span context will be added to the trigger events and with Icd240712b86cc22e55fb67f6787a0974d5308043 complete tracing of the whole chain from receiving a Github event until a change is enqueued. Change-Id: I1734a3a9e44f0ae01f5ed3453f8218945c90db58
* | | Merge "Link span of queue item to trigger event span"Zuul2022-10-043-2/+31
|\ \ \ | |/ /
| * | Link span of queue item to trigger event spanSimon Westphahl2022-09-303-2/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change links the span of the queue item to the span of the forwarded trigger event. This adds a currently empty span context field to trigger events which will be later populated by the drivers. We also need to add add a span context field to `ChangeManagementEvent`s, as some drivers add dequeue events to the pipeline event queues directly. Change-Id: Icd240712b86cc22e55fb67f6787a0974d5308043
* | | Merge "Set default SSH_AUTH_SOCK in zuul-bwrap command"Zuul2022-10-031-1/+3
|\ \ \ | |_|/ |/| |
| * | Set default SSH_AUTH_SOCK in zuul-bwrap commandClark Boylan2022-09-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The zuul-bwrap command is useful for debugging things under the zuul bwrap environment. Unfortunately, the way things are written it assumes there will be an SSH_AUTH_SOCK. For much debugging you might manually do in this environment an SSH_AUTH_SOCK is unnecessary. Instead of throwing a obtuse error simply set the value to /dev/null if not otherwise set. Change-Id: Iec0ee93c6e6b1b647a27c9a7fdf280d14d5d2596
* | | Merge "Create link to previous buildset span"Zuul2022-09-283-13/+26
|\ \ \ | | |/ | |/|
| * | Create link to previous buildset spanSimon Westphahl2022-09-193-13/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create a link to the previous buildset span on gate reset. To make this work we'll start the buildset span when the buildset is created instead of only when we set the configuration. This change also adds the `is_remote` flag of the span context of related links. This is required for creating a `SpanContext` in order to deserialize the links. Change-Id: If3a3a83739c1472659d71d05dcf67f84ddce4247
* | | Merge "Trace node request phase"Zuul2022-09-284-3/+17
|\ \ \ | |/ /
| * | Trace node request phaseSimon Westphahl2022-09-194-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | Since we are mainly interested in the time taken until the request is failed or fulfilled we won't create a span for full the lifetime of the node request. Change-Id: Ia8d9aaaac3ab4a4791eace2024c1ecb1b9c7a6bd
* | | Merge "Trace merge requests and merger operations"Zuul2022-09-284-13/+75
|\ \ \ | |/ /
| * | Trace merge requests and merger operationsSimon Westphahl2022-09-194-13/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The span info for the different merger operations is stored on the request and will be returned to the scheduler via the result event. This also adds the request UUID to the "refstat" job so that we can attach that as a span attribute. Change-Id: Ib6ac7b5e7032d168f53fe32e28358bd0b87df435
* | | Merge "Add span for builds and propagate via request"Zuul2022-09-284-20/+66
|\ \ \ | |/ /
| * | Add span for builds and propagate via requestSimon Westphahl2022-09-194-20/+66
| | | | | | | | | | | | | | | | | | Change-Id: Ib10452862e7aa1355502bb381d3ff07c65ac7187 Co-Authored-By: James E. Blair <jim@acmegating.com> Co-Authored-By: Tristan Cacqueray <tdecacqu@redhat.com>
* | | Merge "Fix instance check when refreshing dependencies"Zuul2022-09-271-1/+1
|\ \ \
| * | | Fix instance check when refreshing dependenciesSimon Westphahl2022-09-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2022-09-23 10:01:32,395 ERROR zuul.Scheduler: Exception processing pipeline post in tenant foobar Traceback (most recent call last): File "/opt/zuul/lib/python3.10/site-packages/zuul/scheduler.py", line 2089, in process_pipelines refreshed = self._process_pipeline( File "/opt/zuul/lib/python3.10/site-packages/zuul/scheduler.py", line 2157, in _process_pipeline self.process_pipeline_trigger_queue(tenant, pipeline) File "/opt/zuul/lib/python3.10/site-packages/zuul/scheduler.py", line 2350, in process_pipeline_trigger_queue self._process_trigger_event(tenant, pipeline, event) File "/opt/zuul/lib/python3.10/site-packages/zuul/scheduler.py", line 2380, in _process_trigger_event pipeline.manager.refreshDeps(change, event) File "/opt/zuul/lib/python3.10/site-packages/zuul/manager/__init__.py", line 296, in refreshDeps for dep_change_ref in item.change.commit_needs_changes: AttributeError: 'Branch' object has no attribute 'commit_needs_changes' Change-Id: I740d277c59764acfe982a24e3c5e972e8d3179d6
* | | | Merge "zuul-stream: Add variable to disable writing streaming files"Zuul2022-09-272-6/+18
|\ \ \ \ | |/ / / |/| | |
| * | | zuul-stream: Add variable to disable writing streaming filesIan Wienand2022-09-142-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upon further discussion we recently found another case of leaking console streaming files; if the zuul_console is not running on port 19885, or can not be reached, the streaming spool files will still be leaked. The prior work in I823156dc2bcae91bd6d9770bd1520aa55ad875b4 has the receiving side indicate to the zuul_console daemon that it should remove the spool file. If this doesn't happen, either because the daemon was never there, or it is firewalled off, the streaming spool files are left behind. This modifies the command action plugin to look for a variable "zuul_console_disable" which will indicate to the library running the shell/command task not to write out the spool file at all, as it will not be consumed. It is expected this would be set at a host level in inventory for nodes that you know can not or will not have access to zuul_console daemon. We already have a mechanism to disable this for commands running in a loop; we expand this with a new string type. The advantage of this is it leaves the library/command.py side basically untouched. Documentation is updated, and we cover this with a new test. Change-Id: I0273993c3ece4363098e4bf30bfc4308bb69a8b4