Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate/verify schema .. had forgotten to update schema.json for neuron devices #8255

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
2 changes: 2 additions & 0 deletions .github/workflows/test-and-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions pkg/apis/eksctl.io/v1alpha5/assets/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -1251,6 +1256,7 @@
"vCPUs",
"memory",
"gpus",
"neuron_devices",
"cpuArchitecture",
"allow",
"deny"
Expand Down
Loading