Skip to content

feat: add 'ci_skip' test tag to bitcoin-tests.yml to handle both docker rate limit and rpc test double run#7056

Merged
simone-stacks merged 5 commits intostacks-network:developfrom
federico-stacks:ci/exclude-btc-rpc-tests
Apr 2, 2026
Merged

feat: add 'ci_skip' test tag to bitcoin-tests.yml to handle both docker rate limit and rpc test double run#7056
simone-stacks merged 5 commits intostacks-network:developfrom
federico-stacks:ci/exclude-btc-rpc-tests

Conversation

@federico-stacks
Copy link
Copy Markdown
Contributor

@federico-stacks federico-stacks commented Mar 30, 2026

Description

I noticed that we are intermittently hitting Docker Hub rate limits when pulling images during CI runs
(see https://github.com/stacks-network/stacks-core/actions/runs/23514194002/job/68450961455?pr=6999)

According to GitHub’s official documentation and prior discussion #6927 (comment) these limits should not apply when

  • Using GitHub-hosted runners, and
  • Pulling public images.

Suspected root cause
The issue appears to stem from how Docker images are pulled in certain jobs.

In the failing cases, images are pulled indirectly via the testcontainers crate (i.e., from within Rust code), rather than being explicitly pulled by the GitHub Actions runner itself. This differs from workflows like bitcoin-rpc-tests.yml, where images are pre-pulled in a dedicated step:

- name: Pre-pull bitcoind image ${{ matrix.bitcoin_version }}
run: docker pull bitcoin/bitcoin:${{ matrix.bitcoin_version }}

Because of this, the pulls performed by testcontainers may not benefit from the special configuration or exemptions applied to GitHub-hosted runners (at least this is my hope 😄 )

Changes in this PR
To explore and mitigate this issue, this PR introduces the following:

  • A new ci_skip test tag, allowing selective exclusion from default CI runs
  • Application of this tag to Bitcoin RPC tests, so they are executed only within the dedicated bitcoin-rpc-tests.yml workflow (which includes explicit image pre-pulling). This also avoid double runs of these tests both as dedicated workflow and as integration tests (an already known fact we wanted to address).
  • A utility script to help generate regex patterns for filtering tests by tags (so that can be reused in other workflow).

NOTE: If this hypothesis is confirmed, we may think to update testenv actions to explicitly pre-pull Docker images before running tests, so that it apply automatically to both integration and unit tests.

Applicable issues

  • fixes #

Additional info (benefits, drawbacks, caveats)

Checklist

  • Test coverage for new or modified code paths
  • For new Clarity features or consensus changes, add property tests (see docs/property-testing.md)
  • Changelog is updated
  • Required documentation changes (e.g., rpc/openapi.yaml for RPC endpoints, event-dispatcher.md for new events)
  • New clarity functions have corresponding PR in clarity-benchmarking repo

@coveralls
Copy link
Copy Markdown

coveralls commented Mar 30, 2026

Pull Request Test Coverage Report for Build 23865270369

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1368 unchanged lines in 52 files lost coverage.
  • Overall coverage decreased (-0.03%) to 85.681%

Files with Coverage Reduction New Missed Lines %
stackslib/src/burnchains/burnchain.rs 1 72.17%
stackslib/src/chainstate/stacks/miner.rs 1 83.37%
stackslib/src/clarity_vm/clarity.rs 1 93.7%
stackslib/src/net/download/nakamoto/download_state_machine.rs 1 90.57%
stackslib/src/net/mod.rs 1 77.92%
stackslib/src/net/stackerdb/mod.rs 1 87.13%
stacks-node/src/burnchains/rpc/bitcoin_rpc_client/mod.rs 1 97.66%
stacks-signer/src/client/stacks_client.rs 1 86.19%
clarity/src/vm/functions/define.rs 2 99.34%
stacks-common/src/deps_common/bitcoin/util/hash.rs 2 81.45%
Totals Coverage Status
Change from base Build 23400582460: -0.03%
Covered Lines: 186565
Relevant Lines: 217744

💛 - Coveralls

@federico-stacks federico-stacks self-assigned this Mar 30, 2026
@federico-stacks federico-stacks changed the title feat: add 'ci_skip' test tag to bitcoin-tests.yml feat: add 'ci_skip' test tag to bitcoin-tests.yml to handle docker rate limit Mar 30, 2026
@federico-stacks federico-stacks changed the title feat: add 'ci_skip' test tag to bitcoin-tests.yml to handle docker rate limit feat: add 'ci_skip' test tag to bitcoin-tests.yml to handle both docker rate limit and rpc test double run Mar 30, 2026
Comment thread stacks-node/src/tests/bitcoin/core_container.rs
Copy link
Copy Markdown
Contributor

@simone-stacks simone-stacks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@federico-stacks federico-stacks added this pull request to the merge queue Apr 2, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Apr 2, 2026
@simone-stacks simone-stacks added this pull request to the merge queue Apr 2, 2026
Merged via the queue into stacks-network:develop with commit 461c7b5 Apr 2, 2026
324 checks passed
@github-actions
Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants