Skip to content

Commit d08a596

Browse files
authored
fix(craftingschema): move annotations to spec (#2620)
Signed-off-by: Sylwester Piskozub <[email protected]>
1 parent 9485dd5 commit d08a596

File tree

12 files changed

+343
-295
lines changed

12 files changed

+343
-295
lines changed

app/cli/pkg/action/attestation_init_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,9 @@ func TestParseContractV2(t *testing.T) {
252252
assert.Greater(t, len(spec.GetEnvAllowList()), 0, "Should have env allow list")
253253
assert.NotNil(t, spec.GetRunner(), "Should have runner config")
254254

255-
// Verify annotations in metadata
256-
annotations := result.GetMetadata().GetAnnotations()
257-
assert.NotEmpty(t, annotations, "Should have metadata annotations")
255+
// Verify annotations in spec
256+
annotations := spec.GetAnnotations()
257+
assert.NotEmpty(t, annotations, "Should have annotations")
258258
} else {
259259
assert.Nil(t, result, "Expected V2 schema parsing to fail")
260260
}

app/cli/pkg/action/testdata/contract_v2.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ kind: Contract
33
metadata:
44
name: test-contract-v2
55
description: Test contract in V2 format
6-
annotations:
7-
version: "1.0.0"
8-
team: test-team
96
spec:
7+
annotations:
8+
- name: version
9+
value: "1.0.0"
10+
- name: team
11+
value: test-team
1012
materials:
1113
- type: CONTAINER_IMAGE
1214
name: skynet-control-plane

app/controlplane/api/gen/frontend/workflowcontract/v1/crafting_schema.ts

Lines changed: 24 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/controlplane/api/gen/jsonschema/workflowcontract.v1.CraftingSchemaV2Spec.jsonschema.json

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/controlplane/api/gen/jsonschema/workflowcontract.v1.CraftingSchemaV2Spec.schema.json

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)