Skip to content

Commit

Permalink
Merge branch 'main' into timeout-duration
Browse files Browse the repository at this point in the history
  • Loading branch information
ackleymi authored Oct 26, 2023
2 parents fda6c29 + 94cf531 commit a5e1a4d
Show file tree
Hide file tree
Showing 125 changed files with 3,418 additions and 939 deletions.
1 change: 1 addition & 0 deletions .devcontainer/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM mcr.microsoft.com/vscode/devcontainers/go:0-1.18
29 changes: 29 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "Quickfix/Go Development",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspace",
"shutdownAction": "stopCompose",
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined"
],
"features": {
"ruby": "latest"
},
"customizations": {
"vscode": {
"settings": {
"go.toolsManagement.checkForUpdates": "local",
"go.useLanguageServer": true,
"go.gopath": "/go"
},
"extensions": [
"golang.Go",
"mongodb.mongodb-vscode"
]
}
},
"remoteUser": "vscode"
}
38 changes: 38 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
version: '3.8'

services:
app:
build:
context: .
dockerfile: Dockerfile.dev
volumes:
- ..:/workspace:cached
- /var/run/docker.sock:/var/run/docker.sock
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity

# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
network_mode: service:db

# Uncomment the next line to use a non-root user for all processes.
# user: node

# Use "forwardPorts" in **devcontainer.json** to forward an app port locally.
# (Adding the "ports" property to this file will not forward from a Codespace.)

db:
image: bitnami/mongodb:latest
restart: unless-stopped
volumes:
- mongodb-data:/data/db
ports:
- 27017:27017
environment:
MONGODB_REPLICA_SET_MODE: primary
ALLOW_EMPTY_PASSWORD: 'yes'

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

volumes:
mongodb-data:
64 changes: 44 additions & 20 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,44 +10,68 @@ on:
branches:
- master
- main
permissions:
contents: read

jobs:
golangci:
name: lint
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
name: Linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
- name: Checkout source code
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
version: v1.41
go-version: '1.18'
- name: Install golangci-lint
run: |
curl -sSLO https://github.com/golangci/golangci-lint/releases/download/v$GOLANGCI_LINT_VERSION/golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64.tar.gz
tar -xf golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64.tar.gz
sudo mv golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64/golangci-lint /usr/local/bin/golangci-lint
rm -rf golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64*
env:
GOLANGCI_LINT_VERSION: '1.50.1'
- name: Run Lint
run: make lint

build:
name: build
runs-on: ubuntu-latest
strategy:
matrix:
go: [1.16]
go: [1.18]
fix-version:
- FIX_TEST=
- FIX_TEST=fix40
- FIX_TEST=fix41
- FIX_TEST=fix42
- FIX_TEST=fix43
- FIX_TEST=fix44
- FIX_TEST=fix50
- FIX_TEST=fix50sp1
- FIX_TEST=fix50sp2
-
- fix40
- fix41
- fix42
- fix43
- fix44
- fix50
- fix50sp1
- fix50sp2
steps:
- name: Setup
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Check out source
uses: actions/checkout@v2
- name: Run Mongo
run: docker run -d -p 27017:27017 mongo
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-replica-set: replicaset
- name: Install ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
- name: Test
env:
GO111MODULE: "on"
MONGODB_TEST_CXN: "localhost"
run: make generate; if [ -z "$FIX_TEST" ]; then make build; make; else make build_accept; make $FIX_TEST; fi
GO111MODULE: on
MONGODB_TEST_CXN: mongodb://localhost:27017
FIX_TEST: ${{ matrix.fix-version }}
run: if [ -z $FIX_TEST ]; then make build-src && make test-ci; else make generate-ci && make build && make $FIX_TEST; fi
28 changes: 28 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
run:
timeout: 10m
skip-dirs:
- gen
- vendor

linters:
disable-all: true
enable:
- dupl
- gofmt
- goimports
- gosimple
- govet
- ineffassign
- misspell
- revive
- unused
- staticcheck
- godot

linters-settings:
gofmt:
simplify: true
goimports:
local-prefixes: github.com/quickfixgo/quickfix
dupl:
threshold: 400
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,53 @@
## 0.8.0 (October 25, 2023)

ENHANCEMENTS

* Remove tag from field map [GH 544]
* Add message.Bytes() to avoid string conversion [GH 546]
* Check RejectInvalidMessage on FIXT validation [GH 572]

BUG FIXES

* Fix repeating group read tags lost [GH 462]
* Acceptance test result must be predictable [GH 578]
* Makes event timer stop idempotent [GH 580, 581]
* Added WaitGroup Wait in Initiator [GH 584]

## 0.7.0 (January 2, 2023)

FEATURES

* PersistMessages Config [GH 297]
* MaxLatency [GH 242]
* ResetOnDisconnect Configuration [GH 68]
* Support for High Precision Timestamps [GH 288]
* LogonTimeout [GH 295]
* LogoutTimeout [GH 296]
* Socks Proxy [GH 375]

ENHANCEMENTS

* Add SocketUseSSL parameter to allow SSL/TLS without client certs [GH 311]
* Support for RejectInvalidMessage configuration [GH 336]
* Add deep copy for Messages [GH 338]
* Add Go Module support [GH 340]
* Support timeout on ssl connection [GH 347, 349]
* Dynamic Sessions [GH 521]
* Upgrade Mongo Driver to support transactions [GH 527]

BUG FIXES

* header and trailer templates use rootpath [GH 302]
* Initiator stop panic if stop chan's already closed [GH 359]
* Connection closed when inbound logon has a too-low sequence number [GH 369]
* TLS server name config [GH 384]
* Fix concurrent map write [GH 436]
* Race condition during bilateral initial resend request [GH 439]
* Deadlock when disconnecting dynamic session [GH 524]
* Align session's ticker with round second [GH 533]
* Seqnum persist and increment fix [GH 528]


## 0.6.0 (August 14, 2017)

FEATURES
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt → LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The QuickFIX Software License, Version 1.0

Copyright (c) 2001-2010 quickfixengine.org All rights
Copyright (c) 2001- quickfixengine.org All rights
reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
48 changes: 32 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@

all: vet test

clean:
rm -rf gen

generate: clean
mkdir -p gen; cd gen; go run ../cmd/generate-fix/generate-fix.go ../spec/*.xml
go get -u all

generate-dist:
cd ..; go run quickfix/cmd/generate-fix/generate-fix.go quickfix/spec/*.xml
mkdir -p gen; cd gen; go run ../cmd/generate-fix/generate-fix.go -pkg-root=github.com/quickfixgo/quickfix/gen ../spec/*.xml

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

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

lint:
go get github.com/golang/lint/golint
golint .

test:
go test -v -cover . ./datadictionary ./internal
MONGODB_TEST_CXN=mongodb://db:27017 go test -v -cover . ./datadictionary ./internal

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

build_accept:
cd _test; go build -o echo_server
lint: linters-install
golangci-lint run

build: _build_all build_accept
# ---------------------------------------------------------------
# Targets related to running acceptance tests -

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

.PHONY: test $(ACCEPT_SUITE)
# ---------------------------------------------------------------

# ---------------------------------------------------------------
# These targets are specific to the Github CI Runner -

build-src:
go build -v `go list ./...`

build: build-src build-test-srv

test-ci:
go test -v -cover . ./datadictionary ./internal

generate-ci: clean
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;

# ---------------------------------------------------------------
Loading

0 comments on commit a5e1a4d

Please sign in to comment.