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

dbt: Propagate the dbt return code also when no OpenLineage events are emitted #2591

Conversation

blacklight
Copy link
Contributor

@blacklight blacklight commented Apr 9, 2024

Problem

This is a missed corner case follow-up of #2560

dbt-ol should always propagate dbt's return code, even when the script encounters an early exit because no lineage events were processed.

Closes: #2558

Solution

Added return return_code to the early exit statements.

  • Your change modifies the core OpenLineage model
  • Your change modifies one or more OpenLineage facets

One-line summary:

dbt-ol should propagate the exit code of the underlying dbt process even if no lineage events are emitted.

Checklist

  • You've signed-off your work
  • Your pull request title follows our guidelines
  • Your changes are accompanied by tests (if relevant)
  • Your change contains a small diff and is self-contained
  • You've updated any relevant documentation (if relevant)
  • Your comment includes a one-liner for the changelog about the specific purpose of the change (if necessary)
  • You've versioned the core OpenLineage model or facets according to SchemaVer (if relevant)
  • You've added a header to source files (if relevant)

SPDX-License-Identifier: Apache-2.0
Copyright 2018-2023 contributors to the OpenLineage project

…eage events are emitted.

This is a follow-up [/missed corner case] of
OpenLineage#2560

Signed-off-by: Fabio Manganiello <[email protected]>
@boring-cyborg boring-cyborg bot added the area:integration/dbt openlineage-dbt label Apr 9, 2024
Copy link
Contributor

@kacpermuda kacpermuda left a comment

Choose a reason for hiding this comment

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

lgtm

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.03%. Comparing base (bc335dc) to head (09e8e46).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2591      +/-   ##
==========================================
- Coverage   84.84%   84.03%   -0.82%     
==========================================
  Files          59       54       -5     
  Lines        3398     3225     -173     
==========================================
- Hits         2883     2710     -173     
  Misses        515      515              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mobuchowski mobuchowski merged commit de8b0c2 into OpenLineage:main Apr 9, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:integration/dbt openlineage-dbt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dbt-ol should transparently propagate the exit code of dbt run
4 participants