Adopt ConfigKit and Go toolchain baseline
This commit is contained in:
@@ -3,12 +3,12 @@ when:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
validate-release:
|
validate-release:
|
||||||
image: golang:1.26.7
|
image: golang:1.27.4
|
||||||
commands:
|
commands:
|
||||||
- ./scripts/check-release-candidate.sh "$CI_COMMIT_TAG"
|
- ./scripts/check-release-candidate.sh "$CI_COMMIT_TAG"
|
||||||
|
|
||||||
build-release-assets:
|
build-release-assets:
|
||||||
image: golang:1.26.7
|
image: golang:1.27.4
|
||||||
depends_on:
|
depends_on:
|
||||||
- validate-release
|
- validate-release
|
||||||
commands:
|
commands:
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ when:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
shuffled-race-tests:
|
shuffled-race-tests:
|
||||||
image: golang:1.26
|
image: golang:1.27.4
|
||||||
commands:
|
commands:
|
||||||
- go test -race -shuffle=on -count=3 ./...
|
- go test -race -shuffle=on -count=3 ./...
|
||||||
|
|||||||
@@ -3,30 +3,30 @@ when:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
tests:
|
tests:
|
||||||
image: golang:1.26
|
image: golang:1.27.4
|
||||||
commands:
|
commands:
|
||||||
- go test ./...
|
- go test ./...
|
||||||
|
|
||||||
race-tests:
|
race-tests:
|
||||||
image: golang:1.26
|
image: golang:1.27.4
|
||||||
depends_on: tests
|
depends_on: tests
|
||||||
commands:
|
commands:
|
||||||
- go test -race ./...
|
- go test -race ./...
|
||||||
|
|
||||||
static-analysis:
|
static-analysis:
|
||||||
image: golang:1.26
|
image: golang:1.27.4
|
||||||
depends_on: tests
|
depends_on: tests
|
||||||
commands:
|
commands:
|
||||||
- go vet ./...
|
- go vet ./...
|
||||||
|
|
||||||
build:
|
build:
|
||||||
image: golang:1.26
|
image: golang:1.27.4
|
||||||
depends_on: tests
|
depends_on: tests
|
||||||
commands:
|
commands:
|
||||||
- go build ./...
|
- go build ./...
|
||||||
|
|
||||||
cross-build:
|
cross-build:
|
||||||
image: golang:1.26
|
image: golang:1.27.4
|
||||||
depends_on: [race-tests, static-analysis, build]
|
depends_on: [race-tests, static-analysis, build]
|
||||||
commands:
|
commands:
|
||||||
- |
|
- |
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ Large pipeline configurations may be split into explicitly named fragments and
|
|||||||
may use fixed-path selected overlays:
|
may use fixed-path selected overlays:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
configkit:
|
config:
|
||||||
imports:
|
imports:
|
||||||
- path: config/storage.yml
|
- path: config/storage.yml
|
||||||
- path: config/integrations.yaml
|
- path: config/integrations.yaml
|
||||||
@@ -194,7 +194,7 @@ including pipeline roots, imported files, selected overlay values, dynamic
|
|||||||
artifact IDs, prompt-variable mappings, campaigns, sessions, and canonical-party
|
artifact IDs, prompt-variable mappings, campaigns, sessions, and canonical-party
|
||||||
inputs. Rename any existing ordinary-data key named `extends`;
|
inputs. Rename any existing ordinary-data key named `extends`;
|
||||||
there is no opt-in or automatic conversion. See the pinned [ConfigKit v0.5.0
|
there is no opt-in or automatic conversion. See the pinned [ConfigKit v0.5.0
|
||||||
configuration contract](https://gitea.maximumdirect.net/eric/ConfigKit/src/commit/dc09959cca4e105f49ec316c6d4ba585bd2340bd/docs/config.md#sibling-inheritance)
|
configuration contract](https://forge.maximumdirect.net/base-layer/configkit/src/commit/51ef3144158db1a09fabdbd1c7ae59908c84923b/docs/config.md#sibling-inheritance)
|
||||||
for exact lookup, composition, presence, and provenance semantics.
|
for exact lookup, composition, presence, and provenance semantics.
|
||||||
|
|
||||||
Overlay names are case-sensitive and use ConfigKit's safe fixed-path naming
|
Overlay names are case-sensitive and use ConfigKit's safe fixed-path naming
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ commit-after-completed-work rule; it does not authorize pushing or releasing.
|
|||||||
|
|
||||||
## Go Prerequisite
|
## Go Prerequisite
|
||||||
|
|
||||||
The Go consumer minimum is 1.26.0, declared in `go.mod`. Maintained development
|
The Go consumer minimum is 1.27.0, declared in `go.mod`. Maintained development
|
||||||
and verification use the official Go 1.26 toolchain. Release validation and
|
and verification use the official Go 1.27.4 toolchain. Release validation and
|
||||||
builds use the selected patch version and setup instructions in the
|
builds use the selected patch version and setup instructions in the
|
||||||
[release procedure](release.md#release-toolchain).
|
[release procedure](release.md#release-toolchain).
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ License and notices: [CC BY-SA 4.0](licenses/CC-BY-SA-4.0.txt) |
|
|||||||
|
|
||||||
## ConfigKit
|
## ConfigKit
|
||||||
|
|
||||||
Selected module: `gitea.maximumdirect.net/eric/ConfigKit` at `v0.5.0`.
|
Selected module: `go.maximumdirect.net/configkit` at `v1.2.1`.
|
||||||
|
|
||||||
Copyright (C) 2026 Eric Rakestraw
|
Copyright (C) 2026 Eric Rakestraw
|
||||||
|
|
||||||
@@ -26,10 +26,10 @@ SPDX-License-Identifier: LGPL-3.0-or-later
|
|||||||
|
|
||||||
License and notices: [LGPL 3.0](licenses/LGPL-3.0.txt) |
|
License and notices: [LGPL 3.0](licenses/LGPL-3.0.txt) |
|
||||||
[GPL 3.0](licenses/GPL-3.0.txt) |
|
[GPL 3.0](licenses/GPL-3.0.txt) |
|
||||||
[COPYRIGHT](https://gitea.maximumdirect.net/eric/ConfigKit/src/commit/dc09959cca4e105f49ec316c6d4ba585bd2340bd/COPYRIGHT) |
|
[COPYRIGHT](https://forge.maximumdirect.net/base-layer/configkit/src/commit/51ef3144158db1a09fabdbd1c7ae59908c84923b/COPYRIGHT) |
|
||||||
[LICENSE](https://gitea.maximumdirect.net/eric/ConfigKit/src/commit/dc09959cca4e105f49ec316c6d4ba585bd2340bd/LICENSE).
|
[LICENSE](https://forge.maximumdirect.net/base-layer/configkit/src/commit/51ef3144158db1a09fabdbd1c7ae59908c84923b/LICENSE).
|
||||||
|
|
||||||
[Source](https://gitea.maximumdirect.net/eric/ConfigKit/src/commit/dc09959cca4e105f49ec316c6d4ba585bd2340bd).
|
[Source](https://forge.maximumdirect.net/base-layer/configkit/src/commit/51ef3144158db1a09fabdbd1c7ae59908c84923b).
|
||||||
|
|
||||||
## YAML v3
|
## YAML v3
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ License and notices: [MIT](licenses/MIT.txt) |
|
|||||||
|
|
||||||
## YAML v4
|
## YAML v4
|
||||||
|
|
||||||
Selected module: `go.yaml.in/yaml/v4` at `v4.0.0-rc.6`.
|
Selected module: `go.yaml.in/yaml/v4` at `v4.0.0`.
|
||||||
|
|
||||||
Copyright 2006-2010 Kirill Simonov
|
Copyright 2006-2010 Kirill Simonov
|
||||||
|
|
||||||
@@ -66,10 +66,10 @@ SPDX-License-Identifier: MIT AND Apache-2.0
|
|||||||
|
|
||||||
License and notices: [MIT](licenses/MIT.txt) |
|
License and notices: [MIT](licenses/MIT.txt) |
|
||||||
[Apache 2.0](licenses/Apache-2.0.txt) |
|
[Apache 2.0](licenses/Apache-2.0.txt) |
|
||||||
[LICENSE](https://github.com/yaml/go-yaml/blob/1c17b9cee72bf81ae73a8be50fbd7dd3a9985125/LICENSE) |
|
[LICENSE](https://github.com/yaml/go-yaml/blob/f2f9563503f11b7a60da0c532175dcc693ce8d5a/LICENSE) |
|
||||||
[NOTICE](https://github.com/yaml/go-yaml/blob/1c17b9cee72bf81ae73a8be50fbd7dd3a9985125/NOTICE).
|
[NOTICE](https://github.com/yaml/go-yaml/blob/f2f9563503f11b7a60da0c532175dcc693ce8d5a/NOTICE).
|
||||||
|
|
||||||
[Source](https://github.com/yaml/go-yaml/commit/1c17b9cee72bf81ae73a8be50fbd7dd3a9985125).
|
[Source](https://github.com/yaml/go-yaml/commit/f2f9563503f11b7a60da0c532175dcc693ce8d5a).
|
||||||
|
|
||||||
## go-cmp
|
## go-cmp
|
||||||
|
|
||||||
@@ -114,18 +114,18 @@ License and notices: [BSD 3-Clause](licenses/BSD-3-Clause.txt) |
|
|||||||
|
|
||||||
## Go runtime and standard library
|
## Go runtime and standard library
|
||||||
|
|
||||||
Material: Go `1.26.7` runtime and standard library material incorporated in
|
Material: Go `1.27.4` runtime and standard library material incorporated in
|
||||||
release binaries built with the declared `golang:1.26.7` CI toolchain.
|
release binaries built with the declared `golang:1.27.4` CI toolchain.
|
||||||
|
|
||||||
Copyright 2009 The Go Authors.
|
Copyright 2009 The Go Authors.
|
||||||
|
|
||||||
SPDX-License-Identifier: BSD-3-Clause
|
SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
License and notices: [BSD 3-Clause](licenses/BSD-3-Clause.txt) |
|
License and notices: [BSD 3-Clause](licenses/BSD-3-Clause.txt) |
|
||||||
[LICENSE](https://github.com/golang/go/blob/e3336a22ad3f0a90bd252c95d8b5544e02674205/LICENSE) |
|
[LICENSE](https://github.com/golang/go/blob/go1.27.4/LICENSE) |
|
||||||
[PATENTS](https://github.com/golang/go/blob/e3336a22ad3f0a90bd252c95d8b5544e02674205/PATENTS).
|
[PATENTS](https://github.com/golang/go/blob/go1.27.4/PATENTS).
|
||||||
|
|
||||||
[Source](https://github.com/golang/go/commit/e3336a22ad3f0a90bd252c95d8b5544e02674205).
|
[Source](https://github.com/golang/go/commit/go1.27.4).
|
||||||
|
|
||||||
## AWS SDK for Go v2
|
## AWS SDK for Go v2
|
||||||
|
|
||||||
|
|||||||
@@ -43,12 +43,12 @@ git rev-parse HEAD
|
|||||||
|
|
||||||
## Release toolchain
|
## Release toolchain
|
||||||
|
|
||||||
The selected release toolchain is Go 1.26.7, matching the validation and build
|
The selected release toolchain is Go 1.27.4, matching the validation and build
|
||||||
jobs in `.woodpecker/release.yml`. With an official Go installation available,
|
jobs in `.woodpecker/release.yml`. With an official Go installation available,
|
||||||
select it before candidate validation and publication:
|
select it before candidate validation and publication:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
export GOTOOLCHAIN=go1.26.7
|
export GOTOOLCHAIN=go1.27.4
|
||||||
go version
|
go version
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ Go downloads the selected toolchain if needed. Complete that setup and module
|
|||||||
preparation before offline candidate validation. Keep this selection and the
|
preparation before offline candidate validation. Keep this selection and the
|
||||||
release CI images aligned when deliberately updating the release toolchain.
|
release CI images aligned when deliberately updating the release toolchain.
|
||||||
|
|
||||||
The consumer minimum remains Go 1.26.0 as declared in `go.mod`.
|
The consumer minimum is Go 1.27.0 as declared in `go.mod`.
|
||||||
Successful release validation on the selected patch establishes presumed
|
Successful release validation on the selected patch establishes presumed
|
||||||
support across that series, subject to the declared minimum and concrete
|
support across that series, subject to the declared minimum and concrete
|
||||||
evidence of incompatibility, under the
|
evidence of incompatibility, under the
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ adopt ReleaseKit for Narratio, or publish a release.
|
|||||||
resolve again. Original results supply actual file provenance. Stages 8–9
|
resolve again. Original results supply actual file provenance. Stages 8–9
|
||||||
explain this boundary.
|
explain this boundary.
|
||||||
|
|
||||||
## Stage 1: Establish the dependency and toolchain baseline
|
## Stage 1: Establish the dependency and toolchain baseline [x]
|
||||||
|
|
||||||
Read `go.mod`, `go.sum`, `.woodpecker/*.yml`, release scripts/runbook, and
|
Read `go.mod`, `go.sum`, `.woodpecker/*.yml`, release scripts/runbook, and
|
||||||
attribution. Read the upstream v1.0.0 migration table and v1.2.1 release note.
|
attribution. Read the upstream v1.0.0 migration table and v1.2.1 release note.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Copyable production-base/testing-overlay entry point. ConfigKit expands only
|
# Copyable production-base/testing-overlay entry point. ConfigKit expands only
|
||||||
# these explicit path and glob imports; Narratio never scans directories itself.
|
# these explicit path and glob imports; Narratio never scans directories itself.
|
||||||
configkit:
|
config:
|
||||||
imports:
|
imports:
|
||||||
- path: conf.d/platform.yml
|
- path: conf.d/platform.yml
|
||||||
- path: conf.d/storage.yml
|
- path: conf.d/storage.yml
|
||||||
|
|||||||
6
go.mod
6
go.mod
@@ -1,14 +1,14 @@
|
|||||||
module gitea.maximumdirect.net/eric/narratio
|
module gitea.maximumdirect.net/eric/narratio
|
||||||
|
|
||||||
go 1.26.0
|
go 1.27.0
|
||||||
|
|
||||||
require (
|
require (
|
||||||
gitea.maximumdirect.net/eric/ConfigKit v0.5.0
|
|
||||||
github.com/aws/aws-sdk-go-v2/config v1.32.17
|
github.com/aws/aws-sdk-go-v2/config v1.32.17
|
||||||
github.com/aws/aws-sdk-go-v2/credentials v1.19.16
|
github.com/aws/aws-sdk-go-v2/credentials v1.19.16
|
||||||
github.com/aws/aws-sdk-go-v2/service/s3 v1.101.0
|
github.com/aws/aws-sdk-go-v2/service/s3 v1.101.0
|
||||||
github.com/aws/smithy-go v1.25.1
|
github.com/aws/smithy-go v1.25.1
|
||||||
github.com/google/go-cmp v0.7.0
|
github.com/google/go-cmp v0.7.0
|
||||||
|
go.maximumdirect.net/configkit v1.2.1
|
||||||
golang.org/x/sync v0.22.0
|
golang.org/x/sync v0.22.0
|
||||||
golang.org/x/sys v0.47.0
|
golang.org/x/sys v0.47.0
|
||||||
gopkg.in/yaml.v3 v3.0.1
|
gopkg.in/yaml.v3 v3.0.1
|
||||||
@@ -29,5 +29,5 @@ require (
|
|||||||
github.com/aws/aws-sdk-go-v2/service/sso v1.30.17 // indirect
|
github.com/aws/aws-sdk-go-v2/service/sso v1.30.17 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.21 // indirect
|
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.21 // indirect
|
||||||
github.com/aws/aws-sdk-go-v2/service/sts v1.42.1 // indirect
|
github.com/aws/aws-sdk-go-v2/service/sts v1.42.1 // indirect
|
||||||
go.yaml.in/yaml/v4 v4.0.0-rc.6 // indirect
|
go.yaml.in/yaml/v4 v4.0.0 // indirect
|
||||||
)
|
)
|
||||||
|
|||||||
8
go.sum
8
go.sum
@@ -1,5 +1,3 @@
|
|||||||
gitea.maximumdirect.net/eric/ConfigKit v0.5.0 h1:2KwG10+kApWM3avOoYA+p768xcbHUp7tQ2rqizBNpyg=
|
|
||||||
gitea.maximumdirect.net/eric/ConfigKit v0.5.0/go.mod h1:tYWpsrbLyu05r8+1MapWp5fN6ZrX9I8hU2xEPedYmYk=
|
|
||||||
github.com/aws/aws-sdk-go-v2 v1.41.7 h1:DWpAJt66FmnnaRIOT/8ASTucrvuDPZASqhhLey6tLY8=
|
github.com/aws/aws-sdk-go-v2 v1.41.7 h1:DWpAJt66FmnnaRIOT/8ASTucrvuDPZASqhhLey6tLY8=
|
||||||
github.com/aws/aws-sdk-go-v2 v1.41.7/go.mod h1:4LAfZOPHNVNQEckOACQx60Y8pSRjIkNZQz1w92xpMJc=
|
github.com/aws/aws-sdk-go-v2 v1.41.7/go.mod h1:4LAfZOPHNVNQEckOACQx60Y8pSRjIkNZQz1w92xpMJc=
|
||||||
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.10 h1:gx1AwW1Iyk9Z9dD9F4akX5gnN3QZwUB20GGKH/I+Rho=
|
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.10 h1:gx1AwW1Iyk9Z9dD9F4akX5gnN3QZwUB20GGKH/I+Rho=
|
||||||
@@ -38,8 +36,10 @@ github.com/aws/smithy-go v1.25.1 h1:J8ERsGSU7d+aCmdQur5Txg6bVoYelvQJgtZehD12GkI=
|
|||||||
github.com/aws/smithy-go v1.25.1/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc=
|
github.com/aws/smithy-go v1.25.1/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc=
|
||||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||||
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||||
go.yaml.in/yaml/v4 v4.0.0-rc.6 h1:1h7H1ohdUh93/FyE4YaDa1Zh64K6VVbjF4K6WUxMtH4=
|
go.maximumdirect.net/configkit v1.2.1 h1:f+/6WjNl6CULbMr6ZSVwi4aty9rmuDfJlvpeU7I+HZM=
|
||||||
go.yaml.in/yaml/v4 v4.0.0-rc.6/go.mod h1:aZqd9kCMsGL7AuUv/m/PvWLdg5sjJsZ4oHDEnfPPfY0=
|
go.maximumdirect.net/configkit v1.2.1/go.mod h1:ewu6blSokUDCMovy8JBXAdXRikGmlHXAQpFghnPWRfs=
|
||||||
|
go.yaml.in/yaml/v4 v4.0.0 h1:/LG1pNO84Z4l603j/xMn69CcS5OYhMQ/f7l2LoQUGuw=
|
||||||
|
go.yaml.in/yaml/v4 v4.0.0/go.mod h1:aZqd9kCMsGL7AuUv/m/PvWLdg5sjJsZ4oHDEnfPPfY0=
|
||||||
golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek=
|
golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek=
|
||||||
golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0=
|
||||||
golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
|
golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/adapters/subprocess"
|
"gitea.maximumdirect.net/eric/narratio/internal/adapters/subprocess"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/fileops"
|
"gitea.maximumdirect.net/eric/narratio/internal/fileops"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/adapters/subprocess"
|
"gitea.maximumdirect.net/eric/narratio/internal/adapters/subprocess"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package notarius
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FakeRunner is a configurable in-memory runner for stage tests.
|
// FakeRunner is a configurable in-memory runner for stage tests.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
)
|
)
|
||||||
|
|
||||||
const ReceiptSchemaVersion = "notarius.run-result.v2"
|
const ReceiptSchemaVersion = "notarius.run-result.v2"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
sharedsubprocess "gitea.maximumdirect.net/eric/narratio/internal/adapters/subprocess"
|
sharedsubprocess "gitea.maximumdirect.net/eric/narratio/internal/adapters/subprocess"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSubprocessRunnerRunSuccessBuildsDeterministicArgsAndCapturesLogs(t *testing.T) {
|
func TestSubprocessRunnerRunSuccessBuildsDeterministicArgsAndCapturesLogs(t *testing.T) {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import (
|
|||||||
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
"github.com/aws/aws-sdk-go-v2/service/s3/types"
|
||||||
"github.com/aws/smithy-go"
|
"github.com/aws/smithy-go"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/config"
|
"gitea.maximumdirect.net/eric/narratio/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package subprocess
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
)
|
)
|
||||||
|
|
||||||
// CredentialEnvironment returns captured secret values and names for a child
|
// CredentialEnvironment returns captured secret values and names for a child
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCredentialEnvironmentUsesCapturedReferences(t *testing.T) {
|
func TestCredentialEnvironmentUsesCapturedReferences(t *testing.T) {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/adapters/storage"
|
"gitea.maximumdirect.net/eric/narratio/internal/adapters/storage"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/config"
|
"gitea.maximumdirect.net/eric/narratio/internal/config"
|
||||||
)
|
)
|
||||||
@@ -36,7 +36,7 @@ func normalizeCommandDependencies(deps commandDependencies) commandDependencies
|
|||||||
deps.downloadObjectToTemp = storage.DownloadObjectToTemp
|
deps.downloadObjectToTemp = storage.DownloadObjectToTemp
|
||||||
}
|
}
|
||||||
if deps.loadSecretsDir == nil {
|
if deps.loadSecretsDir == nil {
|
||||||
deps.loadSecretsDir = configkit.LoadSecretsDir
|
deps.loadSecretsDir = configkit.LoadSecretsIntoEnvironment
|
||||||
}
|
}
|
||||||
if deps.secretsBootstrap == nil {
|
if deps.secretsBootstrap == nil {
|
||||||
deps.secretsBootstrap = &secretsBootstrap{}
|
deps.secretsBootstrap = &secretsBootstrap{}
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ func TestConfigInspectionReportsInheritedCompositeSources(t *testing.T) {
|
|||||||
parentPath := filepath.Join(dir, "families", "parent.yml")
|
parentPath := filepath.Join(dir, "families", "parent.yml")
|
||||||
childPath := filepath.Join(dir, "families", "child.yml")
|
childPath := filepath.Join(dir, "families", "child.yml")
|
||||||
overlayPath := filepath.Join(dir, "overlays", "testing.yml")
|
overlayPath := filepath.Join(dir, "overlays", "testing.yml")
|
||||||
mustWriteTestFile(t, pipelinePath, `configkit:
|
mustWriteTestFile(t, pipelinePath, `config:
|
||||||
imports:
|
imports:
|
||||||
- path: families/parent.yml
|
- path: families/parent.yml
|
||||||
- path: families/child.yml
|
- path: families/child.yml
|
||||||
@@ -341,7 +341,7 @@ func catalogRecordsByKey(t *testing.T, output string) map[string][]string {
|
|||||||
func artifactIdentityPipeline(importPath, inlineKey string) string {
|
func artifactIdentityPipeline(importPath, inlineKey string) string {
|
||||||
document := "workspace:\n root: /srv/narratio\nwhisperx:\n transcribe_url: https://transcription.example.com/transcribe\nscriptorium:\n binary: scriptorium\n"
|
document := "workspace:\n root: /srv/narratio\nwhisperx:\n transcribe_url: https://transcription.example.com/transcribe\nscriptorium:\n binary: scriptorium\n"
|
||||||
if importPath != "" {
|
if importPath != "" {
|
||||||
document = "configkit:\n imports:\n - path: " + importPath + "\n" + document
|
document = "config:\n imports:\n - path: " + importPath + "\n" + document
|
||||||
}
|
}
|
||||||
if inlineKey != "" {
|
if inlineKey != "" {
|
||||||
document += " artifacts:\n " + inlineKey + ":\n enabled: false\n output_path: artifacts/recap.md\n"
|
document += " artifacts:\n " + inlineKey + ":\n enabled: false\n output_path: artifacts/recap.md\n"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/config"
|
"gitea.maximumdirect.net/eric/narratio/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -345,7 +345,7 @@ func TestConfigDiffBootstrapsSecretsOnceForBothOverlays(t *testing.T) {
|
|||||||
if got != secretsDir {
|
if got != secretsDir {
|
||||||
t.Fatalf("secrets directory = %q, want %q", got, secretsDir)
|
t.Fatalf("secrets directory = %q, want %q", got, secretsDir)
|
||||||
}
|
}
|
||||||
return configkit.LoadSecretsDir(got)
|
return configkit.LoadSecretsIntoEnvironment(got)
|
||||||
}, diagnostics: &diagnostics}
|
}, diagnostics: &diagnostics}
|
||||||
|
|
||||||
if err := configDiffWithDependencies(context.Background(), []string{
|
if err := configDiffWithDependencies(context.Background(), []string{
|
||||||
@@ -572,7 +572,7 @@ func TestConfigValidateReportsCanonicalPartyAndImportErrors(t *testing.T) {
|
|||||||
|
|
||||||
dir := t.TempDir()
|
dir := t.TempDir()
|
||||||
rootPath := filepath.Join(dir, "pipeline.yml")
|
rootPath := filepath.Join(dir, "pipeline.yml")
|
||||||
mustWriteTestFile(t, rootPath, `configkit:
|
mustWriteTestFile(t, rootPath, `config:
|
||||||
imports:
|
imports:
|
||||||
- path: conf.yml
|
- path: conf.yml
|
||||||
workspace:
|
workspace:
|
||||||
@@ -673,7 +673,7 @@ func TestConfigSourcesAttributesInferredArtifactDependencies(t *testing.T) {
|
|||||||
pipelinePath := filepath.Join(dir, "pipeline.yml")
|
pipelinePath := filepath.Join(dir, "pipeline.yml")
|
||||||
inputPath := filepath.Join(dir, "input-only.yml")
|
inputPath := filepath.Join(dir, "input-only.yml")
|
||||||
overlayPath := filepath.Join(dir, "overlays", "testing.yml")
|
overlayPath := filepath.Join(dir, "overlays", "testing.yml")
|
||||||
mustWriteTestFile(t, pipelinePath, `configkit:
|
mustWriteTestFile(t, pipelinePath, `config:
|
||||||
imports:
|
imports:
|
||||||
- path: input-only.yml
|
- path: input-only.yml
|
||||||
workspace:
|
workspace:
|
||||||
@@ -733,7 +733,7 @@ func TestConfigSourcesReportsRootImportOverlayAndDefaultOwnership(t *testing.T)
|
|||||||
rootPath := filepath.Join(dir, "pipeline.yml")
|
rootPath := filepath.Join(dir, "pipeline.yml")
|
||||||
importPath := filepath.Join(dir, "base.yml")
|
importPath := filepath.Join(dir, "base.yml")
|
||||||
overlayPath := filepath.Join(dir, "overlays", "testing.yml")
|
overlayPath := filepath.Join(dir, "overlays", "testing.yml")
|
||||||
mustWriteTestFile(t, rootPath, `configkit:
|
mustWriteTestFile(t, rootPath, `config:
|
||||||
imports:
|
imports:
|
||||||
- path: base.yml
|
- path: base.yml
|
||||||
workspace:
|
workspace:
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/adapters/notarius"
|
"gitea.maximumdirect.net/eric/narratio/internal/adapters/notarius"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/artifactmodel"
|
"gitea.maximumdirect.net/eric/narratio/internal/artifactmodel"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/artifactpolicy"
|
"gitea.maximumdirect.net/eric/narratio/internal/artifactpolicy"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/config"
|
"gitea.maximumdirect.net/eric/narratio/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/adapters/storage"
|
"gitea.maximumdirect.net/eric/narratio/internal/adapters/storage"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/artifacts"
|
"gitea.maximumdirect.net/eric/narratio/internal/artifacts"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/config"
|
"gitea.maximumdirect.net/eric/narratio/internal/config"
|
||||||
@@ -251,7 +251,7 @@ inputs:
|
|||||||
deps := commandDependencies{
|
deps := commandDependencies{
|
||||||
loadSecretsDir: func(directory string) (*configkit.SecretsReport, error) {
|
loadSecretsDir: func(directory string) (*configkit.SecretsReport, error) {
|
||||||
bootstrapCalls++
|
bootstrapCalls++
|
||||||
return configkit.LoadSecretsDir(directory)
|
return configkit.LoadSecretsIntoEnvironment(directory)
|
||||||
},
|
},
|
||||||
newObjectStore: func(context.Context, *config.Config) (storage.ObjectStore, error) {
|
newObjectStore: func(context.Context, *config.Config) (storage.ObjectStore, error) {
|
||||||
if os.Getenv(accessKeyEnv) != "remote-session-key-id" || os.Getenv(secretKeyEnv) != "remote-session-secret" {
|
if os.Getenv(accessKeyEnv) != "remote-session-key-id" || os.Getenv(secretKeyEnv) != "remote-session-secret" {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
)
|
)
|
||||||
|
|
||||||
type secretsBootstrap struct {
|
type secretsBootstrap struct {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/config"
|
"gitea.maximumdirect.net/eric/narratio/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ func TestSecretsBootstrapPreservesExistingEnvironmentValues(t *testing.T) {
|
|||||||
|
|
||||||
bootstrap := &secretsBootstrap{selection: &directory, selectionSet: true}
|
bootstrap := &secretsBootstrap{selection: &directory, selectionSet: true}
|
||||||
var diagnostics bytes.Buffer
|
var diagnostics bytes.Buffer
|
||||||
if err := bootstrap.load(filepath.Join(t.TempDir(), "pipeline.yml"), configkit.LoadSecretsDir, &diagnostics); err != nil {
|
if err := bootstrap.load(filepath.Join(t.TempDir(), "pipeline.yml"), configkit.LoadSecretsIntoEnvironment, &diagnostics); err != nil {
|
||||||
t.Fatalf("bootstrap: %v", err)
|
t.Fatalf("bootstrap: %v", err)
|
||||||
}
|
}
|
||||||
if got := diagnostics.String(); !strings.Contains(got, `status="skipped_existing"`) || !strings.Contains(got, `existing_empty=true`) {
|
if got := diagnostics.String(); !strings.Contains(got, `status="skipped_existing"`) || !strings.Contains(got, `existing_empty=true`) {
|
||||||
@@ -170,7 +170,7 @@ func TestSecretsBootstrapPreservesSafePartialReportOnFailure(t *testing.T) {
|
|||||||
directory := t.TempDir()
|
directory := t.TempDir()
|
||||||
mustWriteSecretFile(t, filepath.Join(directory, "INVALID-NAME"), "must-not-appear\n")
|
mustWriteSecretFile(t, filepath.Join(directory, "INVALID-NAME"), "must-not-appear\n")
|
||||||
bootstrap := &secretsBootstrap{selection: &directory, selectionSet: true}
|
bootstrap := &secretsBootstrap{selection: &directory, selectionSet: true}
|
||||||
err := bootstrap.load(filepath.Join(t.TempDir(), "pipeline.yml"), configkit.LoadSecretsDir, io.Discard)
|
err := bootstrap.load(filepath.Join(t.TempDir(), "pipeline.yml"), configkit.LoadSecretsIntoEnvironment, io.Discard)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t.Fatal("bootstrap succeeded, want error")
|
t.Fatal("bootstrap succeeded, want error")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/config"
|
"gitea.maximumdirect.net/eric/narratio/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/artifactpolicy"
|
"gitea.maximumdirect.net/eric/narratio/internal/artifactpolicy"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ func declarationDefinitionSources(cfg *PipelineConfig, declaration configkit.Pat
|
|||||||
pathsByID := pipelineSourcePaths(cfg)
|
pathsByID := pipelineSourcePaths(cfg)
|
||||||
seen := map[string]struct{}{}
|
seen := map[string]struct{}{}
|
||||||
for _, change := range cfg.resolution.configkitMetadata.History(declaration) {
|
for _, change := range cfg.resolution.configkitMetadata.History(declaration) {
|
||||||
if change.Origin.Layer != configkit.LayerBase && change.Origin.Layer != configkit.LayerOverlay {
|
if change.Origin.Layer != configkit.LayerMain && change.Origin.Layer != configkit.LayerOverlay {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
for _, location := range change.Origin.Locations {
|
for _, location := range change.Origin.Locations {
|
||||||
|
|||||||
@@ -343,7 +343,7 @@ characters:
|
|||||||
name: Alice
|
name: Alice
|
||||||
classes: [{name: wizard}]
|
classes: [{name: wizard}]
|
||||||
`)
|
`)
|
||||||
pipeline := `configkit:
|
pipeline := `config:
|
||||||
imports:
|
imports:
|
||||||
- path: families/summary.yml
|
- path: families/summary.yml
|
||||||
- path: families/notes.yml
|
- path: families/notes.yml
|
||||||
@@ -420,7 +420,7 @@ characters:
|
|||||||
classes: [{name: wizard}]
|
classes: [{name: wizard}]
|
||||||
`)
|
`)
|
||||||
|
|
||||||
pipeline := `configkit:
|
pipeline := `config:
|
||||||
imports:
|
imports:
|
||||||
- path: definitions/parent.yml
|
- path: definitions/parent.yml
|
||||||
- path: definitions/child.yml
|
- path: definitions/child.yml
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
import configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
import configkit "go.maximumdirect.net/configkit"
|
||||||
|
|
||||||
// Config is the resolved combined configuration from pipeline.yml,
|
// Config is the resolved combined configuration from pipeline.yml,
|
||||||
// campaign.yml, and session.yml.
|
// campaign.yml, and session.yml.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
import configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
import configkit "go.maximumdirect.net/configkit"
|
||||||
|
|
||||||
// MarshalYAML exposes only public credential reference names. Resolved values
|
// MarshalYAML exposes only public credential reference names. Resolved values
|
||||||
// remain available solely through ConfigKit's explicit trusted accessor.
|
// remain available solely through ConfigKit's explicit trusted accessor.
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package config
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
)
|
)
|
||||||
|
|
||||||
const maxConfigDocumentBytes int64 = 8 << 20
|
const maxConfigDocumentBytes int64 = 8 << 20
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
func TestSingleSourceDocumentsRejectConfigKitDirectives(t *testing.T) {
|
func TestSingleSourceDocumentsRejectConfigKitDirectives(t *testing.T) {
|
||||||
dir := t.TempDir()
|
dir := t.TempDir()
|
||||||
campaignPath := filepath.Join(dir, "campaign.yml")
|
campaignPath := filepath.Join(dir, "campaign.yml")
|
||||||
if err := os.WriteFile(campaignPath, []byte("configkit:\n imports: []\ncampaign_id: sample\n"), 0o644); err != nil {
|
if err := os.WriteFile(campaignPath, []byte("config:\n imports: []\ncampaign_id: sample\n"), 0o644); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
@@ -20,11 +20,11 @@ func TestSingleSourceDocumentsRejectConfigKitDirectives(t *testing.T) {
|
|||||||
}{
|
}{
|
||||||
{name: "campaign", load: func() error { _, err := LoadCampaign(campaignPath); return err }},
|
{name: "campaign", load: func() error { _, err := LoadCampaign(campaignPath); return err }},
|
||||||
{name: "session", load: func() error {
|
{name: "session", load: func() error {
|
||||||
_, err := LoadSessionBytesWithOptions("session.yml", []byte("configkit:\n imports: []\nsession_id: sample\n"), SessionLoadOptions{})
|
_, err := LoadSessionBytesWithOptions("session.yml", []byte("config:\n imports: []\nsession_id: sample\n"), SessionLoadOptions{})
|
||||||
return err
|
return err
|
||||||
}},
|
}},
|
||||||
{name: "party", load: func() error {
|
{name: "party", load: func() error {
|
||||||
_, err := ParseParty([]byte("configkit:\n imports: []\nschema_version: narratio.party.v1\ncharacters: {}\n"))
|
_, err := ParseParty([]byte("config:\n imports: []\nschema_version: narratio.party.v1\ncharacters: {}\n"))
|
||||||
return err
|
return err
|
||||||
}},
|
}},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
"gopkg.in/yaml.v3"
|
"gopkg.in/yaml.v3"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"unicode"
|
"unicode"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/artifactpolicy"
|
"gitea.maximumdirect.net/eric/narratio/internal/artifactpolicy"
|
||||||
"gopkg.in/yaml.v3"
|
"gopkg.in/yaml.v3"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
)
|
)
|
||||||
|
|
||||||
type pipelineResolutionMetadata struct {
|
type pipelineResolutionMetadata struct {
|
||||||
@@ -185,7 +185,7 @@ func resolvePipelineConfig(cfg *PipelineConfig, resolution *configkit.Resolution
|
|||||||
cfg.Publish.Outputs[index] = output
|
cfg.Publish.Outputs[index] = output
|
||||||
}
|
}
|
||||||
if defaultedOutput {
|
if defaultedOutput {
|
||||||
resolution.Record(configkit.Keys("publish", "outputs"), configkit.ChangeDerivedDefault, "publish output entry defaults")
|
resolution.RecordDerivedDefault(configkit.Keys("publish", "outputs"), "publish output entry defaults")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
before := cloneNotariusForResolution(cfg.Notarius)
|
before := cloneNotariusForResolution(cfg.Notarius)
|
||||||
@@ -194,7 +194,7 @@ func resolvePipelineConfig(cfg *PipelineConfig, resolution *configkit.Resolution
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if !reflect.DeepEqual(before, cfg.Notarius) {
|
if !reflect.DeepEqual(before, cfg.Notarius) {
|
||||||
resolution.Record(configkit.Keys("notarius"), configkit.ChangeNormalization, "canonical Notarius configuration")
|
resolution.RecordNormalization(configkit.Keys("notarius"), "canonical Notarius configuration")
|
||||||
}
|
}
|
||||||
if cfg.Publish != nil {
|
if cfg.Publish != nil {
|
||||||
destinations := deriveMissingPublishDestinations(cfg.Publish, cfg.Scriptorium, cfg.Notarius)
|
destinations := deriveMissingPublishDestinations(cfg.Publish, cfg.Scriptorium, cfg.Notarius)
|
||||||
@@ -206,7 +206,7 @@ func resolvePipelineConfig(cfg *PipelineConfig, resolution *configkit.Resolution
|
|||||||
if len(destinations) > 0 {
|
if len(destinations) > 0 {
|
||||||
// ConfigKit compares sequences atomically; child records alone do not
|
// ConfigKit compares sequences atomically; child records alone do not
|
||||||
// cover the list mutation when requiredness was already explicit.
|
// cover the list mutation when requiredness was already explicit.
|
||||||
resolution.Record(configkit.Keys("publish", "outputs"), configkit.ChangeNormalization, "derived publish destinations")
|
resolution.RecordNormalization(configkit.Keys("publish", "outputs"), "derived publish destinations")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
@@ -260,7 +260,7 @@ func pipelineMetadataFromConfigKit(result *configkit.Result[PipelineConfig], opt
|
|||||||
resolved.sources = append(resolved.sources, path)
|
resolved.sources = append(resolved.sources, path)
|
||||||
if index == 0 {
|
if index == 0 {
|
||||||
resolved.rootPath = path
|
resolved.rootPath = path
|
||||||
} else if source.Layer == configkit.LayerBase {
|
} else if source.Layer == configkit.LayerMain {
|
||||||
resolved.imports = append(resolved.imports, path)
|
resolved.imports = append(resolved.imports, path)
|
||||||
}
|
}
|
||||||
if source.Layer == configkit.LayerOverlay {
|
if source.Layer == configkit.LayerOverlay {
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestPipelineConfigKitImportsOverlayAndBaseSelection(t *testing.T) {
|
func TestPipelineConfigKitImportsOverlayAndBaseSelection(t *testing.T) {
|
||||||
dir := t.TempDir()
|
dir := t.TempDir()
|
||||||
writePipelineFixture(t, dir, "pipeline.yml", `configkit:
|
writePipelineFixture(t, dir, "pipeline.yml", `config:
|
||||||
imports:
|
imports:
|
||||||
- path: config/workspace.yml
|
- path: config/workspace.yml
|
||||||
- path: config/artifact.yml
|
- path: config/artifact.yml
|
||||||
@@ -70,7 +70,7 @@ whisperx:
|
|||||||
|
|
||||||
func TestPipelineOverlayDoesNotDiscoverLegacyDirectory(t *testing.T) {
|
func TestPipelineOverlayDoesNotDiscoverLegacyDirectory(t *testing.T) {
|
||||||
dir := t.TempDir()
|
dir := t.TempDir()
|
||||||
writePipelineFixture(t, dir, "pipeline.yml", "configkit:\n imports:\n - path: profiles/shared.yml\n")
|
writePipelineFixture(t, dir, "pipeline.yml", "config:\n imports:\n - path: profiles/shared.yml\n")
|
||||||
writePipelineFixture(t, dir, "profiles/shared.yml", "workspace:\n root: /srv/base\n")
|
writePipelineFixture(t, dir, "profiles/shared.yml", "workspace:\n root: /srv/base\n")
|
||||||
writePipelineFixture(t, dir, "profiles/testing.yml", "workspace:\n root: /srv/old\n")
|
writePipelineFixture(t, dir, "profiles/testing.yml", "workspace:\n root: /srv/old\n")
|
||||||
if base, err := LoadPipeline(filepath.Join(dir, "pipeline.yml")); err != nil || base.Workspace.Root != "/srv/base" {
|
if base, err := LoadPipeline(filepath.Join(dir, "pipeline.yml")); err != nil || base.Workspace.Root != "/srv/base" {
|
||||||
@@ -111,7 +111,7 @@ characters:
|
|||||||
name: Alice
|
name: Alice
|
||||||
classes: [{name: wizard}]
|
classes: [{name: wizard}]
|
||||||
`)
|
`)
|
||||||
pipeline := `configkit:
|
pipeline := `config:
|
||||||
imports:
|
imports:
|
||||||
- path: first.yml
|
- path: first.yml
|
||||||
- path: second.yml
|
- path: second.yml
|
||||||
@@ -165,7 +165,7 @@ whisperx:
|
|||||||
|
|
||||||
t.Run("structural conflict remains a loader error", func(t *testing.T) {
|
t.Run("structural conflict remains a loader error", func(t *testing.T) {
|
||||||
dir := t.TempDir()
|
dir := t.TempDir()
|
||||||
writePipelineFixture(t, dir, "pipeline.yml", `configkit:
|
writePipelineFixture(t, dir, "pipeline.yml", `config:
|
||||||
imports:
|
imports:
|
||||||
- path: first.yml
|
- path: first.yml
|
||||||
- path: second.yml
|
- path: second.yml
|
||||||
@@ -182,7 +182,7 @@ whisperx:
|
|||||||
|
|
||||||
func TestPipelineInheritancePreservesPresenceAndPathBases(t *testing.T) {
|
func TestPipelineInheritancePreservesPresenceAndPathBases(t *testing.T) {
|
||||||
dir := t.TempDir()
|
dir := t.TempDir()
|
||||||
writePipelineFixture(t, dir, "pipeline.yml", `configkit:
|
writePipelineFixture(t, dir, "pipeline.yml", `config:
|
||||||
imports:
|
imports:
|
||||||
- path: config/parent.yml
|
- path: config/parent.yml
|
||||||
- path: config/children.yml
|
- path: config/children.yml
|
||||||
@@ -282,7 +282,7 @@ whisperx:
|
|||||||
|
|
||||||
func TestPipelineInheritanceRetainsZeroTimeoutForDomainValidation(t *testing.T) {
|
func TestPipelineInheritanceRetainsZeroTimeoutForDomainValidation(t *testing.T) {
|
||||||
dir := t.TempDir()
|
dir := t.TempDir()
|
||||||
writePipelineFixture(t, dir, "pipeline.yml", `configkit:
|
writePipelineFixture(t, dir, "pipeline.yml", `config:
|
||||||
imports:
|
imports:
|
||||||
- path: artifacts.yml
|
- path: artifacts.yml
|
||||||
whisperx:
|
whisperx:
|
||||||
@@ -315,7 +315,7 @@ whisperx:
|
|||||||
|
|
||||||
func TestPipelineExplicitEmptyTimeoutDoesNotReceiveDefault(t *testing.T) {
|
func TestPipelineExplicitEmptyTimeoutDoesNotReceiveDefault(t *testing.T) {
|
||||||
dir := t.TempDir()
|
dir := t.TempDir()
|
||||||
writePipelineFixture(t, dir, "pipeline.yml", `configkit:
|
writePipelineFixture(t, dir, "pipeline.yml", `config:
|
||||||
imports:
|
imports:
|
||||||
- path: timeout.yml
|
- path: timeout.yml
|
||||||
whisperx:
|
whisperx:
|
||||||
@@ -340,7 +340,7 @@ whisperx:
|
|||||||
|
|
||||||
func TestInheritedNotariusPathsKeepPipelineRootBase(t *testing.T) {
|
func TestInheritedNotariusPathsKeepPipelineRootBase(t *testing.T) {
|
||||||
dir := t.TempDir()
|
dir := t.TempDir()
|
||||||
pipelinePath := writePipelineFixture(t, dir, "pipeline.yml", `configkit:
|
pipelinePath := writePipelineFixture(t, dir, "pipeline.yml", `config:
|
||||||
imports:
|
imports:
|
||||||
- path: profiles/notarius.yml
|
- path: profiles/notarius.yml
|
||||||
whisperx:
|
whisperx:
|
||||||
@@ -383,7 +383,7 @@ characters:
|
|||||||
name: Alice
|
name: Alice
|
||||||
classes: [{name: wizard}]
|
classes: [{name: wizard}]
|
||||||
`)
|
`)
|
||||||
pipeline := `configkit:
|
pipeline := `config:
|
||||||
imports:
|
imports:
|
||||||
- path: artifacts/parent.yml
|
- path: artifacts/parent.yml
|
||||||
- path: artifacts/child.yml
|
- path: artifacts/child.yml
|
||||||
@@ -668,7 +668,7 @@ func TestNotariusCacheControlProfileReplacementAndNullReset(t *testing.T) {
|
|||||||
|
|
||||||
func TestPipelineConfigKitAllowsOneBaseDeclarationWithProfileOverride(t *testing.T) {
|
func TestPipelineConfigKitAllowsOneBaseDeclarationWithProfileOverride(t *testing.T) {
|
||||||
dir := t.TempDir()
|
dir := t.TempDir()
|
||||||
writePipelineFixture(t, dir, "pipeline.yml", `configkit:
|
writePipelineFixture(t, dir, "pipeline.yml", `config:
|
||||||
imports:
|
imports:
|
||||||
- path: artifact.yml
|
- path: artifact.yml
|
||||||
whisperx:
|
whisperx:
|
||||||
|
|||||||
@@ -131,15 +131,15 @@ func TestReleaseWorkflowRequiresValidation(t *testing.T) {
|
|||||||
if !ok {
|
if !ok {
|
||||||
t.Fatal("release workflow must define validate-release")
|
t.Fatal("release workflow must define validate-release")
|
||||||
}
|
}
|
||||||
if validate.Image != "golang:1.26.7" || !containsWorkflowCommand(validate.Commands, `./scripts/check-release-candidate.sh "$CI_COMMIT_TAG"`) {
|
if validate.Image != "golang:1.27.4" || !containsWorkflowCommand(validate.Commands, `./scripts/check-release-candidate.sh "$CI_COMMIT_TAG"`) {
|
||||||
t.Fatalf("validate-release = %#v, want the shared candidate checker in golang:1.26.7", validate)
|
t.Fatalf("validate-release = %#v, want the shared candidate checker in golang:1.27.4", validate)
|
||||||
}
|
}
|
||||||
assets, ok := workflow.Steps["build-release-assets"]
|
assets, ok := workflow.Steps["build-release-assets"]
|
||||||
if !ok {
|
if !ok {
|
||||||
t.Fatal("release workflow must define build-release-assets")
|
t.Fatal("release workflow must define build-release-assets")
|
||||||
}
|
}
|
||||||
if assets.Image != "golang:1.26.7" || !workflowDependsOn(workflow.Steps, "build-release-assets", "validate-release", map[string]bool{}) {
|
if assets.Image != "golang:1.27.4" || !workflowDependsOn(workflow.Steps, "build-release-assets", "validate-release", map[string]bool{}) {
|
||||||
t.Fatalf("build-release-assets = %#v, want validated golang:1.26.7 asset construction", assets)
|
t.Fatalf("build-release-assets = %#v, want validated golang:1.27.4 asset construction", assets)
|
||||||
}
|
}
|
||||||
assetCommands := strings.Join(assets.Commands, "\n")
|
assetCommands := strings.Join(assets.Commands, "\n")
|
||||||
if !strings.Contains(assetCommands, `./scripts/build-release-assets.sh "$CI_COMMIT_TAG" "$PWD/dist"`) || strings.Contains(assetCommands, "GOOS=") || strings.Contains(assetCommands, "go build") {
|
if !strings.Contains(assetCommands, `./scripts/build-release-assets.sh "$CI_COMMIT_TAG" "$PWD/dist"`) || strings.Contains(assetCommands, "GOOS=") || strings.Contains(assetCommands, "go build") {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/adapters/audita"
|
"gitea.maximumdirect.net/eric/narratio/internal/adapters/audita"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/artifacts"
|
"gitea.maximumdirect.net/eric/narratio/internal/artifacts"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/config"
|
"gitea.maximumdirect.net/eric/narratio/internal/config"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/artifactpolicy"
|
"gitea.maximumdirect.net/eric/narratio/internal/artifactpolicy"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/config"
|
"gitea.maximumdirect.net/eric/narratio/internal/config"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/manifest"
|
"gitea.maximumdirect.net/eric/narratio/internal/manifest"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package stage
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/config"
|
"gitea.maximumdirect.net/eric/narratio/internal/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
configkit "gitea.maximumdirect.net/eric/ConfigKit"
|
configkit "go.maximumdirect.net/configkit"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/adapters/scriptorium"
|
"gitea.maximumdirect.net/eric/narratio/internal/adapters/scriptorium"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/adapters/seriatim"
|
"gitea.maximumdirect.net/eric/narratio/internal/adapters/seriatim"
|
||||||
"gitea.maximumdirect.net/eric/narratio/internal/artifacts"
|
"gitea.maximumdirect.net/eric/narratio/internal/artifacts"
|
||||||
|
|||||||
Reference in New Issue
Block a user