aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add new filtering to exclude changes with picks to closed branchesHEADdevDaniel Smith8 days1-34/+239
| | | | | | Fixes: QTQAINFRA-7311 Change-Id: Ib6431254713baee94cc0ce19759fe7358d72c21d Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Extract SQL query parts into helper functionsDaniel Smith8 days1-175/+96
| | | | | | | General refactoring for improved readability and maintainability. Change-Id: I964d2319eda580fc45cbc4c1f994c738ee9fc0ad Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Query cherry-pick status in both public and tqtc reposDaniel Smith8 days1-3/+11
| | | | | | Fixes: QTQAINFRA-7289 Change-Id: I4ad8872e56e89c21e65394960d3b3f0c9b18942b Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Add /refreshStatus endpoint to sync cherry-pick status from GerritDaniel Smith8 days3-5/+172
| | | | | | | | | | | | | The gerrit plugin for cherry-pick status now provides a "Force refresh" button to users in the change view UI. The new endpoint provided by this commit fetches all changes of the same change ID in the current (or tqtc/ variant) and updates the status of the cherry-pick accordingly. Fixes: QTQAINFRA-7308 Change-Id: I50af411e742a4e18d9e27df6ef38a5b1dea3123b Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Force-disable Axios automatic parsing of gerrit responsesDaniel Smith2025-07-291-22/+40
| | | | | | | | | | | | | | | | | Gerrit responds to most successful requests with an XSSF response header that must be trimmed off before any JSON body can be parsed. If response.data is attempted to be accessed without this trimming, Axios will throw an error because the response is not valid JSON. Since trimming and parsing is already done on an as-needed basis, this commit forces Axios to not automatically parse the response data. Fixes: QTQAINFRA-7270 Change-Id: Ib1d818b3793440f2ef2832d974bd0e5f81cce174 Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Add authenticated recovery functionalityDaniel Smith2025-07-293-1/+51
| | | | | | | | | | | | | | | | | | | | | | This commit introduces a new recovery mechanism that allows an admin to directly trigger checkpointed logic of the cherry-pick bot by passing the event name and the necessary function parameters. This functionality is intended to re-run logic on changes which dead-ended in logic due to a bug or outage. While re-performing the entire cherry-pick logic is preferred by mocking a change-merged event, this patch allows for only specific logic to be re-run on demand. This feature is undocumented, and should only be used by trusted administrators, as improper use may cause unintended side effects. Fixes: QTQAINFRA-7269 Change-Id: I67aa80664a7a08879d3b6eb91b071acaeda23816 Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Fix access for original author in attention set logicDaniel Smith2025-07-292-4/+4
| | | | | Change-Id: I0ff1b84ed9fbf15e5d165e982c855f7719e399c1 Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Add Subject search functionality to cherrypick_status_db pluginDaniel Smith2025-06-301-1/+6
| | | | | | Task-number: QTQAINFRA-7257 Change-Id: I2fb8bedcc24a9487d454364da2f76860bde3700e Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Update tracking database to support change ID and sha1Daniel Smith2025-06-301-20/+72
| | | | | | | | | | | This provides an easy way to filter on a specific change ID or sha1 to see the cherry-pick statuses of a single targeted change. Fixes: QTQAINFRA-7256 Fixes: QTQAINFRA-7259 Change-Id: Id38acd68a829ef359ccf6b5065a82b8e98a3aa74 Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Update reviewer discovery logic to add useful reviewersDaniel Smith2025-06-305-240/+483
| | | | | | | | | | | | | | | | | | | | | | In a situation where a cherry-pick of a cherry-pick has conflicts, the bot previously failed to add useful reviewers to the change, instead adding only the bot itself to the reviewers list and attention set. This change updates fallback logic to ensure that reviewers who reviewed previous branch changes, and the original author where possible, are added to the reviewers list and attention set. In the event that none of the original reviewers have read access to the new branch, the bot will utilize a user/group specified by the environment variable `TQTC_LTS_NOTIFY_FALLBACK_USER`. Fixes: QTQAINFRA-7244 Change-Id: Ic48ba754e88b73e5aaf3a8aeee926edb8944da28 Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Update Cherry-pick bot to fall back to tqtc/esm- branchesDaniel Smith2025-06-307-39/+71
| | | | | | | | | | | | | | | | Qt 5.15 has been EOL, and "tqtc/lts-" branches are now closed for new changes. Any changes which should be backported to Qt 5.15 should now be cherry-picked to the tqtc/esm-5.15 branch. Note: The bot will complain about staging errors in ESM branches, but this is expected, as only Release Managers are allowed to stage changes to ESM branches. Fixes: QTQAINFRA-7235 Change-Id: I13b2d32ab3884e7d23c12d53dfa829a604f40d9e Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Add hashtags-changed events to webhook installerDaniel Smith2025-06-302-0/+2
| | | | | | | | | Hashtags-changed events are needed for the cherry-pick status dashboard. Task-number: QTQAINFRA-7139 Change-Id: I4fe2a31e803191384110462334eab09686eb6951 Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Add handling of hashtags to the cherry-pick status backendDaniel Smith2025-06-301-8/+133
| | | | | | | | | | | | | Changes are now watched for hashtag changes and those hashtags are stored in the pick status database. Note: Hashtags are only stored for the originating change; Filtering on hashtags thus only applies to that base change. Task-number: QTQAINFRA-7139 Change-Id: I14d1b9963d896d18c7abc1a0d3e1a598fad3de12 Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Make the webhook installer safer to useDaniel Smith2025-06-061-66/+201
| | | | | | | | | | | | This change updates the webhook installer to appropriately compare file content before creating a gerrit change, and ensures that updates are made via replacement of the existing contents rather than overwriting the file with the template directly. Change-Id: Ia5ccf201b724326069e7627f1f8838d4b3579ec3 Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Update the Core Benchmarks Server to handle new reposDaniel Smith2025-06-031-7/+17
| | | | | | | | | | | | | QtSVG has some benchmarks that are suitable to run as part of this benchmarks agent environment. The coordinator now includes repo as a parameter on Work items so that agents have the required information to clone the repo. Fixes: QTQAINFRA-7183 Change-Id: Iaa2161bdeddd7bf671656f25dbd4e95fd4de0f46 Reviewed-by: Audun Sutterud <audun.sutterud@qt.io> Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Update Jira Closer Bot to deal with dual cloud instancesDaniel Smith2025-06-039-431/+2618
| | | | | | | | | | | | | | | | | | | | | | | This change handles splitting the Qt Bugreports Jira to two separate Jira Cloud instances. Project caches are kept for both public and private jira to reduce the number of API calls. The Jira Closer plugin is itself agnostic to public or private instances, but jira_toolbox.js handles all requests by first testing the project cache or falling back to probing the public, and then the private jira instances to identify where projects are located. In this way, all requests to act on a given project are routed to the correct instance. The legacy code is kept in a separate directory for now (jira_closer_legacy), but will be removed in the future. This modification requires changes to environment variables. The legacy plugin also needs configuration. Review the specific plugin's config.json for required configuration. Task-number: QTQAINFRA-7060 Change-Id: I2073c312765e47099e66d2eee20d1d626266c1bd Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Add ability to update webhooks in All-ProjectsDaniel Smith2025-05-222-80/+132
| | | | | | | | | | | If production gerrit is cloned for a test instance, webhooks must be updated to point to test instances or disabled such that erroneous actions are not taken by bots in production. Task-number: QTQAINFRA-7180 Change-Id: I7ed3ccaeeacc1b6eb242122ec4ba853febfeb1cd Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Add new database query options for filtering on branchesDaniel Smith2025-05-201-16/+78
| | | | | | | | | | | | | | | | | | The new "branches" option passed in a request will cause only results containing a not-yet-merged cherrypick target on a given branch or branches to be returned. This is useful for release deadline monitoring, so that only relevant changes targeting a given branch are displayed. Includes a drive-by fix for flattening the parent dependency tree when creating the inital database entry for a change to ensure that only the first pick is given a null parent. Task-number: QTQAINFRA-7144 Change-Id: I2328de15fa1233e7216de7b265ebd0daafac30bb Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Hotfix: fix axiosRetry to gracefully handle timeout errorsDaniel Smith2025-04-251-2/+2
| | | | | | | | | | | In the event gerrit is down or too slow, axiosRetry will handle the retrying of the request, but if the purely timed out, the presence or lack of a response object needs to be handled gracefully. Fixes: QTQAINFRA-7134 Change-Id: I871e85aca4792adbca00f736cefda2881b429e11 Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Fixup: Add change-unstaged to watched events for cherrypick_status_dbDaniel Smith2025-04-252-1/+11
| | | | | | | | Also add missing defer events to the webhook template Fixes: QTQAINFRA-7117 Change-Id: I45d6496ac680408895fe83bb474a324f8660c473 Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Add a plugin for handling cherrypick status in the databaseDaniel Smith2025-04-253-1/+568
| | | | | | | | | | | This plugin provides an interface for retrieving the staus of ongoing cherry-picks in the system. Internally, updating the status of picks is done by listening to the gerrit event stream and reacting to the status updates. Task-number: QTQAINFRA-6948 Change-Id: I95913777e522c240129fb050ea5beaf66992097c Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Fix loading of plugins avoid running code when disabledDaniel Smith2025-04-231-10/+20
| | | | | | | | | | | | | | | Use of the autoloader package was causing plugins to be technically loaded even when they were disabled. While those plugins never got mounted to Notifer and were in practice disabled, loading them could lead to undefined behavior if a plugin has a startup routine. This change fixes the issue by checking the plugins's config first and then initializing it using require instead of autoloader. Fixes: QTQAINFRA-7058 Change-Id: I276b20297ce05ce73916779742763c6c065ad769 Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Update the Webhook Installer script to support updating webhooksDaniel Smith2025-04-232-51/+76
| | | | | | | | | | | This patch adds a new parameter --updateConfig which directs the script to update webhook configuration if it exists and differs from the template. Can be used safely in combination with --add. Task-number: QTQAINFRA-7117 Change-Id: I3b2c7810628c0a7d4a2eb6910a898bb4bfe2e57f Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Add a plugin to store and retrieve submodule update round statusDaniel Smith2025-02-245-1/+178
| | | | | | | | | | | Utilize the public-facing interface of cherry-pick-bot to provide a place to store the round status of submodule updates. This enabled moving the jenkins for submodule updates behind the firewall for enhanced security. Task-number: QTQAINFRA-6699 Change-Id: Idcc11d14d24dfc1c5138d06bfae5f0370b2371b0 Reviewed-by: Daniel Smith <daniel.smith@qt.io>
* Initial commit of cherry-pick bot in its own repoDaniel Smith2024-07-2547-0/+14765
Previously commited in qt/qtqa as 5c9fe11d513284a12f6ae3dcc65285e40cec88b1 Task-number: QTQAINFRA-6258 Change-Id: Iee87210a5c2e39895950693bfe71d6e0492e67c8