Skip to content

Commit

Permalink
Merge pull request #523 from spectacles-ci/hotfix/ephemeral-logic
Browse files Browse the repository at this point in the history
Handle ephemeral state correctly
  • Loading branch information
joshtemple authored Mar 2, 2022
2 parents e84d59e + 2c2635c commit 303098b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spectacles/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,9 @@ def validate_sql(
validator = SqlValidator(self.client, concurrency, runtime_threshold)
tests: List[SqlTest] = []

ephemeral = True if incremental else None
# Create explore-level tests for the desired ref
with self.branch_manager(ref=ref, ephemeral=incremental):
with self.branch_manager(ref=ref, ephemeral=ephemeral):
base_ref = self.branch_manager.ref # Resolve the full ref after checkout
logger.debug("Building explore tests for the desired ref")
project = build_project(
Expand Down Expand Up @@ -322,7 +323,7 @@ def validate_sql(

# Create dimension tests for the desired ref when explores errored
if not fail_fast:
with self.branch_manager(ref=ref, ephemeral=incremental):
with self.branch_manager(ref=ref, ephemeral=ephemeral):
base_ref = self.branch_manager.ref
logger.debug("Building dimension tests for the desired ref")
base_tests = validator.create_tests(project, at_dimension_level=True)
Expand Down

0 comments on commit 303098b

Please sign in to comment.