Skip to content

Commit 2a6776a

Browse files
beckermrpre-commit-ci[bot]jaimergp
authored
doc: add new docs on cf-post-staging (#2504)
* doc: add new docs on cf-post-staging * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Apply suggestions from code review --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: jaimergp <[email protected]>
1 parent e5bc76c commit 2a6776a

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed

docs/maintainer/infrastructure.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -669,9 +669,11 @@ works as follows.
669669
2. Then the feedstock CI job makes an API call to our admin webservices server with its secret token
670670
and some information about the package it is trying to upload.
671671
3. The webservices server validates the secret token, the integrity of the package, and
672-
that the package is allowed for the given feedstock.
673-
4. If all of the validation passes, the package is then copied to the `conda-forge`
674-
channel.
672+
that the package is allowed for the given feedstock. As a part of the validation process, the
673+
package is copied from `cf-staging` to a secured, intermediate staging channel, `cf-post-staging`.
674+
This step prevents changes to the package while it is being validated.
675+
4. If all of the validation passes, the package is then copied from `cf-post-staging` to the
676+
`conda-forge` channel.
675677

676678
There are two scenarios we consider:
677679

@@ -797,18 +799,24 @@ Authenticated services involved:
797799
### Package validation and publication
798800

799801
Once built on `main` (or other branches), the conda packages are uploaded to an intermediary channel named `cf-staging`.
802+
The CI job then makes a copy request to the webservices with the feedstock token and other metadata about the package.
800803
From there, our webservices (`conda-forge/conda-forge-webservices`) does the following:
801804

802-
- The logic checks the feedstock token to authenticate a legitimate request.
803-
- The logic checks that the hash sum of the package on `cf-staging` against
804-
the value computed in the CI to ensure the artifact to be copied is the same.
805-
- The logic checks that the feedstock is allowed to push the package using
806-
the `conda-forge/feedstock-outputs` repo.
807-
- If all three checks pass, the webservices copies the artifacts from `cf-staging` to `conda-forge`.
805+
1. The webservices validates the package and copy request by
806+
- using the feedstock token to authenticate the copy request by the CI job
807+
- checking that the hash sum of the package on `cf-staging` from the `anaconda.org` API
808+
is the same as the value sent in the copy request by the CI job
809+
- checking that the feedstock is allowed to push the package using the
810+
`conda-forge/feedstock-outputs` repo
811+
2. If all three checks pass, the webservices copies the package to a secured, intermediate
812+
staging channel, `cf-post-staging`, in order to ensure the package is not changed further during validation.
813+
3. The webservices repeats the check of the package hash sum on `cf-post-staging` to ensure no changes were made
814+
during the initial validation step.
815+
4. If the second hash sum check passes, the webservices copies the package to the `conda-forge` channel.
808816

809817
Authenticated services involved:
810818

811-
- Anaconda.org uploads to `conda-forge` and `cf-staging`
819+
- Anaconda.org uploads to `conda-forge`, `cf-post-staging`, and `cf-staging`
812820
- The `conda-forge-webservices` app deployment itself (currently at Heroku)
813821

814822
### Post-publication

0 commit comments

Comments
 (0)