diff --git a/.github/workflows/test-and-build.yaml b/.github/workflows/test-and-build.yaml index beac7edda6..1b175d6959 100644 --- a/.github/workflows/test-and-build.yaml +++ b/.github/workflows/test-and-build.yaml @@ -31,6 +31,8 @@ jobs: uses: ./.github/actions/setup-build - name: Check go.mod and go.sum run: make check-gomod + - name: Check schema.json + run: make check-schema - name: Lint run: make lint image: diff --git a/Makefile b/Makefile index 0e4fd65823..a604c4aa91 100644 --- a/Makefile +++ b/Makefile @@ -85,6 +85,14 @@ check-gomod: go mod tidy git diff --quiet -- go.mod go.sum || (git --no-pager diff go.mod go.sum; echo "HINT: to fix this, run 'go mod tidy && git commit go.mod go.sum --message \"go mod tidy\"'"; exit 1) +.PHONY: check-schema ## Generate schema.json +generate-schema: + cd pkg/apis/eksctl.io/v1alpha5 && go run ../../../../cmd/schema assets/schema.json + +.PHONY: check-schema ## Verify schema.json is up to date +check-schema: generate-schema + git diff --quiet -- pkg/apis/eksctl.io/v1alpha5/assets/schema.json || (git --no-pager diff pkg/apis/eksctl.io/v1alpha5/assets/schema.json; echo "please run 'make generate-schema' to generate schema.json"; exit 1) + .PHONY: test test: ## Lint, generate and run unit tests. Also ensure that integration tests compile $(MAKE) lint diff --git a/pkg/apis/eksctl.io/v1alpha5/assets/schema.json b/pkg/apis/eksctl.io/v1alpha5/assets/schema.json index 62f050c5d1..d3f97692a3 100755 --- a/pkg/apis/eksctl.io/v1alpha5/assets/schema.json +++ b/pkg/apis/eksctl.io/v1alpha5/assets/schema.json @@ -1241,6 +1241,11 @@ "description": "specifies the memory The unit defaults to GiB", "x-intellij-html-description": "specifies the memory The unit defaults to GiB" }, + "neuron_devices": { + "type": "integer", + "description": "specifies the number of Neuron device Accelerators. It can be set to 0 to select non-Accelerator instance types.", + "x-intellij-html-description": "specifies the number of Neuron device Accelerators. It can be set to 0 to select non-Accelerator instance types." + }, "vCPUs": { "type": "integer", "description": "specifies the number of vCPUs", @@ -1251,6 +1256,7 @@ "vCPUs", "memory", "gpus", + "neuron_devices", "cpuArchitecture", "allow", "deny"