Skip to content

Commit baa4ed3

Browse files
authored
Merge branch 'main' into remove-keepMessage
2 parents c46f651 + b7b2f17 commit baa4ed3

File tree

112 files changed

+2649
-830
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+2649
-830
lines changed
File renamed without changes.

.devcontainer/devcontainer.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
{
2-
"name": "Go & Mongo DB",
2+
"name": "Quickfix/Go Development",
33
"dockerComposeFile": "docker-compose.yml",
44
"service": "app",
55
"workspaceFolder": "/workspace",
6+
"shutdownAction": "stopCompose",
67
"runArgs": [
78
"--cap-add=SYS_PTRACE",
89
"--security-opt",
910
"seccomp=unconfined"
1011
],
12+
"features": {
13+
"ruby": "latest"
14+
},
1115
"customizations": {
1216
"vscode": {
1317
"settings": {

.devcontainer/docker-compose.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ services:
44
app:
55
build:
66
context: .
7-
dockerfile: Dockerfile
7+
dockerfile: Dockerfile.dev
88
volumes:
99
- ..:/workspace:cached
10-
10+
- /var/run/docker.sock:/var/run/docker.sock
1111
# Overrides default command so things don't shut down after the process ends.
1212
command: sleep infinity
1313

@@ -21,16 +21,15 @@ services:
2121
# (Adding the "ports" property to this file will not forward from a Codespace.)
2222

2323
db:
24-
image: mongo:latest
24+
image: bitnami/mongodb:latest
2525
restart: unless-stopped
2626
volumes:
2727
- mongodb-data:/data/db
28-
29-
# Uncomment to change startup options
30-
# environment:
31-
# MONGO_INITDB_ROOT_USERNAME: root
32-
# MONGO_INITDB_ROOT_PASSWORD: example
33-
# MONGO_INITDB_DATABASE: your-database-here
28+
ports:
29+
- 27017:27017
30+
environment:
31+
MONGODB_REPLICA_SET_MODE: primary
32+
ALLOW_EMPTY_PASSWORD: 'yes'
3433

3534
# Add "forwardPorts": ["27017"] to **devcontainer.json** to forward MongoDB locally.
3635
# (Adding the "ports" property to this file will not forward from a Codespace.)

.github/workflows/ci.yaml

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,13 @@ jobs:
3030
- name: Install golangci-lint
3131
run: |
3232
curl -sSLO https://github.com/golangci/golangci-lint/releases/download/v$GOLANGCI_LINT_VERSION/golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64.tar.gz
33-
shasum -a 256 golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64.tar.gz | grep "^$GOLANGCI_LINT_SHA256 " > /dev/null
3433
tar -xf golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64.tar.gz
3534
sudo mv golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64/golangci-lint /usr/local/bin/golangci-lint
3635
rm -rf golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64*
3736
env:
38-
GOLANGCI_LINT_VERSION: '1.46.2'
39-
GOLANGCI_LINT_SHA256: '242cd4f2d6ac0556e315192e8555784d13da5d1874e51304711570769c4f2b9b'
40-
- name: Test style
41-
run: make test-style
37+
GOLANGCI_LINT_VERSION: '1.50.1'
38+
- name: Run Lint
39+
run: make lint
4240

4341
build:
4442
name: build
@@ -47,26 +45,33 @@ jobs:
4745
matrix:
4846
go: [1.18]
4947
fix-version:
50-
- FIX_TEST=
51-
- FIX_TEST=fix40
52-
- FIX_TEST=fix41
53-
- FIX_TEST=fix42
54-
- FIX_TEST=fix43
55-
- FIX_TEST=fix44
56-
- FIX_TEST=fix50
57-
- FIX_TEST=fix50sp1
58-
- FIX_TEST=fix50sp2
48+
-
49+
- fix40
50+
- fix41
51+
- fix42
52+
- fix43
53+
- fix44
54+
- fix50
55+
- fix50sp1
56+
- fix50sp2
5957
steps:
6058
- name: Setup
6159
uses: actions/setup-go@v2
6260
with:
6361
go-version: ${{ matrix.go }}
6462
- name: Check out source
6563
uses: actions/checkout@v2
66-
- name: Run Mongo
67-
run: docker run -d -p 27017:27017 mongo
64+
- name: Start MongoDB
65+
uses: supercharge/[email protected]
66+
with:
67+
mongodb-replica-set: replicaset
68+
- name: Install ruby
69+
uses: ruby/setup-ruby@v1
70+
with:
71+
ruby-version: '3.0'
6872
- name: Test
6973
env:
70-
GO111MODULE: "on"
71-
MONGODB_TEST_CXN: "localhost"
72-
run: make generate; if [ -z "$FIX_TEST" ]; then make build; make; else make build_accept; make $FIX_TEST; fi
74+
GO111MODULE: on
75+
MONGODB_TEST_CXN: mongodb://localhost:27017
76+
FIX_TEST: ${{ matrix.fix-version }}
77+
run: if [ -z $FIX_TEST ]; then make build-src && make test-ci; else make generate-ci && make build && make $FIX_TEST; fi

.golangci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ run:
77
linters:
88
disable-all: true
99
enable:
10-
- deadcode
1110
- dupl
1211
- gofmt
1312
- goimports
@@ -17,8 +16,8 @@ linters:
1716
- misspell
1817
- revive
1918
- unused
20-
- varcheck
2119
- staticcheck
20+
- godot
2221

2322
linters-settings:
2423
gofmt:

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
1+
## 0.7.0 (January 2, 2023)
2+
3+
FEATURES
4+
5+
* PersistMessages Config [GH 297]
6+
* MaxLatency [GH 242]
7+
* ResetOnDisconnect Configuration [GH 68]
8+
* Support for High Precision Timestamps [GH 288]
9+
* LogonTimeout [GH 295]
10+
* LogoutTimeout [GH 296]
11+
* Socks Proxy [GH 375]
12+
13+
ENHANCEMENTS
14+
15+
* Add SocketUseSSL parameter to allow SSL/TLS without client certs [GH 311]
16+
* Support for RejectInvalidMessage configuration [GH 336]
17+
* Add deep copy for Messages [GH 338]
18+
* Add Go Module support [GH 340]
19+
* Support timeout on ssl connection [GH 347, 349]
20+
* Dynamic Sessions [GH 521]
21+
* Upgrade Mongo Driver to support transactions [GH 527]
22+
23+
BUG FIXES
24+
25+
* header and trailer templates use rootpath [GH 302]
26+
* Initiator stop panic if stop chan's already closed [GH 359]
27+
* Connection closed when inbound logon has a too-low sequence number [GH 369]
28+
* TLS server name config [GH 384]
29+
* Fix concurrent map write [GH 436]
30+
* Race condition during bilateral initial resend request [GH 439]
31+
* Deadlock when disconnecting dynamic session [GH 524]
32+
* Align session's ticker with round second [GH 533]
33+
* Seqnum persist and increment fix [GH 528]
34+
35+
136
## 0.6.0 (August 14, 2017)
237

338
FEATURES

LICENSE.txt renamed to LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The QuickFIX Software License, Version 1.0
22

3-
Copyright (c) 2001-2010 quickfixengine.org All rights
3+
Copyright (c) 2001- quickfixengine.org All rights
44
reserved.
55

66
Redistribution and use in source and binary forms, with or without

Makefile

Lines changed: 31 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,35 @@
1-
GOBIN = $(shell go env GOBIN)
2-
ifeq ($(GOBIN),)
3-
GOBIN = $(shell go env GOPATH)/bin
4-
endif
5-
GOX = $(GOBIN)/gox
6-
GOIMPORTS = $(GOBIN)/goimports
7-
ARCH = $(shell uname -p)
8-
9-
# ------------------------------------------------------------------------------
10-
# dependencies
11-
12-
# If go install is run from inside the project directory it will add the
13-
# dependencies to the go.mod file. To avoid that we change to a directory
14-
# without a go.mod file when downloading the following dependencies
15-
16-
$(GOX):
17-
(cd /; GO111MODULE=on go install github.com/mitchellh/gox@latest)
18-
19-
$(GOIMPORTS):
20-
(cd /; GO111MODULE=on go install golang.org/x/tools/cmd/goimports@latest)
21-
22-
# ------------------------------------------------------------------------------
231

242
all: vet test
253

264
clean:
275
rm -rf gen
286

297
generate: clean
30-
mkdir -p gen; cd gen; go run ../cmd/generate-fix/generate-fix.go ../spec/*.xml
31-
go get -u all
32-
33-
generate-dist:
34-
cd ..; go run quickfix/cmd/generate-fix/generate-fix.go quickfix/spec/*.xml
35-
36-
test-style:
37-
GO111MODULE=on golangci-lint run
38-
39-
.PHONY: format
40-
format: $(GOIMPORTS)
41-
GO111MODULE=on go list -f '{{.Dir}}' ./... | xargs $(GOIMPORTS) -w -local github.com/quickfixgo/quickfix
8+
mkdir -p gen; cd gen; go run ../cmd/generate-fix/generate-fix.go -pkg-root=github.com/quickfixgo/quickfix/gen ../spec/*.xml
429

4310
fmt:
44-
go fmt `go list ./... | grep -v quickfix/gen`
11+
gofmt -l -w -s $(shell find . -type f -name '*.go')
4512

4613
vet:
4714
go vet `go list ./... | grep -v quickfix/gen`
4815

4916
test:
50-
MONGODB_TEST_CXN=localhost go test -v -cover . ./datadictionary ./internal
17+
MONGODB_TEST_CXN=mongodb://db:27017 go test -v -cover . ./datadictionary ./internal
5118

52-
_build_all:
53-
go build -v `go list ./...`
19+
linters-install:
20+
@golangci-lint --version >/dev/null 2>&1 || { \
21+
echo "installing linting tools..."; \
22+
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.50.1; \
23+
}
5424

55-
build_accept:
56-
cd _test; go build -o echo_server
25+
lint: linters-install
26+
golangci-lint run
5727

58-
build: _build_all build_accept
28+
# ---------------------------------------------------------------
29+
# Targets related to running acceptance tests -
5930

31+
build-test-srv:
32+
cd _test; go build -o echo_server ./test-server/
6033
fix40:
6134
cd _test; ./runat.sh $@.cfg 5001 "definitions/server/$@/*.def"
6235
fix41:
@@ -78,3 +51,20 @@ ACCEPT_SUITE=fix40 fix41 fix42 fix43 fix44 fix50 fix50sp1 fix50sp2
7851
accept: $(ACCEPT_SUITE)
7952

8053
.PHONY: test $(ACCEPT_SUITE)
54+
# ---------------------------------------------------------------
55+
56+
# ---------------------------------------------------------------
57+
# These targets are specific to the Github CI Runner -
58+
59+
build-src:
60+
go build -v `go list ./...`
61+
62+
build: build-src build-test-srv
63+
64+
test-ci:
65+
go test -v -cover . ./datadictionary ./internal
66+
67+
generate-ci: clean
68+
mkdir -p gen; cd gen; go run ../cmd/generate-fix/generate-fix.go -pkg-root=github.com/quickfixgo/quickfix/gen ../spec/$(shell echo $(FIX_TEST) | tr '[:lower:]' '[:upper:]').xml;
69+
70+
# ---------------------------------------------------------------

0 commit comments

Comments
 (0)