Skip to content

Commit

Permalink
chore: init trunk (#9273)
Browse files Browse the repository at this point in the history
**Description**

Initializing Trunk for formatting and linting across the repo

**Checklist**

- [X] Code compiles correctly and linting passes locally
  • Loading branch information
ryanfoxtyler authored Jan 15, 2025
1 parent ee60263 commit 408e064
Show file tree
Hide file tree
Showing 298 changed files with 54,093 additions and 14,284 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CODEOWNERS info: https://help.github.com/en/articles/about-code-owners
# Owners are automatically requested for review for PRs that changes code
# that they own.
* @hypermodeinc/database
* @hypermodeinc/database
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Please explain the changes you made here.
- [ ] For all _code_ changes, an entry added to the `CHANGELOG.md` file describing and linking to
this PR
- [ ] Tests added for new functionality, or regression tests for bug fixes added as applicable
- [ ] For public APIs, new features, etc., PR on [docs repo](https://github.com/dgraph-io/dgraph-docs)
staged and linked here
- [ ] For public APIs, new features, etc., PR on
[docs repo](https://github.com/dgraph-io/dgraph-docs) staged and linked here

**Instructions**

Expand Down
7 changes: 7 additions & 0 deletions .github/actionlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
self-hosted-runner:
# Labels of self-hosted runner in array of string
labels:
- warp-ubuntu-latest-arm64-4x
- warp-ubuntu-latest-x64-4x
- warp-ubuntu-latest-arm64-16x
- warp-ubuntu-latest-x64-16x
108 changes: 54 additions & 54 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,82 +1,82 @@
area/graphql:
- changed-files:
- any-glob-to-any-file: graphql/**
- changed-files:
- any-glob-to-any-file: graphql/**

area/documentation:
- changed-files:
- any-glob-to-any-file:
- '**/*.md'
- '**/*.pdf'
- '**/*.tex'
- changed-files:
- any-glob-to-any-file:
- "**/*.md"
- "**/*.pdf"
- "**/*.tex"

area/bulk-loader:
- changed-files:
- any-glob-to-any-file: dgraph/cmd/bulk/**
- changed-files:
- any-glob-to-any-file: dgraph/cmd/bulk/**

area/live-loader:
- changed-files:
- any-glob-to-any-file: dgraph/cmd/live/**
- changed-files:
- any-glob-to-any-file: dgraph/cmd/live/**

area/querylang:
- changed-files:
- any-glob-to-any-file: dql/**
- changed-files:
- any-glob-to-any-file: dql/**

area/integrations:
- changed-files:
- any-glob-to-any-file:
- contrib/**
- .github/**
- .travis/**
- changed-files:
- any-glob-to-any-file:
- contrib/**
- .github/**
- .travis/**

area/testing/jepsen:
- changed-files:
- any-glob-to-any-file: contrib/jepsen/**
- changed-files:
- any-glob-to-any-file: contrib/jepsen/**

area/enterprise:
- changed-files:
- any-glob-to-any-file: ee/**
- changed-files:
- any-glob-to-any-file: ee/**

area/enterprise/backup:
- changed-files:
- any-glob-to-any-file: ee/backup/**
- changed-files:
- any-glob-to-any-file: ee/backup/**

area/enterprise/acl:
- changed-files:
- any-glob-to-any-file: ee/acl/**
- changed-files:
- any-glob-to-any-file: ee/acl/**

area/schema:
- changed-files:
- any-glob-to-any-file: schema/**
- changed-files:
- any-glob-to-any-file: schema/**

area/testing:
- changed-files:
- any-glob-to-any-file:
- systest/**
- '**/*test.go'
- graphql/e2e/**
- '**/*test.yaml'
- t/**
- testutil/**
- tlstest/**
- changed-files:
- any-glob-to-any-file:
- systest/**
- "**/*test.go"
- graphql/e2e/**
- "**/*test.yaml"
- t/**
- testutil/**
- tlstest/**

area/core:
- changed-files:
- any-glob-to-any-file:
- protos/**
- posting/**
- raftwal/**
- query/**
- schema/**
- protos/**
- x/**
- xidmap/**
- worker/**
- graphql/**
- changed-files:
- any-glob-to-any-file:
- protos/**
- posting/**
- raftwal/**
- query/**
- schema/**
- protos/**
- x/**
- xidmap/**
- worker/**
- graphql/**

go:
- changed-files:
- any-glob-to-any-file: '**/*.go'
- changed-files:
- any-glob-to-any-file: "**/*.go"

python:
- changed-files:
- any-glob-to-any-file: '**/*.py'
- changed-files:
- any-glob-to-any-file: "**/*.py"
83 changes: 45 additions & 38 deletions .github/workflows/cd-dgraph.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: cd-dgraph

on:
workflow_dispatch:
inputs:
Expand All @@ -13,14 +14,19 @@ on:
custom-build:
type: boolean
default: false
description: if checked, images will be pushed to dgraph-custom repo in Dockerhub
description: if checked, images will be pushed to dgraph-custom repo in Dockerhub

permissions:
contents: read

jobs:
dgraph-build-amd64:
runs-on: warp-ubuntu-latest-x64-16x
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
ref: '${{ github.event.inputs.releasetag }}'
ref: "${{ github.event.inputs.releasetag }}"
- name: Set up Go
uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -116,10 +122,11 @@ jobs:

dgraph-build-arm64:
runs-on: warp-ubuntu-latest-arm64-16x
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
ref: '${{ github.event.inputs.releasetag }}'
ref: "${{ github.event.inputs.releasetag }}"
- name: Set up Go
uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -195,8 +202,9 @@ jobs:
with:
name: dgraph-docker-arm64
path: dgraph-docker-arm64.tar
- name: Make Dgraph Standalone Docker Image with Version
#No need to build and push Standalone Image when its a custom build
- name:
Make Dgraph Standalone Docker Image with Version
#No need to build and push Standalone Image when its a custom build
if: inputs.custom-build == false
run: |
set -e
Expand All @@ -211,13 +219,15 @@ jobs:
with:
name: dgraph-standalone-arm64
path: dgraph-standalone-arm64.tar
dgraph-docker-image-and-manifests-push:

graph-docker-image-and-manifests-push:
needs: [dgraph-build-amd64, dgraph-build-arm64]
runs-on: warp-ubuntu-latest-x64-16x
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
ref: '${{ github.event.inputs.releasetag }}'
ref: "${{ github.event.inputs.releasetag }}"
- name: Set Dgraph Release Version
run: |
#!/bin/bash
Expand All @@ -237,7 +247,7 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD_TOKEN }}

# Download AMD64 Tar File
- name: Download Dgraph AMD64 Tar
uses: actions/download-artifact@v4
Expand All @@ -259,7 +269,7 @@ jobs:
- name: Load ARM64 Docker Image
run: |
docker load -i dgraph-docker-arm64.tar
# Download Standalone AMD64 Tar File
- name: Download Standalone AMD64 Tar
if: inputs.custom-build == false
Expand All @@ -272,7 +282,7 @@ jobs:
if: inputs.custom-build == false
run: |
docker load -i dgraph-standalone-amd64.tar
# Download Standalone ARM64 Tar File
- name: Download Standalone ARM64 Tar
if: inputs.custom-build == false
Expand All @@ -285,36 +295,33 @@ jobs:
if: inputs.custom-build == false
run: |
docker load -i dgraph-standalone-arm64.tar

- name: Docker Manifest
run: |
if [ "${{ github.event.inputs.custom-build }}" == "true" ]; then
#Push AMD and ARM images to dgraph-custom repo
docker push dgraph/dgraph-custom:${{ env.DGRAPH_RELEASE_VERSION }}-amd64
docker push dgraph/dgraph-custom:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
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
docker manifest push dgraph/dgraph-custom:${{ env.DGRAPH_RELEASE_VERSION }}
else
# Push standalone Images and manifest
docker push dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}-amd64
docker push dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
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
docker manifest push dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}
# Push Dgraph Images and Manifest
docker push dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-amd64
docker push dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
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
docker manifest push dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}
if [ "${{ github.event.inputs.custom-build }}" == "true" ]; then
#Push AMD and ARM images to dgraph-custom repo
docker push dgraph/dgraph-custom:${{ env.DGRAPH_RELEASE_VERSION }}-amd64
docker push dgraph/dgraph-custom:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
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
docker manifest push dgraph/dgraph-custom:${{ env.DGRAPH_RELEASE_VERSION }}
else
# Push standalone Images and manifest
docker push dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}-amd64
docker push dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
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
docker manifest push dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}
if [ "${{ github.event.inputs.latest }}" == "true" ]; then
docker manifest create dgraph/standalone:latest --amend dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}-amd64 --amend dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
docker manifest create dgraph/dgraph:latest --amend dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-amd64 --amend dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
docker manifest push dgraph/standalone:latest
docker manifest push dgraph/dgraph:latest
fi
fi
# Push Dgraph Images and Manifest
docker push dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-amd64
docker push dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
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
docker manifest push dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}
if [ "${{ github.event.inputs.latest }}" == "true" ]; then
docker manifest create dgraph/standalone:latest --amend dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}-amd64 --amend dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
docker manifest create dgraph/dgraph:latest --amend dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-amd64 --amend dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-arm64
docker manifest push dgraph/standalone:latest
docker manifest push dgraph/dgraph:latest
fi
fi
45 changes: 0 additions & 45 deletions .github/workflows/ci-aqua-security-trivy-tests.yml

This file was deleted.

Loading

0 comments on commit 408e064

Please sign in to comment.