black: Github Action broken (unable to find version "stable")

I’m pretty sure this isn’t my fault, but our Github Action just started failing with the following message:

Error: Unable to resolve action psf/black@stable, unable to find version stable

You can see this happening here: https://github.com/freelawproject/eyecite/runs/2248542521?check_suite_focus=true.

I’m guessing that this is related to dropping the stable version or something like that, but I expect it will affect a lot of folks that use the action since the docs recommend configuring it this way.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 47
  • Comments: 30 (1 by maintainers)

Commits related to this issue

Most upvoted comments

We’re in the process of getting ready for a release so yeah? I haven’t been involved in this effort so I don’t know the details. Why would the stable branch be deleted? IDK, probably a mistake from the cleaning up they’ve been doing.

cc @ambv @cooperlees

@sdodsley The core team wants to bring it back ASAP, but no one who has the right perms has done it yet …

I don’t have write permissions or else I probably would’ve done it by now. I’m sorry.

@cubranic that may be so, but I do not want to keep having to check the black repo for new releases, that is why stable is so useful.

Reading the references a bit and reflecting on the repository:

  • We moved our stable tag recently to match two new releases (stable)
  • We do not have a branch called “stable” (branches)
  • Moving tags is bad (psf/black#760) (this is new information for me as well 😅) and pre-commit assumes tags to stay consistent

So yeah, I agree that this should be reopened, and the stable branch should be introduced once more.

Just workarounds for those who wonder

# .pre-commit-config.yaml
repos:
  - repo: https://github.com/psf/black
    rev: 20.8b1  # change this
    hooks:
      - id: black
        language_version: python3
# .github/workflows/black.yaml
name: Lint

on: [push, pull_request]

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
      - uses: psf/black@20.8b1  # change this

Yeah, now there’s a stable tag pointing to the commit that ended up being the 20.8b1 version, but there’s no stable branch. So psf/black@stable pretty much translates to psf/black@20.8b1. I’ll see if I can resolve this mess before the stable reference no longer points to the latest published version, no promises though.

We’re experiencing the exact same issue @mlissner. Not isolated to you or your project. See https://github.com/folksgl/identity-give-usps/runs/2248887438?check_suite_focus=true

FWIW, force pushing a modified stable tag breaks other tools such as vim-plug. See https://github.com/psf/black/issues/2503

Thanks for explaining but I do happen to roughly know how pre-commit works and how bad the recommendation of rev: stable is, I’d certainly accept a suggestion to at least get rid of references to stable for pre-commit (and GHA as well).

It’s my understanding here that this issue is about GHA and the official black action we provide, not GHA + pre-commit configured to use black. Our recommendations of using black with pre-commit are problematic in its own way, but I’d argue it’s noise to the fact the official action is failing (I can open a new issue about pre-commit later). I’m sorry if I’m mistaken.

@felix-hilden @JelleZijlstra Actually using version 21.6b0 results in the same error as i mentioned earlier.

So it actually might be a problem with that specific version rather than the @stable tag/branch which leads to the proper newest stable release.

#2335

We have a stable branch again now.

Could you perhaps pin this issue, please? I’ve always used specific releases, so my spidey senses tingled when I saw a stable tag suddenly appear without explanation and worried whether it was legit or package poisoning.