source freshness not working in bigquery after upgrade to 1.5

The problem I’m having

After upgrading dbt from 1.4.1 to 1.5.0, commands like dbt source freshness --select source:mysql.schools never finish.

A command that takes a few seconds in 1.4.1 will now get stuck after “1 of 1 START freshness of mysql.schools … [RUN]”… and will hang there until I cancel the process

We use the image from Package dbt-bigquery · GitHub

We have the freshness configured like this:

freshness:
  error_after:
    count: 1
    period: day

We see the same behavior for any source/model we try to select.

What I’ve already tried

We’ve reverted to 1.4.1 to confirm it still works in that image (it does).

We’ve run source freshness commands with “–debug”. The command still stalls out in the same way, but it shows that the query takes about 2 seconds:

00:42:20  On source.company.mysql.schools: /* {"app": "dbt", "dbt_version": "1.5.0", "profile_name": "default", "target_name": "prod_admin", "node_id": "source.company.mysql.schools"} */





      SELECT
        TIMESTAMP_TRUNC(TIMESTAMP_MILLIS(last_modified_time), DAY, 'UTC') as max_loaded_at,
        TIMESTAMP_TRUNC(current_timestamp(), DAY, 'UTC') as snapshotted_at
      FROM
        `project-name`.`mysql`.__TABLES__
      WHERE table_id = 'schools'



00:42:22  BigQuery adapter: https://console.cloud.google.com/bigquery?project=project-name&j=bq:US:123456&page=queryresults
00:42:22  Timing info for source.company.mysql.schools (execute): 00:42:20.666548 => 00:42:22.372497

When I run the command in the 1.4.1 image, I get the same output except it continues with the following (and then finishes as expected):

00:46:39.233407 [info ] [Thread-1 (]: 1 of 1 PASS freshness of mysql.schools ......................................... [PASS in 1.50s]

Hey @dylan-qz, regressions in dbt Core should be opened on GitHub - I have transferred your post there so please comment/follow it so that you can see followup messages from the Core team!

1 Like