CI job - Deferring to a different target than the one specified

The problem I’m having: Im trying to run a CI job that runs on PR’s but i want to ensure that it defers to the same target as the target the user is currently working in.

For example: When i’ve ran a CI job in UAT target in QA environment, it defers to the most recent QA job run, which sometimes may be in PRD target, and so this causes issues.

What I’ve already tried

In the CI job, i’ve tried to specify the target_name as UAT.
The job commands I have in the job are:

  • dbt clone --select state:modified+,config.materialized:incremental,state:old
  • dbt build --select state:modified+