Skip to content

Commit a5e1a4d

Browse files
authored
Merge branch 'main' into timeout-duration
2 parents fda6c29 + 94cf531 commit a5e1a4d

File tree

125 files changed

+3418
-939
lines changed

Some content is hidden

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

125 files changed

+3418
-939
lines changed

.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/vscode/devcontainers/go:0-1.18

.devcontainer/devcontainer.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "Quickfix/Go Development",
3+
"dockerComposeFile": "docker-compose.yml",
4+
"service": "app",
5+
"workspaceFolder": "/workspace",
6+
"shutdownAction": "stopCompose",
7+
"runArgs": [
8+
"--cap-add=SYS_PTRACE",
9+
"--security-opt",
10+
"seccomp=unconfined"
11+
],
12+
"features": {
13+
"ruby": "latest"
14+
},
15+
"customizations": {
16+
"vscode": {
17+
"settings": {
18+
"go.toolsManagement.checkForUpdates": "local",
19+
"go.useLanguageServer": true,
20+
"go.gopath": "/go"
21+
},
22+
"extensions": [
23+
"golang.Go",
24+
"mongodb.mongodb-vscode"
25+
]
26+
}
27+
},
28+
"remoteUser": "vscode"
29+
}

.devcontainer/docker-compose.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
version: '3.8'
2+
3+
services:
4+
app:
5+
build:
6+
context: .
7+
dockerfile: Dockerfile.dev
8+
volumes:
9+
- ..:/workspace:cached
10+
- /var/run/docker.sock:/var/run/docker.sock
11+
# Overrides default command so things don't shut down after the process ends.
12+
command: sleep infinity
13+
14+
# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
15+
network_mode: service:db
16+
17+
# Uncomment the next line to use a non-root user for all processes.
18+
# user: node
19+
20+
# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
21+
# (Adding the "ports" property to this file will not forward from a Codespace.)
22+
23+
db:
24+
image: bitnami/mongodb:latest
25+
restart: unless-stopped
26+
volumes:
27+
- mongodb-data:/data/db
28+
ports:
29+
- 27017:27017
30+
environment:
31+
MONGODB_REPLICA_SET_MODE: primary
32+
ALLOW_EMPTY_PASSWORD: 'yes'
33+
34+
# Add "forwardPorts": ["27017"] to **devcontainer.json** to forward MongoDB locally.
35+
# (Adding the "ports" property to this file will not forward from a Codespace.)
36+
37+
volumes:
38+
mongodb-data:

.github/workflows/ci.yaml

Lines changed: 44 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,44 +10,68 @@ on:
1010
branches:
1111
- master
1212
- main
13+
permissions:
14+
contents: read
15+
1316
jobs:
1417
golangci:
15-
name: lint
18+
permissions:
19+
contents: read # for actions/checkout to fetch code
20+
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
21+
name: Linter
1622
runs-on: ubuntu-latest
1723
steps:
18-
- uses: actions/checkout@v2
19-
- name: golangci-lint
20-
uses: golangci/golangci-lint-action@v2
24+
- name: Checkout source code
25+
uses: actions/checkout@v2
26+
- name: Setup Go
27+
uses: actions/setup-go@v2
2128
with:
22-
version: v1.41
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+
tar -xf golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64.tar.gz
34+
sudo mv golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64/golangci-lint /usr/local/bin/golangci-lint
35+
rm -rf golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64*
36+
env:
37+
GOLANGCI_LINT_VERSION: '1.50.1'
38+
- name: Run Lint
39+
run: make lint
2340

2441
build:
2542
name: build
2643
runs-on: ubuntu-latest
2744
strategy:
2845
matrix:
29-
go: [1.16]
46+
go: [1.18]
3047
fix-version:
31-
- FIX_TEST=
32-
- FIX_TEST=fix40
33-
- FIX_TEST=fix41
34-
- FIX_TEST=fix42
35-
- FIX_TEST=fix43
36-
- FIX_TEST=fix44
37-
- FIX_TEST=fix50
38-
- FIX_TEST=fix50sp1
39-
- FIX_TEST=fix50sp2
48+
-
49+
- fix40
50+
- fix41
51+
- fix42
52+
- fix43
53+
- fix44
54+
- fix50
55+
- fix50sp1
56+
- fix50sp2
4057
steps:
4158
- name: Setup
4259
uses: actions/setup-go@v2
4360
with:
4461
go-version: ${{ matrix.go }}
4562
- name: Check out source
4663
uses: actions/checkout@v2
47-
- name: Run Mongo
48-
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'
4972
- name: Test
5073
env:
51-
GO111MODULE: "on"
52-
MONGODB_TEST_CXN: "localhost"
53-
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: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
run:
2+
timeout: 10m
3+
skip-dirs:
4+
- gen
5+
- vendor
6+
7+
linters:
8+
disable-all: true
9+
enable:
10+
- dupl
11+
- gofmt
12+
- goimports
13+
- gosimple
14+
- govet
15+
- ineffassign
16+
- misspell
17+
- revive
18+
- unused
19+
- staticcheck
20+
- godot
21+
22+
linters-settings:
23+
gofmt:
24+
simplify: true
25+
goimports:
26+
local-prefixes: github.com/quickfixgo/quickfix
27+
dupl:
28+
threshold: 400

CHANGELOG.md

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

353
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: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,35 @@
1+
12
all: vet test
23

34
clean:
45
rm -rf gen
56

67
generate: clean
7-
mkdir -p gen; cd gen; go run ../cmd/generate-fix/generate-fix.go ../spec/*.xml
8-
go get -u all
9-
10-
generate-dist:
11-
cd ..; go run quickfix/cmd/generate-fix/generate-fix.go quickfix/spec/*.xml
8+
mkdir -p gen; cd gen; go run ../cmd/generate-fix/generate-fix.go -pkg-root=github.com/quickfixgo/quickfix/gen ../spec/*.xml
129

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

1613
vet:
1714
go vet `go list ./... | grep -v quickfix/gen`
1815

19-
lint:
20-
go get github.com/golang/lint/golint
21-
golint .
22-
2316
test:
24-
go test -v -cover . ./datadictionary ./internal
17+
MONGODB_TEST_CXN=mongodb://db:27017 go test -v -cover . ./datadictionary ./internal
2518

26-
_build_all:
27-
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+
}
2824

29-
build_accept:
30-
cd _test; go build -o echo_server
25+
lint: linters-install
26+
golangci-lint run
3127

32-
build: _build_all build_accept
28+
# ---------------------------------------------------------------
29+
# Targets related to running acceptance tests -
3330

31+
build-test-srv:
32+
cd _test; go build -o echo_server ./test-server/
3433
fix40:
3534
cd _test; ./runat.sh $@.cfg 5001 "definitions/server/$@/*.def"
3635
fix41:
@@ -52,3 +51,20 @@ ACCEPT_SUITE=fix40 fix41 fix42 fix43 fix44 fix50 fix50sp1 fix50sp2
5251
accept: $(ACCEPT_SUITE)
5352

5453
.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)