I’m setting up CircleCI for a new repository and have the following config:
version: 2.1
executors:
dev:
docker:
- image: cimg/python:3.9
working_directory: ~/new_project
orbs:
python: circleci/python@1.0.0
aws-cli: circleci/aws-cli@1.4.1
kubernetes: circleci/kubernetes@0.11.2
jobs:
test:
executor: dev
steps:
- checkout
- python/install-packages:
pkg-manager: poetry
- run:
name: run tests
command: echo "hello"
workflows:
version: 2
test:
jobs:
- test
However, i’m seeing this error after the checkout
step:
error computing cache key: template: cacheKey:1:26: executing "cacheKey" at <checksum "~/project/poetry.lock">: error calling checksum: open /home/circleci/project/poetry.lock: no such file or directory
It seems that when running the next step for installing packages, CircleCI is looking for a cached poetry.lock
file at ~/project
. Why isn’t it looking at the working directory specified in the executor (~/new_project
)? I thought if a job referenced the config for an executor that specified the working_directory
key, the job would also use that working directory.
Am I missing anything here? I appreciate any insight.