Commit Graph

252 Commits

Author SHA1 Message Date
James Rasell 184733a126
build: fix `test-nomad` make target when running locally. (#16506) 2023-03-16 09:32:14 +01:00
hc-github-team-nomad-core 2d1a4d90e9 Prepare for next release 2023-03-13 11:13:27 -04:00
hc-github-team-nomad-core de3ee79482
Prepare for next release 2023-03-02 17:44:13 +00:00
Daniel Bennett 39e3a1ac3e
build/cli: Add BuildDate (#16216)
* build: add BuildDate to version info

will be used in enterprise to compare to license expiration time

* cli: multi-line version output, add BuildDate

before:
$ nomad version
Nomad v1.4.3 (coolfakecommithashomgoshsuchacoolonewoww)

after:
$ nomad version
Nomad v1.5.0-dev
BuildDate 2023-02-17T19:29:26Z
Revision coolfakecommithashomgoshsuchacoolonewoww

compare consul:
$ consul version
Consul v1.14.4
Revision dae670fe
Build Date 2023-01-26T15:47:10Z
Protocol 2 spoken by default, blah blah blah...

and vault:
$ vault version
Vault v1.12.3 (209b3dd99fe8ca320340d08c70cff5f620261f9b), built 2023-02-02T09:07:27Z

* docs: update version command output
2023-02-27 11:27:40 -06:00
Farbod Ahmadian 6e9ee969ad
build: correct Makefile to run smoke tests locally (#16137) 2023-02-16 10:58:39 -05:00
Charlie Voiselle 0b9ba1ae92
chore: Convert assets from bindatafs to go embeds (#16066)
* Convert assets from bindatafs to go embeds
* Add command/asset to "uninteresting" list for missing test check
* Remove generate-examples target
* Update paths in tests
2023-02-10 12:02:29 -05:00
Seth Hoenig 21895fb6f0
build: update hc-install and golangci-lint tools (#16067)
Update golangci-lint again, and also hc-install which now has a real version.
2023-02-06 12:54:07 -06:00
Seth Hoenig ad28708511
build: update hclogvet (#16065) 2023-02-06 11:04:38 -06:00
Seth Hoenig 5f3bb0b197
bootstrap: upgrade golangci-lint in prep for go1.20 (#16024)
This PR updates golangci-lint to work better with go1.20 - the previous
version would cause in oom on 'make check'.
2023-02-02 09:44:12 -06:00
Seth Hoenig 336d730b9c
api: make api tests fast and more concurrency safe (#15543)
This PR tries to make API tests run fast, as an experiment to later apply
to all packages. Key changes include

- Swapping freeport for test/portal for port allocations
- Swappng some uses of WaitForResult with test/wait
- Turning on parallelism in api/testutil/slow.go
- Switching to custom public runner (32 vcpu)

There's also chunk of cleanup brought in for the ride
2022-12-16 12:25:28 -06:00
hc-github-team-nomad-core f63351f9e2 Prepare for next release 2022-11-22 12:56:29 -05:00
Seth Hoenig 87a34102f5
make: add target cl for create changelog entry (#15186)
* make: add target cl for create changelog entry

This PR adds `tools/cl-entry` and the `make cl` Makefile target for
conveniently creating correctly formatted Changelog entries.

* Update tools/cl-entry/main.go

Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>

* Update tools/cl-entry/main.go

Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>

Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
2022-11-08 09:43:32 -06:00
Seth Hoenig ec915b2436
build: update linters (#15063)
Remove dead linters and add some interesting new ones.
2022-10-27 15:02:30 -05:00
hc-github-team-nomad-core 38b1c8a22a Prepare for next release 2022-10-27 13:08:05 -04:00
Seth Hoenig 4f3a1e6f7d
ci: use groups of tests in gha (#15018)
* [no ci] use json for grouping packages for testing

* [no ci] able to get packages in group

* [no ci] able to run groups of tests

* [no ci] more

* [no ci] try disable circle unit tests

* ci: use actions/checkout@v3

* ci: rename to quick

* ci: need make dev in mods cache step

* ci: make compile step depend on checks step

* ci: bump consul and vault versions

* ci: need make dev for group tests

* ci: update ci unit testing docs

* docs: spell plumbing correctly

Co-authored-by: Tim Gross <tgross@hashicorp.com>

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2022-10-27 09:02:58 -05:00
Seth Hoenig 1f1b662e73
ci: use gotestsum for CI tests (#14995)
Use gotestsum in both GHA and Circle with retries enabled.
2022-10-21 08:45:24 -05:00
Luiz Aoqui 0fddb4d7e8
Post 1.4.1 release (#14988)
* Generate files for 1.4.1 release

* Prepare for next release

Co-authored-by: hc-github-team-nomad-core <github-team-nomad-core@hashicorp.com>
2022-10-20 13:09:41 -04:00
Michael Schurter 611abdf2cc
build: add ability to specify release targets (#14957)
My make knowledge is very very limited, so if there's a better way to do
this please let me know! This seems to work and lets me cut one off
builds easily.
2022-10-19 10:27:47 -07:00
Damian Czaja 95f969c4bf
cli: add `nomad fmt` (#14779) 2022-10-06 17:00:29 -04:00
hc-github-team-nomad-core bfd7159f42 Prepare for next release 2022-10-06 09:16:01 -07:00
Tim Gross a3ff23608c
deps: use install from current HEAD for `hc-install` (#14786)
The `hc-install` tool we're using needed a patch for a specific bug, but that's
since been merged. We definitely want to switch to using a standard release from
that project once one is shipped with the CLI, but pinning to HEAD should keep
us for now.
2022-10-04 08:22:30 -04:00
Seth Hoenig c68ed3b4c8
client: protect user lookups with global lock (#14742)
* client: protect user lookups with global lock

This PR updates Nomad client to always do user lookups while holding
a global process lock. This is to prevent concurrency unsafe implementations
of NSS, but still enabling NSS lookups of users (i.e. cannot not use osusergo).

* cl: add cl
2022-09-29 09:30:13 -05:00
Luiz Aoqui bff91bef32
build: always set osusergo (#14583)
The way this tag was previous declared would cause it to be overwritten
when the GO_TAGS env var was set.
2022-09-13 21:13:17 -04:00
Seth Hoenig 6ffea7bb7d
Merge pull request #14464 from tonytrg/remove-dead-code
Removing reference to non existant test-website task in makefile
2022-09-09 09:35:33 -05:00
Seth Hoenig ec0d5e9950 build: make ec2info command usable from GNUMakefile
The ec2info was never intuitive to run - needing to set the AWS
envinronment variables, cd'ing into tools/ec2info, and knowing
to invoke the command.

This PR makes it so we can run ec2info just by running
make ec2info

The command now also checks for the AWS environment variables being
set, and provides a useful error if they are not.
2022-09-09 08:48:12 -05:00
Tony Truong 4040044dc7
Removing reference to non existant test-website task in makefile 2022-09-06 01:02:21 +02:00
Derek Strickland 35e91ff376
Merge release 1.3.5 files (#14425)
* Merge release 1.3.5 files

* Generate files for 1.3.5 release

* Prepare for next release

Co-authored-by: hc-github-team-nomad-core <github-team-nomad-core@hashicorp.com>
2022-08-31 18:31:56 -04:00
Luiz Aoqui ad84b22a72
Post 1.3.4 release (#14329)
* Generate files for 1.3.4 release

* Prepare for next release

* Update CHANGELOG.md

Co-authored-by: hc-github-team-nomad-core <github-team-nomad-core@hashicorp.com>
2022-08-26 10:09:13 -04:00
Seth Hoenig cfe9db0f66
build: set osusergo build tag by default (#14248)
This PR activates the osuergo build tag in GNUMakefile. This forces the os/user
package to be compiled without CGO. Doing so seems to resolve a race condition
in getpwnam_r that causes alloc creation to hang or panic on `user.Lookup("nobody")`.
2022-08-24 08:11:56 -05:00
Piotr Kazmierczak b63944b5c1
cleanup: replace TypeToPtr helper methods with pointer.Of (#14151)
Bumping compile time requirement to go 1.18 allows us to simplify our pointer helper methods.
2022-08-17 18:26:34 +02:00
Seth Hoenig 1caea272f0 build: bump golangci-lint version 2022-08-16 15:06:06 -05:00
Seth Hoenig aa1c3cdae2 build: use consistent arrows in makefile step output 2022-08-14 11:20:58 -05:00
Luiz Aoqui 815adbada5
Post 1.3.3 release (#14064)
* Generate files for 1.3.3 release

* Prepare for next release

* Merge release 1.3.3 files

Co-authored-by: hc-github-team-nomad-core <github-team-nomad-core@hashicorp.com>
2022-08-09 17:27:29 -04:00
James Rasell bb5b510c9d
cli: do not import structs, use API package only. (#13938) 2022-08-02 16:33:08 +02:00
James Rasell 66b23dc588
deps: update stringer version installed to bring generics fix (#13942) 2022-08-01 16:50:58 +02:00
hc-github-team-nomad-core c2f95eecc1
Prepare for next release 2022-07-13 19:34:32 -04:00
Seth Hoenig dca954faac build: update golangci-lint to v1.46.2
This version of golangci-lint improves support for generics, but also
is more strict in copy vs. loop for slice copying.
2022-05-31 23:32:01 +00:00
Seth Hoenig f7c0e078a9 build: update golang version to 1.18.2
This PR update to Go 1.18.2. Also update the versions of hclfmt
and go-hclogfmt which includes newer dependencies necessary for dealing
with go1.18.

The hcl v2 branch is now 'nomad-v2.9.1+tweaks2', to include a fix for
newer macOS versions: 8927e75e82
2022-05-25 10:04:04 -05:00
hc-github-team-nomad-core e9630d31be
Prepare for next release 2022-05-24 16:29:47 -04:00
Luiz Aoqui ed7798fbdf
prepare for next release (#12956) 2022-05-11 17:42:53 -04:00
Seth Hoenig 466f0c3fd2
build: use new version of hc-install (#12937)
https://github.com/shoenig/hc-install/pull/2

Uses new version of hc-install which supports the new
json content type reported by api.releases.hashicorp.com
2022-05-10 15:28:29 -04:00
Seth Hoenig 35728cbc58
Merge pull request #12740 from hashicorp/cleanup-makefile-help
build: add missing help descriptions to makefile
2022-05-02 10:33:22 -05:00
Luiz Aoqui b8dd60f79c
update LAST_RELEASE comment to match new release branches structure (#12773) 2022-04-25 11:57:55 -04:00
Seth Hoenig 6ea9da8d03 build: add missing help descriptions to makefile 2022-04-21 14:58:58 -05:00
Seth Hoenig 47040391bb ci: ensure package coverage of test-core 2022-04-14 19:04:06 -05:00
Luiz Aoqui 13233a4dd3
ci: make version script match ENT to avoid unnecessary merge conflicts (#12482) 2022-04-06 12:56:52 -04:00
claire labry 6f7f7277d5
[Main] Onboard to CRT (#12276) 2022-04-06 11:47:02 -04:00
Seth Hoenig 4b895a436a ci: set count to bypass caching 2022-03-25 13:43:33 -05:00
Seth Hoenig e85fbaf0ac ci: cleanup verbose mode and enable for gha
test_checks.sh was removed in 2019 and now just breaks if VERBOSE is
set when running tests via make targets

in GHA, use verbose mode to display what tests are running
2022-03-24 15:15:05 -05:00
Seth Hoenig 57bd480062 ci: turn on testing in github actions 2022-03-18 11:12:24 -05:00