Two things -
- I can’t seem to override the default executor in my
general
orb for these jobs ~
E.g.
https://app.circleci.com/pipelines/github/bjd2385/wildmatch/176/workflows/93e96b5e-60ff-4130-926b-aa9970b80cb1/jobs/300
which was spawned from
- The schema (particularly the validation endpoint) around defining executors seems to both accept structures like
executors:
python-3-9:
docker:
- image: cimg/python:3.9.13
and
executors:
python-3-9:
docker:
image: cimg/python:3.9.13
i.e. both a list and map of the key image
are accepted? Which one is correct / preferred, or does it not matter?
Oh, so overriding the executors can’t be done with locally-defined executors when using orbs?
...
executor:
python-3-9:
docker:
image: cimg/python:3.9.13
workflows:
src:
jobs:
- general/python-pylint:
executor: python-3-9
poetry-version: '1.5.1'
filters:
branches:
ignore:
- master
...
...
Validate CircleCI configs................................................Failed
- hook id: circleci-config-validate
- exit code: 1
Error: config compilation contains errors: [{Error calling workflow: 'src'} {Error calling job: 'general/python-pylint'} {Cannot find a definition for executor named python-3-9}]
CircleCI config file ".circleci/src.yml" failed validation.
Interesting tho, when I try to validate an orb-defined executor, it prefers a list of images and breaks for maps.
general-orb$ yarn orb:validate
yarn run v1.22.19
$ yarn orb:pack >/dev/null && circleci orb validate --skip-update-check orb.yml && yarn orb:clean >/dev/null
Error: ERROR IN CONFIG FILE:
[#/executors/python-3-9] 0 subschemas matched instead of one
1. [#/executors/python-3-9] expected type: String, found: Mapping
| Executor may be a string reference to another executor
2. [#/executors/python-3-9/docker] expected type: Sequence, found: Mapping
| SCHEMA:
| type: array
| INPUT:
| image: cimg/python:<< parameters.tag >>
error Command failed with exit code 255.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Yeah it’s definitely somehow stuck on the default executor, python 3.10.
circleci@5f5d694c2413:~$ python --version
Python 3.10.6
https://app.circleci.com/pipelines/github/bjd2385/wildmatch/177/workflows/6f8beb8c-6937-491b-ba11-148437107c79/jobs/305