Skip to content

Enhanced Dependency-Aware Multi-Repo CI/CD Pipeline Logic #430

@biergaizi

Description

@biergaizi

The openEMS Project is a multi-repo project, openEMS is just a component in it. Changes frequently affect multiple repos, with changes depending on and also blocking on each other. This is the proposal to implement better CI/CD logic to automatically pick the correct dependency in a multi-repo merge.

The logic should work like this:

  1. Contributor opens a Pull Request against openEMS.
  2. CI pipeline checks if the change is a commit or a Pull Request.
  3. If the change is a Pull Request, CI pipeline checks if the contributor has a modified version of fparser and CSXCAD under their personal account.
  4. If no, use the upstream repos as the action/checkout input.
  5. If yes, check if the modified fparser and CSXCAD has a branch of the same name, and check if there's an open Pull Request. If so, use the 'merge commit" of those Pull Request as the repos to clone for action/checkout, and generate a warning that those Pull Request must be merged first.

Motivated by my personal development and @gadiLhv's contribution in thliebig/openEMS#175.

I believe implementing this logic is somewhat complicated but not difficult. The only thing one needs is time and energy to figure out the syntax, write the code and try repeatedly until it works, which I lack. So it's only a wishlist feature right now. I may return to this project after finishing the Windows port.

It's important that the detection logic produces outputs that can be fed into action/checkout or legacy git commands (or legacy systems), rather than calling git directly to keep it modular. We don't want to reimplement the repo checkout logic itself, only the determination of repos.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions