open-telemetry / open-telemetry/opentelemetry-python-contrib

`test_0.yml` runtime is 1 hour 45 minutes

Open
#4,316 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.1k
Forks
1.1k
Avg merge
4d 15h
Merged PRs (30d)
16

Description

Hello,

I've observed that test_0.yml takes an hour and 45 minutes to run [recent example, scroll to the bottom of the page to see the total time].

Would you be open to me submitting PRs to reduce the total runtime?

Some of the things that I'm seeing that are contributing to that long runtime include:

  • Python 3.9 has to be downloaded and set up for ~35 jobs. 3.9 is not cached on the Ubuntu runners anymore, so each download and install contributes to the runtime.
  • tox-uv is installed ~250 times (once per runner).
  • The package has to be built (first as a .tar.gz file, and then converted to a wheel per tox defaults) for each run.

If you're open to it, I'd like to explore speeding up test_0.yml runtimes in the following ways:

  1. Aggregating environments so that, say, py3{9,10,11,12,13,14}-test-instrumentation-aiopg all run on the same runner.
  2. Building the opentelemetry wheel once, uploading it as an artifact, and then downloading it so that it doesn't have to be built for each tox environment
  3. Using the setup-uv action and using uv pip install tox-uv to install tox, rather than pip install tox-uv, which should reduce the time required to install tox.

These are all examples of what's possible. I have a lot of experience speeding up CI runs, but it always involves reducing duplication, which can affect the shape of the jobs. If you're open to me submitting PRs for this, let me know! If you'd like to keep CI as it is, that's fine too. I'm interested in helping, but don't want to waste anybody's time, my own included. 😁

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 with the test_0.yml workflow and the linked Actions run, reviewing how its jobs install Python 3.9, install tox-uv, and build the package. Compare the duplicated setup and build work across environments. Done means the workflow preserves its test coverage while reducing repeated CI work and total runtime.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, python
Domain
ci-cd, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.