forked from sourcenetwork/defradb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request sourcenetwork#1895 from sourcenetwork/release/0.7.0
Release v0.7.0
- Loading branch information
Showing
246 changed files
with
17,420 additions
and
8,107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
# 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: Combine Bot PRs Workflow | ||
|
||
# Triggered manually with the following configuration options to combine dependabot PRs. | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
|
||
branchPrefix: | ||
description: 'Branch prefix to find combinable PRs based on, eg: dependabot/npm_and_yarn/playground' | ||
required: true | ||
default: 'dependabot' | ||
|
||
mustBeGreen: | ||
description: 'Only combine PRs that are green (status is success). Set to false if repo does not run checks' | ||
type: boolean | ||
required: true | ||
default: true | ||
|
||
combineBranchName: | ||
description: 'Name of the branch to combine PRs into' | ||
required: true | ||
default: 'combined-bot-prs-branch' | ||
|
||
ignoreLabel: | ||
description: 'Exclude PRs with this label' | ||
required: true | ||
default: 'nocombine' | ||
|
||
jobs: | ||
combine-bot-prs: | ||
name: Combine bot prs job | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/github-script@v6 | ||
|
||
id: create-combined-pr | ||
|
||
name: Create combined pr | ||
|
||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const pulls = await github.paginate('GET /repos/:owner/:repo/pulls', { | ||
owner: context.repo.owner, | ||
repo: context.repo.repo | ||
}); | ||
let branchesAndPRStrings = []; | ||
let baseBranch = null; | ||
let baseBranchSHA = null; | ||
for (const pull of pulls) { | ||
const branch = pull['head']['ref']; | ||
console.log('Pull for branch: ' + branch); | ||
if (branch.startsWith('${{ github.event.inputs.branchPrefix }}')) { | ||
console.log('Branch matched prefix: ' + branch); | ||
let statusOK = true; | ||
if(${{ github.event.inputs.mustBeGreen }}) { | ||
console.log('Checking green status: ' + branch); | ||
const stateQuery = `query($owner: String!, $repo: String!, $pull_number: Int!) { | ||
repository(owner: $owner, name: $repo) { | ||
pullRequest(number:$pull_number) { | ||
commits(last: 1) { | ||
nodes { | ||
commit { | ||
statusCheckRollup { | ||
state | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}` | ||
const vars = { | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
pull_number: pull['number'] | ||
}; | ||
const result = await github.graphql(stateQuery, vars); | ||
const [{ commit }] = result.repository.pullRequest.commits.nodes; | ||
const state = commit.statusCheckRollup.state | ||
console.log('Validating status: ' + state); | ||
if(state != 'SUCCESS') { | ||
console.log('Discarding ' + branch + ' with status ' + state); | ||
statusOK = false; | ||
} | ||
} | ||
console.log('Checking labels: ' + branch); | ||
const labels = pull['labels']; | ||
for(const label of labels) { | ||
const labelName = label['name']; | ||
console.log('Checking label: ' + labelName); | ||
if(labelName == '${{ github.event.inputs.ignoreLabel }}') { | ||
console.log('Discarding ' + branch + ' with label ' + labelName); | ||
statusOK = false; | ||
} | ||
} | ||
if (statusOK) { | ||
console.log('Adding branch to array: ' + branch); | ||
const prString = '#' + pull['number'] + ' ' + pull['title']; | ||
branchesAndPRStrings.push({ branch, prString }); | ||
baseBranch = pull['base']['ref']; | ||
baseBranchSHA = pull['base']['sha']; | ||
} | ||
} | ||
} | ||
if (branchesAndPRStrings.length == 0) { | ||
core.setFailed('No PRs/branches matched criteria'); | ||
return; | ||
} | ||
try { | ||
await github.rest.git.createRef({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
ref: 'refs/heads/' + '${{ github.event.inputs.combineBranchName }}', | ||
sha: baseBranchSHA | ||
}); | ||
} catch (error) { | ||
console.log(error); | ||
core.setFailed('Failed to create combined branch - maybe a branch by that name already exists?'); | ||
return; | ||
} | ||
let combinedPRs = []; | ||
let mergeFailedPRs = []; | ||
for(const { branch, prString } of branchesAndPRStrings) { | ||
try { | ||
await github.rest.repos.merge({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
base: '${{ github.event.inputs.combineBranchName }}', | ||
head: branch, | ||
}); | ||
console.log('Merged branch ' + branch); | ||
combinedPRs.push(prString); | ||
} catch (error) { | ||
console.log('Failed to merge branch ' + branch); | ||
mergeFailedPRs.push(prString); | ||
} | ||
} | ||
console.log('Creating combined PR'); | ||
const combinedPRsString = combinedPRs.join('\n'); | ||
let body = '✅ This PR was created by the Combine PRs action by combining the following PRs:\n' + combinedPRsString; | ||
if(mergeFailedPRs.length > 0) { | ||
const mergeFailedPRsString = mergeFailedPRs.join('\n'); | ||
body += '\n\n⚠️ The following PRs were left out due to merge conflicts:\n' + mergeFailedPRsString | ||
} | ||
await github.rest.pulls.create({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
title: 'bot: Combined PRs', | ||
head: '${{ github.event.inputs.combineBranchName }}', | ||
base: baseBranch, | ||
body: body | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# 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: Run Collection Named Mutations Tests Workflow | ||
|
||
# This workflow runs the test suite with any supporting mutation test actions | ||
# running their mutations via their corresponding named [Collection] call. | ||
# | ||
# For example, CreateDoc will call [Collection.Create], and | ||
# UpdateDoc will call [Collection.Update]. | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
- develop | ||
|
||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
branches: | ||
- master | ||
- develop | ||
|
||
jobs: | ||
test-collection-named-mutations: | ||
name: Test Collection Named Mutations 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.20" | ||
check-latest: true | ||
|
||
- name: Build dependencies | ||
run: | | ||
make deps:modules | ||
make deps:test | ||
- name: Run tests with Collection Named mutations | ||
run: make test:ci-col-named-mutations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Copyright 2022 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: Run GQL Mutations Tests Workflow | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
- develop | ||
|
||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
branches: | ||
- master | ||
- develop | ||
|
||
jobs: | ||
test-gql-mutations: | ||
name: Test GQL mutations 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.20" | ||
check-latest: true | ||
|
||
- name: Build dependencies | ||
run: | | ||
make deps:modules | ||
make deps:test | ||
- name: Run tests with gql mutations | ||
run: make test:ci-gql-mutations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,75 @@ | ||
<a name="v0.7.0"></a> | ||
## [v0.7.0](https://github.com/sourcenetwork/defradb/compare/v0.6.0...v0.7.0) | ||
|
||
> 2023-09-18 | ||
DefraDB v0.7 is a major pre-production release. Until the stable version 1.0 is reached, the SemVer minor patch number will denote notable releases, which will give the project freedom to experiment and explore potentially breaking changes. | ||
|
||
This release has focused on robustness, testing, and schema management. Some highlight new features include notable expansions to the expressiveness of schema migrations. | ||
|
||
To get a full outline of the changes, we invite you to review the official changelog below. This release does include a Breaking Change to existing v0.5.x databases. If you need help migrating an existing deployment, reach out at [[email protected]](mailto:[email protected]) or join our Discord at https://discord.source.network/. | ||
|
||
### Features | ||
|
||
* Allow field indexing by name in PatchSchema ([#1810](https://github.com/sourcenetwork/defradb/issues/1810)) | ||
* Auto-create relation id fields via PatchSchema ([#1807](https://github.com/sourcenetwork/defradb/issues/1807)) | ||
* Support PatchSchema relational field kind substitution ([#1777](https://github.com/sourcenetwork/defradb/issues/1777)) | ||
* Add support for adding of relational fields ([#1766](https://github.com/sourcenetwork/defradb/issues/1766)) | ||
* Enable downgrading of documents via Lens inverses ([#1721](https://github.com/sourcenetwork/defradb/issues/1721)) | ||
|
||
### Fixes | ||
|
||
* Correctly handle serialisation of nil field values ([#1872](https://github.com/sourcenetwork/defradb/issues/1872)) | ||
* Compound filter operators with relations ([#1855](https://github.com/sourcenetwork/defradb/issues/1855)) | ||
* Only update updated fields via update requests ([#1817](https://github.com/sourcenetwork/defradb/issues/1817)) | ||
* Error when saving a deleted document ([#1806](https://github.com/sourcenetwork/defradb/issues/1806)) | ||
* Prevent multiple docs from being linked in one one ([#1790](https://github.com/sourcenetwork/defradb/issues/1790)) | ||
* Handle the querying of secondary relation id fields ([#1768](https://github.com/sourcenetwork/defradb/issues/1768)) | ||
* Improve the way migrations handle transactions ([#1737](https://github.com/sourcenetwork/defradb/issues/1737)) | ||
|
||
### Tooling | ||
|
||
* Add Akash deployment configuration ([#1736](https://github.com/sourcenetwork/defradb/issues/1736)) | ||
|
||
### Refactoring | ||
|
||
* HTTP client interface ([#1776](https://github.com/sourcenetwork/defradb/issues/1776)) | ||
* Simplify fetcher interface ([#1746](https://github.com/sourcenetwork/defradb/issues/1746)) | ||
|
||
### Testing | ||
|
||
* Convert and move out of place explain tests ([#1878](https://github.com/sourcenetwork/defradb/issues/1878)) | ||
* Update mutation tests to make use of mutation system ([#1853](https://github.com/sourcenetwork/defradb/issues/1853)) | ||
* Test top level agg. with compound relational filter ([#1870](https://github.com/sourcenetwork/defradb/issues/1870)) | ||
* Skip unsupported mutation types at test level ([#1850](https://github.com/sourcenetwork/defradb/issues/1850)) | ||
* Extend mutation tests with col.Update and Create ([#1838](https://github.com/sourcenetwork/defradb/issues/1838)) | ||
* Add tests for multiple one-one joins ([#1793](https://github.com/sourcenetwork/defradb/issues/1793)) | ||
|
||
### Chore | ||
|
||
* Update Badger version to v4 ([#1740](https://github.com/sourcenetwork/defradb/issues/1740)) | ||
* Update go-libp2p to 0.29.2 ([#1780](https://github.com/sourcenetwork/defradb/issues/1780)) | ||
* Bump golangci-lint to v1.54 ([#1881](https://github.com/sourcenetwork/defradb/issues/1881)) | ||
* Bump go.opentelemetry.io/otel/metric from 1.17.0 to 1.18.0 ([#1890](https://github.com/sourcenetwork/defradb/issues/1890)) | ||
* Bump [@tanstack](https://github.com/tanstack)/react-query from 4.35.0 to 4.35.3 in /playground ([#1876](https://github.com/sourcenetwork/defradb/issues/1876)) | ||
* Bump [@typescript](https://github.com/typescript)-eslint/eslint-plugin from 6.5.0 to 6.7.0 in /playground ([#1874](https://github.com/sourcenetwork/defradb/issues/1874)) | ||
* Bump [@typescript](https://github.com/typescript)-eslint/parser from 6.6.0 to 6.7.0 in /playground ([#1875](https://github.com/sourcenetwork/defradb/issues/1875)) | ||
* Combined PRs 2023-09-14 ([#1873](https://github.com/sourcenetwork/defradb/issues/1873)) | ||
* Bump [@typescript](https://github.com/typescript)-eslint/eslint-plugin from 6.4.0 to 6.5.0 in /playground ([#1827](https://github.com/sourcenetwork/defradb/issues/1827)) | ||
* Bump go.opentelemetry.io/otel/sdk/metric from 0.39.0 to 0.40.0 ([#1829](https://github.com/sourcenetwork/defradb/issues/1829)) | ||
* Bump github.com/ipfs/go-block-format from 0.1.2 to 0.2.0 ([#1819](https://github.com/sourcenetwork/defradb/issues/1819)) | ||
* Combined PRs ([#1826](https://github.com/sourcenetwork/defradb/issues/1826)) | ||
* Bump [@typescript](https://github.com/typescript)-eslint/parser from 6.4.0 to 6.4.1 in /playground ([#1804](https://github.com/sourcenetwork/defradb/issues/1804)) | ||
* Combined PRs ([#1803](https://github.com/sourcenetwork/defradb/issues/1803)) | ||
* Combined PRs ([#1791](https://github.com/sourcenetwork/defradb/issues/1791)) | ||
* Combined PRs ([#1778](https://github.com/sourcenetwork/defradb/issues/1778)) | ||
* Bump dependencies ([#1761](https://github.com/sourcenetwork/defradb/issues/1761)) | ||
* Bump vite from 4.3.9 to 4.4.8 in /playground ([#1748](https://github.com/sourcenetwork/defradb/issues/1748)) | ||
* Bump graphiql from 3.0.4 to 3.0.5 in /playground ([#1730](https://github.com/sourcenetwork/defradb/issues/1730)) | ||
* Combined bumps of dependencies under /playground ([#1744](https://github.com/sourcenetwork/defradb/issues/1744)) | ||
* Bump github.com/ipfs/boxo from 0.10.2 to 0.11.0 ([#1726](https://github.com/sourcenetwork/defradb/issues/1726)) | ||
* Bump github.com/libp2p/go-libp2p-kad-dht from 0.24.2 to 0.24.3 ([#1724](https://github.com/sourcenetwork/defradb/issues/1724)) | ||
* Bump google.golang.org/grpc from 1.56.2 to 1.57.0 ([#1725](https://github.com/sourcenetwork/defradb/issues/1725)) | ||
|
||
<a name="v0.6.0"></a> | ||
## [v0.6.0](https://github.com/sourcenetwork/defradb/compare/v0.5.1...v0.6.0) | ||
|
Oops, something went wrong.