You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/maintainer/infrastructure.md
+153Lines changed: 153 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -469,6 +469,159 @@ uploaded from the new feedstock, by design.
469
469
Once this is done correctly and the package is uploaded,
470
470
you can then request the conda-forge core devs to archive the old feedstock.
471
471
472
+
## How package building interacts with infrastructure
473
+
474
+
Packages in conda-forge are always built through CI.
475
+
However, when a new package enters conda-forge for the first time, it does so via a pull request in the [`staged-recipes` repository](#staged-recipes), whereas every new build of the package after that is built in its repository, the so-called feedstock.
476
+
Both places use slightly different CI setups and interact with the infrastructure accordingly.
477
+
Hence, we first describe the interaction at the start of a new package and then for existing packages in their respective feedstocks.
478
+
479
+
### Initial submission to staged-recipes
480
+
481
+
The `conda-forge/staged-recipes` repository uses several pieces of infrastructure.
482
+
483
+
On pull requests:
484
+
485
+
- Package building pipelines. These are slightly different than the ones running in feedstocks (they are not automatically generated by `conda-smithy`, but they do use the same underlying components).
486
+
- The linter is provided by `conda-smithy recipe-lint`, run by `@conda-forge-linter`.
487
+
- Auto-labeling logic, run by Github Actions workflows.
488
+
489
+
On pushes to `main`:
490
+
491
+
- Create and initialize the new feedstocks.
492
+
493
+
Authenticated services involved:
494
+
495
+
- Github, with permissions for:
496
+
- Repository creation
497
+
- Azure Pipelines
498
+
- Travis CI
499
+
- Other CI providers?
500
+
501
+
### Feedstock changes
502
+
503
+
A feedstock can receive changes for several reasons.
504
+
505
+
Pushes to `main` or other branches:
506
+
507
+
- The automated initialization commits following approval in `staged-recipes`.
508
+
These are generated by `conda-smithy`.
509
+
- Automated maintenance commits triggered from `admin-migrations`.
510
+
- Rerender requests are handled by instances of `conda-forge/webservices-dispatch-action` and triggered by the admin web service.
511
+
512
+
Automatic pull requests can be opened by...
513
+
514
+
- `@conda-forge-linter`, responding to some issues with titles like `@conda-forge-admin, please...`.
515
+
- `@regro-cf-autotick-bot`, handling migrations and new versions being available.
516
+
517
+
...and closed by:
518
+
519
+
- `conda-forge/automerge-action`, if labeled accordingly.
520
+
521
+
On an open pull request:
522
+
523
+
- The building pipelines (more [below](#package-building)).
524
+
- The linter is provided by `conda-smithy recipe-lint`, run by `@conda-forge-linter`.
525
+
- The `@conda-forge-admin, please...` command comments, answered by `@conda-forge-linter`.
526
+
527
+
On issues:
528
+
529
+
- `@conda-forge-admin, please...`command issues, handled by `@conda-forge-linter`.
530
+
531
+
### Package building {#package-building}
532
+
533
+
The pipelines that build conda packages are used for both pull requests and push events in `main` and other branches.
534
+
The only difference is that the packages built during a pull request are not uploaded to the staging channel.
535
+
Maintaining these up-to-date across all feedstocks involves several repositories:
536
+
537
+
- `conda-smithy`is in charge of generating the CI pipelines themselves, together with the supporting scripts and configuration files.
538
+
These pipelines and scripts can rely on code and data defined in the repositories below.
539
+
- `conda-forge-ci-setup-feedstock`provides the code needed to prepare and homogenize the CI runners across providers.
540
+
It also does some checks before the artifacts are uploaded to `cf-staging`.
541
+
- `conda-forge-pinning-feedstock`defines which versions are supported for a number of runtimes and libraries, as well as the compilers used for certain languages and platforms.
542
+
- `docker-images`builds the standardized container images for Linux runners.
543
+
This repository has additional authentication needs for Docker Hub, Quay.io.
544
+
545
+
The pipelines can run on several CI providers supported by `conda-smithy`, including:
546
+
547
+
- Azure DevOps Pipelines
548
+
- Travis CI
549
+
- Circle CI
550
+
- Appveyor
551
+
552
+
Registration of hooks and triggers is also done by the `conda-smithy` app.
553
+
554
+
:::tip
555
+
`conda-smithy`supports more CI providers.
556
+
Check [its repository](https://github.com/conda-forge/conda-smithy) for more details.
557
+
:::
558
+
559
+
Authenticated services involved:
560
+
561
+
- Anaconda.org uploads to `cf-staging`
562
+
563
+
### Package validation and publication
564
+
565
+
Once built on `main` (or other branches), the conda packages are uploaded to an intermediary channel named `cf-staging`.
566
+
From there, the packages are downloaded by the validation server and, if successful, copied over to `conda-forge` itself.
567
+
568
+
- The validation logic is defined at `conda-forge/artifact-validation`
569
+
- If problematic, the results of the validation are posted as issues in the same repo.
570
+
- This logic runs at `conda-forge/conda-forge-webservices`.
571
+
This web app also copies the artifacts from `cf-staging` to `conda-forge`.
572
+
- Part of the validation includes checking for cross-package clobbering.
573
+
The list of authorized feedstocks per package name is maintained at `conda-forge/feedstock-outputs`.
574
+
- Some further analysis might be performed _after_ publication.
575
+
576
+
Authenticated services involved:
577
+
578
+
- Anaconda.org uploads to `conda-forge`
579
+
- The `conda-forge-webservices` app deployment itself (currently at Heroku)
580
+
- (?) Post new issues to `conda-forge/artifact-validation`
581
+
582
+
### Post-publication
583
+
584
+
Once uploaded to anaconda.org/conda-forge, packages are not immediately available to CLI clients.
585
+
They have to be replicated in the Content Distribution Network (CDN).
586
+
This step usually takes less than 15 minutes.
587
+
588
+
After CDN replication, most packages available on anaconda.org/conda-forge won't suffer any further modifications.
589
+
However, in some cases, maintainers might need to perform some actions on the published packages:
590
+
591
+
- Patching their repodata
592
+
- Marking them as broken
593
+
594
+
#### Repodata patch
595
+
596
+
The metadata for `conda` packages is initially contained in each package archive (under `info/`).
597
+
`conda index` iterates over the published `conda` packages, extracts the metadata and consolidates all the found JSON blobs into a single JSON file: `repodata.json`.
598
+
This is the metadata file that the CLI clients download initially to _solve_ the environment.
599
+
600
+
Since the metadata is external to the package files, some details can be modified without rebuilding packages, which simplifies some maintenance tasks notably.
601
+
602
+
Repodata patches are created in `conda-forge/conda-forge-repodata-patches-feedstock`, which generates (and uploads) a regular `conda` package as a result:
0 commit comments