summaryrefslogtreecommitdiff
path: root/releasenotes
Commit message (Collapse)AuthorAgeFilesLines
* Merge "merger: Keep redundant cherry-pick commits"Zuul2023-03-151-0/+14
|\
| * merger: Keep redundant cherry-pick commitsJoshua Watt2023-03-011-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In normal git usage, cherry-picking a commit that has already been applied and doesn't do anything or cherry-picking an empty commit causes git to exit with an error to let the user decide what they want to do. However, this doesn't match the behavior of merges and rebases where non-empty commits that have already been applied are simply skipped (empty source commits are preserved). To fix this, add the --keep-redundant-commit option to `git cherry-pick` to make git always keep a commit when cherry-picking even when it is empty for either reason. Then, after the cherry-pick, check if the new commit is empty and if so back it out if the original commit _wasn't_ empty. This two step process is necessary because git doesn't have any options to simply skip cherry-pick commits that have already been applied to the tree. Removing commits that have already been applied is particularly important in a "deploy" pipeline triggered by a Gerrit "change-merged" event, since the scheduler will try to cherry-pick the change on top of the commit that just merged. Without this option, the cherry-pick will fail and the deploy pipeline will fail with a MERGE_CONFICT. Change-Id: I326ba49e2268197662d11fd79e46f3c020675f21
* | Merge "Expose nodepool slot attribute"Zuul2023-03-151-0/+7
|\ \
| * | Expose nodepool slot attributeJames E. Blair2022-11-301-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nodepool now exposes a slot attribute which is set by the static and metastatic drivers to provide a stable id for which "slot" is occupied by a node on a host with max-parallel-jobs > 1. Expose this as a variable to Ansible so that jobs can use it to provide stable but non-conflicting workspace paths. This also documents all of the current "nodepool" host vars. Change-Id: I07cea423df7811c1de7763ff48b8308768246810
* | | Merge "Elasticsearch: filter zuul data from job returned vars"Zuul2023-03-101-0/+6
|\ \ \ | |_|/ |/| |
| * | Elasticsearch: filter zuul data from job returned varsThomas Cardonne2022-09-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove data under the `zuul` key from the job returned vars. These returned values are meant to be used only by Zuul and shouldn't be included in documents as it may include large amount of data such as file comments. Change-Id: Ie6de7e3373b21b7c234ffedd5db7d3ca5a0645b6
* | | Add an !unsafe change_message variableJames E. Blair2023-02-091-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In I9628e2770dda120b269612e28bb6217036942b8e we switched zuul.change from a plain string tagged with !unsafe to base64 encoded and no !unsafe tag. The idea was to make the inventory file parseable by external tools while avoiding accidental interpolation of the commit message by Ansible. That doesn't work in all cases -- it's not hard to construct a scenario where after base64 decoding the message any further processing by Ansible causes it to undergo interpolation. Moreover, since then we have made many changes to how we deal with variables; notably, the inventory.yaml is no longer actually used by Zuul's Anisble -- it is now there only for human and downstream processing. We call it the "debug inventory". The actual inventory is much more complex and in some cases has lots of !unsafe tags in it. Given all that, it now seems like the most straightforward way to deal with this is to tag the message variable as !unsafe when passing it to Zuul's Ansible, but render it as plain text in the inventory.yaml. To address backwards compatability, this is done in a new variable called zuul.change_message. Since that's a more descriptive variable anyway, we will just keep that one in the future and drop the current base64- encoded zuul.message variable Change-Id: Iea86de15e722bc271c1bf0540db2c9efb032500c
* | | Fix include-branches priorityJoshua Watt2023-01-201-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per the documentation, include-branches should be able to override exclude-branches, but this was not the case in the way the code was written. Rework the code to correct this, and also add a test to ensure it works as documented Change-Id: I2e23b1533c67ccf84b4d6a36f5a003adc7b3e45a
* | | Honor independent pipeline requirements for non-live changesJames E. Blair2023-01-171-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Independent pipelines ignore requirements for non-live changes because they are not actually executed. However, a user might configure an independent pipeline that requires code review and expect a positive code-review pipeline requirement to be enforced. To ignore it risks executing unreviewed code via dependencies. To correct this, we now enforce pipeline requirements in independent pipelines in the same way as dependent ones. This also adds a new "allow-other-connections" pipeline configuration option which permits users to specify exhaustive pipeline requirements. Change-Id: I6c006f9e63a888f83494e575455395bd534b955f Story: 2010515
* | | Store pause and resume events on the build and report themFelix Edel2023-01-021-0/+5
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | When a build is paused or resumed, we now store this information on the build together with the event time. Instead of additional attributes for each timestamp, we add an "event" list attribute to the build which can also be used for other events in the future. The events are stored in the SQL database and added to the MQTT payload so the information can be used by the zuul-web UI (e.g. in the "build times" gantt chart) or provided to external services. Change-Id: I789b4f69faf96e3b8fd090a2e389df3bb9efd602
* | Merge "Detect errors with non-permitted parent jobs"Zuul2022-11-151-0/+12
|\ \
| * | Detect errors with non-permitted parent jobsJames E. Blair2022-10-261-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently only detect some errors with job parents when freezing the job graph. This is due to the vagaries of job variants, where it is possible for a variant on one branch to be okay while one on another branch is an error. If the erroneous job doesn't match, then there is no harm. However, in the typical case where there is only one variant or multiple variants are identical, it is possible for us to detect during config loading a situation where we know the job graph generation will later fail. This change adds that analysis and raises errors early. This can save users quite a bit of time, and since variants are typically added one at a time, may even prevent users from getting into abiguous situations which could only be detected when freezing the job graph. Change-Id: Ie8b9ee7758c94788ee7bc05947ddd97d9fa8e075
* | | Merge "Add playbook semaphores"Zuul2022-11-101-0/+11
|\ \ \
| * | | Add playbook semaphoresJames E. Blair2022-11-071-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the ability to specify that the Zuul executor should acquire a semaphore before running an individual playbook. This is useful for long running jobs which need exclusive access to a resources for only a small amount of time. Change-Id: I90f5e0f570ef6c4b0986b0143318a78ddc27bbde
* | | | Fix skipped builds filter in web uiJames E. Blair2022-11-011-0/+5
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change to automatically filter out skipped builds inadvertently affected the buildsets tab as well since they share the query builder. This caused the buildsets tab to automatically append a filter which is invalid for buildsets and therefore return a 404. This change adds an argument to the query builder to indicate whether it should include the automatic filter. Additionally, the query builder had an error which caused it to append the query in all cases (which affects the otherwise working builds tab). This change corrects that as well. Change-Id: Id03eee51b3551c4b32ae3c6b784b0993c4a3779c
* | | Merge "Fix implied branch matchers and override-checkout"8.0.0Zuul2022-10-271-0/+13
|\ \ \
| * | | Fix implied branch matchers and override-checkoutJames E. Blair2022-10-201-0/+13
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When specifying job.override-checkout, we apply job variants from that match the specified branch. The mechanism we use to do that is to create a synthetic Ref object to pass to the branch matcher instead of the real branch of the Change (since the real branch is likely different -- that's why override-checkout was specified). However, branch matching behavior has gottes slightly more sophisticated and Ref objects don't match in the same way that Change objects do. In particular, implied branch matchers match Ref subclasses that have a branch attribute iff the match is exact. This means that if a user constructed two branches: * testbranch * testbranch2 and used override-checkout to favor a job definition from testbranch2, the implied branch matcher for the variant in testbranch would match since the matcher behaved as if it were matching a Ref not a Change or Branch. To correct this, we update the simulated change object used in the override-checkout variant matching routine to be a Branch (which unsurprisingly has a branch attribute) instead of a Ref. The test test_implied_branch_matcher_similar_override_checkout is added to cover this test case. Additionally, the test test_implied_branch_matcher_similar is added for good measure (it tests implied branch matchers in the same way but without specifying override-checkout), though its behavior is already correct. A release note is included since this may have an effect on job behavior. Change-Id: I1104eaf02f752e8a73e9b04939f03a4888763b27
* | | Merge "Add rebase-merge merge mode"Zuul2022-10-271-0/+5
|\ \ \
| * | | Add rebase-merge merge modeJames E. Blair2022-10-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GitHub supports a "rebase" merge mode where it will rebase the PR onto the target branch and fast-forward the target branch to the result of the rebase. Add support for this process to the merger so that it can prepare an effective simulated repo, and map the merge-mode to the merge operation in the reporter so that gating behavior matches. This change also makes a few tweaks to the merger to improve consistency (including renaming a variable ref->base), and corrects some typos in the similar squash merge test methods. Change-Id: I9db1d163bafda38204360648bb6781800d2a09b4
* | | | Merge "Change merge mode default based on driver"Zuul2022-10-271-0/+10
|\ \ \ \ | |/ / /
| * | | Change merge mode default based on driverJames E. Blair2022-10-131-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default merge mode is 'merge-resolve' because it has been observed that it more closely matches the behavior of jgit in Gerrit (or, at least it did the last time we looked into this). The other drivers are unlikely to use jgit and more likely to use the default git merge strategy. This change allows the default to differ based on the driver, and changes the default for all non-gerrit drivers to 'merge'. The implementation anticipates that we may want to add more granularity in the future, so the API accepts a project as an argument, and in the future, drivers could provide a per-project default (which they may obtain from the remote code review system). That is not implemented yet. This adds some extra data to the /projects endpoint in the REST api. It is currently not easy (and perhaps not possible) to determine what a project's merge mode is through the api. This change adds a metadata field to the output which will show the resulting value computed from all of the project stanzas. The project stanzas themselves may have null values for the merge modes now, so the web app now protects against that. Change-Id: I9ddb79988ca08aba4662cd82124bd91e49fd053c
* | | | Add access-rules configuration and documentationJames E. Blair2022-10-251-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows configuration of read-only access rules, and corresponding documentation. It wraps every API method in an auth check (other than info endpoints). It exposes information in the info endpoints that the web UI can use to decide whether it should send authentication information for all requests. A later change will update the web UI to use that. Change-Id: I3985c3d0b9f831fd004b2bb010ab621c00486e05
* | | | Merge "Rename admin-rule to authorization-rule"Zuul2022-10-251-0/+24
|\ \ \ \
| * | | | Rename admin-rule to authorization-ruleJames E. Blair2022-10-061-0/+24
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a preparatory step to add access-control for read-level access to the API and web UI. Because we will likely end up with tenant config that looks like: - tenant: name: example admin-rules: ['my-admin-rule'] access-rules: ['my-read-only-rule'] It does not make sense for 'my-read-only-rule' to be defined as: - admin-rule: name: read-only-rule In other words, the current nomenclature conflates (new word: nomenconflature) the idea of an abstract authorization rule and what it authorizes. The new name makes it more clear than an authorization-rule can be used to authorize more than just admin access. Change-Id: I44da8060a804bc789720bd207c34d802a52b6975
* | | | Merge "Remove Ansible 5"Zuul2022-10-241-0/+6
|\ \ \ \ | |_|/ / |/| | |
| * | | Remove Ansible 5James E. Blair2022-10-111-0/+6
| | | | | | | | | | | | | | | | Change-Id: Icd8c33dfe1c8ffd21a717a1a94f1783c244a6b82
* | | | Merge "Add "draft" github pipeline requirement"Zuul2022-10-131-0/+6
|\ \ \ \ | |/ / / |/| | |
| * | | Add "draft" github pipeline requirementJames E. Blair2022-10-101-0/+6
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Deprecate Ansible 5, make Ansible 6 the defaultJames E. Blair2022-10-111-0/+6
|/ / | | | | | | | | | | | | Ansible 5 is no longer supported and 6 is available and working. Deprecate Ansible 5. Change-Id: I8c152f7c0818bccd07f50e85bef9a82ddb863a68
* | Merge " Add semaphore support to web UI"Zuul2022-10-061-0/+5
|\ \
| * | Add semaphore support to web UIJames E. Blair2022-09-211-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | This updates the OpenAPI docs to include the semaphores endpoint, and adds a Semaphores tab to the web UI to show information about semaphores within a tenant. Change-Id: If78b27131ac76aff93c47a986fce6eae3e068668
* | | Merge "Remove support for Ansible 2"Zuul2022-09-231-0/+6
|\ \ \
| * | | Remove support for Ansible 2James E. Blair2022-09-141-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Versions 2.8 and 2.9 are no longer supported by the Ansible project. Change-Id: I888ddcbecadd56ced83a27ae5a6e70377dc3bf8c
* | | | Merge "Add nodeset alternatives"Zuul2022-09-161-0/+7
|\ \ \ \
| * | | | Add nodeset alternativesJames E. Blair2022-09-081-0/+7
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This feature instructs Zuul to attempt a second or more node request with a different node configuration (ie, possibly different labels) if the first one fails. It is intended to address the case where a cloud provider is unable to supply specialized high-performance nodes, and the user would like the job to proceed anyway on lower-performance nodes. Change-Id: Idede4244eaa3b21a34c20099214fda6ecdc992df
* | | | Merge "Remove deprecated pipeline queue configuration"Zuul2022-09-162-1/+7
|\ \ \ \
| * | | | Remove deprecated pipeline queue configurationJames E. Blair2022-09-082-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was deprecated quite some time ago and we should remove it as part of the next major release. Also remove a very old Zuul v1 layout.yaml from the test fixtures. Change-Id: I40030840b71e95f813f028ff31bc3e9b3eac4d6a
* | | | | Merge "Remove merge-failure pipeline configuration"Zuul2022-09-161-0/+6
|\ \ \ \ \ | |/ / / /
| * | | | Remove merge-failure pipeline configurationJames E. Blair2022-09-021-0/+6
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | This was previously deprecated and should be removed shortly before we release Zuul v7. Change-Id: Idbdfca227d2f7ede5583f031492868f634e1a990
* | | | Merge "Add option to include returned data in MQTT reporter"Zuul2022-09-161-0/+6
|\ \ \ \ | |/ / / |/| | |
| * | | Add option to include returned data in MQTT reporterJames E. Blair2022-09-131-0/+6
| |/ / | | | | | | | | | | | | | | | | | | | | | This adds an option to include result data from a job in the MQTT reporter. It is off by default since it may be quite large for some jobs. Change-Id: I802adee834b60256abd054eda2db834f8db82650
* | | Add Ansible 6James E. Blair2022-09-021-0/+6
| | | | | | | | | | | | Change-Id: I0d450d9385b9aaab22d2d87fb47798bf56525f50
* | | Deprecate Ansible 2, make Ansible 5 defaultJames E. Blair2022-09-021-0/+5
|/ / | | | | | | Change-Id: I2576d0dcec7c8f7bbb76bdd469fd992874742edc
* | Add config-error reporter and report config errors to DBJames E. Blair2022-08-221-0/+6
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a config-error pipeline reporter configuration option and now also reports config errors and merge conflicts to the database as buildset failures. The driving use case is that if periodic pipelines encounter config errors (such as being unable to freeze a job graph), they might send email if configured to send email on merge conflicts, but otherwise their results are not reported to the database. To make this more visible, first we need Zuul pipelines to report buildset ends to the database in more cases -- currently we typically only report a buildset end if there are jobs (and so a buildset start), or in some other special cases. This change adds config errors and merge conflicts to the set of cases where we report a buildset end. Because of some shortcuts previously taken, that would end up reporting a merge conflict message to the database instead of the actual error message. To resolve this, we add a new config-error reporter action and adjust the config error reporter handling path to use it instead of the merge-conflicts action. Tests of this as well as the merge-conflicts code path are added. Finally, a small debug aid is added to the GerritReporter so that we can easily see in the logs which reporter action was used. Change-Id: I805c26a88675bf15ae9d0d6c8999b178185e4f1f
* Apply timer trigger jitter to project-branchesJames E. Blair2022-07-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the timer trigger accepts an optional "jitter" specification which can delay the start of a pipeline timer trigger by up to a certain number of seconds. It applies uniformly to every project-branch that participates in the pipeline. For example, if a periodic pipeline with nova and glance is configured to trigger at midnight, and has a jitter of 30 seconds, then the master and stable branches of nova and glance will all be enqueued at the same time (perhaps 00:00:17). While this provides some utility in that if other systems are configured to do things around midnight, this pipeline may not join a thundering herd with them. Or if there are many periodic pipelines configured for midnight (perhaps across different tenants, or just with slightly different purposes), they won't be a thundering hurd. But to the extent that jobs within a given pipeline might want to avoid a thundering herd with other similar jobs in the same pipeline, it offers no relief. While Zuul may be able to handle it (especially since multiple schedulers allows other pipelines to continue to operate), these jobs may interact with remote systems which would appreciate not being DoS'd. To alleviate this, we change the jitter from applying to the pipeline as a whole to individual project-branches. To be clear, it is still the case that the pipeline has only a single configured trigger time (this change does not allow projects to configure their own triggers). But instead of firing a single event for the entire pipeline, we will fire a unique event for every project-branch in that pipeline, and these events will have the jitter applied to them individually. So in our example above, nova@master might fire at 00:00:05, nova@stable/zulu may fire at 00:00:07, glance@master at 00:00:13, etc. This behavior is similar enough in spirit to the current behavior that we can consider it a minor implementation change, and it doesn't require any new configuration options, feature flags, deprecation notice, etc. The documentation is updated to describe the new behavior, as well as correct an error relating to the description of jitter (it only delays, not advances, events). We currently add a single job to APScheduler for every timer triggered pipeline in every tenant (so the number of jobs is the sum of the periodic pipelines in every tenant). OpenDev for example may have on the order of 20 APScheduler jobs. With the new approach, we will enqueue a job for each project-branch in a periodic pipeline. For a system like OpenDev, that could potentially be thousands of jobs. In reality, based on current configuration and pipeline participation, it should be 176. Even though it will result in the same number of Zuul trigger events, there is overhead to having more APScheduler jobs. To characterize this, I performed a benchmark where I added a certain number of APScheduler jobs with the same trigger time (and no jitter) and recorded the amount of time needed to add the jobs and also, once the jobs began firing, the elapsed time from the first to the last job. This should charactize the additional overhead the scheduler will encounter with this change. Time needed to add jobs to APScheduler (seconds) 1: 0.00014448165893554688 10: 0.0009338855743408203 100: 0.00925445556640625 1000: 0.09204769134521484 10000: 0.9236903190612793 100000: 11.758053541183472 1000000: 223.83168983459473 Time to run jobs (last-first in seconds) 1: 2.384185791015625e-06 10: 0.006863832473754883 100: 0.09936022758483887 1000: 0.22670435905456543 10000: 1.517075777053833 100000: 19.97287678718567 1000000: 399.24730825424194 Given that this operates primarily at the tenant level (when a tenant reconfiguration happens, jobs need to be removed and added), I think it makes sense to consider up to 10,000 jobs a reasonable high end. It looks like we can go a little past that (between 10,000 and 100,000) while still seeing something like a linear increase. As we approach 1,000,000 jobs it starts looking more polynomial and I would not conisder the performance to be acceptable. But 100,000 is already an unlikely number, so I think this level of performance is okay within the likely range of jobs. The default executor used by APScheduler is a standard python ThreadPoolExecutor with a maximum of 10 simultaneous workers. This will cause us to fire up to 10 Zuul event simultaneously (whereas before we were only likely to fire simultaneous events if multiple tenants had identical pipeline timer triggers). This could result in more load on the connection sources and change cache as they update the branch tips in the change cache. It seems plausible that 10 simulatenous events is something that the sources and ZK can handle. If not, we can reduce the granularity of the lock we use to prevent updating the same project at the same time (to perhaps a single lock for all projects), or construct the APScheduler with a lower number of max_workrs. Change-Id: I27fc23763da81273eb135e14cd1d0bd95964fd16
* Merge "Add build set URL to reporter"Zuul2022-07-011-0/+5
|\
| * Add build set URL to reporterKenny Ho2022-06-261-0/+5
| | | | | | | | | | | | | | | | | | | | formatStatusUrl() return build set URL when the item.current_build_set.result exist (zuul/model.py) Also updated the quick-start to continue to look for the build URL instead of the buildset URL. Change-Id: I5f8433e2926da5a8d14b966d89cc943be1ecfca9
* | Merge "Validate dependent job names"Zuul2022-07-011-0/+12
|\ \
| * | Validate dependent job namesJames E. Blair2022-06-151-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is possible to merge an invalid Zuul config by having a dependency on a job which does not exist (e.g., due to a typo in the job name). If this happens, the problem will only be detected when the job graph is frozen. At this point, the user will need to try to find out where the erroneus reference is defined. To try to avoid this situation, we can validate job dependency references early, as we do most other configuration objects (such as references to nodesets from jobs). This should help users avoid merging new errors. Existing jobs and project stanzas with reference errors will become invalid and ineffective, which may cause some collatoral damage, so a release note is included. This may have escaped notice so far because within a single repo, attempting to add a bad config would trigger an error freezing the job graph and therefore bringing the error to the attention of the user. Having a project stanza in a config project is much more likely to produce the issue since the job graph would not be frozen as part of that change. Change-Id: I196a2fb13e93847bc4db4b20f30dea8fecba6325
* | | Merge "Replace 'web' section with 'webclient'"Zuul2022-07-011-1/+1
|\ \ \