From 9973467de935265eae41025e20df062c090620d0 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Thu, 26 Apr 2018 10:19:38 -0700 Subject: [PATCH 1/4] Travis tests binary built with generated files --- GNUmakefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GNUmakefile b/GNUmakefile index 048951b0586..e6dcbfd9b34 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -261,6 +261,9 @@ clean: ## Remove build artifacts .PHONY: travis travis: ## Run Nomad test suites with output to prevent timeouts under Travis CI + @if [ ! $(SKIP_NOMAD_TESTS) ]; then \ + make generate; \ + fi @sh -C "$(PROJECT_ROOT)/scripts/travis.sh" .PHONY: testcluster From d14ba920a115b1f0ce16c5d071ff4dfa73a4afc1 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Thu, 26 Apr 2018 10:22:45 -0700 Subject: [PATCH 2/4] Codecgen full package --- client/structs/generate.sh | 5 +++++ client/structs/structs.go | 2 +- nomad/structs/generate.sh | 5 +++++ nomad/structs/structs_codegen.go | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100755 client/structs/generate.sh create mode 100755 nomad/structs/generate.sh diff --git a/client/structs/generate.sh b/client/structs/generate.sh new file mode 100755 index 00000000000..12a8c0ed16e --- /dev/null +++ b/client/structs/generate.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +FILES="$(ls *.go | tr '\n' ' ')" +codecgen -d 102 -o structs.generated.go ${FILES} diff --git a/client/structs/structs.go b/client/structs/structs.go index af28b55ca6c..22aecd45af2 100644 --- a/client/structs/structs.go +++ b/client/structs/structs.go @@ -1,6 +1,6 @@ package structs -//go:generate codecgen -d 102 -o structs.generated.go structs.go +//go:generate ./generate.sh import ( "crypto/md5" diff --git a/nomad/structs/generate.sh b/nomad/structs/generate.sh new file mode 100755 index 00000000000..34147c91833 --- /dev/null +++ b/nomad/structs/generate.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +FILES="$(ls *[!_test].go | tr '\n' ' ')" +codecgen -d 100 -o structs.generated.go ${FILES} diff --git a/nomad/structs/structs_codegen.go b/nomad/structs/structs_codegen.go index bdc324bb5c5..f883d9314c4 100644 --- a/nomad/structs/structs_codegen.go +++ b/nomad/structs/structs_codegen.go @@ -1,3 +1,3 @@ package structs -//go:generate codecgen -d 100 -o structs.generated.go structs.go +//go:generate ./generate.sh From 54ecd73370c29c0684329080521839b650eae093 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Thu, 26 Apr 2018 14:46:06 -0700 Subject: [PATCH 3/4] Keep client simple --- client/structs/generate.sh | 5 ----- client/structs/structs.go | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) delete mode 100755 client/structs/generate.sh diff --git a/client/structs/generate.sh b/client/structs/generate.sh deleted file mode 100755 index 12a8c0ed16e..00000000000 --- a/client/structs/generate.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -set -e - -FILES="$(ls *.go | tr '\n' ' ')" -codecgen -d 102 -o structs.generated.go ${FILES} diff --git a/client/structs/structs.go b/client/structs/structs.go index 22aecd45af2..af28b55ca6c 100644 --- a/client/structs/structs.go +++ b/client/structs/structs.go @@ -1,6 +1,6 @@ package structs -//go:generate ./generate.sh +//go:generate codecgen -d 102 -o structs.generated.go structs.go import ( "crypto/md5" From 7fd28ceb1edea25217f6b81ebe92fee7b2fecc38 Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Thu, 26 Apr 2018 15:25:53 -0700 Subject: [PATCH 4/4] Changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 975fb5e9af5..507fccc40fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ BUG FIXES: [[GH-4216](https://github.com/hashicorp/nomad/issues/4216)] * core: Improve tracking of node connections even if the address being used to contact the server changes [[GH-4222](https://github.com/hashicorp/nomad/issues/4222)] + * api: Fix an issue in which the autopilot configuration could not be updated + [GH-4220] * client: Populate access time and modify time when unarchiving tar archives that do not specify them explicitly [[GH-4217](https://github.com/hashicorp/nomad/issues/4217)] * driver/exec: Create process group for Windows process and send Ctrl-Break