Skip to content

Commit

Permalink
Merge branch 'main' into jassi/systest_21million
Browse files Browse the repository at this point in the history
  • Loading branch information
jbhamra1 committed Aug 20, 2023
2 parents 8d33400 + 4fc9cfd commit 519fc7e
Show file tree
Hide file tree
Showing 18 changed files with 93 additions and 63 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-aqua-security-trivy-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ on:
- main
- 'release/**'
schedule:
- cron: "0 * * * *"
- cron: "1 * * * *"
jobs:
build:
name: trivy-tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-dgraph-fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
- main
- 'release/**'
schedule:
- cron: "0 */8 * * *" # every 8hrs
- cron: "1 */8 * * *" # every 8hrs
jobs:
fuzz-test:
runs-on: ubuntu-20.04
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-dgraph-integration2-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
- main
- 'release/**'
schedule:
- cron: "0 */4 * * *" # every 4hrs
- cron: "1 */4 * * *" # every 4hrs
jobs:
dgraph-integration2-tests:
if: github.event.pull_request.draft == false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-dgraph-ldbc-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ on:
- main
- 'release/**'
schedule:
- cron: "0 0 * * *" # 1-run per day
- cron: "1 0 * * *" # 1-run per day
jobs:
dgraph-ldbc-tests:
if: github.event.pull_request.draft == false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-dgraph-load-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ on:
- main
- 'release/**'
schedule:
- cron: "0 0,6,12,18 * * *"
- cron: "1 0,6,12,18 * * *"
jobs:
dgraph-load-tests:
if: github.event.pull_request.draft == false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-dgraph-oss-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ on:
- main
- 'release/**'
schedule:
- cron: "0 0,6,12,18 * * *"
- cron: "1 0,6,12,18 * * *"
jobs:
dgraph-oss-build:
if: github.event.pull_request.draft == false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-dgraph-tests-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ on:
- main
- 'release/**'
schedule:
- cron: "0 0,6,12,18 * * *"
- cron: "1 0,6,12,18 * * *"
jobs:
dgraph-tests:
if: github.event.pull_request.draft == false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-dgraph-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ on:
- main
- 'release/**'
schedule:
- cron: "0 0,6,12,18 * * *"
- cron: "1 0,6,12,18 * * *"
jobs:
dgraph-tests:
if: github.event.pull_request.draft == false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: ci-dgraph-upgrade-fixed-versions-tests
on:
schedule:
- cron: "0 */12 * * *" # every 12hrs
- cron: "1 */12 * * *" # every 12hrs
jobs:
dgraph-upgrade-fixed-versions-tests:
runs-on: [self-hosted, x64]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-dgraph-upgrade-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
- main
- 'release/**'
schedule:
- cron: "0 */4 * * *" # every 4hrs
- cron: "1 */4 * * *" # every 4hrs
jobs:
dgraph-upgrade-tests:
if: github.event.pull_request.draft == false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-golang-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ on:
- main
- 'release/**'
schedule:
- cron: "0 */2 * * *" # every 2hrs
- cron: "1 */2 * * *" # every 2hrs
jobs:
golang-lint:
if: github.event.pull_request.draft == false
Expand Down
56 changes: 55 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,61 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project will adhere to [Semantic Versioning](https://semver.org) starting `v22.0.0`.

## [v23.1.0] - 2023-08-17
[v23.1.0]: https://github.com/dgraph-io/dgraph/compare/v23.0.1...v23.1.0

### Added

- **Core Dgraph**
- perf(query): Improve IntersectCompressedWithBin for UID Pack (#8941)
- feat(query): add feature flag normalize-compatibility-mode (#8845) (#8929)
- feat(alpha): support RDF response via http query request (#8004) (#8639)
- perf(query): speed up parsing of a huge query (#8942)
- fix(live): replace panic in live loader with errors (#7798) (#8944)

- **GraphQL**
- feat(graphql): This PR allows @id field in interface to be unique across all implementing types (#8876)

### Fixed

- **Core Dgraph**
- docs(zero): add comments in zero and clarify naming (#8945)
- fix(cdc): skip bad events in CDC (#8076)
- fix(bulk): enable running bulk loader with only gql schema (#8903)
- chore(badger): upgrade badger to v4.2.0 (#8932) (#8925)
- doc(restore): add docs for mutations in between incremental restores (#8908)
- chore: fix compilation on 32bit (#8895)
- chore(raft): add debug logs to print all transactions (#8890)
- chore(alpha): add logs for processing entries in applyCh (#8930)
- fix(acl): allow data deletion for non-reserved predicates (#8937)
- fix(alpha): convert numbers correctly in superflags (#7712) (#8943)
- chore(raft): better logging message for cleaning banned ns pred (#7886)

- **Security**
- sec(acl): convert x.Sensitive to string type for auth hash (#8931)
- chore(deps): bump google.golang.org/grpc from 1.52.0 to 1.53.0 (#8900)
- chore(deps): bump certifi from 2022.12.7 to 2023.7.22 in /contrib/config/marketplace/aws/tests (#8920)
- chore(deps): bump certifi from 2022.12.7 to 2023.7.22 in /contrib/embargo (#8921)
- chore(deps): bump pygments from 2.7.4 to 2.15.0 in /contrib/embargo (#8913)
- chore: upgrade bleve to v2.3.9 (#8948)

- **CI & Testing**
- chore: update cron job frequency to reset github notifications (#8956)
- test(upgrade): add v20.11 upgrade tests in query package (#8954)
- chore(contrib) - fixes for Vault (#7739)
- chore(build): make build codename configurable (#8951)
- fix(upgrade): look for version string in logs bottom up (#8926)
- fix(upgrade): check commit SHA to find running dgraph version (#8923)
- chore(upgrade): run upgrade tests for v23.0.1 (#8918)
- chore(upgrade): ensure we run right version of Dgraph (#8910)
- chore(upgrade): add workaround for multiple groot issue in export-import (#8897)
- test(upgrade): add upgrade tests for systest/license package (#8902)
- chore(upgrade): increase the upgrade job duration limit to 12h (#8907)
- chore(upgrade): increase the duration of the CI workflow (#8906)
- ci(upgrade): break down upgrade tests CI workflow (#8904)
- test(acl): add upgrade tests for ee/acl package (#8792)
- chore: update pull request template (#8899)

## [v23.0.1] - 2023-07-09
[v23.0.1]: https://github.com/dgraph-io/dgraph/compare/v23.0.0...v23.0.1

Expand All @@ -28,7 +83,6 @@ and this project will adhere to [Semantic Versioning](https://semver.org) starti
- chore(deps): bump github.com/docker/distribution from 2.8.0+incompatible to 2.8.2+incompatible (#8821)
- chore(deps): bump github.com/cloudflare/circl from 1.1.0 to 1.3.3 (#8822)


## [v23.0.0] - 2023-05-08
[v23.0.0]: https://github.com/dgraph-io/dgraph/compare/v22.0.2...v23.0.0

Expand Down
45 changes: 0 additions & 45 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,51 +171,6 @@ Run `go test` in the root folder.
ok github.com/dgraph-io/badger/table 0.478s
ok github.com/dgraph-io/badger/y 0.004s

## Doing a release

* Create a branch called `release/v<x.y.z>` from main. For e.g. `release/v1.0.5`. Look at the
diff between the last release and main and make sure that `CHANGELOG.md` has all the changes
that went in. Also make sure that any new features/changes are added to the docs under
`wiki/content` to the relevant section.
* Test any new features or bugfixes and then tag the final commit on the release branch like:

```sh
git tag -s -a v1.0.5
```

* Push the release branch and the tagged commit.

```sh
git push origin release/v<x.y.z>
git push origin v<x.y.z>
```

* Travis CI would run the `contrib/nightly/upload.sh` script when a new tag is pushed. This script
would create the binaries for `linux`, `darwin` and `windows` and also upload them to Github after
creating a new draft release. It would also publish a new docker image for the new release as well
as update the docker image with tag `latest` and upload them to docker hub.

* Checkout the `main` branch and merge the tag to it and push it.

```sh
git checkout main
git merge v<x.y.z>
git push origin main
```

* Once the draft release is published on Github by Travis, modify it to add the release notes. The release
notes would mostly be the same as changes for the current version in `CHANGELOG.md`. Finally publish the
release and announce to users on [Discourse](https://discuss.dgraph.io).

* To make sure that docs are added for the newly released version, add the version to
`wiki/scripts/build.sh`. It is also important for a release branch for the version to exist,
otherwise docs won't be built and published for it. SSH into the server serving the docs and pull
the latest version of `wiki/scripts/build.sh` from main branch and rerun it so that it can start
publishing docs for the latest version.

* If any bugs were fixed with regards to query language or in the server then it is a good idea to
deploy the latest version on `play.dgraph.io`.

## Contributing

### Guidelines
Expand Down
19 changes: 17 additions & 2 deletions dgraph/cmd/migrate/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@ type sqlRow struct {
tableInfo *sqlTable
}

// escapeColumnNames wraps columnNames with backticks in order to avoid creating
// invalid sql queries in cases where a table uses a reserved keyword as a
// column name
func escapeColumnNames(columnNames []string) []string {
var escapedColNames []string
for _, c := range columnNames {
escapedColNames = append(escapedColNames, fmt.Sprintf("`"+"%s"+"`", c))
}
return escapedColNames
}

// dumpSchema generates the Dgraph schema based on m.tableGuides
// and sends the schema to m.schemaWriter
func (m *dumpMeta) dumpSchema() error {
Expand Down Expand Up @@ -91,7 +102,9 @@ func (m *dumpMeta) dumpTable(table string) error {
tableGuide := m.tableGuides[table]
tableInfo := m.tableInfos[table]

query := fmt.Sprintf(`select %s from %s`, strings.Join(tableInfo.columnNames, ","), table)
escapedColNames := escapeColumnNames(tableInfo.columnNames)

query := fmt.Sprintf(`select %s from %s`, strings.Join(escapedColNames, ","), table)
rows, err := m.sqlPool.Query(query)
if err != nil {
return err
Expand Down Expand Up @@ -135,7 +148,9 @@ func (m *dumpMeta) dumpTableConstraints(table string) error {
tableGuide := m.tableGuides[table]
tableInfo := m.tableInfos[table]

query := fmt.Sprintf(`select %s from %s`, strings.Join(tableInfo.columnNames, ","), table)
escapedColNames := escapeColumnNames(tableInfo.columnNames)

query := fmt.Sprintf(`select %s from %s`, strings.Join(escapedColNames, ","), table)
rows, err := m.sqlPool.Query(query)
if err != nil {
return err
Expand Down
4 changes: 1 addition & 3 deletions dgraphtest/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,8 @@ type ClusterConfig struct {
volumes map[string]string
refillInterval time.Duration
uidLease int
// exposed port offset for grpc/http port for both alpha/zero
portOffset int
portOffset int // exposed port offset for grpc/http port for both alpha/zero
bulkOutDir string
lambdaURL string
featureFlags []string
detectRace bool
}
Expand Down
2 changes: 1 addition & 1 deletion query/mutation.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ func checkIfDeletingAclOperation(ctx context.Context, edges []*pb.DirectedEdge)
}
}
if isDeleteAclOperation {
return errors.Errorf("Reserved properties of guardians group and groot user cannot be deleted.")
return errors.Errorf("Reserved Properties of guardians group and groot user cannot be deleted.")
}
return nil
}
3 changes: 3 additions & 0 deletions telemetry/telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ type Telemetry struct {
NumGraphQLPM uint64 `json:",omitempty"`
NumGraphQL uint64 `json:",omitempty"`
EEFeaturesList []string `json:",omitempty"`
Codename string `json:",omitempty"`
}

const url = "https://ping.dgraph.io/3.0/projects/5b809dfac9e77c0001783ad0/events"
Expand All @@ -65,6 +66,7 @@ func NewZero(ms *pb.MembershipState) *Telemetry {
Version: x.Version(),
OS: runtime.GOOS,
Arch: runtime.GOARCH,
Codename: x.Codename(),
}
for _, g := range ms.GetGroups() {
t.NumAlphas += len(g.GetMembers())
Expand All @@ -86,6 +88,7 @@ func NewAlpha(ms *pb.MembershipState) *Telemetry {
OS: runtime.GOOS,
Arch: runtime.GOARCH,
EEFeaturesList: worker.GetEEFeaturesList(),
Codename: x.Codename(),
}
}

Expand Down
5 changes: 5 additions & 0 deletions x/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ func Version() string {
return dgraphVersion
}

// Codename returns a string containing the dgraphCodename.
func Codename() string {
return dgraphCodename
}

// pattern for dev version = min. 7 hex digits of commit-hash.
var versionRe *regexp.Regexp = regexp.MustCompile(`-g[[:xdigit:]]{7,}`)

Expand Down

0 comments on commit 519fc7e

Please sign in to comment.