Skip to content

Commit b0c4645

Browse files
Merge branch 'main' into harshil-goel/mutation-pipeline
2 parents 41d6445 + 247813c commit b0c4645

696 files changed

Lines changed: 20309 additions & 7723 deletions

File tree

Some content is hidden

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

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# CODEOWNERS info: https://help.github.com/en/articles/about-code-owners
22
# Owners are automatically requested for review for PRs that changes code
33
# that they own.
4-
* @hypermodeinc/database
4+
* @dgraph-io/maintainers

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
blank_issues_enabled: false
22
contact_links:
3-
- name: Dgraph Community Support
4-
url: https://discord.hypermode.com
3+
- name: Dgraph Community
4+
url: https://github.com/dgraph-io/dgraph/discussions
55
about: Please ask and answer questions here

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,25 @@ Please explain the changes you made here.
44

55
**Checklist**
66

7-
- [ ] Code compiles correctly and linting passes locally
8-
- [ ] For all _code_ changes, an entry added to the `CHANGELOG.md` file describing and linking to
9-
this PR
7+
- [ ] The PR title follows the
8+
[Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) syntax, leading
9+
with `fix:`, `feat:`, `chore:`, `ci:`, etc.
10+
- [ ] Code compiles correctly and linting (via trunk) passes locally
1011
- [ ] Tests added for new functionality, or regression tests for bug fixes added as applicable
11-
- [ ] For public APIs, new features, etc., PR on
12-
[docs repo](https://github.com/hypermodeinc/docs) staged and linked here
12+
- [ ] For public APIs, new features, etc., a PR on the
13+
[docs repo](https://github.com/dgraph-io/dgraph-docs) staged and linked here. This process can
14+
be simplified by going to the [public docs site](https://docs.dgraph.io/) and clicking the
15+
"Edit this page" button at the bottom of page(s) relevant to your changes. Ensure that you
16+
indicate in the PR that this is an **unreleased** feature so that it does not get merged into
17+
the main docs prematurely.
1318

1419
**Instructions**
1520

16-
- The PR title should follow the [Conventional Commits](https://www.conventionalcommits.org/)
17-
syntax, leading with `fix:`, `feat:`, `chore:`, `ci:`, etc.
21+
- The PR title should follow the
22+
[Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) syntax, leading
23+
with `fix:`, `feat:`, `chore:`, `ci:`, etc. Ensure any breaking changes are appropriately marked
24+
with a `!`. For instance, `feat(dql)!: Remove the foobar func` would indicate that this is a
25+
breaking change to the DQL syntax.
1826
- The description should briefly explain what the PR is about. In the case of a bugfix, describe or
1927
link to the bug.
2028
- In the checklist section, check the boxes in that are applicable, using `[x]` syntax.

.github/actionlint.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
self-hosted-runner:
2+
# Define custom labels for Blacksmith runners
3+
# Ubuntu 24.04 x64 runners
4+
labels:
5+
- blacksmith-2vcpu-ubuntu-2404
6+
- blacksmith-4vcpu-ubuntu-2404
7+
- blacksmith-8vcpu-ubuntu-2404
8+
- blacksmith-16vcpu-ubuntu-2404
9+
- blacksmith-32vcpu-ubuntu-2404
10+
# Ubuntu 24.04 ARM runners
11+
- blacksmith-2vcpu-ubuntu-2404-arm
12+
- blacksmith-4vcpu-ubuntu-2404-arm
13+
- blacksmith-8vcpu-ubuntu-2404-arm
14+
- blacksmith-16vcpu-ubuntu-2404-arm
15+
- blacksmith-32vcpu-ubuntu-2404-arm
16+
# Ubuntu 22.04 x64 runners
17+
- blacksmith-2vcpu-ubuntu-2204
18+
- blacksmith-4vcpu-ubuntu-2204
19+
- blacksmith-8vcpu-ubuntu-2204
20+
- blacksmith-16vcpu-ubuntu-2204
21+
- blacksmith-32vcpu-ubuntu-2204
22+
# Ubuntu 22.04 ARM runners
23+
- blacksmith-2vcpu-ubuntu-2204-arm
24+
- blacksmith-4vcpu-ubuntu-2204-arm
25+
- blacksmith-8vcpu-ubuntu-2204-arm
26+
- blacksmith-16vcpu-ubuntu-2204-arm
27+
- blacksmith-32vcpu-ubuntu-2204-arm

.github/actionlint.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/renovate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": ["github>hypermodeinc/renovate-config"],
3+
"extends": ["github>dgraph-io/renovate-config"],
44
"rangeStrategy": "widen",
55
"ignorePaths": ["contrib/**"],
66
"baseBranches": ["main", "release/v24.1"],

.github/workflows/cd-dgraph-nightly.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ permissions:
1010

1111
jobs:
1212
build:
13-
runs-on: warp-ubuntu-latest-x64-4x
13+
if: false # Temporarily disabled
14+
runs-on: blacksmith-4vcpu-ubuntu-2404
1415
steps:
15-
- uses: docker/[email protected]
16+
- name: Setup Blacksmith Builder
17+
uses: useblacksmith/setup-docker-builder@v1
1618

1719
- name: Log in to GitHub Container Registry
1820
uses: docker/[email protected]
@@ -22,8 +24,8 @@ jobs:
2224
password: ${{ secrets.GITHUB_TOKEN }}
2325

2426
- name: Build and push Docker image
25-
uses: docker/build-push-action@v6.18.0
27+
uses: useblacksmith/build-push-action@v2
2628
with:
2729
push: true
2830
platforms: linux/amd64,linux/arm64
29-
tags: ghcr.io/hypermodeinc/dgraph-standalone:nightly
31+
tags: ghcr.io/dgraph-io/dgraph-standalone:nightly

.github/workflows/cd-dgraph.yml

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@ on:
1717
description: if checked, images will be pushed to dgraph-custom repo in Dockerhub
1818

1919
permissions:
20-
contents: read
20+
contents: write
2121

2222
jobs:
2323
dgraph-build-amd64:
24-
runs-on: warp-ubuntu-latest-x64-4x
24+
runs-on: blacksmith-4vcpu-ubuntu-2404
2525
timeout-minutes: 15
2626
steps:
2727
- uses: actions/checkout@v5
2828
with:
2929
ref: "${{ github.event.inputs.releasetag }}"
3030
- name: Set up Go
31-
uses: actions/setup-go@v5
31+
uses: actions/setup-go@v6
3232
with:
3333
go-version-file: go.mod
3434
- name: Install protobuf-compiler
@@ -81,12 +81,6 @@ jobs:
8181
badger/badger-linux-amd64.tar.gz
8282
dgraph/dgraph-checksum-linux-amd64.sha256
8383
dgraph/dgraph-linux-amd64.tar.gz
84-
- name: Move Badger Binary into Linux Directory
85-
run: |
86-
tar -xzf badger/badger-linux-amd64.tar.gz --directory badger
87-
[ -d "linux" ] || mkdir linux
88-
# linux directory will be added to docker image in build step
89-
cp badger/badger-linux-amd64 linux/badger
9084
- name: Make Dgraph Docker Image
9185
run: |
9286
set -e
@@ -121,14 +115,14 @@ jobs:
121115
path: dgraph-standalone-amd64.tar
122116

123117
dgraph-build-arm64:
124-
runs-on: warp-ubuntu-latest-arm64-4x
118+
runs-on: blacksmith-4vcpu-ubuntu-2404-arm
125119
timeout-minutes: 15
126120
steps:
127121
- uses: actions/checkout@v5
128122
with:
129123
ref: "${{ github.event.inputs.releasetag }}"
130124
- name: Set up Go
131-
uses: actions/setup-go@v5
125+
uses: actions/setup-go@v6
132126
with:
133127
go-version-file: go.mod
134128
- name: Install protobuf-compiler
@@ -181,12 +175,6 @@ jobs:
181175
badger/badger-linux-arm64.tar.gz
182176
dgraph/dgraph-checksum-linux-arm64.sha256
183177
dgraph/dgraph-linux-arm64.tar.gz
184-
- name: Move Badger Binary into Linux Directory
185-
run: |
186-
tar -xzf badger/badger-linux-arm64.tar.gz --directory badger
187-
[ -d "linux" ] || mkdir linux
188-
# linux directory will be added to docker image in build step
189-
cp badger/badger-linux-arm64 linux/badger
190178
- name: Make Dgraph Docker Image
191179
run: |
192180
set -e
@@ -222,7 +210,7 @@ jobs:
222210

223211
graph-docker-image-and-manifests-push:
224212
needs: [dgraph-build-amd64, dgraph-build-arm64]
225-
runs-on: warp-ubuntu-latest-x64-4x
213+
runs-on: blacksmith-4vcpu-ubuntu-2404
226214
timeout-minutes: 15
227215
steps:
228216
- uses: actions/checkout@v5
@@ -260,6 +248,20 @@ jobs:
260248
with:
261249
name: dgraph-docker-arm64
262250

251+
# Download Dgraph Linux AMD64 Binary Artifacts
252+
- name: Download Dgraph Linux AMD64 Binary Artifacts
253+
uses: actions/download-artifact@v5
254+
with:
255+
name: dgraph-amd-release-artifacts
256+
path: dgraph-amd-release-artifacts
257+
258+
# Download Dgraph Linux ARM64 Binary Artifacts
259+
- name: Download Dgraph Linux ARM64 Binary Artifacts
260+
uses: actions/download-artifact@v5
261+
with:
262+
name: dgraph-arm-release-artifacts
263+
path: dgraph-arm-release-artifacts
264+
263265
# Load Dgraph AMD64 Image
264266
- name: Load AMD64 Docker Image
265267
run: |
@@ -325,3 +327,18 @@ jobs:
325327
docker manifest push dgraph/dgraph:latest
326328
fi
327329
fi
330+
331+
- name: Upload Assets to Release
332+
if: github.event.inputs.custom-build == 'false'
333+
uses: softprops/action-gh-release@v2
334+
with:
335+
tag_name: ${{ github.event.inputs.releasetag }}
336+
files: |
337+
dgraph-amd-release-artifacts/dgraph/dgraph-linux-amd64.tar.gz
338+
dgraph-amd-release-artifacts/dgraph/dgraph-checksum-linux-amd64.sha256
339+
dgraph-amd-release-artifacts/badger/badger-linux-amd64.tar.gz
340+
dgraph-amd-release-artifacts/badger/badger-checksum-linux-amd64.sha256
341+
dgraph-arm-release-artifacts/dgraph/dgraph-linux-arm64.tar.gz
342+
dgraph-arm-release-artifacts/dgraph/dgraph-checksum-linux-arm64.sha256
343+
dgraph-arm-release-artifacts/badger/badger-linux-arm64.tar.gz
344+
dgraph-arm-release-artifacts/badger/badger-checksum-linux-arm64.sha256
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Check File Changes
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
skip-extensions:
7+
description: Space-separated list of file extensions that should skip tests
8+
required: false
9+
type: string
10+
default: md mdc txt rst png jpg jpeg gif svg ico pdf
11+
outputs:
12+
should-skip:
13+
description: Whether the workflow should skip (only skippable files changed)
14+
value: ${{ jobs.check-changes.outputs.should-skip }}
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
check-changes:
21+
runs-on: ubuntu-latest
22+
outputs:
23+
should-skip: ${{ steps.check.outputs.should-skip }}
24+
steps:
25+
- uses: actions/checkout@v5
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Check if only skippable files changed
30+
id: check
31+
run: |
32+
# Use input parameter or default
33+
SKIP_EXTENSIONS="${{ inputs.skip-extensions }}"
34+
35+
if [ "${{ github.event_name }}" == "schedule" ] || [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
36+
echo "Triggered by schedule or manual dispatch, running full tests"
37+
echo "should-skip=false" >> $GITHUB_OUTPUT
38+
exit 0
39+
fi
40+
41+
# Get the list of changed files
42+
git fetch origin ${{ github.base_ref }}
43+
CHANGED_FILES=$(git diff --name-only origin/${{ github.base_ref }}...HEAD)
44+
45+
# Check if we have any changes
46+
if [ -z "$CHANGED_FILES" ]; then
47+
echo "No files changed, running tests"
48+
echo "should-skip=false" >> $GITHUB_OUTPUT
49+
exit 0
50+
fi
51+
52+
# Build regex pattern from extensions (e.g., \.(md|txt|png)$)
53+
PATTERN=$(echo "$SKIP_EXTENSIONS" | sed 's/ /|/g')
54+
REGEX="\.($PATTERN)$"
55+
56+
# Check if all changes match skippable extensions
57+
NON_SKIPPABLE_FILES=$(echo "$CHANGED_FILES" | grep -Ev "$REGEX" || true)
58+
59+
if [ -z "$NON_SKIPPABLE_FILES" ]; then
60+
echo "Only skippable files changed (extensions: $SKIP_EXTENSIONS), skipping tests"
61+
echo "should-skip=true" >> $GITHUB_OUTPUT
62+
else
63+
echo "Non-skippable files changed, running tests"
64+
echo "should-skip=false" >> $GITHUB_OUTPUT
65+
fi
66+
67+
skip-job:
68+
needs: check-changes
69+
if: needs.check-changes.outputs.should-skip == 'true'
70+
runs-on: ubuntu-latest
71+
steps:
72+
- name: Skip tests
73+
run: echo "Only documentation/assets changed, skipping tests"

.github/workflows/ci-dgraph-core-tests.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@ name: ci-dgraph-core-tests
22

33
on:
44
pull_request:
5-
paths:
6-
- "**/*.go"
7-
- "**/go.mod"
8-
- "**/*.yml"
9-
- "**/Dockerfile"
10-
- "**/Makefile"
115
types:
126
- opened
137
- reopened
@@ -23,40 +17,53 @@ permissions:
2317
contents: read
2418

2519
jobs:
20+
check-changes:
21+
uses: ./.github/workflows/check-changes.yml
22+
2623
dgraph-core-tests:
27-
if: github.event.pull_request.draft == false
28-
runs-on: warp-ubuntu-latest-x64-16x
24+
needs: check-changes
25+
if:
26+
github.event.pull_request.draft == false && needs.check-changes.outputs.should-skip != 'true'
27+
runs-on: blacksmith-8vcpu-ubuntu-2404
2928
timeout-minutes: 60
3029
steps:
3130
- uses: actions/checkout@v5
31+
3232
- name: Set up Go
33-
uses: actions/setup-go@v5
33+
uses: actions/setup-go@v6
3434
with:
3535
go-version-file: go.mod
36+
3637
- name: Install protobuf-compiler
3738
run: sudo apt update && sudo apt install -y protobuf-compiler
39+
3840
- name: Install gotestsum
3941
run: go install gotest.tools/gotestsum@latest
42+
4043
- name: Check protobuf
4144
run: |
4245
cd ./protos
4346
go mod tidy
4447
make regenerate
4548
git diff -b --exit-code -- .
49+
4650
- name: Make Linux Build and Docker Image
4751
run: make docker-image
52+
4853
- name: Build Test Binary
4954
run: |
5055
#!/bin/bash
5156
# build the test binary
5257
cd t; go build .
58+
5359
- name: Clean Up Environment
5460
run: |
5561
#!/bin/bash
5662
# clean cache
5763
go clean -testcache
5864
# clean up docker containers before test execution
5965
cd t; ./t -r
66+
6067
- name: Run Core Tests
6168
run: |
6269
#!/bin/bash
@@ -76,5 +83,5 @@ jobs:
7683
uses: trunk-io/analytics-uploader@v2
7784
with:
7885
junit-paths: ./test-results.xml
79-
org-slug: hypermode
86+
org-slug: dgraph-io
8087
token: ${{ secrets.TRUNK_TOKEN }}

0 commit comments

Comments
 (0)