refactor(P57): contract surface redesign + rename + .yml repo-wide
Contract surface redesign: - New top-level fields: id (3-6 char acronym → stack.name), name (full → stack.title), infrastructure (map keyed by module name, replaces module:) - Drop uses: field (dead reference; version pin lives in CI workflow uses: line) - Drop top-level module/inputs (now nested under infrastructure map) - Per-module optional version (defaults to latest published from registry) - Multi-module contracts: one file deploys N modules in one pipeline run, resource IDs namespaced with module name to avoid collisions - stack.schema.json: add optional title field for display name Rename: - pipelines/deploy.yaml → pipelines/contract.yml (declarative spec, not a pipeline) - pipelines/ci.yaml → pipelines/ci.yml - All 44 .yaml files → .yml repo-wide (contracts, module examples, kyverno policies) - .acdl/contract.yaml → .acdl/contract.yml Resolver (core/contract_resolver.py): - Rewrite resolve() to loop infrastructure map, default version to latest, merge module fragments into one stack with namespaced resource IDs - _latest_version() picks highest non-deprecated from registry - _namespace_resources() prefixes IDs + rewrites ref: expressions for multi-module - Single-module path: unprefixed IDs (backward compatible) Verification: - 494 tests pass (0 contract-shape failures) - Local E2E passes (contract → resolver → adapter → local ECS HTTP 200 → outbox) ---ci--- project: acdl phase: 57 milestone: v1.10.2 status: execute ---/ci---
This commit is contained in:
+22
-17
@@ -69,33 +69,38 @@ pipeline validates them against `schemas/contract.schema.json`.
|
||||
|
||||
A minimal deployment:
|
||||
|
||||
[`examples/simple.yaml`](examples/simple.yaml)
|
||||
[`examples/simple.yml`](examples/simple.yml)
|
||||
```yaml
|
||||
uses: acdl/pipelines/deploy.yaml@v1.6
|
||||
module: vpc
|
||||
environment: dev
|
||||
inputs:
|
||||
cidr: 10.0.0.0/16
|
||||
azs: us-east-1a,us-east-1b
|
||||
name: my-vpc
|
||||
region: us-east-1
|
||||
id: vpc
|
||||
infrastructure:
|
||||
vpc:
|
||||
inputs:
|
||||
azs: us-east-1a,us-east-1b
|
||||
cidr: 10.0.0.0/16
|
||||
name: my-vpc
|
||||
region: us-east-1
|
||||
version: 1.0.0
|
||||
name: vpc-network
|
||||
```
|
||||
|
||||
### Complex
|
||||
|
||||
A production deployment with optional inputs:
|
||||
|
||||
[`examples/complex.yaml`](examples/complex.yaml)
|
||||
[`examples/complex.yml`](examples/complex.yml)
|
||||
```yaml
|
||||
# Complex VPC with 3 AZs and a custom CIDR
|
||||
uses: acdl/pipelines/deploy.yaml@v1.6
|
||||
module: vpc
|
||||
environment: dev
|
||||
inputs:
|
||||
cidr: 10.50.0.0/16
|
||||
azs: us-east-1a,us-east-1b,us-east-1c
|
||||
name: my-production-vpc
|
||||
region: us-east-1
|
||||
id: vpc
|
||||
infrastructure:
|
||||
vpc:
|
||||
inputs:
|
||||
azs: us-east-1a,us-east-1b,us-east-1c
|
||||
cidr: 10.50.0.0/16
|
||||
name: my-production-vpc
|
||||
region: us-east-1
|
||||
version: 1.0.0
|
||||
name: vpc-network
|
||||
```
|
||||
|
||||
## Versioning
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
# Complex VPC with 3 AZs and a custom CIDR
|
||||
uses: acdl/pipelines/deploy.yaml@v1.6
|
||||
module: vpc
|
||||
environment: dev
|
||||
inputs:
|
||||
cidr: 10.50.0.0/16
|
||||
azs: us-east-1a,us-east-1b,us-east-1c
|
||||
name: my-production-vpc
|
||||
region: us-east-1
|
||||
@@ -0,0 +1,12 @@
|
||||
# Complex VPC with 3 AZs and a custom CIDR
|
||||
environment: dev
|
||||
id: vpc
|
||||
infrastructure:
|
||||
vpc:
|
||||
inputs:
|
||||
azs: us-east-1a,us-east-1b,us-east-1c
|
||||
cidr: 10.50.0.0/16
|
||||
name: my-production-vpc
|
||||
region: us-east-1
|
||||
version: 1.0.0
|
||||
name: vpc-network
|
||||
@@ -1,8 +0,0 @@
|
||||
uses: acdl/pipelines/deploy.yaml@v1.6
|
||||
module: vpc
|
||||
environment: dev
|
||||
inputs:
|
||||
cidr: 10.0.0.0/16
|
||||
azs: us-east-1a,us-east-1b
|
||||
name: my-vpc
|
||||
region: us-east-1
|
||||
@@ -0,0 +1,11 @@
|
||||
environment: dev
|
||||
id: vpc
|
||||
infrastructure:
|
||||
vpc:
|
||||
inputs:
|
||||
azs: us-east-1a,us-east-1b
|
||||
cidr: 10.0.0.0/16
|
||||
name: my-vpc
|
||||
region: us-east-1
|
||||
version: 1.0.0
|
||||
name: vpc-network
|
||||
Reference in New Issue
Block a user