dbt Slim CI with Gitlab CI Runner

The problem I’m having

I’m attempting to implement a Slim CI configuration on our deployment of dbt Core, and I’m running into an error where the image I’m using isn’t recognizing the manifest.json file in the root directory of my dbt project, even after I’ve copied it from my source.

What I’ve already tried

I’ve been able to successfully copy a manifest.json file from an S3 bucket during our CI run, but when I attempt to run dbt with state selectors, I’m receiving the following error:

Runtime Error
  Got a state selector method, but no comparison manifest

Some example code or error messages

This is the setup of my CI run. I have a current manifest.json file stored in the dbt-manifests bucket.
I’ve tested this out locally by just removing a column from two different models, so there should be a modified state to check.

$ aws s3 ls
2023-01-19 14:26:48 dbt-manifests
$ aws s3 cp s3://dbt-manifests/manifest.json ./
download: s3://dbt-manifests/manifest.json to ./manifest.json   
$ ls
Dockerfile
Makefile
README.md
analysis
data
dbt_packages
dbt_project.yml
deployment.yml
logs
macros
manifest.json
models
packages.yml
poetry.lock
profiles.yml
pyproject.toml
requirements.txt
snapshots
tests
$ dbt run --target staging --select state:modified+ state ./
15:53:38  Running with dbt=1.3.1
15:53:38  Partial parse save file not found. Starting full parse.
15:53:50  Found 502 models, 211 tests, 11 snapshots, 0 analyses, 922 macros, 9 operations, 7 seed files, 218 sources, 15 exposures, 0 metrics
15:53:51  Encountered an error:
Runtime Error
  Got a state selector method, but no comparison manifest

Nevermind - I screwed up the syntax.
I forgot to add the -- flag to my state selector.
I changed it to --state:modified+ and it works.
We can close this out!

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

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.