Compare commits

..

4 Commits

Author SHA1 Message Date
Jeff McCune
8e690b43ee ci: fix golangci-lint
Without this patch there are unexpected lint errors in version 1.60
where 1.61.0 passes locally on my machine.

This patch updates to:

    golangci-lint has version 1.64.5 built with go1.24.0 from 0a603e49 on 2025-02-13T21:19:55Z
2025-02-20 09:28:35 -08:00
Jeff McCune
a4ceb1cdb2 ci: update test cases with make bump
Previously using make bump to bump a version did not also update all of
the test cases and documentation to reflect the new version.  This patch
updates the make bump tasks call HOLOS_UPDATE_SCRIPTS=1 scripts/test to
keep the test cases and documentation in sync with the new version.
2025-02-20 09:14:37 -08:00
Jeff McCune
ddb5c0e07b ci: fix make lint failures resulting from version bumps
Without this patch lint fails with error:

    SA1019: testscript.RunMain is deprecated: use [Main]

This patch uses testscript.Main instead.
2025-02-20 09:07:47 -08:00
Jeff McCune
a14d3ba0f4 ci: fix make test failures resulting from version bumps
Previously the tests fail because they were not updated to use the new
version string in holos, or the new topo sort behavior in cue 0.12.0.

This patch updates the test cases using:

    HOLOS_UPDATE_SCRIPTS=1 scripts/test

Result: make test passes
2025-02-20 08:37:01 -08:00
33 changed files with 100 additions and 94 deletions

View File

@@ -27,4 +27,4 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60
version: v1.64.5

View File

@@ -32,17 +32,20 @@ bump: bumppatch
.PHONY: bumppatch
bumppatch: ## Bump the patch version.
scripts/bump patch
HOLOS_UPDATE_SCRIPTS=1 scripts/test
.PHONY: bumpminor
bumpminor: ## Bump the minor version.
scripts/bump minor
scripts/bump patch 0
HOLOS_UPDATE_SCRIPTS=1 scripts/test
.PHONY: bumpmajor
bumpmajor: ## Bump the major version.
scripts/bump major
scripts/bump minor 0
scripts/bump patch 0
HOLOS_UPDATE_SCRIPTS=1 scripts/test
.PHONY: show-version
show-version: ## Print the full version.

View File

@@ -11,10 +11,11 @@ import (
)
func TestMain(m *testing.M) {
os.Exit(testscript.RunMain(m, map[string]func() int{
"holos": cmd.MakeMain(),
"cue": cue.Main,
}))
holosMain := cmd.MakeMain()
testscript.Main(m, map[string]func(){
"holos": func() { os.Exit(holosMain()) },
"cue": func() { os.Exit(cue.Main()) },
})
}
func TestGuides_v1alpha5(t *testing.T) {

View File

@@ -31,7 +31,6 @@ spec:
- kind: Resources
output: resources.gen.yaml
resources: {}
validators: []
transformers:
- kind: Kustomize
inputs:
@@ -39,7 +38,8 @@ spec:
output: components/no-name/no-name.gen.yaml
kustomize:
kustomization:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- resources.gen.yaml
kind: Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
validators: []

View File

@@ -4,4 +4,4 @@ cmp stdout $WORK/output.txt
-- command.sh --
holos --version
-- output.txt --
0.103.0
0.104.1

View File

@@ -1 +1 @@
0.103.0
0.104.1

View File

@@ -1,2 +1,2 @@
rendered podinfo in 544.501875ms
rendered platform in 544.608125ms
rendered podinfo in 312.472625ms
rendered platform in 312.557375ms

View File

@@ -4,4 +4,4 @@ cmp stdout $WORK/output.txt
-- command.sh --
holos --version
-- output.txt --
0.103.0
0.104.1

View File

@@ -1 +1 @@
0.103.0
0.104.1

View File

@@ -1,3 +1,3 @@
[main 1adcd08] add blackbox configuration
[main aa9749e] add blackbox configuration
1 file changed, 15 insertions(+)
create mode 100644 components/blackbox.cue
create mode 100644 config/prometheus/blackbox.cue

View File

@@ -1,2 +1,3 @@
[main 4221803] integrate blackbox and prometheus together
2 files changed, 4 insertions(+), 2 deletions(-)
[main 656d4ee] integrate blackbox and prometheus together
3 files changed, 1348 insertions(+), 2 deletions(-)
create mode 100644 components/prometheus/values.cue.orig

View File

@@ -1,4 +1,4 @@
[main 52e90ea] import values
[main 3788921] import values
2 files changed, 1815 insertions(+)
create mode 100644 components/blackbox/values.cue
create mode 100644 components/prometheus/values.cue

View File

@@ -1,3 +1,3 @@
rendered blackbox in 365.936792ms
rendered prometheus in 371.855875ms
rendered platform in 372.109916ms
rendered blackbox in 129.142708ms
rendered prometheus in 165.260375ms
rendered platform in 165.33ms

View File

@@ -1,4 +1,4 @@
[main b5df111] add blackbox and prometheus
[main 654ae06] add blackbox and prometheus
5 files changed, 1550 insertions(+)
create mode 100644 components/blackbox/blackbox.cue
create mode 100644 components/prometheus/prometheus.cue

View File

@@ -1,5 +1,3 @@
cached prometheus-blackbox-exporter 9.0.1
rendered blackbox in 3.825430417s
cached prometheus 25.27.0
rendered prometheus in 4.840089667s
rendered platform in 4.840137792s
rendered blackbox in 1.096663084s
rendered prometheus in 1.151784875s
rendered platform in 1.151839916s

View File

@@ -1,2 +1,2 @@
[main 67efe0d] render integrated blackbox and prometheus manifests
[main 9bc0126] render integrated blackbox and prometheus manifests
2 files changed, 7 insertions(+), 7 deletions(-)

View File

@@ -4,4 +4,4 @@ cmp stdout $WORK/output.txt
-- command.sh --
holos --version
-- output.txt --
0.103.0
0.104.1

View File

@@ -1 +1 @@
0.103.0
0.104.1

View File

@@ -13,7 +13,6 @@ spec:
output: httpbin.yaml
file:
source: httpbin.yaml
validators: []
transformers:
- kind: Kustomize
inputs:
@@ -22,6 +21,8 @@ spec:
output: components/no-name/no-name.gen.yaml
kustomize:
kustomization:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
labels:
- includeSelectors: false
pairs:
@@ -32,5 +33,4 @@ spec:
resources:
- resources.gen.yaml
- httpbin.yaml
kind: Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
validators: []

View File

@@ -1,4 +1,4 @@
[main f0dd632] add httpbin
[main 823e136] add httpbin
4 files changed, 113 insertions(+)
create mode 100644 components/httpbin/httpbin.cue
create mode 100644 components/httpbin/httpbin.yaml

View File

@@ -1,3 +1,3 @@
[main b120712] annotate httpbin for prometheus probes
[main 96f5f45] annotate httpbin for prometheus probes
2 files changed, 18 insertions(+)
create mode 100644 components/httpbin/patches.cue

View File

@@ -1,2 +1,2 @@
rendered httpbin in 132.00525ms
rendered platform in 132.124042ms
rendered httpbin in 112.916375ms
rendered platform in 112.990333ms

View File

@@ -1,2 +1,2 @@
rendered httpbin in 175.057083ms
rendered platform in 175.145292ms
rendered httpbin in 111.183042ms
rendered platform in 111.265792ms

View File

@@ -15,10 +15,12 @@ import (
)
func TestMain(m *testing.M) {
os.Exit(testscript.RunMain(m, map[string]func() int{
"holos": cmd.MakeMain(),
"cue": cue.Main,
}))
holosMain := cmd.MakeMain()
testscript.Main(m, map[string]func(){
"holos": func() { os.Exit(holosMain()) },
"cue": func() { os.Exit(cue.Main()) },
})
}
// Run these with go test -v to see the verbose names

View File

@@ -24,7 +24,7 @@ exec git config user.name 'go test'
-- version.sh --
holos --version
-- version.txt --
0.103.0
0.104.1
-- clone.sh --
git clone https://github.com/holos-run/multi-sources-example.git
cd multi-sources-example

View File

@@ -1 +1 @@
f35da50452b346d4eea3f3e59ff5ae6b8c221218
6a882ac5aee7241e0130a59737cc46db5f636a21

View File

@@ -1 +1 @@
0.103.0
0.104.1

View File

@@ -1,4 +1,28 @@
config:
integration/gpu/config.json:
env: integration-gpu
region: us
type: non-prod
version: prod
chart: 0.1.0
integration/non-gpu/config.json:
env: integration-non-gpu
region: us
type: non-prod
version: qa
chart: 0.2.0
prod/eu/config.json:
env: prod-eu
region: eu
type: prod
version: prod
chart: 0.1.0
prod/us/config.json:
env: prod-us
region: us
type: prod
version: prod
chart: 0.1.0
qa/config.json:
env: qa
region: us
@@ -17,33 +41,9 @@ config:
type: non-prod
version: staging
chart: 0.2.0
prod/eu/config.json:
env: prod-eu
region: eu
type: prod
version: prod
chart: 0.1.0
integration/gpu/config.json:
env: integration-gpu
region: us
type: non-prod
version: prod
chart: 0.1.0
staging/us/config.json:
env: staging-us
region: us
type: non-prod
version: staging
chart: 0.2.0
prod/us/config.json:
env: prod-us
region: us
type: prod
version: prod
chart: 0.1.0
integration/non-gpu/config.json:
env: integration-non-gpu
region: us
type: non-prod
version: qa
chart: 0.2.0

View File

@@ -1,11 +1,11 @@
my-values/common-values.yaml:
replicaCount: 1
my-values/app-version/prod-values.yaml:
imageVersion: "1.0"
my-values/app-version/qa-values.yaml:
imageVersion: "3.0"
my-values/app-version/staging-values.yaml:
imageVersion: "2.0"
my-values/common-values.yaml:
replicaCount: 1
my-values/env-type/non-prod-values.yaml:
replicaCount: 3
environmentType: non-prod

View File

@@ -1,8 +1,8 @@
rendered my-chart 0.1.0 for environment integration-gpu in 428.168708ms
rendered my-chart 0.1.0 for environment prod-us in 428.221333ms
rendered my-chart 0.1.0 for environment prod-eu in 428.148834ms
rendered my-chart 0.2.0 for environment qa in 433.4605ms
rendered my-chart 0.2.0 for environment staging-us in 493.320625ms
rendered my-chart 0.2.0 for environment integration-non-gpu in 493.343917ms
rendered my-chart 0.2.0 for environment staging-eu in 493.325917ms
rendered platform in 493.432542ms
rendered my-chart 0.1.0 for environment prod-us in 169.0965ms
rendered my-chart 0.1.0 for environment integration-gpu in 169.146375ms
rendered my-chart 0.1.0 for environment prod-eu in 171.797375ms
rendered my-chart 0.2.0 for environment staging-us in 195.439625ms
rendered my-chart 0.2.0 for environment qa in 270.457708ms
rendered my-chart 0.2.0 for environment integration-non-gpu in 270.497166ms
rendered my-chart 0.2.0 for environment staging-eu in 271.18825ms
rendered platform in 271.252916ms

View File

@@ -1,8 +1,8 @@
rendered my-chart 0.2.0 for environment integration-non-gpu in 204.149958ms
rendered my-chart 0.1.0 for environment prod-us in 205.34475ms
rendered my-chart 0.2.0 for environment staging-eu in 206.376291ms
rendered my-chart 0.1.0 for environment prod-eu in 207.298833ms
rendered my-chart 0.1.0 for environment integration-gpu in 207.896ms
rendered my-chart 0.2.0 for environment staging-us in 210.70825ms
rendered my-chart 0.2.0 for environment qa in 210.695667ms
rendered platform in 210.776584ms
rendered my-chart 0.2.0 for environment staging-eu in 202.936708ms
rendered my-chart 0.2.0 for environment staging-us in 204.292666ms
rendered my-chart 0.1.0 for environment integration-gpu in 205.155833ms
rendered my-chart 0.1.0 for environment prod-us in 207.647458ms
rendered my-chart 0.2.0 for environment qa in 208.1245ms
rendered my-chart 0.1.0 for environment prod-eu in 208.608833ms
rendered my-chart 0.2.0 for environment integration-non-gpu in 212.441042ms
rendered platform in 212.504042ms

View File

@@ -18,10 +18,11 @@ import (
)
func TestMain(m *testing.M) {
os.Exit(testscript.RunMain(m, map[string]func() int{
"holos": cmd.MakeMain(),
"cue": cue.Main,
}))
holosMain := cmd.MakeMain()
testscript.Main(m, map[string]func(){
"holos": func() { os.Exit(holosMain()) },
"cue": func() { os.Exit(cue.Main()) },
})
}
func RunOneScript(t *testing.T, dir string, file string) {

View File

@@ -1 +1 @@
0
1