From b90cb16d67845aab0563479c786951e38a18a38b Mon Sep 17 00:00:00 2001 From: Sam Doran Date: Fri, 17 Jul 2026 12:25:38 -0400 Subject: [PATCH 1/3] Add cherry_picker config --- .cherry_picker.toml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .cherry_picker.toml diff --git a/.cherry_picker.toml b/.cherry_picker.toml new file mode 100644 index 000000000..3d35a58a2 --- /dev/null +++ b/.cherry_picker.toml @@ -0,0 +1,5 @@ +team = "lightspeed-core" +repo = "lightspeed-stack" +check_sha = "ea5de69d94e33aa2a75a622fec455bc4b0fa6c6b" +fix_commit_msg = false +default_branch = "main" From a3bc47a6442f52fea8162b09b8dc26791c2bb097 Mon Sep 17 00:00:00 2001 From: Sam Doran Date: Fri, 17 Jul 2026 12:26:44 -0400 Subject: [PATCH 2/3] Update valid prefixes Include the prefix used for backports which will be the release branch name in brackets such as "[release/0.6]". --- .github/pr-title-checker-config.json | 11 ++++++++++- AGENTS.md | 2 +- docs/demos/lcore/contributing_guidelines.md | 5 ++++- docs/devel_doc/contributing_guide.md | 14 +++++++++----- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/pr-title-checker-config.json b/.github/pr-title-checker-config.json index d755f04c9..e0ff11136 100644 --- a/.github/pr-title-checker-config.json +++ b/.github/pr-title-checker-config.json @@ -4,7 +4,16 @@ "color": "EEEEEE" }, "CHECKS": { - "prefixes": ["LCORE-", "RSPEED-", "MGTM-", "OLS-", "RHIDP-", "LEADS-", "CWFHEALTH-"] + "prefixes": [ + "LCORE-", + "RSPEED-", + "MGTM-", + "OLS-", + "RHIDP-", + "LEADS-", + "CWFHEALTH-", + "[release/" + ] }, "MESSAGES": { "success": "All OK", diff --git a/AGENTS.md b/AGENTS.md index 1922f91c8..fc3fa8d83 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -385,7 +385,7 @@ uv run make test-e2e # End-to-end tests **PR titles MUST start with a JIRA issue key prefix.** CI enforces this via `pr-title-checker` (config: `.github/pr-title-checker-config.json`). -Allowed prefixes: `LCORE-`, `RSPEED-`, `MGTM-`, `OLS-`, `RHDHPAI-`, `LEADS-` +Allowed prefixes: `LCORE-`, `RSPEED-`, `MGTM-`, `OLS-`, `RHIDP-`, `LEADS-`, `CWFHEALTH-`, `[release/` - ✅ `RSPEED-2849: add user_agent to ResponsesEventData` - ❌ `feat(observability): add user_agent to ResponsesEventData` diff --git a/docs/demos/lcore/contributing_guidelines.md b/docs/demos/lcore/contributing_guidelines.md index 103c80e78..f9bb68650 100644 --- a/docs/demos/lcore/contributing_guidelines.md +++ b/docs/demos/lcore/contributing_guidelines.md @@ -74,7 +74,10 @@ ptisnovs@redhat.com ## PR description -* Jira ticket needs to be added into PR title +* PR titles must start with a JIRA issue key prefix. CI enforces this via + `pr-title-checker` (config: `.github/pr-title-checker-config.json`). + Allowed prefixes: `LCORE-`, `RSPEED-`, `MGTM-`, `OLS-`, `RHIDP-`, `LEADS-`, + `CWFHEALTH-`, `[release/` - for example: `LCORE-740: type hints for models unit tests` * Fill-in all relevant information in the PR template - unused parts of PR template (like information about testing etc.) can be deleted diff --git a/docs/devel_doc/contributing_guide.md b/docs/devel_doc/contributing_guide.md index 9f8bf3ade..c2b5b83c4 100644 --- a/docs/devel_doc/contributing_guide.md +++ b/docs/devel_doc/contributing_guide.md @@ -98,7 +98,11 @@ Happy hacking! ## PR description -* Jira ticket needs to be added into PR title, for example: `LCORE-740: type hints for models unit tests` +* PR titles must start with a JIRA issue key prefix or the target branch of a backport. CI enforces this via + `pr-title-checker` (config: `.github/pr-title-checker-config.json`). + Allowed prefixes: `LCORE-`, `RSPEED-`, `MGTM-`, `OLS-`, `RHIDP-`, `LEADS-`, + `CWFHEALTH-`, `[release/` + - for example: `LCORE-740: type hints for models unit tests` * Fill-in all relevant information in the PR template - unused parts of PR template (like information about testing etc.) can be deleted * Please note that CodeRabbitAI will create a summary of your pull request @@ -183,7 +187,7 @@ at the start of each session and announce which files were loaded. Nontrivial and substantial AI-generated or AI-assisted content should be “marked” in appropriate cases. In deciding how to approach this, consider adopting one or more of the following recommendations. (This assumes you have -not concluded that a suggestion is a match to some existing third-party code.) +not concluded that a suggestion is a match to some existing third-party code.) In a commit message, or in a pull request/merge request description field, identify the code assistant that you used, perhaps elaborating on how it was @@ -329,14 +333,14 @@ Here is simple example: ```python def function_with_pep484_type_annotations(param1: int, param2: str) -> bool: """Example function with PEP 484 type annotations. - + Args: param1: The first parameter. param2: The second parameter. - + Returns: The return value. True for success, False otherwise. - + Raises: ValueError: If the first parameter does not contain proper model name """ From 863406a3a04048f6ed04fef237b2be50ad81d605 Mon Sep 17 00:00:00 2001 From: Sam Doran Date: Fri, 17 Jul 2026 12:44:34 -0400 Subject: [PATCH 3/3] Update contributing guide to include info on backports --- CONTRIBUTING.md | 70 +++++++++++++++++++++++++++++++++++++++++++---- docs/branching.md | 3 ++ 2 files changed, 68 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 93e206485..672300cfa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,6 +12,7 @@ * [Pull request size](#pull-request-size) * [Definition of Done](#definition-of-done) * [A deliverable is to be considered “done” when](#a-deliverable-is-to-be-considered-done-when) +* [Backports](#backports) * [AI assistants](#ai-assistants) * [“Mark” code with substantial AI-generated portions.](#mark-code-with-substantial-ai-generated-portions) * [Copyright and licence notices](#copyright-and-licence-notices) @@ -110,7 +111,11 @@ Happy hacking! ## PR description -* Jira ticket needs to be added into PR title, for example: `LCORE-740: type hints for models unit tests` +* PR titles must start with a JIRA issue key prefix or the target branch of a backport in brackets. CI enforces this via + `pr-title-checker` (config: `.github/pr-title-checker-config.json`). + Allowed prefixes: `LCORE-`, `RSPEED-`, `MGTM-`, `OLS-`, `RHIDP-`, `LEADS-`, + `CWFHEALTH-`, `[release/` + - for example: `LCORE-740: type hints for models unit tests` * Fill-in all relevant information in the PR template - unused parts of PR template (like information about testing etc.) can be deleted * Please note that CodeRabbitAI will create a summary of your pull request @@ -160,6 +165,61 @@ Happy hacking! +## Backports + +We use [cherry_picker](https://pypi.org/project/cherry-picker/) to backport +merged pull requests to release branches. See the +[cherry_picker documentation](https://cherry-picker.readthedocs.io/) for full +details. + +### Installation + +```bash +pip install --user cherry_picker +``` + +### Usage + +After a pull request has been merged to `main`, you can backport it to one or +more release branches: + +```bash +# backport to a single release branch +cherry_picker release/0.6 + +# backport to multiple release branches +cherry_picker release/0.5 release/0.6 +``` + +`cherry_picker` will create a new branch, cherry-pick the commit, and open a +pull request against the target release branch. + +If the commit you want to backport is a **merge commit**, append `^-` to the +hash so that `cherry_picker` applies the correct parent diff: + +```bash +cherry_picker ^- release/0.6 +``` + +If there are conflicts, `cherry_picker` will pause and let you resolve them. +After resolving: + +```bash +git add . +cherry_picker --continue +``` + +To abort a backport in progress: + +```bash +cherry_picker --abort +``` + +See the [branching documentation](docs/branching.md) for more details on our +branching strategy and release workflow. + + + ## Definition of Done ### A deliverable is to be considered “done” when @@ -182,7 +242,7 @@ Happy hacking! Nontrivial and substantial AI-generated or AI-assisted content should be “marked” in appropriate cases. In deciding how to approach this, consider adopting one or more of the following recommendations. (This assumes you have -not concluded that a suggestion is a match to some existing third-party code.) +not concluded that a suggestion is a match to some existing third-party code.) In a commit message, or in a pull request/merge request description field, identify the code assistant that you used, perhaps elaborating on how it was @@ -332,14 +392,14 @@ Here is simple example: ```python def function_with_pep484_type_annotations(param1: int, param2: str) -> bool: """Example function with PEP 484 type annotations. - + Args: param1: The first parameter. param2: The second parameter. - + Returns: The return value. True for success, False otherwise. - + Raises: ValueError: If the first parameter does not contain proper model name """ diff --git a/docs/branching.md b/docs/branching.md index d5856a977..2a04ab8e8 100644 --- a/docs/branching.md +++ b/docs/branching.md @@ -267,6 +267,9 @@ branch history. Key points: - Resolve any merge conflicts, then `git add` and `git cherry-pick --continue`. Test, review, and push the resulting commit into the release branch. +We use `cherry_picker` to automate this process. See the +[contributing guide](../CONTRIBUTING.md#backports) for usage instructions. + NOTE: the cherry picking can be made in main -> release branch direction or vice versa. We prefer the first method when possible.