-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
Make asset checks matter to integration tests #3687
Conversation
Frustratingly, running |
8dd44ac
to
bb86c06
Compare
Also, don't continue integration test if the ETL run fails.
bb86c06
to
f84467d
Compare
@@ -23,42 +19,6 @@ | |||
logger = pudl.logging_helpers.get_logger(__name__) | |||
|
|||
|
|||
def pudl_etl_job_factory( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was only being used in conftest
so I moved it over to avoid some import issues.
@@ -272,6 +279,29 @@ def ferc1_xbrl_taxonomy_metadata(ferc1_engine_xbrl: sa.Engine): | |||
return result.output_for_node("raw_ferc1_xbrl__metadata_json") | |||
|
|||
|
|||
def _pudl_etl_job_factory( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed one layer of function nesting here because it seemed unnecessary based on the reconstructable jobs docs.
Since we're only using execute_in_process
right now anyways, we don't even need a reconstructable job, but it seems fine to leave this because the logic is pretty straightforward now.
The job definition to be executed. | ||
""" | ||
pudl.logging_helpers.configure_root_logger(logfile=logfile, loglevel=loglevel) | ||
if not process_epacems: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of making whole new JobDefinitions
I just return the ones we actually use in other builds - that should make test behavior hew more closely to production behavior.
Overview
Closes #3705 .
What did you change?
Exception
s, so we don't technically need this, but it seems prudent to assert success anyways.Testing
fgd_equipment_null_check
asset check passes, by running the raw_eia860 assets and then the_core_eia860__fgd_equipment
asset in Dagstermake pytest-coverage
and saw the integration tests passfgd_equipment_null_check
by making itreturn AssetCheckResult(passed=False)
_core_eia860__fgd_equipment
asset in Dagster and see the check failmake pytest-coverage
and see that the integration test fails with a bunch of errors aboutdagster._core.errors.DagsterAssetCheckFailedError: Blocking check 'fgd_equipment_null_c heck' for asset '_core_eia860__fgd_e...
To-do list