Commit Graph

156 Commits

Author SHA1 Message Date
Phil Pennock
2ac72d92bf YAML engineering: quote go version string
We're currently using Go 1.19; we'll switch to 1.20 when the NATS Maintainers
make the call to switch.  Prepare by making sure that 1.20 won't turn into 1.2
instead, by quoting the string to be updated and adding a warning.
2023-02-07 17:32:20 -05:00
Byron Ruth
163743ab3f Bump to Go 1.19.5
Signed-off-by: Byron Ruth <byron@nats.io>
2023-01-31 15:43:16 -05:00
Byron Ruth
b19f0205e4 Bump Travis to use Go 1.19.4
Signed-off-by: Byron Ruth <b@devel.io>
2022-12-08 11:16:19 -05:00
Ivan Kozlovic
3fadccab38 Move new test to new jetstream_cluster_3_test.go file
Since the second batch was already past the 5min mark and a bit
longer than the first batch, it is a good opportunity to add
this new test in a new file. Updated runTestsOnTravis and travis.yml
accordingly.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-09-15 12:13:00 -06:00
Ivan Kozlovic
29224c8ea9 Split more tests to speed up Travis run
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-09-09 12:45:48 -06:00
Ivan Kozlovic
3c9a7cc6e5 Move to Go 1.19, remote io/util, fix data race and a flapper
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-08-05 09:55:37 -06:00
Derek Collison
b0580cdfc2 Fix some spellings
Signed-off-by: Derek Collison <derek@nats.io>
2022-06-28 18:45:33 -07:00
Derek Collison
a7bb479339 For older versions just check we did not break build step
Signed-off-by: Derek Collison <derek@nats.io>
2022-06-24 10:54:02 -07:00
Derek Collison
cc197771ec Allow compile and staticheck to pass.
Signed-off-by: Derek Collison <derek@nats.io>
2022-06-24 09:17:12 -07:00
Derek Collison
6b6a2202c7 Bump CI to Go 1.18
Signed-off-by: Derek Collison <derek@nats.io>
2022-06-24 08:45:55 -07:00
Ivan Kozlovic
06ff4b2b29 Split JS cluster and super clusters tests and compile only on 1.16
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-26 16:24:05 -06:00
Ivan Kozlovic
0e2ab5eeea Changes to tests that run on Travis
- Remove code coverage from Travis and add it to a GitHub Action
that will be run as a nightly.
- Use tag builds to exclude some tests, such as the "norace" or
JS tests. Since "go test" does not support "negative" regexs, there
is no other way.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-04-26 14:11:31 -06:00
Ivan Kozlovic
34650e9dd5 Fixed data race and some flappers
Data race that has been seen:
```
Read at 0x00c00134bec0 by goroutine 159:
  github.com/nats-io/nats-server/v2/server.(*client).msgHeaderForRouteOrLeaf()
      /home/travis/gopath/src/github.com/nats-io/nats-server/server/client.go:2935 +0x254
  github.com/nats-io/nats-server/v2/server.(*client).processMsgResults()
      /home/travis/gopath/src/github.com/nats-io/nats-server/server/client.go:4364 +0x2147
(...)
Previous write at 0x00c00134bec0 by goroutine 201:
  github.com/nats-io/nats-server/v2/server.(*Server).addRoute()
      /home/travis/gopath/src/github.com/nats-io/nats-server/server/route.go:1475 +0xdb4
  github.com/nats-io/nats-server/v2/server.(*client).processRouteInfo()
      /home/travis/gopath/src/github.com/nats-io/nats-server/server/route.go:641 +0x1704
```

Also fixed some flappers and removed use of `s.js.` since we have
already captured `js` in Jsz monitoring.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-03-31 10:05:34 -06:00
Ivan Kozlovic
e9b9c39853 Ping staticcheck to previous release since getting:
```
go: downloading golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3
../../../../pkg/mod/honnef.co/go/tools@v0.3.0/go/ir/builder.go:36:2: //go:build comment without // +build comment
The command "go install honnef.co/go/tools/cmd/staticcheck@latest" failed and exited with 1 during
```

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-03-29 19:11:00 -06:00
Ivan Kozlovic
70b1f5c950 Fix goreleaser script invocation - bump to rc2
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-01-13 16:58:19 -07:00
Ivan Kozlovic
59eef192cd Prepare for release v2.7.0, start with v2.7.0-rc1
Since we have never released with goreleaser and GO111MODULE=on
and have removed vendor directory, we are going to push a
v2.7.0-rc1 tag. If the goreleaser process works fine and submit
the draft release correctly, we will not do an actual v2.7.0-rc1
release. Instead, we will follow up immediately with the v2.7.0
tag and the proper release.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2022-01-13 16:15:51 -07:00
Ivan Kozlovic
aaf6d82c10 Remove version for misspell and staticcheck tools
Since with Go 1.17, we also get following notice:
```
go get: installing executables with 'go get' in module mode is deprecated.
...
```
Switching to `go install` and add `@latest` for the version.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-11-16 09:06:17 -07:00
Ivan Kozlovic
f805f23d6e Travis updates
- Add Go 1.17
- Fix go fmt from Go 1.17 (build directives)
- Download version of misspell and staticcheck instead of doing
"go get" since current staticcheck would be broken without go.mod

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-11-15 17:23:08 -07:00
Ivan Kozlovic
d154d646d4 Run coverage, but push to coverall only after_success
This will ensure that we get the matrix run green before pushing
results to coveralls, but also that if for some reason coveralls
has a problem, this is not making our build status red.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-09-20 12:02:14 -06:00
Derek Collison
2b2c4ba4a6 Bump Go test timeout
Signed-off-by: Derek Collison <derek@nats.io>
2021-09-07 08:20:54 -07:00
Derek Collison
c94a5cc30c Tweak travis vm size
Signed-off-by: Derek Collison <derek@nats.io>
2021-08-14 08:35:18 -07:00
Ivan Kozlovic
5bb236cef0 Update travis
- For tags, only run the version check test.
- Ping goreleaser to last version that works with vendor for now.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-03-26 11:24:48 -06:00
Derek Collison
91a63505a6 Re-enable tests post release process
Signed-off-by: Derek Collison <derek@nats.io>
2021-03-15 09:05:24 -07:00
Ivan Kozlovic
0d5b037fc3 Release v2.2.0
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2021-03-14 19:51:14 -06:00
Derek Collison
8fe8b835fe Fixes for flapping tests
Signed-off-by: Derek Collison <derek@nats.io>
2021-02-23 14:08:17 -08:00
Derek Collison
095a83bc2a Make sure to suppress duplicate create/delete audit events
Signed-off-by: Derek Collison <derek@nats.io>
2021-01-31 09:16:16 -08:00
Waldemar Quevedo
f0c144203b Add Go 1.15 version to CI
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2020-09-09 07:21:32 -07:00
Ivan Kozlovic
b329215af3 Release v2.1.7
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-05-13 19:40:49 -06:00
Ivan Kozlovic
182e30adb6 Update dependencies
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-03-30 18:23:43 -06:00
Ivan Kozlovic
2e2f94edea Release 2.1.4
Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-01-29 16:35:59 -07:00
Ivan Kozlovic
bdf5cf63b3 Shutdown on Ctrl+C
Changed code on Windows to not use svc code if running in interactive
mode. The original code was running svc.debug.Run() which uses service
code (Execute()) but from the command line. We don't need that.

Also reduced salt on bcrypt password for a config file that started
to cause failures due to test taking too long to finish.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-11-14 20:05:32 -07:00
Derek Collison
e6debc9fe7 Remove go1.11
Signed-off-by: Derek Collison <derek@nats.io>
2019-10-31 14:51:55 -07:00
Ivan Kozlovic
cbbc21ac25 Some update to leafnode subscription handling
- Send all subs in place if smap is small
- Skip sending update until after sendAllLeafSubs() is done

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-10-30 20:01:49 -06:00
Ivan Kozlovic
3d2a961c5a Updates to the script
- Replace EXCLUDE_VENDOR with GO_LIST since `go list` already
  excludes vendor directory.
- Changed misspell invocation because it was not doing what
  it was supposed to.
- Use `./...` in the test commands.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-09-12 10:24:56 -06:00
Ivan Kozlovic
2f48ad5150 Fixed subscription close
I noticed that TestNoRaceRoutedQueueAutoUnsubscribe started to
fail a lot on Travis. Running locally I could see a 45 to 50%
failures. After investigation I realized that the issue was that
we have wrongly re-used `subscription.nm` and set to -1 on unsubscribe
however, I believe that it was possible that when subscription was
closed, the server may have already picked that consumer for a delivery
which then causes nm==-1 to be bumped to 0, which was wrong.
Commenting out the subscription.close() that sets nm to -1, I could
not get the test to fail on macOS but would still get 7% failure on
Linux VM. Adding the check to see if sub is closed in deliverMsg()
completely erase the failures, even on Linux VM.

We could still use `nm` set to -1 but check on deliverMsg(), the
same way I use the closed int32 now.

Fixed some flappers.
Updated .travis.yml to failfast if one of the command in the
`script` fails. User `set -e` and `set +e` as recommended in
https://github.com/travis-ci/travis-ci/issues/1066

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-08-20 14:39:23 -06:00
Ivan Kozlovic
ef65ccbfd4 Removing skipping email notification [ci skip]
I had put that in place when testing the release process.
Removing now.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-08-15 11:00:34 -06:00
Ivan Kozlovic
fc8087daa7 Updates based on comments
- add sha256 algo
- move some mem hungry tests while running with -race to the norace
- remove GOGC=10

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-08-15 09:06:56 -06:00
Ivan Kozlovic
07e3db6b8e Prepare for v2.0.4 with goreleaser
Also fixed some flappers

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-08-15 09:06:56 -06:00
Derek Collison
1fc7e99e76 tmp disable of coveralls testing due to site down
Signed-off-by: Derek Collison <derek@nats.io>
2019-08-13 20:16:18 -07:00
Derek Collison
3cf6f6a5d2 Bug fix for service import with leafnodes and gws
Signed-off-by: Derek Collison <derek@nats.io>
2019-05-31 11:22:02 -07:00
Derek Collison
acfe372d63 Changes for rename from gnatsd -> nats-server
Signed-off-by: Derek Collison <derek@nats.io>
2019-05-06 15:04:24 -07:00
Waldemar Quevedo
7da8861e49 Add Go 1.12 to the build
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2019-03-06 16:05:49 -08:00
Derek Collison
28f14e5c97 Merge pull request #912 from nats-io/test_for_route_send_subs
Routes sending large subs and fan-in slow consumer fixes.
2019-02-20 13:27:16 -08:00
Ivan Kozlovic
04d824c4d4 [FIXED] Possible slow consumers when routes exchange sub list
If each server has a long list of subscriptions, when the route
is established, sending this list could result in each server
treating the peer as a slow consumer, resulting in a reconnect,
etc..
Also bumping the fan-in threshold for route connections.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-02-20 12:09:26 -08:00
Waldemar Quevedo
2936e1b92a Add go import path to Travis
Signed-off-by: Waldemar Quevedo <wally@synadia.com>
2019-02-11 02:08:05 -08:00
Ivan Kozlovic
7449e9ac53 Replace megacheck with staticcheck
Fixed issues reported by staticcheck

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2019-01-09 14:14:47 -07:00
Derek Collison
0ee714ce28 Add JWT support for users, accounts and import activations.
Add in trusted keys options and binary stamp
User JWT and Account fetch with AccountResolver
Account and User expiration
Account Imports/Exports w/ updates
Import activation expiration

Signed-off-by: Derek Collison <derek@nats.io>
2018-11-21 10:36:32 -08:00
Ivan Kozlovic
1817b354e3 Update tests on Travis with tweaked GC settings
Moved some tests to "no race" tests that are run separately.
Removing -v and adding -p=1.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2018-11-08 16:56:20 -07:00
Derek Collison
1ce1a434b0 Fix for #792
Allow deny clauses for subscriptions to still allow wildcard subscriptions but do not deliver the messages themselves.

Signed-off-by: Derek Collison <derek@nats.io>
2018-11-06 15:00:21 -08:00
Sergey Mudrik
0eebccbed8 Use the last Go version for travis CI 2018-10-14 19:30:25 +03:00