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

test: orval with ajv specified at 8 [TESTENG-121] #10189

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
19 changes: 15 additions & 4 deletions bindings/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
SWAGGER_SPEC := ../proto/build/swagger/determined/api/v1/api.swagger.json
py_bindings_dest := ../harness/determined/common/api/bindings.py
ts_bindings_dest := ../webui/react/src/services/api-ts-sdk
e2e_bindings_dest := ../webui/react/src/generated/orval/e2e-client.ts
py_generator := generate_bindings_py.py
ts_generator := generate_bindings_ts.py

Expand All @@ -17,30 +18,40 @@ $(py_bindings_dest): $(SWAGGER_SPEC) swagger_parser.py $(py_generator)
$(ts_bindings_dest): $(SWAGGER_SPEC) swagger_parser.py $(ts_generator) $(wildcard static_ts_files/*)
python $(ts_generator) --output $@

$(e2e_bindings_dest): $(SWAGGER_SPEC)
cd ../webui/react && npm run bindings

.PHONY: build/python
build/python: $(py_bindings_dest)

.PHONY: build/typescript
build/typescript: $(ts_bindings_dest)

.PHONY: build/e2e
build/e2e: $(ts_bindings_dest)

.PHONY: build
build: $(ts_bindings_dest) $(py_bindings_dest)
build: $(ts_bindings_dest) $(py_bindings_dest) $(e2e_bindings_dest)

.PHONY: check
check: force-gen check/python check/typescript
check: force-gen check/python check/typescript check/e2e
# Checking that the (committed) generated code is up-to-date by ensuring that
# git reports the files as unchanged after forcibly regenerating them.
# WARNING this has a dependency on proto module being built recently
# which isn't linked here.

.PHONY: check-python
.PHONY: check/python
check/python: build/python
test -z "$(shell git status --porcelain $(py_bindings_dest))" || (git diff; false)

.PHONY: check-typescript
.PHONY: check/typescript
check/typescript: build/typescript
test -z "$(shell git status --porcelain $(ts_bindings_dest)/*)" || (git diff; false)

.PHONY: check/e2e
check/e2e: build/e2e
test -z "$(shell git status --porcelain $(e2e_bindings_dest)/*)" || (git diff; false)

.PHONY: clean
clean:
rm -rf build/ $(py_bindings_dest) $(ts_bindings_dest)
Expand Down
1 change: 1 addition & 0 deletions webui/react/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ src/vendor/notebook/notebook.js
!.eslintrc.js
!.stylelintrc.js
node_modules
generated
1 change: 1 addition & 0 deletions webui/react/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ src/vendor/*
!.eslintrc.js
!.stylelintrc.js
node_modules
generated
Loading
Loading