Cannot find manifest.json in state path when running in different deployments

The problem I’m having

State selector not finding manifest.json when using dbt clone of a CI job and trying to read a manifest of a prod run.

During job runs on the production deployment I am adding the --target-path ‘./target/prod’ flag to save the manifests in one folder so that they are not overwritten by any other dev runs and test jobs.
When I look on the artifacts tab after a prod job run, I see that they are properly saved under target/prod, including the manifest.json file.

As a first step of my CI runs (On the staging environment). I want to run dbt clone -s some_model --state ‘./target/prod’. However when I do this I get an error:

11:49:58  Encountered an error:
Runtime Error
  Could not find manifest in --state path: "target/prod"

When as a test case I run a dbt build job run on the CI environment with --target-path ‘./target/ci’ and after the run completes I run dbt clone -s some_model --state ‘./target/ci’ there are no issues and the manifest is found.

What I’ve already tried

  • Tried every combination I could think of of changing the path naming:
"/target/prod"
"./target/prod"
"/target/prod/"
"./prod"
"/prod/"
"/prod"
  • Triggering the job manually as well as through a PR
  • Ensuring that the manifest.json was present at the target/prod after each run that had the --target-path flag set

Additional Information

  • target/ is in the .gitignore file, as that was the part of the setup
  • This is happening on Multi-Tenant dbt Cloud
  • dbt version: Keep on latest (“Versionless”)