Skip to content

Commit d5746f1

Browse files
Fixed merge conflicts and minor changes
2 parents 4409144 + 9d2a3c2 commit d5746f1

File tree

121 files changed

+3365
-944
lines changed

Some content is hidden

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

121 files changed

+3365
-944
lines changed

.devcontainer/Dockerfile

Lines changed: 0 additions & 1 deletion
This file was deleted.

.devcontainer/Dockerfile.dev

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM mcr.microsoft.com/devcontainers/go:1.21

.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: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -21,52 +21,50 @@ jobs:
2121
name: Linter
2222
runs-on: ubuntu-latest
2323
steps:
24-
- name: Checkout source code
25-
uses: actions/checkout@v2
26-
- name: Setup Go
27-
uses: actions/setup-go@v2
24+
- uses: actions/checkout@v3
25+
- uses: actions/setup-go@v4
2826
with:
29-
go-version: '1.18'
30-
- name: Install golangci-lint
31-
run: |
32-
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
34-
tar -xf golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64.tar.gz
35-
sudo mv golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64/golangci-lint /usr/local/bin/golangci-lint
36-
rm -rf golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64*
37-
env:
38-
GOLANGCI_LINT_VERSION: '1.46.2'
39-
GOLANGCI_LINT_SHA256: '242cd4f2d6ac0556e315192e8555784d13da5d1874e51304711570769c4f2b9b'
40-
- name: Test style
41-
run: make test-style
27+
go-version: '1.21'
28+
cache: false
29+
- name: golangci-lint
30+
uses: golangci/golangci-lint-action@v3
31+
with:
32+
version: v1.51
4233

4334
build:
4435
name: build
4536
runs-on: ubuntu-latest
4637
strategy:
4738
matrix:
48-
go: [1.18]
39+
go: [1.21]
4940
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
41+
-
42+
- fix40
43+
- fix41
44+
- fix42
45+
- fix43
46+
- fix44
47+
- fix50
48+
- fix50sp1
49+
- fix50sp2
5950
steps:
6051
- name: Setup
6152
uses: actions/setup-go@v2
6253
with:
6354
go-version: ${{ matrix.go }}
6455
- name: Check out source
6556
uses: actions/checkout@v2
66-
- name: Run Mongo
67-
run: docker run -d -p 27017:27017 mongo
57+
- name: Start MongoDB
58+
uses: supercharge/[email protected]
59+
with:
60+
mongodb-replica-set: replicaset
61+
- name: Install ruby
62+
uses: ruby/setup-ruby@v1
63+
with:
64+
ruby-version: '3.0'
6865
- name: Test
6966
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
67+
GO111MODULE: on
68+
MONGODB_TEST_CXN: mongodb://localhost:27017
69+
FIX_TEST: ${{ matrix.fix-version }}
70+
run: if [ -z $FIX_TEST ]; then make build-src && make test-ci; else make generate-ci && make build && make $FIX_TEST; fi

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ _test/echo_server
88
_test/tmp
99
_vendor*
1010
gen
11+
.DS_Store

.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: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,62 @@
1+
## 0.8.1 (October 27, 2023)
2+
3+
BUG FIXES
4+
5+
* Remove initiator wait [GH 587]
6+
* for xml charset and bug of "Incorrect NumInGroup" [GH 368, 363, 365, 366]
7+
* Allow time.Duration or int for timeouts [GH 477]
8+
* Trim extra non-ascii characters that can arise from manually editing [GH 463, 464]
9+
10+
## 0.8.0 (October 25, 2023)
11+
12+
ENHANCEMENTS
13+
14+
* Remove tag from field map [GH 544]
15+
* Add message.Bytes() to avoid string conversion [GH 546]
16+
* Check RejectInvalidMessage on FIXT validation [GH 572]
17+
18+
BUG FIXES
19+
20+
* Fix repeating group read tags lost [GH 462]
21+
* Acceptance test result must be predictable [GH 578]
22+
* Makes event timer stop idempotent [GH 580, 581]
23+
* Added WaitGroup Wait in Initiator [GH 584]
24+
25+
## 0.7.0 (January 2, 2023)
26+
27+
FEATURES
28+
29+
* PersistMessages Config [GH 297]
30+
* MaxLatency [GH 242]
31+
* ResetOnDisconnect Configuration [GH 68]
32+
* Support for High Precision Timestamps [GH 288]
33+
* LogonTimeout [GH 295]
34+
* LogoutTimeout [GH 296]
35+
* Socks Proxy [GH 375]
36+
37+
ENHANCEMENTS
38+
39+
* Add SocketUseSSL parameter to allow SSL/TLS without client certs [GH 311]
40+
* Support for RejectInvalidMessage configuration [GH 336]
41+
* Add deep copy for Messages [GH 338]
42+
* Add Go Module support [GH 340]
43+
* Support timeout on ssl connection [GH 347, 349]
44+
* Dynamic Sessions [GH 521]
45+
* Upgrade Mongo Driver to support transactions [GH 527]
46+
47+
BUG FIXES
48+
49+
* header and trailer templates use rootpath [GH 302]
50+
* Initiator stop panic if stop chan's already closed [GH 359]
51+
* Connection closed when inbound logon has a too-low sequence number [GH 369]
52+
* TLS server name config [GH 384]
53+
* Fix concurrent map write [GH 436]
54+
* Race condition during bilateral initial resend request [GH 439]
55+
* Deadlock when disconnecting dynamic session [GH 524]
56+
* Align session's ticker with round second [GH 533]
57+
* Seqnum persist and increment fix [GH 528]
58+
59+
160
## 0.6.0 (August 14, 2017)
261

362
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)