From 9118d7f8a19901ac06200a4a1dab7dd233c67f17 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 21 Nov 2025 17:08:47 +0100 Subject: [PATCH 1/5] How to: Maintain several versions --- docs/_sidebar_diataxis.json | 4 +- docs/how-to/advanced/several-versions.md | 50 ++++++++++++++++++++++++ docs/maintainer/updating_pkgs.md | 6 +-- 3 files changed, 53 insertions(+), 7 deletions(-) create mode 100644 docs/how-to/advanced/several-versions.md diff --git a/docs/_sidebar_diataxis.json b/docs/_sidebar_diataxis.json index 85e4319dcd..565756546d 100644 --- a/docs/_sidebar_diataxis.json +++ b/docs/_sidebar_diataxis.json @@ -110,9 +110,9 @@ "href": "/docs/maintainer/knowledge_base/#multi-output-recipes" }, { - "type": "link", + "type": "doc", "label": "Maintain several versions", - "href": "/docs/maintainer/updating_pkgs/#maintaining-several-versions" + "id": "how-to/advanced/several-versions" }, { "type": "link", diff --git a/docs/how-to/advanced/several-versions.md b/docs/how-to/advanced/several-versions.md new file mode 100644 index 0000000000..724d41257d --- /dev/null +++ b/docs/how-to/advanced/several-versions.md @@ -0,0 +1,50 @@ +--- +tags: [how-to, advanced] +--- + +# How to maintain several versions + +The conda-forge workflow assumes that all pushes to a branch in the feedstock repository will result in a build being uploaded to the conda-forge channel (and that's why PRs must always be opened from a fork!). + +Most feedstocks only need `main` for their builds, since the package has a single release line, and new releases always imply a later version. However, some packages may maintain a few release lines in parallel. If you wish to maintain those in your feedstock, you will need to create a branch for each. + +## Create the new branch + +:::note +This operation can only be performed by users with write acccess to the feedstock. +::: + +In the local copy of your [forked repository](../basics/fork-sync.md), create a branch named after the version you want to maintain. For example, for `3.10`, it could be: + +```bash +git checkout main +git pull upstream main +git checkout -b v3.10.x +``` + +Add an empty commit with the `[ci skip]` message so the new branch does not result in a new build process, and push it to `origin`. This is one of the rare ocassions where you must push directly to the feedstock, not your fork! + +```bash +git commit --allow-empty -m "[ci skip] Create new branch for v3.10.x release series" +git push -u origin v3.10.x +``` + +Now, this branch can be selected as a target branch in the following steps. + +## Open a PR with the necessary changes + +From the same branch, create a new one to add some extra changes that will need to be reviewed in a PR: + +```bash +git checkout -b setup-3.10.x +``` + +Open your `conda-forge.yml` file and add these lines: + +```yaml +abi_migration_branches: # TODO +``` + +And [rerender](../basics/rerender.md). Now, make sure to adjust the recipe file so the correct version is being built. + +Once ready, push the branch to your fork (`origin`) and open the corresponding pull request. Don't forget to pick `v3.10.x` as the target branch! diff --git a/docs/maintainer/updating_pkgs.md b/docs/maintainer/updating_pkgs.md index 517212a486..b921ff1360 100644 --- a/docs/maintainer/updating_pkgs.md +++ b/docs/maintainer/updating_pkgs.md @@ -342,11 +342,7 @@ For an example see [this](https://github.com/conda-forge/cudnn-feedstock/issues/ ## Maintaining several versions -If you'd like to maintain more than one version of your package, you can use branches on the feedstock. To do this: - -- Fork your feedstock and make a meaningful branch name (e.g., v1.X or v1.0). -- Make the required changes to the recipe and rerender the feedstock. -- Then push this branch from your fork to the upstream feedstock. Our CI services will automatically build any branches in addition to the default branch. +See [How to maintain several versions](/docs/how-to/advanced/several-versions.md). ## Troubleshooting From 3a13103460af229db1fc0801b1412d287c2fa0e2 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 1 Dec 2025 09:50:01 +0100 Subject: [PATCH 2/5] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Michał Górny --- docs/how-to/advanced/several-versions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/how-to/advanced/several-versions.md b/docs/how-to/advanced/several-versions.md index 724d41257d..580c9674b8 100644 --- a/docs/how-to/advanced/several-versions.md +++ b/docs/how-to/advanced/several-versions.md @@ -4,7 +4,7 @@ tags: [how-to, advanced] # How to maintain several versions -The conda-forge workflow assumes that all pushes to a branch in the feedstock repository will result in a build being uploaded to the conda-forge channel (and that's why PRs must always be opened from a fork!). +The conda-forge workflow assumes that a push to any branch in the feedstock repository will result in a build being uploaded to the conda-forge channel (and that's why PRs must always be opened from a fork!). Most feedstocks only need `main` for their builds, since the package has a single release line, and new releases always imply a later version. However, some packages may maintain a few release lines in parallel. If you wish to maintain those in your feedstock, you will need to create a branch for each. @@ -14,7 +14,7 @@ Most feedstocks only need `main` for their builds, since the package has a singl This operation can only be performed by users with write acccess to the feedstock. ::: -In the local copy of your [forked repository](../basics/fork-sync.md), create a branch named after the version you want to maintain. For example, for `3.10`, it could be: +In the local copy of your [forked repository](../basics/fork-sync.md), create a branch named after the release line you want to maintain. For example, for `3.10`, it could be: ```bash git checkout main From 9d27f9886bbb535c148c52a46669f2e506f4ae24 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 1 Dec 2025 09:55:45 +0100 Subject: [PATCH 3/5] Finalize `abi_migration_changes` bit --- docs/how-to/advanced/several-versions.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/how-to/advanced/several-versions.md b/docs/how-to/advanced/several-versions.md index 580c9674b8..eee9d98d83 100644 --- a/docs/how-to/advanced/several-versions.md +++ b/docs/how-to/advanced/several-versions.md @@ -22,11 +22,11 @@ git pull upstream main git checkout -b v3.10.x ``` -Add an empty commit with the `[ci skip]` message so the new branch does not result in a new build process, and push it to `origin`. This is one of the rare ocassions where you must push directly to the feedstock, not your fork! +Add an empty commit with the `[ci skip]` message so the new branch does not result in a new build process, and push it to `upstream`. This is one of the rare ocassions where you must push directly to the feedstock, not your fork! ```bash git commit --allow-empty -m "[ci skip] Create new branch for v3.10.x release series" -git push -u origin v3.10.x +git push -u upstream v3.10.x ``` Now, this branch can be selected as a target branch in the following steps. @@ -42,7 +42,9 @@ git checkout -b setup-3.10.x Open your `conda-forge.yml` file and add these lines: ```yaml -abi_migration_branches: # TODO +bot: + abi_migration_branches: + - "v3.10.x" # or the branch name you picked ``` And [rerender](../basics/rerender.md). Now, make sure to adjust the recipe file so the correct version is being built. From e744e4e9d7b1cf0a3b6a5a3cfefc0fb685d8a92d Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 1 Dec 2025 15:47:49 +0100 Subject: [PATCH 4/5] Update docs/how-to/advanced/several-versions.md --- docs/how-to/advanced/several-versions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/how-to/advanced/several-versions.md b/docs/how-to/advanced/several-versions.md index eee9d98d83..8e5d527b79 100644 --- a/docs/how-to/advanced/several-versions.md +++ b/docs/how-to/advanced/several-versions.md @@ -33,7 +33,7 @@ Now, this branch can be selected as a target branch in the following steps. ## Open a PR with the necessary changes -From the same branch, create a new one to add some extra changes that will need to be reviewed in a PR: +From the same branch, create another one to add some extra changes that will need to be reviewed in a PR: ```bash git checkout -b setup-3.10.x From a1c30fb0a474c484998e67eb0509cc864bd7ea98 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Tue, 2 Dec 2025 10:52:25 +0100 Subject: [PATCH 5/5] Add a note about cf-scripts issue 2500 --- docs/how-to/advanced/several-versions.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/how-to/advanced/several-versions.md b/docs/how-to/advanced/several-versions.md index 8e5d527b79..a4c2209c6d 100644 --- a/docs/how-to/advanced/several-versions.md +++ b/docs/how-to/advanced/several-versions.md @@ -50,3 +50,9 @@ bot: And [rerender](../basics/rerender.md). Now, make sure to adjust the recipe file so the correct version is being built. Once ready, push the branch to your fork (`origin`) and open the corresponding pull request. Don't forget to pick `v3.10.x` as the target branch! + +:::note + +In some cases, the `abi_migration_branches` may receive migration PRs that have already been processed. This is being looked into at [regro/cf-scripts#2500](https://github.com/regro/cf-scripts/issues/2500). In the meantime, you can ignore these redundant PRs by closing them. + +:::