Skip to content

Commit 408e064

Browse files
authored
chore: init trunk (#9273)
**Description** Initializing Trunk for formatting and linting across the repo **Checklist** - [X] Code compiles correctly and linting passes locally
1 parent ee60263 commit 408e064

File tree

298 files changed

+54093
-14284
lines changed

Some content is hidden

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

298 files changed

+54093
-14284
lines changed

.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+
* @hypermodeinc/database

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Please explain the changes you made here.
88
- [ ] For all _code_ changes, an entry added to the `CHANGELOG.md` file describing and linking to
99
this PR
1010
- [ ] Tests added for new functionality, or regression tests for bug fixes added as applicable
11-
- [ ] For public APIs, new features, etc., PR on [docs repo](https://github.com/dgraph-io/dgraph-docs)
12-
staged and linked here
11+
- [ ] For public APIs, new features, etc., PR on
12+
[docs repo](https://github.com/dgraph-io/dgraph-docs) staged and linked here
1313

1414
**Instructions**
1515

.github/actionlint.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
self-hosted-runner:
2+
# Labels of self-hosted runner in array of string
3+
labels:
4+
- warp-ubuntu-latest-arm64-4x
5+
- warp-ubuntu-latest-x64-4x
6+
- warp-ubuntu-latest-arm64-16x
7+
- warp-ubuntu-latest-x64-16x

.github/labeler.yml

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,82 @@
11
area/graphql:
2-
- changed-files:
3-
- any-glob-to-any-file: graphql/**
2+
- changed-files:
3+
- any-glob-to-any-file: graphql/**
44

55
area/documentation:
6-
- changed-files:
7-
- any-glob-to-any-file:
8-
- '**/*.md'
9-
- '**/*.pdf'
10-
- '**/*.tex'
6+
- changed-files:
7+
- any-glob-to-any-file:
8+
- "**/*.md"
9+
- "**/*.pdf"
10+
- "**/*.tex"
1111

1212
area/bulk-loader:
13-
- changed-files:
14-
- any-glob-to-any-file: dgraph/cmd/bulk/**
13+
- changed-files:
14+
- any-glob-to-any-file: dgraph/cmd/bulk/**
1515

1616
area/live-loader:
17-
- changed-files:
18-
- any-glob-to-any-file: dgraph/cmd/live/**
17+
- changed-files:
18+
- any-glob-to-any-file: dgraph/cmd/live/**
1919

2020
area/querylang:
21-
- changed-files:
22-
- any-glob-to-any-file: dql/**
21+
- changed-files:
22+
- any-glob-to-any-file: dql/**
2323

2424
area/integrations:
25-
- changed-files:
26-
- any-glob-to-any-file:
27-
- contrib/**
28-
- .github/**
29-
- .travis/**
25+
- changed-files:
26+
- any-glob-to-any-file:
27+
- contrib/**
28+
- .github/**
29+
- .travis/**
3030

3131
area/testing/jepsen:
32-
- changed-files:
33-
- any-glob-to-any-file: contrib/jepsen/**
32+
- changed-files:
33+
- any-glob-to-any-file: contrib/jepsen/**
3434

3535
area/enterprise:
36-
- changed-files:
37-
- any-glob-to-any-file: ee/**
36+
- changed-files:
37+
- any-glob-to-any-file: ee/**
3838

3939
area/enterprise/backup:
40-
- changed-files:
41-
- any-glob-to-any-file: ee/backup/**
40+
- changed-files:
41+
- any-glob-to-any-file: ee/backup/**
4242

4343
area/enterprise/acl:
44-
- changed-files:
45-
- any-glob-to-any-file: ee/acl/**
46-
44+
- changed-files:
45+
- any-glob-to-any-file: ee/acl/**
46+
4747
area/schema:
48-
- changed-files:
49-
- any-glob-to-any-file: schema/**
48+
- changed-files:
49+
- any-glob-to-any-file: schema/**
5050

5151
area/testing:
52-
- changed-files:
53-
- any-glob-to-any-file:
54-
- systest/**
55-
- '**/*test.go'
56-
- graphql/e2e/**
57-
- '**/*test.yaml'
58-
- t/**
59-
- testutil/**
60-
- tlstest/**
52+
- changed-files:
53+
- any-glob-to-any-file:
54+
- systest/**
55+
- "**/*test.go"
56+
- graphql/e2e/**
57+
- "**/*test.yaml"
58+
- t/**
59+
- testutil/**
60+
- tlstest/**
6161

6262
area/core:
63-
- changed-files:
64-
- any-glob-to-any-file:
65-
- protos/**
66-
- posting/**
67-
- raftwal/**
68-
- query/**
69-
- schema/**
70-
- protos/**
71-
- x/**
72-
- xidmap/**
73-
- worker/**
74-
- graphql/**
63+
- changed-files:
64+
- any-glob-to-any-file:
65+
- protos/**
66+
- posting/**
67+
- raftwal/**
68+
- query/**
69+
- schema/**
70+
- protos/**
71+
- x/**
72+
- xidmap/**
73+
- worker/**
74+
- graphql/**
7575

7676
go:
77-
- changed-files:
78-
- any-glob-to-any-file: '**/*.go'
77+
- changed-files:
78+
- any-glob-to-any-file: "**/*.go"
7979

8080
python:
81-
- changed-files:
82-
- any-glob-to-any-file: '**/*.py'
81+
- changed-files:
82+
- any-glob-to-any-file: "**/*.py"

.github/workflows/cd-dgraph.yml

Lines changed: 45 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: cd-dgraph
2+
23
on:
34
workflow_dispatch:
45
inputs:
@@ -13,14 +14,19 @@ on:
1314
custom-build:
1415
type: boolean
1516
default: false
16-
description: if checked, images will be pushed to dgraph-custom repo in Dockerhub
17+
description: if checked, images will be pushed to dgraph-custom repo in Dockerhub
18+
19+
permissions:
20+
contents: read
21+
1722
jobs:
1823
dgraph-build-amd64:
1924
runs-on: warp-ubuntu-latest-x64-16x
25+
timeout-minutes: 15
2026
steps:
2127
- uses: actions/checkout@v4
2228
with:
23-
ref: '${{ github.event.inputs.releasetag }}'
29+
ref: "${{ github.event.inputs.releasetag }}"
2430
- name: Set up Go
2531
uses: actions/setup-go@v5
2632
with:
@@ -116,10 +122,11 @@ jobs:
116122

117123
dgraph-build-arm64:
118124
runs-on: warp-ubuntu-latest-arm64-16x
125+
timeout-minutes: 15
119126
steps:
120127
- uses: actions/checkout@v4
121128
with:
122-
ref: '${{ github.event.inputs.releasetag }}'
129+
ref: "${{ github.event.inputs.releasetag }}"
123130
- name: Set up Go
124131
uses: actions/setup-go@v5
125132
with:
@@ -195,8 +202,9 @@ jobs:
195202
with:
196203
name: dgraph-docker-arm64
197204
path: dgraph-docker-arm64.tar
198-
- name: Make Dgraph Standalone Docker Image with Version
199-
#No need to build and push Standalone Image when its a custom build
205+
- name:
206+
Make Dgraph Standalone Docker Image with Version
207+
#No need to build and push Standalone Image when its a custom build
200208
if: inputs.custom-build == false
201209
run: |
202210
set -e
@@ -211,13 +219,15 @@ jobs:
211219
with:
212220
name: dgraph-standalone-arm64
213221
path: dgraph-standalone-arm64.tar
214-
dgraph-docker-image-and-manifests-push:
222+
223+
graph-docker-image-and-manifests-push:
215224
needs: [dgraph-build-amd64, dgraph-build-arm64]
216225
runs-on: warp-ubuntu-latest-x64-16x
226+
timeout-minutes: 15
217227
steps:
218228
- uses: actions/checkout@v4
219229
with:
220-
ref: '${{ github.event.inputs.releasetag }}'
230+
ref: "${{ github.event.inputs.releasetag }}"
221231
- name: Set Dgraph Release Version
222232
run: |
223233
#!/bin/bash
@@ -237,7 +247,7 @@ jobs:
237247
with:
238248
username: ${{ secrets.DOCKERHUB_USERNAME }}
239249
password: ${{ secrets.DOCKERHUB_PASSWORD_TOKEN }}
240-
250+
241251
# Download AMD64 Tar File
242252
- name: Download Dgraph AMD64 Tar
243253
uses: actions/download-artifact@v4
@@ -259,7 +269,7 @@ jobs:
259269
- name: Load ARM64 Docker Image
260270
run: |
261271
docker load -i dgraph-docker-arm64.tar
262-
272+
263273
# Download Standalone AMD64 Tar File
264274
- name: Download Standalone AMD64 Tar
265275
if: inputs.custom-build == false
@@ -272,7 +282,7 @@ jobs:
272282
if: inputs.custom-build == false
273283
run: |
274284
docker load -i dgraph-standalone-amd64.tar
275-
285+
276286
# Download Standalone ARM64 Tar File
277287
- name: Download Standalone ARM64 Tar
278288
if: inputs.custom-build == false
@@ -285,36 +295,33 @@ jobs:
285295
if: inputs.custom-build == false
286296
run: |
287297
docker load -i dgraph-standalone-arm64.tar
288-
289-
298+
290299
- name: Docker Manifest
291300
run: |
292-
if [ "${{ github.event.inputs.custom-build }}" == "true" ]; then
293-
#Push AMD and ARM images to dgraph-custom repo
294-
docker push dgraph/dgraph-custom:${{ env.DGRAPH_RELEASE_VERSION }}-amd64
295-
docker push dgraph/dgraph-custom:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
296-
docker manifest create dgraph/dgraph-custom:${{ env.DGRAPH_RELEASE_VERSION }} --amend dgraph/dgraph-custom:${{ env.DGRAPH_RELEASE_VERSION }}-amd64 --amend dgraph/dgraph-custom:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
297-
docker manifest push dgraph/dgraph-custom:${{ env.DGRAPH_RELEASE_VERSION }}
298-
else
299-
# Push standalone Images and manifest
300-
docker push dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}-amd64
301-
docker push dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
302-
docker manifest create dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }} --amend dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}-amd64 --amend dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
303-
docker manifest push dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}
304-
305-
# Push Dgraph Images and Manifest
306-
docker push dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-amd64
307-
docker push dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
308-
docker manifest create dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }} --amend dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-amd64 --amend dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
309-
docker manifest push dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}
301+
if [ "${{ github.event.inputs.custom-build }}" == "true" ]; then
302+
#Push AMD and ARM images to dgraph-custom repo
303+
docker push dgraph/dgraph-custom:${{ env.DGRAPH_RELEASE_VERSION }}-amd64
304+
docker push dgraph/dgraph-custom:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
305+
docker manifest create dgraph/dgraph-custom:${{ env.DGRAPH_RELEASE_VERSION }} --amend dgraph/dgraph-custom:${{ env.DGRAPH_RELEASE_VERSION }}-amd64 --amend dgraph/dgraph-custom:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
306+
docker manifest push dgraph/dgraph-custom:${{ env.DGRAPH_RELEASE_VERSION }}
307+
else
308+
# Push standalone Images and manifest
309+
docker push dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}-amd64
310+
docker push dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
311+
docker manifest create dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }} --amend dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}-amd64 --amend dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
312+
docker manifest push dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}
310313
311-
312-
if [ "${{ github.event.inputs.latest }}" == "true" ]; then
313-
docker manifest create dgraph/standalone:latest --amend dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}-amd64 --amend dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
314-
docker manifest create dgraph/dgraph:latest --amend dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-amd64 --amend dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
315-
docker manifest push dgraph/standalone:latest
316-
docker manifest push dgraph/dgraph:latest
317-
fi
318-
fi
314+
# Push Dgraph Images and Manifest
315+
docker push dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-amd64
316+
docker push dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
317+
docker manifest create dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }} --amend dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-amd64 --amend dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
318+
docker manifest push dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}
319319
320320
321+
if [ "${{ github.event.inputs.latest }}" == "true" ]; then
322+
docker manifest create dgraph/standalone:latest --amend dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}-amd64 --amend dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
323+
docker manifest create dgraph/dgraph:latest --amend dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-amd64 --amend dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
324+
docker manifest push dgraph/standalone:latest
325+
docker manifest push dgraph/dgraph:latest
326+
fi
327+
fi

.github/workflows/ci-aqua-security-trivy-tests.yml

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

0 commit comments

Comments
 (0)