camunda / camunda/orchestration-cluster-api-python
ci: separate generation from type checking in CI pipeline
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- Avg merge
- 6h 15m
- Merged PRs (30d)
- 20
Description
Context
The lint CI job previously ran make typecheck (pyright) against the committed generated code in generated/. This broke when examples referenced types from new upstream API operations (e.g. ResourceSearchQuery from searchResources) that hadn't been regenerated into the committed code yet.
What was done (PR #122)
Moved make typecheck from the lint job into the test job, gated to python-version == '3.12'. The test job runs make itest, which depends on make generate, so pyright now checks freshly generated code.
The lint job retains:
make lint(ruff)make sync-readme-checkmake config-reference-checkmake docs-link-check
Tradeoffs of current approach
- Slower feedback — type errors now wait for the full test pipeline (Docker, Node.js, spec fetch, generation, integration tests) instead of the fast
lintjob. - Fragile dependency chain — if Docker, spec fetch, or tests fail, pyright never runs.
- Redundant pyright runs —
make generatealready runsuv run pyrightanduv run pyright examples/internally, then the explicitmake typecheckstep runsuv run pyrightagain. - Docker required for type checking — purely static analysis is now gated behind Docker Compose.
Future improvement: separate generation job
Long-term, consider splitting CI into three jobs:
lint (fast, no generation) → ruff, readme checks, config checks, docs links
gen (medium, no Docker) → bundle-spec + generate + pyright + pyright examples/ + acceptance tests
test (slow, Docker) → integration tests + coverage checks
The gen job would:
- Set up Node.js + Python
- Run
make bundle-spec(fetch upstream spec) - Run generation + formatting + linting of generated code
- Run
make typecheck(pyright on generated code + examples) - Run acceptance tests
This gives fast type-checking feedback (~2-3 min) without needing Docker, while keeping the heavy integration tests separate.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the current lint and test job definitions and the Make targets named in the issue: bundle-spec, generate, typecheck, and itest. Compare the existing dependency chain with the proposed lint, gen, and test split, then verify that type checking runs without Docker and that integration tests and coverage remain in the test job.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, node.js, python
- Domain
- build-system, ci-cd, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100