Skip to content

Commit

Permalink
Merge pull request #1513 from sourcenetwork/release/0.5.1
Browse files Browse the repository at this point in the history
Release/0.5.1
  • Loading branch information
jsimnz authored May 17, 2023
2 parents 9ff3eb6 + 1fd7095 commit b04c423
Show file tree
Hide file tree
Showing 461 changed files with 14,540 additions and 10,198 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-ami-with-packer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

env:
PACKER_LOG: 1
# RELEASE_VERSION: v0.4.0
# RELEASE_VERSION: v0.5.0

jobs:
build-ami-with-packer:
Expand Down Expand Up @@ -52,8 +52,8 @@ jobs:

- name: Run `packer validate`
id: validate
run: "packer validate -var \"github_pat=${{ secrets.ONLY_DEFRADB_REPO_CI_PAT }}\" -var \"commit=${{ env.RELEASE_VERSION }}\" ./tools/cloud/aws/packer/build_aws_ami.pkr.hcl"
run: "packer validate -var \"commit=${{ env.RELEASE_VERSION }}\" ./tools/cloud/aws/packer/build_aws_ami.pkr.hcl"

- name: Run `packer build`
id: build
run: "packer build -var \"github_pat=${{ secrets.ONLY_DEFRADB_REPO_CI_PAT }}\" -var \"commit=${{ env.RELEASE_VERSION }}\" ./tools/cloud/aws/packer/build_aws_ami.pkr.hcl"
run: "packer build -var \"commit=${{ env.RELEASE_VERSION }}\" ./tools/cloud/aws/packer/build_aws_ami.pkr.hcl"
7 changes: 5 additions & 2 deletions .github/workflows/code-test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@

name: Code Test Coverage Workflow

on: [push]
on:
pull_request:

push:


jobs:
code-test-coverage:
Expand All @@ -36,7 +40,6 @@ jobs:
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./coverage.txt
flags: defra-tests
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/detect-change.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@ jobs:
make deps:modules
make deps:test
# We need SSH Authorization because change detection needs use `ls-remote` like:
# git ls-remote [email protected]:sourcenetwork/defradb.git refs/heads/develop
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
log-public-key: false

- name: Run detection for changes
run: make test:changes

Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Copyright 2023 Democratized Data Foundation
#
# Use of this software is governed by the Business Source License
# included in the file licenses/BSL.txt.
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software will be governed
# by the Apache License, Version 2.0, included in the file
# licenses/APL.txt.

name: Lint Workflow

on:
pull_request:
branches:
- master
- develop

push:

permissions:
# Allow read access to pull request (Required for the `only-new-issues` option.)
pull-requests: read
contents: read

jobs:
lint:
name: Lint job

runs-on: ubuntu-latest

steps:
- name: Checkout code into the directory
uses: actions/checkout@v3

- name: Setup Go environment explicitly
uses: actions/setup-go@v3
with:
go-version: "1.19"
check-latest: true

- name: Check linting through golangci-lint
uses: golangci/golangci-lint-action@v3

with:
# Required: the version of golangci-lint is required.
# Note: The version should not pick the patch version as the latest patch
# version is what will always be used.
version: v1.51

# Optional: working directory, useful for monorepos or if we wanted to run this
# on a non-root directory.
# working-directory: ./

# Optional: golangci-lint command line arguments.
# Note: we can set `--issues-exit-code=0` if we want a successcode always,
# indicating that the linter ran successfully (weather or not linter errors
# exist or not doesn't matter). But the good thing is that the annotations
# will still show up. I think this can be useful if we don't want the pipeline
# to stop just because we had some linter errors.
args: --issues-exit-code=1 --config tools/configs/golangci.yaml

# Optional: we can set the below to `true` if we only want to see newly
# introduced linter errors, however I found that in practive that option is a
# bit gimmicky, as it passes the linter check despite having new linter errors
# in some cases. So we opt in for all annotations of linter errors to show up,
# this is actually nicer because we suppress our linter errors manually
# anyways so there shouldn't be any linter errors anyways. The enforces us to
# always have a clean lint state.
only-new-issues: false
5 changes: 4 additions & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@

name: Run Tests Workflow

on: [push]
on:
pull_request:

push:

jobs:
run-tests:
Expand Down
89 changes: 89 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,92 @@
<a name="v0.5.1"></a>
## [v0.5.1](https://github.com/sourcenetwork/defradb/compare/v0.5.0...v0.5.1)

> 2023-05-16
### Features

* Add collection response information on creation ([#1499](https://github.com/sourcenetwork/defradb/issues/1499))
* CLI client request from file ([#1503](https://github.com/sourcenetwork/defradb/issues/1503))
* Add commits fieldName and fieldId fields ([#1451](https://github.com/sourcenetwork/defradb/issues/1451))
* Add allowed origins config ([#1408](https://github.com/sourcenetwork/defradb/issues/1408))
* Add descriptions to all system defined GQL stuff ([#1387](https://github.com/sourcenetwork/defradb/issues/1387))
* Strongly type Request.Errors ([#1364](https://github.com/sourcenetwork/defradb/issues/1364))

### Fixes

* Skip new test packages in change detector ([#1495](https://github.com/sourcenetwork/defradb/issues/1495))
* Make nested joins work correctly from primary direction ([#1491](https://github.com/sourcenetwork/defradb/issues/1491))
* Add reconnection to known peers ([#1482](https://github.com/sourcenetwork/defradb/issues/1482))
* Rename commit field input arg to fieldId ([#1460](https://github.com/sourcenetwork/defradb/issues/1460))
* Reference collectionID in p2p readme ([#1466](https://github.com/sourcenetwork/defradb/issues/1466))
* Handling SIGTERM in CLI `start` command ([#1459](https://github.com/sourcenetwork/defradb/issues/1459))
* Update QL documentation link and replicator command ([#1440](https://github.com/sourcenetwork/defradb/issues/1440))
* Fix typo in readme ([#1419](https://github.com/sourcenetwork/defradb/issues/1419))
* Limit the size of http request bodies that we handle ([#1405](https://github.com/sourcenetwork/defradb/issues/1405))
* Improve P2P event handling ([#1388](https://github.com/sourcenetwork/defradb/issues/1388))
* Serialize DB errors to json in http package ([#1401](https://github.com/sourcenetwork/defradb/issues/1401))
* Do not commit if errors have been returned ([#1390](https://github.com/sourcenetwork/defradb/issues/1390))
* Unlock replicator lock before returning error ([#1369](https://github.com/sourcenetwork/defradb/issues/1369))
* Improve NonNull error message ([#1362](https://github.com/sourcenetwork/defradb/issues/1362))
* Use ring-buffer for WaitForFoo chans ([#1359](https://github.com/sourcenetwork/defradb/issues/1359))
* Guarantee event processing order ([#1352](https://github.com/sourcenetwork/defradb/issues/1352))
* Explain of _group with dockeys filter to be []string ([#1348](https://github.com/sourcenetwork/defradb/issues/1348))

### Refactoring

* Use `int32` for proper gql scalar Int parsing ([#1493](https://github.com/sourcenetwork/defradb/issues/1493))
* Improve rollback on peer P2P collection error ([#1461](https://github.com/sourcenetwork/defradb/issues/1461))
* Improve CLI with test suite and builder pattern ([#928](https://github.com/sourcenetwork/defradb/issues/928))

### Testing

* Add DB/Node Restart tests ([#1504](https://github.com/sourcenetwork/defradb/issues/1504))
* Provide tests for client introspection query ([#1492](https://github.com/sourcenetwork/defradb/issues/1492))
* Convert explain count tests to new explain setup ([#1488](https://github.com/sourcenetwork/defradb/issues/1488))
* Convert explain sum tests to new explain setup ([#1489](https://github.com/sourcenetwork/defradb/issues/1489))
* Convert explain average tests to new explain setup ([#1487](https://github.com/sourcenetwork/defradb/issues/1487))
* Convert explain top-level tests to new explain setup ([#1480](https://github.com/sourcenetwork/defradb/issues/1480))
* Convert explain order tests to new explain setup ([#1478](https://github.com/sourcenetwork/defradb/issues/1478))
* Convert explain join tests to new explain setup ([#1476](https://github.com/sourcenetwork/defradb/issues/1476))
* Convert explain dagscan tests to new explain setup ([#1474](https://github.com/sourcenetwork/defradb/issues/1474))
* Add tests to assert schema id order independence ([#1456](https://github.com/sourcenetwork/defradb/issues/1456))
* Capitalize all integration schema types ([#1445](https://github.com/sourcenetwork/defradb/issues/1445))
* Convert explain limit tests to new explain setup ([#1446](https://github.com/sourcenetwork/defradb/issues/1446))
* Improve change detector performance ([#1433](https://github.com/sourcenetwork/defradb/issues/1433))
* Convert mutation explain tests to new explain setup ([#1416](https://github.com/sourcenetwork/defradb/issues/1416))
* Convert filter explain tests to new explain setup ([#1380](https://github.com/sourcenetwork/defradb/issues/1380))
* Retry test doc mutation on transaction conflict ([#1366](https://github.com/sourcenetwork/defradb/issues/1366))

### Continuous integration

* Remove secret ssh key stuff from change detector wf ([#1438](https://github.com/sourcenetwork/defradb/issues/1438))
* Fix the SSH security issue from AMI scan report ([#1426](https://github.com/sourcenetwork/defradb/issues/1426))
* Add a separate workflow to run the linter ([#1434](https://github.com/sourcenetwork/defradb/issues/1434))
* Allow CI to work from forked repo ([#1392](https://github.com/sourcenetwork/defradb/issues/1392))
* Bump go version within packer for AWS AMI ([#1344](https://github.com/sourcenetwork/defradb/issues/1344))

### Chore

* Enshrine defra logger names ([#1410](https://github.com/sourcenetwork/defradb/issues/1410))
* Remove some dead code ([#1470](https://github.com/sourcenetwork/defradb/issues/1470))
* Update graphql-go ([#1422](https://github.com/sourcenetwork/defradb/issues/1422))
* Improve logging consistency ([#1424](https://github.com/sourcenetwork/defradb/issues/1424))
* Makefile tests with shorter timeout and common flags ([#1397](https://github.com/sourcenetwork/defradb/issues/1397))
* Move to gofrs/uuid ([#1396](https://github.com/sourcenetwork/defradb/issues/1396))
* Move to ipfs boxo ([#1393](https://github.com/sourcenetwork/defradb/issues/1393))
* Document collection.txn ([#1363](https://github.com/sourcenetwork/defradb/issues/1363))

### Bot

* Bump golang.org/x/crypto from 0.8.0 to 0.9.0 ([#1497](https://github.com/sourcenetwork/defradb/issues/1497))
* Bump golang.org/x/net from 0.9.0 to 0.10.0 ([#1496](https://github.com/sourcenetwork/defradb/issues/1496))
* Bump google.golang.org/grpc from 1.54.0 to 1.55.0 ([#1464](https://github.com/sourcenetwork/defradb/issues/1464))
* Bump github.com/ipfs/boxo from 0.8.0 to 0.8.1 ([#1427](https://github.com/sourcenetwork/defradb/issues/1427))
* Bump golang.org/x/crypto from 0.7.0 to 0.8.0 ([#1398](https://github.com/sourcenetwork/defradb/issues/1398))
* Bump github.com/spf13/cobra from 1.6.1 to 1.7.0 ([#1399](https://github.com/sourcenetwork/defradb/issues/1399))
* Bump github.com/ipfs/go-blockservice from 0.5.0 to 0.5.1 ([#1300](https://github.com/sourcenetwork/defradb/issues/1300))
* Bump github.com/ipfs/go-cid from 0.4.0 to 0.4.1 ([#1301](https://github.com/sourcenetwork/defradb/issues/1301))

<a name="v0.5.0"></a>
## [v0.5.0](https://github.com/sourcenetwork/defradb/compare/v0.4.0...v0.5.0)

Expand Down
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ BUILD_FLAGS=-trimpath -ldflags "\
-X 'github.com/sourcenetwork/defradb/version.GitCommitDate=$(VERSION_GITCOMMITDATE)'"
endif

TEST_FLAGS=-race -shuffle=on -timeout 60s

default:
@go run $(BUILD_FLAGS) cmd/defradb/main.go

Expand Down Expand Up @@ -143,28 +145,28 @@ endif

.PHONY: test
test:
gotestsum --format pkgname -- ./... -race -shuffle=on
gotestsum --format pkgname -- ./... $(TEST_FLAGS)

# Only build the tests (don't execute them).
.PHONY: test\:build
test\:build:
gotestsum --format pkgname -- ./... -race -shuffle=on -run=nope
gotestsum --format pkgname -- ./... $(TEST_FLAGS) -run=nope

.PHONY: test\:ci
test\:ci:
DEFRA_BADGER_MEMORY=true DEFRA_BADGER_FILE=true $(MAKE) test:names

.PHONY: test\:go
test\:go:
go test ./... -race -shuffle=on
go test ./... $(TEST_FLAGS)

.PHONY: test\:names
test\:names:
gotestsum --format testname -- ./... -race -shuffle=on
gotestsum --format testname -- ./... $(TEST_FLAGS)

.PHONY: test\:verbose
test\:verbose:
gotestsum --format standard-verbose -- ./... -race -shuffle=on
gotestsum --format standard-verbose -- ./... $(TEST_FLAGS)

.PHONY: test\:watch
test\:watch:
Expand Down
Loading

0 comments on commit b04c423

Please sign in to comment.