Skip to content

Migrate viable/strict promotion to GHA #76700

@janeyx99

Description

@janeyx99

Since our trunk CI is not the most reliable as of yet, we have the concept of a “viable/strict” branch where we enforce that every commit on the branch must pass all our CI checks. This branch is crucial for our build and release pipelines as we do not want to distribute broken binaries to our users. This branch is also useful for developers who want a guarantee that they will not inherit upstream failures while developing.

The current way we update this branch is a janky internal cron job that is overly complicated, unreliable, and hard to debug. We want to migrate this functionality to an open source GitHub action so that:

  1. The logic is clearer and easier to debug and thus more maintainable (better engineering!)
  2. The code is reusable across all open source projects, such as our domain projects TorchVision and TorchAudio, etc. (scalability!)

The ask in this milestone is to create a GitHub action that would periodically promote the latest trunk commit where:

  • All jobs are passing
  • No jobs are pending
  • At least 20 jobs have been run

Goal:
A GitHub action that would periodically promote the latest green trunk commit to our viable/strict branch.

Resources:

Tasks:

  • Start a stub script that prints the latest commit SHAs on trunk from the last M minutes
  • Add a function that prints the check statuses run on a given commit SHA
  • Write stubbed out test cases for a function that would verify whether a commit SHA is promote-able
  • Write the function that would verify whether a commit SHA is promote-able
  • Write a GitHub Action that would run the completed script every 30 minutes and promote the most recent “green” commit SHA to viable/strict

Metadata

Metadata

Assignees

Labels

module: ciRelated to continuous integrationtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions