Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add life cycle description #2167

Merged
merged 26 commits into from
Aug 13, 2024
Merged

Add life cycle description #2167

merged 26 commits into from
Aug 13, 2024

Conversation

zklaus
Copy link
Contributor

@zklaus zklaus commented May 1, 2024

PR Checklist:

  • note any issues closed by this PR with closing keywords
  • if you are adding a new page under docs/ or community/, you have added it to the sidebar in the corresponding _sidebar.json file
  • put any other relevant information below

This doesn't directly close any issues, but potentially relevant issues and PRs are:

🔍 Preview at https://deploy-preview-2167--conda-forge-previews.netlify.app/docs/maintainer/understanding_conda_forge/

Copy link

netlify bot commented May 1, 2024

Deploy Preview for conda-forge-previews ready!

Name Link
🔨 Latest commit bb0761f
🔍 Latest deploy log https://app.netlify.com/sites/conda-forge-previews/deploys/66bb34745dfcdd0008ca0d8c
😎 Deploy Preview https://deploy-preview-2167--conda-forge-previews.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

docusaurus.config.js Outdated Show resolved Hide resolved
@jaimergp
Copy link
Member

jaimergp commented Jun 3, 2024

@zklaus any progress here?

@zklaus zklaus changed the title [WIP] Add life cycle description Add life cycle description Aug 6, 2024
@zklaus zklaus requested a review from jaimergp August 6, 2024 15:08
@jaimergp
Copy link
Member

jaimergp commented Aug 8, 2024

@conda-forge/core - this is ready for review. You can start reading at https://deploy-preview-2167--conda-forge-previews.netlify.app/docs/maintainer/understanding_conda_forge/.

@jaimergp jaimergp marked this pull request as ready for review August 8, 2024 10:03
@jaimergp jaimergp requested a review from a team as a code owner August 8, 2024 10:03
@jaimergp
Copy link
Member

jaimergp commented Aug 8, 2024

pre-commit.ci autofix

Package building can be triggered by several events, which are described in the next section.
In all of those cases, the following sequence plays out.

```mermaid
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding the diagram here just for the sake of visibility. Nice one BTW!

sequenceDiagram
    box github
    participant f as feedstock
    end
    box CI provider
    participant c as CI
    end
    box distribution infrastructure
    participant s as cf-staging channel
    participant cf as conda-forge channel
    participant cdn as CDN
    end
    f->>+c: trigger build
    Note right of c: 1. build<br/>2. validate
    opt if valid and required (4.)
    c->>s: upload packages
    s->>c: report reception success/failure
    Note right of s: 3. validate
    s->>cf: upload packages
    cf->>cdn: upload packages
    end
    c->>-f: report success/failure
Loading


First, the version information is updated from upstream sources and stored in the [`cf-graph-countyfair` repo](/docs/maintainer/infrastructure/#regrocf-graph-countyfair), more specifically in the `versions` directory tree, nested by hash with one file per package.

```mermaid
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sequenceDiagram
    participant cfs as cf-scripts
    participant gha as github actions
    participant cft as conda_forge_tick
    participant ups as upstream
    participant cfg as cf-graph-countyfair
    loop every hour at :15, :45
        cfs->>gha: bot-versions
        gha->>cft: update-upstream-versions
        cft->>cfg: load package information from `graph.json`
        loop for every package
            cft->>ups: query version
            ups->>cft: return version
            cft->>cfg: write new version
        end
    end
Loading

Second, the main bot CI job, the `bot-bot` action in [`cf-scripts`](/docs/maintainer/infrastructure/#regrocf-scripts) creates PRs for all packages that have a new version available upstream.
Here is a simplified diagram of how that is done. For the full picture, read [below](#rebuilds-for-migrators).

```mermaid
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sequenceDiagram
    participant cfs as cf-scripts
    participant gha as github actions
    participant cft as conda_forge_tick
    participant fs as feedstock
    participant cfg as cf-graph-countyfair
    loop self renewing
        cfs->>gha: bot-bot
        gha->>cft: auto-tick
        note right of cfg: the graph now contains<br/>the new version information
        cft->>cfg: load package information from `graph.json`
        loop for every package
            opt if new version
                cft->>fs: rewrite recipe and open pr
            end
        end
        gha->>gha: re-trigger bot-bot
    end
Loading


A more complete picture of what `auto-tick` does is the following:

```mermaid
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sequenceDiagram
    participant cfs as cf-scripts
    participant gha as github actions
    participant cft as conda_forge_tick
    participant fs as feedstock
    participant cfg as cf-graph-countyfair
    loop self renewing
        cfs->>gha: bot-bot
        gha->>cft: auto-tick
        note right of cfg: the graph now contains<br/>the new version information
        cft->>cfg: load package information from `graph.json`
        loop for every migrator
            create participant mg as migrator
            cft->>mg: run migrator on graph
            note right of mg: 1. filter applicable package to produce effective graph<br/>2. determine migration order<br/>3. run migrator on every possible node
            destroy mg
            mg->>fs: create migration PR
        end
        gha->>cfs: deploy, i.e. commit changed pr information
        gha->>gha: re-trigger bot-bot
    end
Loading

Copy link
Member

@ocefpaf ocefpaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love to see this long missing piece in our docs! Thank you for writing it!!

@jaimergp
Copy link
Member

jaimergp commented Aug 8, 2024

pre-commit.ci autofix

@zklaus
Copy link
Contributor Author

zklaus commented Aug 13, 2024

I think all comments were addressed.

@jaimergp
Copy link
Member

Let's merge! Further refinements, if needed, can happen in additional PRs.

@jaimergp jaimergp merged commit c08b554 into conda-forge:main Aug 13, 2024
6 checks passed
@zklaus zklaus deleted the add-life-cycle branch August 13, 2024 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants