Macro Error connected with model after dbt upgrade to 1.6)

I’m trying to run a model with for our load framework which is essential to our ops but returns errors. The model has some macros in the background.
The model isn’t running anymore after I upgraded dbt from 1.0 to 1.6.

Example code or error messages

Compilation Error in model mtd_table_config models\metadata\load\tables\mtd_table_config.sql)
11:35:17    macro 'dbt_macro__get_delete_insert_merge_sql' takes not more than 4 argument(s)
11:35:17
11:35:17    > in macro default__get_incremental_delete_insert_sql (macros\materializations\models\incremental\strategies.sql)
11:35:17    > called by macro get_incremental_delete_insert_sql (macros\materializations\models\incremental\strategies.sql)
11:35:17    > called by macro statement (macros\etc\statement.sql)
11:35:17    > called by macro materialization_incremental_snowflake (macros\materializations\incremental.sql)
11:35:17    > called by macro materialization_incremental_snowflake (macros\edr\materializations\model\incremental.sql)
11:35:17    > called by model mtd_load_table_config (models\metadata\load\tables\mtd_load_table_config.sql)

What I’ve already tried - edited

downgraded: I now know that with dbt 1.3 works but isn’t working with 1.4. Gives exact same errors. It points out to these macros that can be found here:
C:\Users\UID\Anaconda3\envs\dbt-1.5\Lib\site-packages\dbt\include\global_project\macros\materializations\models\incremental

I don’t understand why this is happening. Maybe because in 1.4 there are some new incremental_predicates?
Help would be greatly appreciated.

We managed to find the problem and fix it.

Note: @Cristian originally posted this reply in Slack. It might not have transferred perfectly.

Hi, could you please share the steps taken? I am planning to upgrade from 1.4 to 1.6 as well and would be good for reference. Thanks!

Hi - Generally i followed the upgrade steps written on dbt docs https://docs.getdbt.com/guides/migration/versions/upgrading-to-v1.6
So the steps would be:

  1. read the dbt docs and change log for each version that you will upgrade - note which are the massive impacts and see if any would apply.
  2. when upgrading dbt you should (need) to upgrade dbt packages as well - read that too.
  3. if using core : create a new conda env and install the dbt version and python on your local machine and packages… see if you get any errors with packages
  4. run a dbt compile on your old environment (with dbt 1.4 for ex) copy the target to another folder
  5. run a dbt compile on your new env (dbt 1.6)
  6. do a diff between the two folders
  7. run your macros and your seeds, models, tests in ci / dev - according to whats important for you
  8. optionally you can save results from runs and compare the tables to see if you get diff data.
    If you have dbt running on pipelines and on a image (like docker) you should test that too. Otherwise you’re good to go.

Note: @Cristian originally posted this reply in Slack. It might not have transferred perfectly.