Skip to content

Fix flapping tests#54

Merged
gabmontes merged 7 commits into
production-hemifrom
fix-flapping-tests
May 22, 2026
Merged

Fix flapping tests#54
gabmontes merged 7 commits into
production-hemifrom
fix-flapping-tests

Conversation

@gabmontes
Copy link
Copy Markdown

@gabmontes gabmontes commented May 20, 2026

Motivation

This PR is a collection of changes taken from upstream to ensure checks "Blockscout / Explorer Tests (optimism)" pass. The original problem is related to cache conditions when downloading the Solidity compilers during the tests making those to fail randomly. See blockscout#13230.

Changelog

This pull request updates spell checking configuration and related workflows, and makes minor test and code cleanups. The main changes are the migration to a new version of the cspell action with configuration moved to cspell.json, improvements to spell checking coverage and accuracy, and minor test and comment adjustments.

Spell checking improvements and configuration:

  • Upgraded the cspell-action in .github/workflows/config.yml to v6.11.1 and switched to using the centralized cspell.json configuration file, enabling broader and more consistent spell checking across the codebase.
  • Added and enhanced cspell.json with schema reference, enabled editor suggestions, specified file globs, used .gitignore for exclusions, added ignore regex patterns, and expanded the custom dictionary. [1] [2] [3] [4] [5] [6]

Test and code cleanups:

  • Removed unnecessary # cspell:ignore comments from migration files, as these words are now handled in the dictionary. [1] [2] [3] [4] [5] [6]
  • Updated test timing intervals in process_test.exs and realtime_test.exs to improve reliability on slower machines. [1] [2] [3]
  • Refactored Solidity test modules to conditionally run based on :chain_type and improved test setup/teardown for Tesla adapters. [1] [2] [3] [4] [5]

Other minor changes:

  • Minor YAML formatting update for ignored paths in workflow configuration.
  • Added a cspell:disable-next-line comment in an NFT helper test to suppress a specific spell check warning.

Checklist for your Pull Request (PR)

  • If I added new functionality, I added tests covering it.
  • If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
  • I checked whether I should update the docs and did so by submitting a PR to docs repository.
  • If I added/changed/removed ENV var, I submitted a PR to docs repository to update the list of env vars and I updated the version to master in the Version column. If I removed variable, I added it to Deprecated ENV Variables page. After merging docs PR, changes will be reflected in these pages.
  • If I added new DB indices, I checked, that they are not redundant, with PGHero or other tools.
  • If I added/removed chain type, I modified the Github CI matrix and PR labels accordingly.

@gabmontes gabmontes self-assigned this May 20, 2026
@gabmontes gabmontes force-pushed the fix-flapping-tests branch 3 times, most recently from bafef0c to 91fc6d6 Compare May 20, 2026 22:51
@gabmontes gabmontes mentioned this pull request May 21, 2026
6 tasks
@gabmontes gabmontes force-pushed the fix-flapping-tests branch from 80095cf to f8f2bcf Compare May 21, 2026 19:52
gabmontes and others added 7 commits May 21, 2026 17:01
* fix: cspell ignore weird IPFS url

* fix: cspell ignore filecoin f410f addresses

* chore: write ignore in single line

* feat: configure everything in `cspell.json`

* refactor: remove unnecessary cspell ignores

* refactor: cspell run command in actions and devcontainer

* chore: enable editor support

* chore: add comment

* fix: cspell action options

* feat: run for all files
(partially cherry-picked from f0fbeef)
(partially cherry picked from commit ebc3367)
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR pulls in a set of upstream changes intended to reduce CI flakiness (notably around Solidity compiler downloads during tests) and to improve spell-checking consistency by centralizing cspell configuration and upgrading the GitHub Action.

Changes:

  • Migrate spell-check configuration to cspell.json and update the CI workflow to use cspell-action v6 with repo-defined file globs.
  • Make several test-suite stability tweaks (timing adjustments, conditional Solidity test execution by :chain_type, Tesla adapter setup/teardown).
  • Expand API v2 search controller tests (pagination, ENS/metadata/TAC microservice cases) and align response expectations to address_hash fields.

Reviewed changes

Copilot reviewed 14 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
cspell.json Adds schema, file globs, regex ignores, and dictionary updates to centralize spell-check behavior.
apps/indexer/test/indexer/fetcher/token_instance/realtime_test.exs Increases sleep to reduce timing-related flakes.
apps/explorer/test/explorer/smart_contract/solidity/verifier_test.exs Gates Solidity verifier tests behind @chain_type == :default.
apps/explorer/test/explorer/smart_contract/solidity/publisher_test.exs Gates Solidity publisher tests behind @chain_type == :default.
apps/explorer/test/explorer/smart_contract/solidity/code_compiler_test.exs Gates Solidity compiler tests behind @chain_type == :default and adjusts Tesla adapter handling.
apps/explorer/test/explorer/history/process_test.exs Adjusts timing interval and receive assertions to reduce flakiness.
apps/explorer/priv/repo/migrations/20230905085809_drop_token_balances_tokens_foreign_key.exs Removes now-unnecessary cspell:ignore comment.
apps/explorer/priv/repo/migrations/20230831122819_drop_current_token_balances_tokens_foreign_key.exs Removes now-unnecessary cspell:ignore comment.
apps/explorer/priv/repo/migrations/20230821120625_drop_rest_address_foreign_keys.exs Removes now-unnecessary cspell:ignore comment.
apps/explorer/priv/repo/migrations/20230817061317_drop_address_foreign_keys.exs Removes now-unnecessary cspell:ignore comment.
apps/explorer/priv/repo/migrations/20230816061723_drop_token_transfers_and_transactions_address_foreign_key.exs Removes now-unnecessary cspell:ignore comment.
apps/explorer/priv/repo/migrations/20230815131151_drop_logs_address_hash_foreign_key.exs Removes now-unnecessary cspell:ignore comment.
apps/block_scout_web/test/block_scout_web/views/nft_helper_test.exs Adds a targeted cspell suppression comment.
apps/block_scout_web/test/block_scout_web/controllers/api/v2/search_controller_test.exs Major expansion/refactor of API v2 search tests, including pagination, reputation filtering, ENS/metadata, and TAC microservice scenarios.
.github/workflows/config.yml Upgrades cspell-action and switches workflow to use cspell.json file globs.
.devcontainer/bin/bs Updates devcontainer spellcheck command to rely on default cspell config behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/explorer/test/explorer/history/process_test.exs
@gabmontes gabmontes marked this pull request as ready for review May 21, 2026 21:25
@gabmontes gabmontes enabled auto-merge May 21, 2026 21:25
@gabmontes gabmontes merged commit 2a3df83 into production-hemi May 22, 2026
21 checks passed
@gabmontes gabmontes deleted the fix-flapping-tests branch May 22, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants