Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ingest): refactor test markers + fix disk space issues in CI #8938

Merged
merged 7 commits into from
Oct 4, 2023

Conversation

hsheth2
Copy link
Collaborator

@hsheth2 hsheth2 commented Oct 3, 2023

This refactors the tests into integration_batch_{0,1,2}. If it's in the tests/integration directory, it gets labelled as an integration test. If it has an explicit batch number, that will be used. Otherwise, it will go in batch 0 by default.

Also renames slow_integration -> batch_2 and slow_unit to slow. The slow marker isn't actually used for much yet.

Root cause of the disk space issues seems to be the iceberg CI tests - the tabulario/spark-iceberg image is 6.7gb uncompressed. This shuffles some of the tests between the batches and adds logic to remove some of the larger docker images after the integration test is done.

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added ingestion PR or Issue related to the ingestion of metadata devops PR or Issue related to DataHub backend & deployment labels Oct 3, 2023
@hsheth2 hsheth2 marked this pull request as ready for review October 3, 2023 23:07
@hsheth2 hsheth2 requested a review from treff7es October 3, 2023 23:09
Comment on lines +68 to +74
if (
"docker_compose_runner" in item.fixturenames # type: ignore[attr-defined]
or any(
marker.name == "integration_batch_2" for marker in item.iter_markers()
)
):
item.add_marker(pytest.mark.slow)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we manually mark each test in this batch slow instead? Feels like this is something that'd be easy to miss

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we don't actually use slow anywhere, so I think it's fine - I mainly added it as a convenience thing to run quick unit tests locally

@hsheth2 hsheth2 merged commit 9deb7be into datahub-project:master Oct 4, 2023
61 checks passed
@hsheth2 hsheth2 deleted the test-refactor branch October 4, 2023 03:17
@maggiehays maggiehays added the hacktoberfest-accepted Acceptance for hacktoberfest https://hacktoberfest.com/participation/ label Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops PR or Issue related to DataHub backend & deployment hacktoberfest-accepted Acceptance for hacktoberfest https://hacktoberfest.com/participation/ ingestion PR or Issue related to the ingestion of metadata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants