From 2cac67e3bd3d6c918d27856257d42071b383cc6f Mon Sep 17 00:00:00 2001 From: dmathieu <42@dmathieu.com> Date: Wed, 20 Nov 2024 09:36:13 +0100 Subject: [PATCH 1/6] run genjsonschema in CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b60e049327..1068f2eaf66 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: touch -t ${touchtime} "${filename}" ls -la --time-style=full-iso "${filename}" - name: Generate - run: make generate + run: make generate genjsonschema - name: Run linters run: make toolchain-check license-check lint vanity-import-check - name: Build From 0fffff15af9337028b952d37b7dd7db4c720aaf3 Mon Sep 17 00:00:00 2001 From: dmathieu <42@dmathieu.com> Date: Thu, 21 Nov 2024 09:19:39 +0100 Subject: [PATCH 2/6] clean jsonschema before running lint --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c119eb21edb..ffed0975566 100644 --- a/Makefile +++ b/Makefile @@ -342,8 +342,8 @@ genjsonschema: genjsonschema-cleanup $(GOJSONSCHEMA) @echo Modify jsonschema generated files. sed -f ./config/jsonschema_patch.sed ${GENERATED_CONFIG} > ${GENERATED_CONFIG}.tmp mv ${GENERATED_CONFIG}.tmp ${GENERATED_CONFIG} - $(MAKE) lint $(MAKE) genjsonschema-cleanup + $(MAKE) lint .PHONY: codespell codespell: $(CODESPELL) From a69f2cb2340b777088fad1e39e1743aced79fb1e Mon Sep 17 00:00:00 2001 From: dmathieu <42@dmathieu.com> Date: Thu, 21 Nov 2024 09:19:52 +0100 Subject: [PATCH 3/6] fix typo in jsonschema src dir --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ffed0975566..77a01cf4f24 100644 --- a/Makefile +++ b/Makefile @@ -316,7 +316,7 @@ update-all-otel-deps: done # The source directory for opentelemetry-configuration schema. -OPENTELEMETRY_CONFIGURATION_JSONSCHEMA_SRC_DIR=tmp/opentelememetry-configuration +OPENTELEMETRY_CONFIGURATION_JSONSCHEMA_SRC_DIR=tmp/opentelemetry-configuration # The SHA matching the current version of the opentelemetry-configuration schema to use OPENTELEMETRY_CONFIGURATION_JSONSCHEMA_VERSION=v0.3.0 From 0aacc33cece1a9ba74d3a0ee9afe8d948377e985 Mon Sep 17 00:00:00 2001 From: dmathieu <42@dmathieu.com> Date: Thu, 21 Nov 2024 14:22:04 +0100 Subject: [PATCH 4/6] run jsonschemagen with generate --- .github/workflows/ci.yml | 2 +- Makefile | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 274670b86de..89ec10c0823 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: touch -t ${touchtime} "${filename}" ls -la --time-style=full-iso "${filename}" - name: Generate - run: make generate genjsonschema + run: make generate - name: Run linters run: make toolchain-check license-check lint vanity-import-check - name: Build diff --git a/Makefile b/Makefile index 77a01cf4f24..b1e9301eae5 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ TIMEOUT = 60 .DEFAULT_GOAL := precommit .PHONY: precommit ci -precommit: generate toolchain-check license-check misspell go-mod-tidy golangci-lint-fix test-default +precommit: generate jsonschemagen toolchain-check license-check misspell go-mod-tidy golangci-lint-fix test-default ci: generate toolchain-check license-check lint vanity-import-check build test-default check-clean-work-tree test-coverage # Tools @@ -343,7 +343,6 @@ genjsonschema: genjsonschema-cleanup $(GOJSONSCHEMA) sed -f ./config/jsonschema_patch.sed ${GENERATED_CONFIG} > ${GENERATED_CONFIG}.tmp mv ${GENERATED_CONFIG}.tmp ${GENERATED_CONFIG} $(MAKE) genjsonschema-cleanup - $(MAKE) lint .PHONY: codespell codespell: $(CODESPELL) From cf430fe82a5d49405fcaf36b9b647dcefd4d9c71 Mon Sep 17 00:00:00 2001 From: dmathieu <42@dmathieu.com> Date: Wed, 27 Nov 2024 16:37:59 +0100 Subject: [PATCH 5/6] add genjsonschema to make ci --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b1e9301eae5..c5311e6f248 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ TIMEOUT = 60 .PHONY: precommit ci precommit: generate jsonschemagen toolchain-check license-check misspell go-mod-tidy golangci-lint-fix test-default -ci: generate toolchain-check license-check lint vanity-import-check build test-default check-clean-work-tree test-coverage +ci: generate jsonschemagen toolchain-check license-check lint vanity-import-check build test-default check-clean-work-tree test-coverage # Tools From bbf3451081a95af77ad1704594dbc2ac60b57d51 Mon Sep 17 00:00:00 2001 From: dmathieu <42@dmathieu.com> Date: Wed, 27 Nov 2024 16:50:23 +0100 Subject: [PATCH 6/6] properly run jsonschemagen on generate --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c5311e6f248..8b9f9ead06d 100644 --- a/Makefile +++ b/Makefile @@ -18,8 +18,8 @@ TIMEOUT = 60 .DEFAULT_GOAL := precommit .PHONY: precommit ci -precommit: generate jsonschemagen toolchain-check license-check misspell go-mod-tidy golangci-lint-fix test-default -ci: generate jsonschemagen toolchain-check license-check lint vanity-import-check build test-default check-clean-work-tree test-coverage +precommit: generate toolchain-check license-check misspell go-mod-tidy golangci-lint-fix test-default +ci: generate toolchain-check license-check lint vanity-import-check build test-default check-clean-work-tree test-coverage # Tools @@ -107,7 +107,7 @@ $(CODESPELL): PACKAGE=codespell # Generate .PHONY: generate -generate: go-generate vanity-import-fix +generate: go-generate genjsonschema vanity-import-fix .PHONY: go-generate go-generate: $(OTEL_GO_MOD_DIRS:%=go-generate/%)