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

[CT-3370] [implementation] ensure dbt retry works with unit tests #9053

Closed
1 task done
Tracked by #8283
graciegoheen opened this issue Nov 10, 2023 · 4 comments
Closed
1 task done
Tracked by #8283
Assignees
Labels
retry user docs [docs.getdbt.com] Needs better documentation

Comments

@graciegoheen
Copy link
Contributor

graciegoheen commented Nov 10, 2023

Housekeeping

  • I am a maintainer of dbt-core

Acceptance criteria

dbt retry re-executes the last dbt command from the node point of failure.

Once we finish swapping over the dbt unit-test command to dbt build and dbt test with selectors (#8979), let's confirm dbt retry still works.

If a unit test fails in a dbt test or a dbt build, dbt retry should re-execute that dbt command from the failed unit test.

  • check that this works for dbt build and dbt test
  • add integration tests

Impact to Other Teams

none

Will backports be required?

no

Context

No response

@graciegoheen graciegoheen added the user docs [docs.getdbt.com] Needs better documentation label Nov 10, 2023
@github-actions github-actions bot changed the title [implementation] ensure dbt retry works with unit tests [CT-3370] [implementation] ensure dbt retry works with unit tests Nov 10, 2023
@jtcohen6
Copy link
Contributor

This appears to be working (in simple cases). I added an initial functional test for this in #9032:

class TestUnitTestRetry(UnitTestState):
def test_unit_test_retry(self, project):
run_dbt(["run"])
run_dbt(["unit-test"], expect_pass=False)
self.copy_state(project.project_root)
results = run_dbt(["retry"], expect_pass=False)
assert len(results) == 1

@graciegoheen
Copy link
Contributor Author

Open question from refinement:

  • how will this work given we have a separate manifest for unit testing

@MichelleArk
Copy link
Contributor

@graciegoheen
Copy link
Contributor Author

graciegoheen commented Nov 15, 2023

I thought we changed the acceptance criteria to work on this ticket after we switched over the unit testing commands?

But if the test is enough then I’m good to close it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
retry user docs [docs.getdbt.com] Needs better documentation
Projects
None yet
Development

No branches or pull requests

4 participants