Skip to content

v2.0.0 - Migrate from GitHub Reusable Workflows to GitHub Actions

Latest
Compare
Choose a tag to compare
@jeffhandley jeffhandley released this 30 Apr 20:52

Referencing v2.0.0

To reference dotnet/issue-labeler v2.0.0 actions, workflows should pin to the SHA associated with the release as follows:

  • uses: dotnet/issue-labeler/download@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0
  • uses: dotnet/issue-labeler/train@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0
  • uses: dotnet/issue-labeler/test@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0
  • uses: dotnet/issue-labeler/promote@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0
  • uses: dotnet/issue-labeler/restore@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0
  • uses: dotnet/issue-labeler/predict@46125e85e6a568dc712f358c39f35317366f5eed # v2.0.0

What's New

Since launching Release v1.0.0 - 2025-03-06 - Initial version of GitHub workflow-based Issue Labeler, we've accumulated feedback and explored how to take this even further by migrating from Reusable Workflows to GitHub Actions. This will offers notable usability, stability, and maintainability benefits both for the implementation of the issue-labeler and more so for repositories that consume it.

Some reference documents on the types of reusability:

Notable Benefits

  • With the reusable workflows approach, every consuming repository needed to run a workflow to build the predictor-app and store it in the GitHub Action Cache, and use workflows to try to prevent the app from being evicted from cache.
    • If the predictor-app gets evicted from cache, all prediction jobs start failing
    • With a Docker-based GitHub Action, a container image with the predictor app is published to the GitHub Container Registry, providing a faster and more reliable way to invoke the predictor
  • Fewer and simpler workflows to manage in consuming repositories
    • With the reusable workflows, a lot of YAML-based workflow logic was replicatated into each consuming repository for managing the full lifecycle of the issue-labler's implementation details
    • The GitHub Actions introduced here consolidate much more of the workflow logic into the issue-labeler's action.yml files, and the workflows in each consuming repository are simpler to set up and maintain
  • Substantially improved output on the workflow jobs
    • While the reusable workflows could have gone further with their output, adoption of the GitHub Actions approach enables the usage of the GitHub.Actions.Core package to integrate rich summary and log output into each of the actions
    • All actions now produce rich summaries visible in the GitHub UI, displayed detailed information about data downloading, model training, model testing, model promotion, and testing
    • For example, to understand the model testing results previously, the full console log from the Tester application needed to be inspected and interpreted; teams onboarding to the issue-labeler shared feedback this was unintuitive. With the GitHub Actions implemented here, detailed job summaries are emitted in markdown and visibile on the Actions page in GitHub. The reports provide alerts that indicate whether training was deemed favorable, and links are provided for next steps.
    • Error handling is similarly improved throughout, with detailed console and summary output for all errors that occur, improving troubleshooting for consumers
  • Maintainability of Downloader, Trainer, Tester, and Predictor applications
    • The implementations have been revised to improve input/argument processing, and control flow

Migration for Consumers

Once a release with the GitHub Actions based implementation is merged, consumers will migrate by:

  1. Delete the labeler-build-predictor.yml workflow
  2. Update the labeler-cache-retention.yml workflow
  3. Update the labeler-predict-issues.yml workflow
  4. Update the labeler-predict-pulls.yml workflow
  5. Update the labeler-promote.yml workflow
  6. Update the labeler-train.yml workflow
  7. Delete all existing issue-labeler Action Cache entries, including the issue-labeler/predictor-app and all models
  8. Run the updated labeler-train.yml workflow to re-train the models, as the cache key naming conventions were updated
  9. Run the updated labeler-promote.yml workflow to promote the newly trained workflows into use

Issues Resolved

The following issues are resolved with this PR:

Fixes #87
Fixes #93
Fixes #95
Fixes #97
Fixes #98
Fixes #99
Fixes #100
Fixes #103

Workflow Onboarding and Execution

Issue labeler onboarding (jeffhandley/labeler-demo#1) illustrates the revised onboarding experience for adding the worfklows into a repository.

Here are example workflow runs showing the training, promotion, prediction, and cache retention job results: