Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions conformance/blueprint/v1/cases.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@
"phase": "structural",
"path": "structural/012-invalid-node-name"
},
{
"id": "structural-013-empty-component-graph",
"phase": "structural",
"path": "structural/013-empty-component-graph"
},
{
"id": "structural-014-missing-component-graph",
"phase": "structural",
"path": "structural/014-missing-component-graph"
},
{
"id": "semantic-001-connection-names-unknown-role",
"phase": "semantic",
Expand Down Expand Up @@ -136,6 +146,26 @@
"id": "semantic-011-three-node-cycle-reporting",
"phase": "semantic",
"path": "semantic/011-three-node-cycle-reporting"
},
{
"id": "semantic-012-connection-type-mismatch",
"phase": "semantic",
"path": "semantic/012-connection-type-mismatch"
},
{
"id": "semantic-013-connection-semantic-type-mismatch",
"phase": "semantic",
"path": "semantic/013-connection-semantic-type-mismatch"
},
{
"id": "semantic-014-connection-names-unknown-input",
"phase": "semantic",
"path": "semantic/014-connection-names-unknown-input"
},
{
"id": "semantic-015-required-connection-input-unwired",
"phase": "semantic",
"path": "semantic/015-required-connection-input-unwired"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
#
# The slug is the directory name, the version matches the listing, both
# component documents are referenced, both references resolve inside the item,
# the connection names an output `db` really publishes, and the two components
# declare `adminPassword` identically — which §5.2 absorbs rather than reports.
# the connection names an output `db` really publishes and an input `web`
# really declares, the two ends of that wire agree on type and semanticType,
# `web` has no other required CONNECTION input left unwired, and the two
# components declare `adminPassword` identically — which §5.2 absorbs rather
# than reports.
specVersion: v1
kind: BLUEPRINT
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ spec:
visibility: PRIVATE
contract:
inputs:
DATABASE_URL:
schema:
type: STRING
isSensitive: true
suppliedBy: CONNECTION
ui: null
adminPassword:
schema:
type: STRING
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{
"code": "ERR_INCOMPATIBLE_TYPE",
"path": "/spec/components/web/connections/DATABASE_PORT/fromOutput"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "semantic-012-connection-type-mismatch",
"phase": "semantic",
"expected": "fail",
"clause": "specifications/blueprint/v1/spec.md#connections",
"summary": "A connection joining an output and an input of different types is rejected.",
"document": "acme-wiki/blueprint.yaml"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# `db` publishes an INTEGER port; `web` asks for a STRING. Both ends resolve —
# the node, the output and the input all exist — so nothing above §4.2's
# compatibility rule fires. Without it the mismatch reaches the consuming
# workload at deploy time with nothing pointing back at either document.
specVersion: v1
kind: BLUEPRINT
metadata:
slug: acme-wiki
version: 1
spec:
components:
db:
component: ./components/postgres.yaml
size: general.standard.small
connections: {}
web:
component: ./components/web.yaml
size: general.standard.small
connections:
DATABASE_PORT:
fromRole: db
fromOutput: port
parameters: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
specVersion: v1
kind: COMPONENT
metadata:
version: 1
spec:
workload:
kind: SERVICE
source:
type: IMAGE
ref: postgres:17.10-alpine
endpoints:
primary:
containerPort: 5432
protocol: TCP
visibility: PRIVATE
contract:
inputs: {}
outputs:
port:
schema:
type: INTEGER
valueFrom: DECLARED
value: '5432'
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
specVersion: v1
kind: COMPONENT
metadata:
version: 1
spec:
workload:
kind: SERVICE
source:
type: IMAGE
ref: nginx:1.29.4-alpine
endpoints:
web:
containerPort: 8080
protocol: HTTP
visibility: PRIVATE
contract:
inputs:
DATABASE_PORT:
schema:
type: STRING
suppliedBy: CONNECTION
ui: null
outputs: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
specVersion: v1
kind: LISTING
metadata:
slug: acme-wiki
version: 1
spec:
listingKind: BLUEPRINT
displayName: Acme Wiki
summary: A wiki backed by PostgreSQL
category: PRODUCTIVITY
lifecycleStage: STABLE
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{
"code": "ERR_INCOMPATIBLE_SEMANTIC_TYPE",
"path": "/spec/components/web/connections/DATABASE_URL/fromOutput"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "semantic-013-connection-semantic-type-mismatch",
"phase": "semantic",
"expected": "fail",
"clause": "specifications/blueprint/v1/spec.md#connections",
"summary": "A connection joining an output and an input whose semanticTypes disagree is rejected.",
"document": "acme-wiki/blueprint.yaml"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Both ends are STRING, so the type axis agrees. `db` publishes a POSTGRES
# connection string and `web` asks for a MYSQL one — a mismatch only the
# semanticType tag can see, and the mistake the tag exists to catch.
specVersion: v1
kind: BLUEPRINT
metadata:
slug: acme-wiki
version: 1
spec:
components:
db:
component: ./components/postgres.yaml
size: general.standard.small
connections: {}
web:
component: ./components/web.yaml
size: general.standard.small
connections:
DATABASE_URL:
fromRole: db
fromOutput: connectionString
parameters: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
specVersion: v1
kind: COMPONENT
metadata:
version: 1
spec:
workload:
kind: SERVICE
source:
type: IMAGE
ref: postgres:17.10-alpine
endpoints:
primary:
containerPort: 5432
protocol: TCP
visibility: PRIVATE
contract:
inputs: {}
outputs:
connectionString:
schema:
type: STRING
format: CONNECTION_STRING
semanticType: POSTGRES
isSensitive: true
valueFrom: DERIVED
value: null
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
specVersion: v1
kind: COMPONENT
metadata:
version: 1
spec:
workload:
kind: SERVICE
source:
type: IMAGE
ref: nginx:1.29.4-alpine
endpoints:
web:
containerPort: 8080
protocol: HTTP
visibility: PRIVATE
contract:
inputs:
DATABASE_URL:
schema:
type: STRING
format: CONNECTION_STRING
semanticType: MYSQL
isSensitive: true
suppliedBy: CONNECTION
ui: null
outputs: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
specVersion: v1
kind: LISTING
metadata:
slug: acme-wiki
version: 1
spec:
listingKind: BLUEPRINT
displayName: Acme Wiki
summary: A wiki backed by PostgreSQL
category: PRODUCTIVITY
lifecycleStage: STABLE
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{
"code": "ERR_UNKNOWN_INPUT",
"path": "/spec/components/web/connections/DATABASE_URI"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "semantic-014-connection-names-unknown-input",
"phase": "semantic",
"expected": "fail",
"clause": "specifications/blueprint/v1/spec.md#connections",
"summary": "A connection whose key names no input of the consuming component is rejected.",
"document": "acme-wiki/blueprint.yaml"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# `db` publishes `connectionString` and `web` declares an input called
# `DATABASE_URL`, but the wire is keyed `DATABASE_URI`. The producer end
# resolves, so ERR_UNKNOWN_OUTPUT does not fire — only the consumer end is
# misspelled, which is the half nothing checked before.
specVersion: v1
kind: BLUEPRINT
metadata:
slug: acme-wiki
version: 1
spec:
components:
db:
component: ./components/postgres.yaml
size: general.standard.small
connections: {}
web:
component: ./components/web.yaml
size: general.standard.small
connections:
DATABASE_URI:
fromRole: db
fromOutput: connectionString
parameters: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
specVersion: v1
kind: COMPONENT
metadata:
version: 1
spec:
workload:
kind: SERVICE
source:
type: IMAGE
ref: postgres:17.10-alpine
endpoints:
primary:
containerPort: 5432
protocol: TCP
visibility: PRIVATE
contract:
inputs: {}
outputs:
connectionString:
schema:
type: STRING
format: CONNECTION_STRING
semanticType: POSTGRES
isSensitive: true
valueFrom: DERIVED
value: null
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
specVersion: v1
kind: COMPONENT
metadata:
version: 1
spec:
workload:
kind: SERVICE
source:
type: IMAGE
ref: nginx:1.29.4-alpine
endpoints:
web:
containerPort: 8080
protocol: HTTP
visibility: PRIVATE
contract:
inputs:
DATABASE_URL:
schema:
type: STRING
format: CONNECTION_STRING
semanticType: POSTGRES
isSensitive: true
suppliedBy: CONNECTION
isRequired: false
ui: null
outputs: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
specVersion: v1
kind: LISTING
metadata:
slug: acme-wiki
version: 1
spec:
listingKind: BLUEPRINT
displayName: Acme Wiki
summary: A wiki backed by PostgreSQL
category: PRODUCTIVITY
lifecycleStage: STABLE
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{
"code": "ERR_UNWIRED_REQUIRED_INPUT",
"path": "/spec/components/web/connections"
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "semantic-015-required-connection-input-unwired",
"phase": "semantic",
"expected": "fail",
"clause": "specifications/blueprint/v1/spec.md#connections",
"summary": "A required CONNECTION input that no connection satisfies is rejected.",
"document": "acme-wiki/blueprint.yaml"
}
Loading