324 Commits

Author SHA1 Message Date
Tim Gross
5d0008a9b4 tools: bump version of hc-install (#19063)
The version we have of `hc-install` doesn't allow installing Enterprise
binaries. Upgrade so that this is available to the development team and to our
E2E tests in the Enterprise repo.
2023-11-10 09:57:29 -05:00
Michael Schurter
c4ae91f8be Fix WorkloadIdentity.TTL handling, jobspec2 testing, and hcl1 vs 2 parsing (#19024)
* make the little dots consistent
* don't trim delimiter as that over matches
* test jobspec2 package
* copy api/WorkloadIdentity.TTL -> structs
* test ttl parsing
* fix hcl1 v 2 parsing mismatch
* make jobspec(1) tests match jobspec2 tests
2023-11-08 09:01:16 -08:00
Seth Hoenig
b5469dd0eb Post 1.6.3 release (#18918)
* Generate files for 1.6.3 release

* Prepare for next release

* Merge release 1.6.3 files

---------

Co-authored-by: hc-github-team-nomad-core <github-team-nomad-core@hashicorp.com>
2023-10-30 12:38:16 -05:00
Tim Gross
6c2d5a0fbb E2E: Consul compatibility matrix tests (#18799)
Set up a new test suite that exercises Nomad's compatibility with Consul. This
suite installs all currently supported versions of Consul, spins up a Consul
agent with appropriate configuration, and a Nomad agent running in dev
mode. Then it runs a Connect job against each pair.
2023-10-24 16:03:53 -04:00
modrake
51ffe4208e workaround and fixes for MPL and copywrite bot (#18775) 2023-10-17 08:02:13 +01:00
Luiz Aoqui
c6ce966d98 build: load time/tzdata on Windows (#18676)
Nomad uses `time.LoadLocation()` to translate a periodic job time zone
string value to a `time.Location`. From godocs:

    LoadLocation looks for the IANA Time Zone database in the following locations in order:

    * the directory or uncompressed zip file named by the ZONEINFO environment variable
    * on a Unix system, the system standard installation location
    * $GOROOT/lib/time/zoneinfo.zip
    * the time/tzdata package, if it was imported

So non-Unix systems require Go to be installed or `time/tzdata` to be
imported, otherwise running periodic jobs with a specific `time_zone`
value results in an error:

    Invalid time zone "America/Toronto": unknown time zone America/Toronto

This commit adds the `timetzdata` build tag on Windows to embed the time
zone data into the final binary. This results in a slightly bigger
binary, but from `time/tzdata` godocs:

    Importing this package will increase the size of a program by about 450 KB.
    [..]
    This package will be automatically imported if you build with -tags timetzdata.
2023-10-06 12:57:42 -04:00
hc-github-team-nomad-core
648a53fc49 Prepare for next release 2023-09-13 15:41:21 -03:00
Seth Hoenig
77e139ea25 build: use modtool to format go.mod file (#18195) 2023-08-15 07:26:46 -05:00
Seth Hoenig
d9341f0664 update go1.21 (#18184)
* build: update to go1.21

* go: eliminate helpers in favor of min/max

* build: run go mod tidy

* build: swap depguard for semgrep

* command: fixup broken tls error check on go1.21
2023-08-14 08:43:27 -05:00
Seth Hoenig
a4cc76bd3e numa: enable numa topology detection (#18146)
* client: refactor cgroups management in client

* client: fingerprint numa topology

* client: plumb numa and cgroups changes to drivers

* client: cleanup task resource accounting

* client: numa client and config plumbing

* lib: add a stack implementation

* tools: remove ec2info tool

* plugins: fixup testing for cgroups / numa changes

* build: update makefile and package tests and cl
2023-08-10 17:05:30 -05:00
Seth Hoenig
37dd4c4a69 e2e: modernize vaultcompat testing (#18179)
* e2e: modernize vaultcompat testing

* e2e: cr fixes for vaultcompat
2023-08-09 09:24:51 -05:00
Piotr Kazmierczak
ee0b104785 build: support s390x architecture for linux (ent) (#18069)
Makefile changes required for supporting s390x builds and a corresponding
changelog entry.
2023-07-26 17:43:37 +02:00
hc-github-team-nomad-core
0bcc20e9e5 Prepare for next release 2023-07-21 11:12:00 -04:00
hc-github-team-nomad-core
bc8b4bd749 Prepare for next release 2023-07-19 10:38:08 -04:00
Daniel Bennett
5733fa7516 ci: remove circleci (#17502)
all of our workflows are in GitHub Actions now 🎉
2023-06-12 16:28:19 -05:00
Seth Hoenig
2f634db013 post 1.5.6 release (#17276)
* Generate files for 1.5.6 release

* Prepare for next release

* Merge release 1.5.6 files

* manual revert bindata_assetfs because the one on main is better

---------

Co-authored-by: hc-github-team-nomad-core <github-team-nomad-core@hashicorp.com>
2023-05-22 14:03:51 -05:00
Luiz Aoqui
e80945f37d Post 1.5.5 release (#17241)
* Generate files for 1.5.5 release

* Prepare for next release

---------

Co-authored-by: hc-github-team-nomad-core <github-team-nomad-core@hashicorp.com>
2023-05-18 14:06:56 -04:00
Luiz Aoqui
ee5a08dbb2 Revert "hashicorp/go-msgpack v2 (#16810)" (#17047)
This reverts commit 8a98520d56.
2023-05-01 17:18:34 -04:00
Ian Fijolek
8a98520d56 hashicorp/go-msgpack v2 (#16810)
* Upgrade from hashicorp/go-msgpack v1.1.5 to v2.1.0

Fixes #16808

* Update hashicorp/net-rpc-msgpackrpc to v2 to match go-msgpack

* deps: use go-msgpack v2.0.0

go-msgpack v2.1.0 includes some code changes that we will need to
investigate furthere to assess its impact on Nomad, so keeping this
dependency on v2.0.0 for now since it's no-op.

---------

Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
2023-04-17 17:02:05 -04:00
Seth Hoenig
7120b90743 deps: bump build and linter tool versions (#16858)
This just helps keep up with the podman driver repo.
2023-04-11 17:01:14 -05:00
hc-github-team-nomad-core
02cf95c1b6 Prepare for next release 2023-04-05 12:31:42 -04:00
Michael Schurter
1a53d9ca57 Post 1.5.2 release (#16614)
* Generate files for 1.5.2 release

* Prepare for next release

* add 1.4.7 and 1.3.12 to the changelog

---------

Co-authored-by: hc-github-team-nomad-core <github-team-nomad-core@hashicorp.com>
2023-03-22 14:23:38 -07:00
James Rasell
323abf731e build: fix test-nomad make target when running locally. (#16506) 2023-03-16 09:32:14 +01:00
hc-github-team-nomad-core
6c91cc85c7 Prepare for next release 2023-03-13 11:13:27 -04:00
hc-github-team-nomad-core
4734c02a94 Prepare for next release 2023-03-02 17:44:13 +00:00
Daniel Bennett
4bdfe6d24f 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
6226e568f0 build: correct Makefile to run smoke tests locally (#16137) 2023-02-16 10:58:39 -05:00
Charlie Voiselle
7da6ade4f0 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
a4254f9118 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
0fd82e0058 build: update hclogvet (#16065) 2023-02-06 11:04:38 -06:00
Seth Hoenig
d881b23370 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
12034f90a3 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
8c6a5354c6 Prepare for next release 2022-11-22 12:56:29 -05:00
Seth Hoenig
72d58fcf72 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
ee2880ceaf 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
cc232f295e Prepare for next release 2022-10-27 13:08:05 -04:00
Seth Hoenig
f715cc1488 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
b52d40d46b 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
4a6417eb0f 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
d59dc3da53 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
e4efedbbe4 cli: add nomad fmt (#14779) 2022-10-06 17:00:29 -04:00
hc-github-team-nomad-core
60d5a1b278 Prepare for next release 2022-10-06 09:16:01 -07:00
Tim Gross
d063845177 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
e4e5bc5cef 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
507391df46 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
87f5eea52b 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
fbec815e41 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
eac690bb40 Removing reference to non existant test-website task in makefile 2022-09-06 01:02:21 +02:00
Derek Strickland
79c08ae577 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
119bb50151 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