Skip to content

Commit 2978eb6

Browse files
authored
Merge branch 'main' into describe-infrastructure-role-in-packaging
2 parents 9144692 + 5003dd8 commit 2978eb6

File tree

7 files changed

+189
-18
lines changed

7 files changed

+189
-18
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repos:
1515
- id: prettier
1616
types_or: [markdown, mdx, json, yaml, css, javascript]
1717
- repo: https://github.com/astral-sh/ruff-pre-commit
18-
rev: v0.3.5
18+
rev: v0.3.7
1919
hooks:
2020
- id: ruff-format
2121
ci:

community/subteams.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ This team will operate via the following rules:
4343

4444
### Members
4545

46-
- Matthew R. Becker <[[email protected]](mailto:[email protected])>
4746
- Christopher J. "CJ" Wright <[[email protected]](mailto:[email protected])>
4847
- Anthony Scopatz <[[email protected]](mailto:[email protected])>
4948

docs/glossary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ sidebar_position: 27
1515

1616
## ABI
1717

18-
**A**pplication **B**inary **I**nterface. ABI is a document that comprehensively defines the binary system interface between applications and the operating system on which they run. [Learn More](https://en.wikipedia.org/wiki/Application_binary_interface).
18+
**A**pplication **B**inary **I**nterface. ABI is a document that comprehensively defines the binary system interface between applications and the operating system on which they run. [Learn More at Wikipedia](https://en.wikipedia.org/wiki/Application_binary_interface) or [pypackaging-native](https://pypackaging-native.github.io/background/binary_interface).
1919

2020
<a id="term-CDT"></a>
2121

docs/maintainer/infrastructure.md

Lines changed: 184 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,70 @@ External services connect to `staged-recipes` too:
5353

5454
- The `@conda-forge-admin` bot (deployed at [`webservices`](#webservices)) will lint and provide hints in PRs based on the contents of the recipe.
5555

56+
### Feedstocks
57+
58+
- ⚙️ Deployed in Github repositories
59+
- 🔒 Has access to Azure Pipelines, Github Actions, Anaconda.org (cf-staging)
60+
- 🔐 Might have access to Travis CI, Cirun via `admin-requests` (WIP)
61+
- 🤖 Integrated with [`admin-migrations`](#admin-migrations), [`admin-requests`](#admin-requests), the [`autotick-bot`](#autotick-bot), and [`webservices`](#webservices).
62+
63+
Conda-forge has thousands of feedstocks.
64+
Each feedstock hosts a recipe plus the required pipelines, supporting scripts and configuration metadata.
65+
66+
The contents of a feedstock are well specified. Only two locations are user-managed:
67+
68+
- `recipe/`: Contains the conda-build instructions to build packages. It needs, at least, a `meta.yaml` file, and this is also where the optional `conda_build_config.yaml` usually goes.
69+
- `conda-forge.yml`: This is the feedstock configuration file.
70+
71+
:::warning
72+
You should never manually edit files _not_ listed above! Changes will be overridden in the next feedstock rerender.
73+
:::
74+
75+
Combining these two sources with some external components, `conda-smithy` will generate (render) the contents of the feedstock. Many of the directories are named like that because it is what the external service (e.g. Azure) requests. However, some `conda-smithy`-unique directories are worth discussing:
76+
77+
- `.ci_support/`: Contains the rendered `conda_build_config.yaml` files, passed to `conda-build` via the `-m` flag. Each file here corresponds to one job in the CI build matrix.
78+
- `.ci_support/migrations/`: Special YAML files that instruct `conda-smithy` how to update the `.ci_support/*.yaml` files. These migration files are usually put here by the [`autotick-bot`](#autotick-bot) infrastructure, and removed once the migration is considered finished.
79+
- `.scripts/`: Common logic and code supporting the steps you can find in the CI pipelines and local debugging tools.
80+
- `build-locally.py`: A Python script to debug recipes in your machine, roughly equivalent to what's done in the CI pipelines.
81+
82+
:::info Learn more (WIP)
83+
84+
- Rerendering a feedstock
85+
- Recommended workflow
86+
87+
:::
88+
89+
#### feedstocks monorepo
90+
91+
A single repository containing all feedstocks as submodules.
92+
93+
- ⚙️ Deployed in [`conda-forge/feedstocks`](https://github.com/conda-forge/feedstocks)
94+
95+
#### feedstock-outputs
96+
97+
This repository is a registry of feedstock names and the packages (artifacts) they produce.
98+
99+
- ⚙️ Deployed in [Github Actions via `conda-forge/feedstock-outputs`](https://github.com/conda-forge/feedstock-outputs)
100+
- 🔒 Has access to Azure, Anaconda.org (cf-staging)
101+
102+
Its main purpose is to provide an allow-list for the validation server to prevent malicious cross-feedstock builds, although it's also an informative map of `feedstocks <-> packages` that is exposed in the [packages section of the website](https://conda-forge.org/feedstock-outputs/).
103+
104+
### cdt-builds
105+
106+
- ⚙️ Deployed in [Azure Pipelines](https://dev.azure.com/conda-forge/cdt-builds/_build) via [`conda-forge/cdt-builds`](https://github.com/conda-forge/cdt-builds)
107+
- 🔒 Has access to Azure Pipelines, Anaconda.org (cf-staging)
108+
109+
This special repository builds Core Dependency Tree packages for conda-forge (Linux only).
110+
It doesn't use the feedstock automated machinery.
111+
Instead, it has its own Azure Pipelines workflow and a well-documented README.
112+
113+
### msys2-recipes
114+
115+
- ⚙️ Deployed manually from [`conda-forge/msys2-recipes`](https://github.com/conda-forge/msys2-recipes)
116+
117+
This is a fork of the old community recipes repository at Anaconda, which includes the `msys2` recipes under the [`msys2/`](https://github.com/conda-forge/msys2-recipes/tree/master/msys2) directory.
118+
Note also the supporting scripts in the [`common-scripts/`](https://github.com/conda-forge/msys2-recipes/tree/master/common-scripts) folder.
119+
56120
### Website
57121

58122
The current [conda-forge.org](https://conda-forge.org) is a statically generated website published to Github Pages.
@@ -173,7 +237,7 @@ Bugs or suggestions regarding the service functionality should therefore be open
173237
The code and logic behind [`autotick-bot`](#autotick-bot).
174238

175239
- 📜 Source at [`regro/cf-scripts`](https://github.com/regro/cf-scripts)
176-
- 📖 [Documentation](https://regro.github.io/cf-scripts/)
240+
- 📖 [Documentation](https://github.com/regro/cf-scripts/blob/master/README.md)
177241

178242
### Automated maintenance
179243

@@ -392,36 +456,144 @@ take more serious actions, including archiving feedstocks or removing maintainer
392456

393457
conda-forge builds and maintains its own set of compilers for various languages
394458
and/or systems (e.g., `C`, `FORTRAN`, `C++`, `CUDA`, etc.). These are used
395-
in all of our CI builds to build both core dependencies (e.g., `Python`) and maintainer-contributed
396-
packages. While we do not have any formal policies or promises of support for these
459+
in all of our CI builds to build essentially all artefacts published by conda-forge.
460+
461+
This compiler infrastructure has a critical role beyond building everything, which
462+
is to ensure that packages stay compatible with each other. This is due to how compiled
463+
packages have a so-called [Application Binary Interface](../glossary.md#abi)
464+
(ABI), and how changes in the compiler infrastructure may break this ABI, leading
465+
to crashes, miscalculations, etc. Generally speaking, using a consistent compiler
466+
version greatly reduces the risk of ABI breaks.
467+
468+
Compilers generally strive to maintain ABI-compatibility across versions, meaning that
469+
combining artefacts for the same target produced by different versions of the same
470+
compiler will work together without issue. Due to the nature of the ABI (i.e. a vast
471+
interface between software and hardware, with innumerable corner cases), it still
472+
happens that unintentional changes for some specific aspect are introduced across
473+
compiler versions, though in practice this does not lead to wide-spread issues.
474+
475+
In contrast, when compilers do intentionally change the ABI (as MSVC did with each
476+
release before the `vc14` series currently covering VS2015-VS2022), _every_ compiled
477+
package needs to be rebuilt for that new ABI, and cannot be mixed with builds for the
478+
old ABI. While less likely nowadays, in principle it's also possible that a major
479+
infrastructural overhaul in the compiler stack similarly forces a complete rebuild.
480+
481+
Such large-scale changes – requiring +/- all of conda-forge to be rebuilt – take a
482+
lot of effort, though thankfully, in recent years such full rebuilds have not been
483+
necessary and we managed to do less disruptive compiler upgrades.
484+
485+
However, large-scale ABI breaks remain a possibility (e.g. MSVC is planning a vNext
486+
after `vc14`), and so we keep our policies for such a scenario in place.
487+
While we do not have any formal promises of support for a generation of ABI-compatible
397488
compilers, we have historically maintained them according to the following (non-binding)
398489
principles.
399490

400491
- The authoritative source of the current compilers and versions for various languages
401492
and platforms is the [conda_build_config.yaml](https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/master/recipe/conda_build_config.yaml)
402493
in the [conda-forge/conda-forge-pinning-feedstock](https://github.com/conda-forge/conda-forge-pinning-feedstock)
403494
as described in [Globally pinned packages](pinning_deps.md#globally-pinned-packages).
404-
- We provide no support of any kind in terms of the long-term stability of these pinnings.
495+
- We provide no support of any kind in terms of the long-term stability/support of a given compiler generation.
405496
- We upgrade them in an ad-hoc manner on a periodic basis as we have the time and energy to do so.
406497
Note that because of the way we enforce runtime constraints, these compiler upgrades will not break
407498
existing packages. However, if you are using the compilers outside of `conda`, then you may find issues.
408-
- We generally provide notice in the form of an announcement when a compiler is going to be upgraded.
499+
- We generally provide notice in the form of an announcement when an ABI-incompatible compiler change is going to happen.
409500
Note that these changes take a bit of time to complete, so you will generally have time
410501
to prepare should you need to.
411502
- Some of the criteria we think about when considering a compiler migration include:
412503
- the degree of disruption to the ecosystem,
413504
- the amount of work for the `core` team,
414505
- the amount of time it will cost our (volunteer) feedstock maintainers.
415506

416-
We do use some unofficial names for our compiler stack internally. Note however that
417-
the existence of these names does not imply any level of support or stability for the compilers
507+
These compiler generations may or may not have some unofficial names for our
508+
internal use (e.g. `comp7`). We note again that the existence of these names
509+
does not imply any level of support or stability for the compilers
418510
that form the given stack.
419511

420-
- Our current compiler stack is referred to internally as `comp7`.
421-
- The previous compiler stack based in part on the various `toolchain_*` packages
422-
was sometimes referred to as `comp4`. On linux the `toolchain_*` compilers were
423-
GCC 4.8.2 as packaged in the devtoolset-2 software collection. On osx, we use clang from
424-
Apple's Xcode in the `toolchain_*` packages.
512+
For the cases that do not require a complete rebuild of conda-forge (i.e. if the ABI
513+
of a new compiler remains compatible, up to rare corner cases), we can just increase
514+
the version in our global pinning, and it will slowly roll out to the ecosystem as
515+
feedstocks get rerendered.
516+
517+
For such ABI-compatible upgrades, similar but looser principles apply:
518+
519+
- The pins are similarly defined in the global pinning, see [Globally Pinned Packages](pinning_deps.md#globally-pinned-packages).
520+
- We provide no support of any kind in terms of the long-term availability of a given compiler version.
521+
- We generally provide notice in the form of an announcement when a compiler is going to be upgraded.
522+
- Without promising any timelines, our compilers on Linux and OSX are normally
523+
very recent; on Windows, we generally use the last supported VS version.
524+
525+
Despite the lack of explicit support, we try to keep the compilers in their various versions
526+
working also outside of conda-forge, and even provide an easy way to install them
527+
(through the [compilers feedstock](https://github.com/conda-forge/compilers-feedstock)).
528+
529+
More specifically, each compiler uses an _activation_ package that makes the difference
530+
between it being merely present in a build environment, and it being used by default.
531+
These will be installed when using `{{ compiler('xyz') }}` in `meta.yaml`, where
532+
`'xyz'` is one of `'c', 'cxx', 'fortran', 'cuda', 'rust', 'go-cgo', 'go-nocgo'`.
533+
534+
Our default compiler stack is made up very differently on each platform; each platform
535+
has its own default compiler, with its own set of feedstocks that provide them. Due to historical
536+
reasons (the way compilers are integrated with their OS, and the amount of
537+
software written in them, etc.), the most impactful languages are C & C++ (though
538+
Fortran is considered part of the default, not least because GCC compiles all three).
539+
540+
Linux (GCC):
541+
542+
- [C, C++, Fortran] Activation: https://github.com/conda-forge/ctng-compiler-activation-feedstock/
543+
- [C, C++, Fortran] Implementation: https://github.com/conda-forge/ctng-compilers-feedstock
544+
- Note that when used in conjunction with CUDA, compiler versions are restricted by the
545+
maximum GCC version supported by nvcc (which is also reflected in the global pinning).
546+
547+
OSX (Clang):
548+
549+
- [C, C++] Activation: https://github.com/conda-forge/clang-compiler-activation-feedstock/
550+
- [C, C++] Required feedstocks:
551+
[llvmdev](https://github.com/conda-forge/llvmdev-feedstock),
552+
[clangdev](https://github.com/conda-forge/clangdev-feedstock),
553+
[compiler-rt](https://github.com/conda-forge/compiler-rt-feedstock),
554+
[libcxx](https://github.com/conda-forge/libcxx-feedstock),
555+
[openmp](https://github.com/conda-forge/openmp-feedstock),
556+
[lld](https://github.com/conda-forge/lld-feedstock),
557+
[cctools](https://github.com/conda-forge/cctools-and-ld64-feedstock)
558+
- [Fortran] Activation: https://github.com/conda-forge/gfortran_osx-64-feedstock/
559+
- [Fortran] Implementation: https://github.com/conda-forge/gfortran_impl_osx-64-feedstock/
560+
561+
Windows (MSVC):
562+
563+
- [C, C++] Activation: https://github.com/conda-forge/vc-feedstock
564+
(we cannot redistribute the actual MSVC compilers due to licensing constraints)
565+
- [Fortran] Activation & Implementation: https://github.com/conda-forge/flang-feedstock
566+
567+
There exists an alternative, MinGW-based, compiler stack on Windows, which is available
568+
with a `m2w64_` prefix (e.g. `{{ compiler('m2w64_c') }}`). However, it is falling out
569+
of use now that most projects will natively support compilation also with MSVC, in addition
570+
to several complications arising from mixing compiler stacks.
571+
572+
Additionally, there is a possibility to use `clang` as a compiler on Linux & Windows:
573+
574+
- Activation (Linux): https://github.com/conda-forge/ctng-compiler-activation-feedstock/
575+
- Activation (Windows): https://github.com/conda-forge/clang-win-activation-feedstock/
576+
577+
Aside from the main C/C++/Fortran compilers, these are the feedstocks for the other compilers:
578+
579+
- [CUDA] [CUDA 12.0+](https://github.com/conda-forge/cuda-nvcc-feedstock) & [CUDA <12](https://github.com/conda-forge/nvcc-feedstock) (legacy)
580+
- [Rust] [Activation](https://github.com/conda-forge/rust-activation-feedstock)
581+
and [Implementation](https://github.com/conda-forge/rust-feedstock)
582+
- [Go] [Activation](https://github.com/conda-forge/go-activation-feedstock)
583+
and [Implementation](https://github.com/conda-forge/go-feedstock)
584+
585+
To upgrade the compiler version of our default compilers in the global pinning for
586+
Linux or OSX, ensure that the respective above-mentioned feedstocks have been rebuilt
587+
for the new major version, that all interrelated versions are lifted at the same time,
588+
and obviously that the compilers work (e.g. by testing them on some feedstocks by
589+
specifying the new version through the feedstock-local `conda_build_config.yaml`).
590+
You should also check the compiler release notes for warnings about ABI incompatibilities,
591+
and mention any such notices in the discussion about the upgrade.
592+
593+
For Windows, we stay on older compilers for longer, because using a newer toolchain
594+
would force everyone wanting to locally develop with conda-forge artefacts to use
595+
a toolchain that's at least as new. You can find more details about this topic in this
596+
[issue about updating to the vc142 toolchain](https://github.com/conda-forge/conda-forge.github.io/issues/1732).
425597

426598
### CentOS `sysroot` for `linux-*` Platforms
427599

docs/maintainer/knowledge_base.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2269,7 +2269,7 @@ Once the PR is merged, the migration bot goes through the list of feedstocks in
22692269
When any changes are made in the global pinnings of a package, then the entire stack of the packages that need that package on their `host` section would need to be updated and rebuilt.
22702270
Doing it manually can be quite tedious, and that's where migrations come to help. Migrations automate the process of submitting changes to a feedstock and are an integral part of the `regro-cf-autotick-bot`'s duties.
22712271

2272-
There are several kinds of migrations, which you can read about in [Making Migrators](https://regro.github.io/cf-scripts/migrators.html). To generate these migrations, you use migrators, which are bots that automatically create pull requests for the affected packages in conda-forge.
2272+
There are several kinds of migrations, which you can read about in [Making Migrators](https://github.com/regro/cf-scripts/blob/master/README.md#making-migrators). To generate these migrations, you use migrators, which are bots that automatically create pull requests for the affected packages in conda-forge.
22732273
To propose a migration in one or more pins, the migrator issues a PR into the pinning feedstock using a yaml file expressing the changes to the global pinning file in the migrations folder.
22742274
Once the PR is merged, the dependency graph is built. After that, the bot walks through the graph, migrates all the nodes (feedstocks) one by one, and issues PRs for those feedstocks.
22752275

docs/maintainer/pinning_deps.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,4 @@ be added by hand. To do this, follow these steps:
132132
- Bump the version in meta.yaml to the current date
133133

134134
Details of how the migration yaml is setup are provided in an [example](https://github.com/conda-forge/conda-forge-pinning-feedstock/tree/master/recipe/migrations/example.exyaml)
135-
and documentation [here](https://regro.github.io/cf-scripts/migrators.html#making-migrators).
135+
and documentation [here](https://github.com/regro/cf-scripts/blob/master/README.md#making-migrators).

docs/maintainer/updating_pkgs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ When a new version of a package is released on PyPI/CRAN/.., we have a bot that
7777

7878
##### **How does regro-cf-autotick-bot create automatic version updates?**
7979

80-
The [regro-cf-autotick-bot](https://github.com/regro/autotick-bot) continuously searches on a loop for any PyPI releases, GitHub releases, and any other sources of versions when any updates are released. The source code that gets executed in the loop comes from the [cf-scripts repository](https://github.com/regro/cf-scripts), which contains the code to detect versions and submit PRs. Visit [cf-scripts](https://regro.github.io/cf-scripts/index.html) to read more about it.
80+
The [regro-cf-autotick-bot](https://github.com/regro/autotick-bot) continuously searches on a loop for any PyPI releases, GitHub releases, and any other sources of versions when any updates are released. The source code that gets executed in the loop comes from the [cf-scripts repository](https://github.com/regro/cf-scripts), which contains the code to detect versions and submit PRs. Visit [cf-scripts](https://github.com/regro/cf-scripts/blob/master/README.md) to read more about it.
8181

8282
The bot creates updates via inspection of the upstream release and will always update the `source` section and build version in the [recipe metadata](https://docs.conda.io/projects/conda-build/en/stable/resources/define-metadata.html#).
8383
As an experimental feature, the autotick bot can also be configured to verify or update the recipe's requirements for [Grayskull](https://github.com/conda-incubator/grayskull)-compatible recipes.

0 commit comments

Comments
 (0)