Skip to content

chore: remove snapshot creation/restoration - #164

Open
OlufemiAdeOlusile wants to merge 1 commit into
mainfrom
chore/remove-snapshot-testing
Open

chore: remove snapshot creation/restoration#164
OlufemiAdeOlusile wants to merge 1 commit into
mainfrom
chore/remove-snapshot-testing

Conversation

@OlufemiAdeOlusile

Copy link
Copy Markdown
Contributor

Summary

We do not run db-sync snapshot workflows anymore, so this removes
the whole subsystem rather than leaving unused code and CI toggles
sitting around.

Removed:

  • test_snapshot_creation.py, test_local_snapshot_restoration.py,
    test_iohk_snapshot_restoration.py
  • sync_tests/utils/db_sync/snapshots.py and its re-export
    wrappers in db_sync/init.py
  • teardown_node_and_db_sync() in sync_entries.py, which existed
    only to serve the two restoration test fixtures
  • the snapshot_creation, local_snapshot, and iohk_snapshot
    pytest markers
  • the --snapshot-url and --run-only-sync-test CLI options
  • the run_only_sync_test toggle in db_sync_full_sync.yaml, which
    only existed to gate the now-removed snapshot tests

Not touched: peer-snapshot handling in sync_tests/utils/node
(_downgrade_peer_snapshot, normalize_peer_snapshot, etc). That is
unrelated node topology bootstrap data, not db-sync snapshotting.

Note for reviewers: PR #162 (unit tests workflow) filters pytest
with -m "not (... or snapshot_creation or local_snapshot or iohk_snapshot ...)". Those marker names will just no longer match
anything once this merges; nothing breaks, but that filter list
should get cleaned up in a follow-up on #162.

Test plan

  • ruff check sync_tests/ .github/ passes
  • ruff format --check passes
  • mypy sync_tests/ passes with no issues
  • pytest sync_tests/tests/ (non-sync markers) - 15 passed
  • grep confirms no remaining references to removed functions,
    files, markers, or CLI options

We no longer run db-sync snapshot workflows, so this drops the
whole subsystem instead of leaving unused code and CI toggles
around.

Removed:
- test_snapshot_creation.py, test_local_snapshot_restoration.py,
  and test_iohk_snapshot_restoration.py
- sync_tests/utils/db_sync/snapshots.py and its re-export
  wrappers in db_sync/__init__.py
- teardown_node_and_db_sync() in sync_entries.py, which existed
  only to serve the two restoration test fixtures
- the snapshot_creation, local_snapshot, and iohk_snapshot
  pytest markers
- the --snapshot-url and --run-only-sync-test CLI options
- the run_only_sync_test toggle in db_sync_full_sync.yaml, which
  only existed to gate the now-removed snapshot tests

Lint, mypy, and the full non-sync pytest suite pass locally.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Removes the obsolete Cardano db-sync snapshot creation/restoration subsystem from the test suite, CLI, and CI workflow configuration now that snapshot workflows are no longer run.

Changes:

  • Deletes snapshot creation/restoration tests and the underlying db_sync.snapshots utility module (plus its re-export wrappers).
  • Removes snapshot-related pytest markers and CLI options from test configuration.
  • Simplifies the db-sync full-sync GitHub Actions workflow to always run only node_sync / db_sync tests.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
sync_tests/utils/sync_entries.py Removes teardown helper that existed only for snapshot restoration fixtures.
sync_tests/utils/db_sync/snapshots.py Deletes snapshot download/create/restore implementation.
sync_tests/utils/db_sync/init.py Drops snapshots import and removes snapshot-related wrapper APIs.
sync_tests/tests/test_snapshot_creation.py Deletes snapshot creation test coverage (no longer used).
sync_tests/tests/test_local_snapshot_restoration.py Deletes local snapshot restoration tests (no longer used).
sync_tests/tests/test_iohk_snapshot_restoration.py Deletes IOHK snapshot restoration tests (no longer used).
sync_tests/tests/conftest.py Removes snapshot-specific CLI options from pytest configuration.
pyproject.toml Removes snapshot-related pytest marker registrations.
.github/workflows/db_sync_full_sync.yaml Removes run_only_sync_test toggle and runs only node_sync/db_sync marked tests.

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

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.

2 participants