|
| 1 | +--- |
| 2 | +authors: |
| 3 | + - cj-wright |
| 4 | +tags: [autotick-bot] |
| 5 | +--- |
| 6 | + |
| 7 | +# Automatically Deployed ABI Migrations |
| 8 | + |
| 9 | +Handling application binary interface (ABI) migrations has always been a |
| 10 | +hassle for Conda-Forge. Maintaining ABI consistency helps enable the |
| 11 | +"just use conda-forge" experience for many of our users, making |
| 12 | +certain that numpy's blas is the same as scipy's. As libraries update |
| 13 | +their code, the new versions may be ABI incompatible, as function |
| 14 | +signatures and other symbols may have changed, leading to the dreaded |
| 15 | +`SegmentationFault` and other errors. |
| 16 | + |
| 17 | +<!--truncate--> |
| 18 | + |
| 19 | +Conda-Forge handles this by having a pinning file that tracks all the |
| 20 | +currently supported ABIs. These pinned ABIs are then used to build the |
| 21 | +downstream packages, making certain that all are consistent. As new |
| 22 | +versions of pinned software are released the pins are updated, causing a |
| 23 | +migration of the pin, and the rebuilding of all packages which rely on |
| 24 | +the pinned package. In the past, this was handled by a change to the |
| 25 | +global pinnings and a subsequent migration via the auto-tick bot. While |
| 26 | +this worked, there were issues that this created. Firstly, this approach |
| 27 | +could cause unsatisfiable build dependencies for new packages, as some |
| 28 | +of the new package's dependencies had been compiled with the new pins, |
| 29 | +but not all. Secondly, migrations happened in series, if a second pin |
| 30 | +was moved while the first was being migrated then the migration could go |
| 31 | +wrong as packages which were being rebuilt for the first pin got the |
| 32 | +second pin before they were ready. |
| 33 | + |
| 34 | +Conda-Forge Core has recently approved CFEP-9, a migration policy to fix |
| 35 | +these issues. With CFEP-9 pinnings are proposed as small yaml snippets |
| 36 | +which contain the new pins. The auto-tick bot then starts migrating the |
| 37 | +packages in order, applying the yaml snippet to each package in turn. If |
| 38 | +a second pinning change is issued then the bot starts the migration for |
| 39 | +that package too, enabling the two migrations to work independently. If |
| 40 | +a package needs a change in both pins then the maintainers can choose |
| 41 | +the order in which they apply the pins by merging one pin before the |
| 42 | +other. |
| 43 | + |
| 44 | +This approach will yield much greater stability in migrations and will |
| 45 | +enable more maintainers to issue migrations. Migrations can be issued by |
| 46 | +putting a PR into |
| 47 | +[conda-forge/conda-forge-pinning-feedstock](https://github.com/conda-forge/conda-forge-pinning-feedstock), |
| 48 | +adding a file to the `migrations` folder, PRs into the auto-tick bot are |
| 49 | +not needed anymore. |
0 commit comments