schema-e2e-validation
Original:🇺🇸 English
Translated
Earthly E2E validation for YAML schema contracts. TRIGGERS - schema validation, YAML schema, schema contracts, regenerate types.
16installs
Sourceterrylica/cc-skills
Added on
NPX Install
npx skill4agent add terrylica/cc-skills schema-e2e-validationTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Schema E2E Validation
When to Use This Skill
Use this skill when:
- Validating schema changes before commit
- Verifying YAML schema matches live ClickHouse Cloud
- Regenerating Python types, DDL, or docs
- Running full schema workflow validation
Prerequisites
Docker Runtime (Required)
Earthly requires Docker. Start Colima before running:
bash
colima startCheck if running:
bash
docker ps # Should not errorDoppler Access (For validation targets)
Required for and :
+test-schema-validate+test-schema-e2ebash
doppler configure set token <token_from_1password>
doppler setup --project gapless-network-data --config prdEarthly Installation
bash
brew install earthlyQuick Commands
Generation only (no secrets)
bash
cd /Users/terryli/eon/gapless-network-data
colima start # If not already running
earthly +test-schema-generateFull E2E with validation (requires Doppler)
bash
cd /Users/terryli/eon/gapless-network-data
colima start # If not already running
./scripts/earthly-with-doppler.sh +test-schema-e2eAll non-secret targets
bash
cd /Users/terryli/eon/gapless-network-data
earthly +allArtifacts
After running or , check :
+test-schema-generate+test-schema-e2e./earthly-artifacts/| Path | Contents |
|---|---|
| Pydantic + TypedDict models |
| Package init |
| ClickHouse DDL |
| Markdown documentation |
For E2E, artifacts are under , , .
e2e/types/e2e/ddl/e2e/docs/Earthfile Targets Reference
| Target | Secrets | Purpose |
|---|---|---|
| No | Install uv + dependencies |
| No | Copy source files |
| No | Run pytest |
| No | Generate types/DDL/docs |
| Yes | Validate vs ClickHouse |
| Yes | Full workflow + artifacts |
| No | Run all non-secret targets |
Troubleshooting
"could not determine buildkit address - is Docker or Podman running?"
Cause: Docker/Colima not running
Fix:
bash
colima start
# Wait for "done" message, then retry
earthly +test-schema-generate"unable to parse --secret-file argument"
Cause: Wrong flag name or malformed secrets file
Fix: The correct flag is (NOT ). The wrapper script handles this, but if running manually:
--secret-file-path--secret-filebash
# WRONG
earthly --secret-file=/path/to/secrets +target
# CORRECT
earthly --secret-file-path=/path/to/secrets +targetAlso ensure secrets file has no quotes around values:
bash
# WRONG format
CLICKHOUSE_HOST="host.cloud"
# CORRECT format
CLICKHOUSE_HOST=host.cloud"OSError: Readme file does not exist: README.md"
Cause: hatchling build backend requires README.md in container
Fix: Ensure Earthfile copies README.md in deps target:
earthfile
deps:
COPY pyproject.toml uv.lock README.md ./ # README.md required!"missing secret" during validation
Cause: Doppler not configured or secrets not passed
Fix:
bash
# Verify Doppler has the secrets
doppler secrets --project gapless-network-data --config prd | grep CLICKHOUSE
# Use the wrapper script (handles secret injection)
./scripts/earthly-with-doppler.sh +test-schema-validateCache Issues
Force rebuild without cache:
bash
earthly --no-cache +test-schema-e2eImplementation Details
Doppler Secret Injection
The wrapper script :
scripts/earthly-with-doppler.sh- Downloads secrets from Doppler
- Filters for variables
CLICKHOUSE_* - Strips quotes (Doppler outputs , Earthly needs
KEY="value")KEY=value - Passes via flag
--secret-file-path - Cleans up temp file on exit
Secrets Required
| Secret | Purpose |
|---|---|
| ClickHouse Cloud host |
| Read-only user |
| Read-only password |
Related Files
| File | Purpose |
|---|---|
| Main build file |
| Secret injection wrapper |
| SSoT schema |
| ADR |
Validation History
- 2025-12-03: Created and validated with full E2E run against ClickHouse Cloud
- Lessons Learned:
- not
--secret-file-path(Earthly v0.8.16)--secret-file - Doppler outputs quotes, must strip with
--format envsed 's/"//g' - README.md must be copied for hatchling build backend
- Colima must be started before Earthly runs
Design Authority
<!-- ADR: 2025-12-10-clickhouse-skill-delegation -->This skill validates schemas but does not design them. For schema design guidance (ORDER BY, compression, partitioning), invoke first.
quality-tools:clickhouse-architectRelated Skills
| Skill | Purpose |
|---|---|
| Schema design before validation |
| Cloud credentials for E2E tests |
| Client configuration |