Model runs in DEV but fails in TEST for parsing issue

I just deployed my models to our TEST environment but I am getting parsing issue. The error message says “Model [foo] depends on a source named [bar] which was not found”.

Here are the problems:

  1. The model [foo] does not have any relationship to that source at all
  2. When I run the same command in dbt command line, it runs successfully
  3. When I run the same command within a Job, it fails.