matrix-org / matrix-org/backend-meta

Cache and restore `black`'s cache directory

Open
#8 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
No language data
Stars
1
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Synapse spends 20 seconds running black. Might be able to trim this down.

Black's cache dir can be set using the env var BLACK_CACHE_DIR, see https://black.readthedocs.io/en/stable/usage_and_configuration/file_collection_and_discovery.html.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the shared CI configuration used by Synapse and identify where Black runs. Read Black's cache-directory documentation and verify how BLACK_CACHE_DIR can be configured and persisted between runs. Done means the CI job restores and saves Black's cache so repeated runs avoid the current roughly 20-second cost.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ci-cd
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.