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

Run singular tests conditionally #95

Merged
merged 6 commits into from
Sep 19, 2024

Conversation

amishas157
Copy link
Contributor

@amishas157 amishas157 commented Sep 18, 2024

PR Checklist

PR Structure

  • This PR has reasonably narrow scope (if not, break it down into smaller PRs).
  • This PR avoids mixing refactoring changes with feature changes (split into two PRs
    otherwise).
  • This PR's title starts with the jira ticket associated with the PR.

Thoroughness

  • This PR adds tests for the most critical parts of the new functionality or fixes.
  • I've updated the docs and README with the added features, breaking changes, new instructions on how to use the repository.

Release planning

  • I've decided if this PR requires a new major/minor/patch version accordingly to
    semver, and I've changed the name of the BRANCH to release/* , feature/* or patch/* .

What

This PR adds config in singular tests to be enabled only in prod environment and when variable is_singular_airflow_task setup.

Why

It is a known problem that singular tests run whenever dbt build command is executed. Even with adding --exclude singular_test argument, dbt does not stop running these tests. Ideally we want singular tests to be run only as part of dbt_singular_tests airflow task.

The other option was to:

Testing

Enriched_base_table_task does not run any singular test with this PR

dbt_singular_test_task runs only ledger_sequence_increment test since that enabled for test environment. In prod env, all singular test should run okay

@amishas157 amishas157 marked this pull request as ready for review September 18, 2024 18:44
@amishas157 amishas157 requested a review from a team as a code owner September 18, 2024 18:44
fix lint
@amishas157 amishas157 force-pushed the patch/run-singular-test-conditionally branch from 376efff to 26c9b6c Compare September 18, 2024 18:56
Copy link
Contributor

@sydneynotthecity sydneynotthecity left a comment

Choose a reason for hiding this comment

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

LGTM

@amishas157 amishas157 merged commit 67beea5 into master Sep 19, 2024
3 checks passed
@sydneynotthecity sydneynotthecity deleted the patch/run-singular-test-conditionally branch November 14, 2024 16:40
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.

3 participants