Skip to content

Commit fde19b7

Browse files
authored
Merge pull request #1823 from vegaprotocol/release/v0.21.0
Release v0.21.0
2 parents 13e70cc + 3c1df00 commit fde19b7

63 files changed

Lines changed: 3395 additions & 1288 deletions

Some content is hidden

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

.drone-github.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ steps:
1919
# ====== Pipeline for pull requests ======
2020

2121
- name: build-PR
22-
image: docker.pkg.github.com/vegaprotocol/devops-infra/cipipeline:1.11.13
22+
image: docker.pkg.github.com/vegaprotocol/devops-infra/cipipeline:1.14.4
2323
pull: always
2424
volumes:
2525
- name: gocache
@@ -43,15 +43,15 @@ steps:
4343
- ssh-keyscan github.com 1>~/.ssh/known_hosts 2>/dev/null ; chmod 0644 ~/.ssh/known_hosts
4444
- unset GITHUB_DEPLOY_SSH_PRIVATE_KEY
4545
# Build normal executable
46-
- ./script/build.sh -t linux/amd64
46+
- ./script/build.sh -a build -t linux/amd64
4747
# Build executable for sytstem-tests, with custom Governance parameters. 8760h is 24*365 hours.
4848
- env
4949
VEGA_GOVERNANCE_MIN_CLOSE=5s
5050
VEGA_GOVERNANCE_MAX_CLOSE=8760h
5151
VEGA_GOVERNANCE_MIN_ENACT=5s
5252
VEGA_GOVERNANCE_MAX_ENACT=8760h
5353
VEGA_GOVERNANCE_MIN_PARTICIPATION_STAKE=1
54-
./script/build.sh -t linux/amd64 -s "-systemtests"
54+
./script/build.sh -a build -t linux/amd64 -s "-systemtests"
5555
depends_on:
5656
- fetch
5757
when:
@@ -72,7 +72,7 @@ steps:
7272
- pull_request
7373

7474
- name: test-PR
75-
image: docker.pkg.github.com/vegaprotocol/devops-infra/cipipeline:1.11.13
75+
image: docker.pkg.github.com/vegaprotocol/devops-infra/cipipeline:1.14.4
7676
volumes:
7777
- name: gocache
7878
path: /go/cache
@@ -86,7 +86,7 @@ steps:
8686
from_secret: SLACK_HOOK_URL
8787
commands:
8888
- make retest
89-
# More small checks. Run all, instead of exitng after first failure.
89+
# More small checks. Run all, instead of exiting after first failure.
9090
- failed=""
9191
- for target in codeowners_check gqlgen_check print_check proto_check race vet ; do
9292
echo "$$COL_CYAN$$target$$COL_RESET" ; make "$$target" || failed="$$failed $$target" ; done
@@ -159,7 +159,7 @@ steps:
159159
# ====== Pipeline for main branches (master, develop) and tags ======
160160

161161
- name: build-branch
162-
image: docker.pkg.github.com/vegaprotocol/devops-infra/cipipeline:1.11.13
162+
image: docker.pkg.github.com/vegaprotocol/devops-infra/cipipeline:1.14.4
163163
pull: always
164164
volumes:
165165
- name: gocache
@@ -182,7 +182,7 @@ steps:
182182
- echo "$${GITHUB_DEPLOY_SSH_PRIVATE_KEY}" >~/.ssh/id_rsa ; chmod 0600 ~/.ssh/id_rsa
183183
- ssh-keyscan github.com 1>~/.ssh/known_hosts 2>/dev/null ; chmod 0644 ~/.ssh/known_hosts
184184
- unset GITHUB_DEPLOY_SSH_PRIVATE_KEY
185-
- ./script/build.sh -t linux/amd64
185+
- ./script/build.sh -a build -t linux/amd64
186186
depends_on:
187187
- fetch
188188
when:
@@ -192,7 +192,7 @@ steps:
192192
- refs/tags/*
193193

194194
- name: deploy_devnet
195-
image: docker.pkg.github.com/vegaprotocol/devops-infra/cipipeline:1.11.13
195+
image: docker.pkg.github.com/vegaprotocol/devops-infra/cipipeline:1.14.4
196196
volumes:
197197
- name: gopkg
198198
path: /go/pkg
@@ -293,7 +293,7 @@ steps:
293293
- echo "$${GITHUB_DEPLOY_SSH_PRIVATE_KEY}" >~/.ssh/id_rsa ; chmod 0600 ~/.ssh/id_rsa
294294
- ssh-keyscan github.com 1>~/.ssh/known_hosts 2>/dev/null ; chmod 0644 ~/.ssh/known_hosts
295295
- unset GITHUB_DEPLOY_SSH_PRIVATE_KEY
296-
- ./script/build.sh -T
296+
- ./script/build.sh -a build -T
297297
depends_on:
298298
- build-branch
299299
when:
@@ -317,7 +317,7 @@ steps:
317317
- build-multiarch
318318

319319
- name: changelog_slack
320-
image: docker.pkg.github.com/vegaprotocol/devops-infra/cipipeline:1.11.13
320+
image: docker.pkg.github.com/vegaprotocol/devops-infra/cipipeline:1.14.4
321321
environment:
322322
SLACK_HOOK_URL:
323323
from_secret: SLACK_HOOK_URL

.spelling

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Suzdalnitski
2929
syslog
3030
tamlyn10
3131
Tendermint
32+
tendermint
3233
testnet
3334
tradable
3435
traderbot

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Changelog
22

3+
## 0.21.0
4+
5+
*2020-06-18*
6+
7+
A follow-on from 0.20.1, this release includes a fix for the GraphQL API returning inconsistent values for the `side` field on orders, leading to Vega Console failing to submit orders. As a bonus there is another GraphQL improvement, and two fixes that return more correct values for filled network orders and expired orders.
8+
9+
### Improvements
10+
11+
- 💥 [#1820](https://github.com/vegaprotocol/vega/pull/1820) GraphQL: Non existent parties no longer return a GraphQL error
12+
- 💥 [#1784](https://github.com/vegaprotocol/vega/pull/1784) GraphQL: Update schema and fix enum mappings from Proto
13+
- 💥 [#1761](https://github.com/vegaprotocol/vega/pull/1761) Governance: Improve processing of Proposals
14+
- [#1822](https://github.com/vegaprotocol/vega/pull/1822) Remove duplicate updates to `createdAt`
15+
- [#1818](https://github.com/vegaprotocol/vega/pull/1818) Trades: Replace buffer with events
16+
- [#1812](https://github.com/vegaprotocol/vega/pull/1812) Governance: Improve logging
17+
- [#1810](https://github.com/vegaprotocol/vega/pull/1810) Execution: Set order status for fully filled network orders to be `FILLED`
18+
- [#1803](https://github.com/vegaprotocol/vega/pull/1803) Matching: Set `updatedAt` when orders expire
19+
- [#1780](https://github.com/vegaprotocol/vega/pull/1780) APIs: Reject `NETWORK` orders
20+
- [#1792](https://github.com/vegaprotocol/vega/pull/1792) Update Golang to 1.14 and tendermint to 0.33.5
21+
322
## 0.20.1
423

524
*2020-06-18*

Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM docker.pkg.github.com/vegaprotocol/devops-infra/cipipeline:1.11.13 \
1+
FROM docker.pkg.github.com/vegaprotocol/devops-infra/cipipeline:1.14.4 \
22
AS builder
33
RUN \
44
git config --global url."git@github.com:vegaprotocol".insteadOf "https://github.com/vegaprotocol" && \
@@ -19,10 +19,9 @@ RUN make install
1919

2020

2121
FROM scratch
22-
ENTRYPOINT ["/vega"]
23-
CMD ["node"]
22+
ENTRYPOINT ["/vega-linux-amd64"]
2423
EXPOSE 3002/tcp 3003/tcp 3004/tcp 26658/tcp
25-
COPY --from=builder /go/bin/dummyriskmodel /
26-
COPY --from=builder /go/bin/vega /
27-
COPY --from=builder /go/bin/vegaccount /
28-
COPY --from=builder /go/bin/vegastream /
24+
COPY --from=builder /go/bin/dummyriskmodel-linux-amd64 /
25+
COPY --from=builder /go/bin/vega-linux-amd64 /
26+
COPY --from=builder /go/bin/vegaccount-linux-amd64 /
27+
COPY --from=builder /go/bin/vegastream-linux-amd64 /

Makefile

Lines changed: 14 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ lint: ## Lint the files
1313

1414
.PHONY: retest
1515
retest: ## Re-run all unit tests
16-
@go test -count=1 ./...
16+
@./script/build.sh -a retest
1717

1818
.PHONY: test
1919
test: ## Run unit tests
20-
@go test ./...
20+
@./script/build.sh -a test
2121

2222
.PHONY: integrationtest
2323
integrationtest: ## run integration tests, showing ledger movements and full scenario output
24-
@go test -v ./integration/... -godog.format=pretty
24+
@./script/build.sh -a integrationtest
2525

2626
.PHONY: race
2727
race: ## Run data race detector
28-
@env CGO_ENABLED=1 go test -race ./...
28+
@./script/build.sh -a race
2929

3030
.PHONY: mocks
3131
mocks: ## Make mocks
@@ -38,57 +38,32 @@ msan: ## Run memory sanitizer
3838

3939
.PHONY: vet
4040
vet: ## Run go vet
41-
@go vet -all ./...
42-
43-
.PHONY: vetshadow
44-
vetshadow: # Run go vet with shadow detection
45-
@go vet -shadow ./... 2>&1 | grep -vE '^(#|gateway/graphql/generated.go|proto/.*\.pb\.(gw\.)?go)' ; \
46-
code="$$?" ; test "$$code" -ne 0
47-
48-
.PHONY: .testCoverage.txt
49-
.testCoverage.txt:
50-
@go list ./... |grep -v '/gateway' | xargs go test -covermode=count -coverprofile="$@"
51-
@go tool cover -func="$@"
41+
@./script/build.sh -a vet
5242

5343
.PHONY: coverage
54-
coverage: .testCoverage.txt ## Generate global code coverage report
55-
56-
.PHONY: .testCoverage.html
57-
.testCoverage.html: .testCoverage.txt
58-
@go tool cover -html="$^" -o "$@"
59-
60-
.PHONY: coveragehtml
61-
coveragehtml: .testCoverage.html ## Generate global code coverage report in HTML
44+
coverage: ## Generate global code coverage report
45+
@./script/build.sh -a coverage
6246

6347
.PHONY: deps
6448
deps: ## Get the dependencies
65-
@go mod download
66-
@go mod vendor
67-
@grep 'google/protobuf' go.mod | awk '{print "# " $$1 " " $$2 "\n"$$1"/src";}' >> vendor/modules.txt
68-
@mkdir -p "$$GOPATH/pkg/mod/@indirect"
69-
@modvendor -copy="**/*.proto"
49+
@./script/build.sh -a deps
7050

7151
.PHONY: build
7252
build: ## install the binaries in cmd/{progname}/
7353
@d="" ; test -n "$$DEBUGVEGA" && d="-d" ; \
74-
./script/build.sh $d -t linux/amd64
54+
./script/build.sh $$d -a build -t default
7555

7656
.PHONY: gofmtsimplify
7757
gofmtsimplify:
7858
@find . -path vendor -prune -o \( -name '*.go' -and -not -name '*_test.go' -and -not -name '*_mock.go' \) -print0 | xargs -0r gofmt -s -w
7959

8060
.PHONY: install
81-
install: SHELL:=/bin/bash
8261
install: ## install the binaries in GOPATH/bin
83-
@source ./script/build.sh && set_version && set_ldflags && \
84-
echo "Version: $$version ($$version_hash)" && \
85-
for app in "$${apps[@]}" ; do \
86-
env CGO_ENABLED=1 go install -v -ldflags "$$ldflags" "./cmd/$$app" || exit 1 ; \
87-
done
62+
@./script/build.sh -a install -t default
8863

8964
.PHONY: gqlgen
9065
gqlgen: ## run gqlgen
91-
@cd ./gateway/graphql/ && go run github.com/99designs/gqlgen --config gqlgen.yml
66+
@./script/build.sh -a gqlgen
9267

9368
.PHONY: gqlgen_check
9469
gqlgen_check: ## GraphQL: Check committed files match just-generated files
@@ -107,7 +82,7 @@ ineffectassign: ## Check for ineffectual assignments
10782
if test "$$(echo -n "$$ia" | wc -l | awk '{print $$1}')" -gt 0 ; then echo "$$ia" ; exit 1 ; fi
10883

10984
.PHONY: proto
110-
proto: deps ## build proto definitions
85+
proto: ## build proto definitions
11186
@./proto/generate.sh
11287

11388
.PHONY: proto_check
@@ -150,7 +125,7 @@ print_check: ## Check for fmt.Print functions in Go code
150125
if test "$$count" -gt 0 ; then exit 1 ; fi
151126

152127
.PHONY: docker
153-
docker: SHELL:=/bin/bash
128+
docker: SHELL:=/usr/bin/env bash
154129
docker: ## Make docker container image from scratch
155130
@source ./script/build.sh && \
156131
if ! test -f "$(HOME)/.ssh/id_rsa" ; then \
@@ -207,9 +182,7 @@ spellcheck: ## Run markdown spellcheck container
207182
# The integration directory is special, and contains a package called core_test.
208183
.PHONY: staticcheck
209184
staticcheck: ## Run statick analysis checks
210-
@go list ./... | grep -v /integration | xargs staticcheck
211-
@f="$$(mktemp)" && find integration -name '*.go' | xargs staticcheck | grep -v 'could not load export data' | tee "$$f" && \
212-
count="$$(wc -l <"$$f")" && rm -f "$$f" && if test "$$count" -gt 0 ; then exit 1 ; fi
185+
@./script/build.sh -a staticcheck
213186

214187
.PHONY: clean
215188
clean: SHELL:=/bin/bash

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Vega
22

3-
Version 0.20.1.
3+
Version 0.21.0.
44

55
A decentralised trading platform that allows pseudo-anonymous trading of derivatives on a blockchain.
66

api/mocks/governance_data_service_mock.go

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/trading_data.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,7 @@ func (h *tradingDataService) Parties(ctx context.Context, req *empty.Empty) (*pr
11511151
func (h *tradingDataService) PartyByID(ctx context.Context, req *protoapi.PartyByIDRequest) (*protoapi.PartyByIDResponse, error) {
11521152
startTime := vegatime.Now()
11531153
defer metrics.APIRequestAndTimeGRPC("PartyByID", startTime)
1154-
pty, err := validateParty(ctx, req.PartyID, h.PartyService)
1154+
pty, err := validateParty(ctx, h.log, req.PartyID, h.PartyService)
11551155
if err != nil {
11561156
return nil, err // validateParty already returns an API error, no need to additionally wrap
11571157
}
@@ -1252,15 +1252,21 @@ func validateMarket(ctx context.Context, marketID string, marketService MarketSe
12521252
return mkt, nil
12531253
}
12541254

1255-
func validateParty(ctx context.Context, partyID string, partyService PartyService) (*types.Party, error) {
1255+
func validateParty(ctx context.Context, log *logging.Logger, partyID string, partyService PartyService) (*types.Party, error) {
12561256
var pty *types.Party
12571257
var err error
12581258
if len(partyID) == 0 {
12591259
return nil, apiError(codes.InvalidArgument, ErrEmptyMissingPartyID)
12601260
}
12611261
pty, err = partyService.GetByID(ctx, partyID)
12621262
if err != nil {
1263-
return nil, apiError(codes.Internal, ErrPartyServiceGetByID, err)
1263+
// we just log the error here, then return an nil error.
1264+
// right now the only error possible is about not finding a party
1265+
// we just not an actual error
1266+
log.Debug("error getting party by ID",
1267+
logging.Error(err),
1268+
logging.String("party-id", partyID))
1269+
err = nil
12641270
}
12651271
return pty, err
12661272
}

api/trading_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func getTestGRPCServer(
101101
blockchainClient := mocks.NewMockBlockchainClient(mockCtrl)
102102
blockchainClient.EXPECT().Health().AnyTimes().Return(&tmctypes.ResultHealth{}, nil)
103103
blockchainClient.EXPECT().GetStatus(gomock.Any()).AnyTimes().Return(&tmctypes.ResultStatus{
104-
NodeInfo: tmp2p.DefaultNodeInfo{Version: "0.32.9"},
104+
NodeInfo: tmp2p.DefaultNodeInfo{Version: "0.33.5"},
105105
SyncInfo: tmctypes.SyncInfo{},
106106
ValidatorInfo: tmctypes.ValidatorInfo{},
107107
}, nil)

blockchain/noop/noop.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func (n *NOOPChain) GetChainID(context.Context) (string, error) {
132132
func (n *NOOPChain) GetStatus(context.Context) (*tmctypes.ResultStatus, error) {
133133
return &tmctypes.ResultStatus{
134134
NodeInfo: p2p.DefaultNodeInfo{
135-
Version: "0.32.9",
135+
Version: "0.33.5",
136136
},
137137
SyncInfo: tmctypes.SyncInfo{
138138
CatchingUp: false,

0 commit comments

Comments
 (0)