From 4d9ec68aa3d42155fdfefbbfc99519d12e87c807 Mon Sep 17 00:00:00 2001 From: nighttrek Date: Tue, 15 Jul 2025 17:40:17 -0700 Subject: [PATCH 1/3] testing rules --- .clinerules/testing-preferences.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .clinerules/testing-preferences.md diff --git a/.clinerules/testing-preferences.md b/.clinerules/testing-preferences.md new file mode 100644 index 00000000000..5b164f97ccb --- /dev/null +++ b/.clinerules/testing-preferences.md @@ -0,0 +1,24 @@ +## Brief overview + +These guidelines are specific to testing preferences for Go projects, particularly for the dgraph +repository, focusing on direct Go testing rather than Docker-based make targets. + +## Testing approach + +- Use `go test -v` with specific package paths instead of the make system for running tests +- Run tests on individual packages like `go test -v ./algo/...`, `go test -v ./chunker/...`, + `go test -v ./codec/...` +- Avoid `make test` which requires Docker and can have dependency issues +- Direct Go testing works reliably without external dependencies like Docker containers + +## Development workflow + +- When asked to run tests, start with unit tests using `go test -v` on specific packages +- Only resort to Docker-based integration tests if specifically requested +- Test individual components first to quickly identify issues without Docker overhead + +## Environment considerations + +- Assume Docker may not be available or running on the development machine +- Prefer lightweight unit tests that don't require external services +- Use Go's built-in testing framework directly rather than complex build systems From 7ca429b0f1a2bc2890e75bf69186f839157bca51 Mon Sep 17 00:00:00 2001 From: nighttrek Date: Thu, 14 Aug 2025 19:53:30 -0700 Subject: [PATCH 2/3] added clarity rules --- .clinerules/code-clarity-rules.md | 193 ++++++++++++++++++++++++++++++ 1 file changed, 193 insertions(+) create mode 100644 .clinerules/code-clarity-rules.md diff --git a/.clinerules/code-clarity-rules.md b/.clinerules/code-clarity-rules.md new file mode 100644 index 00000000000..ea64d13afb8 --- /dev/null +++ b/.clinerules/code-clarity-rules.md @@ -0,0 +1,193 @@ +# Code Clarity and Readability Rules + +## Overview + +All code, especially test code, must prioritize clarity and readability over brevity. Code is read +far more often than it's written, so optimize for the reader's understanding. + +## Core Principles + +### 1. Clarity Over Cleverness + +- Write code that a junior developer can understand in 6 months +- If there's a choice between clever/short code and clear/longer code, always choose clear +- Avoid one-liners that pack multiple operations unless they're trivial + +### 2. Test Code Readability Standards + +Test code has even higher readability requirements than production code: + +- **Descriptive Variable Names**: Use full, descriptive names instead of abbreviations + + - Bad: `n`, `i`, `l`, `r` + - Good: `heapSize`, `parentIndex`, `leftChildIndex`, `rightChildIndex` + +- **Clear Function Names**: Test helper functions should describe exactly what they do + + - Bad: `check()`, `validate()` + - Good: `validateHeapPropertyMaintained()`, `assertNodeHasCorrectChildren()` + +- **Logical Separation**: Break complex operations into clearly named steps + - Use intermediate variables to make calculations explicit + - Separate setup, action, and assertion phases + +### 3. Comment Requirements + +**Mandatory Comments For:** + +- Complex algorithms or mathematical operations +- Non-obvious business logic +- Performance-critical sections +- Workarounds or bug fixes +- Any code that made you think "hmm, how does this work?" + +**Comment Structure:** + +```go +// Why: Explain the purpose/reasoning +// What: Describe what the code does (if not obvious) +// How: Explain the approach for complex logic +``` + +### 4. Function Structure Standards + +**Test Helper Functions Must:** + +- Have a single, clear responsibility +- Include parameter validation with meaningful error messages +- Use descriptive error messages that help debug failures +- Separate concerns into logical blocks with whitespace + +**Example of Good Structure:** + +```go +// validateHeapPropertyMaintained verifies that the min-heap property is satisfied: +// each parent node's value must be <= both of its children's values +func validateHeapPropertyMaintained(t *testing.T, heap *uint64Heap) { + heapSize := len(*heap) + + // Check each parent node against its children + for parentIndex := 0; parentIndex < heapSize; parentIndex++ { + leftChildIndex := 2*parentIndex + 1 + rightChildIndex := 2*parentIndex + 2 + + // Validate left child relationship + if leftChildIndex < heapSize { + parentValue := (*heap)[parentIndex].val + leftChildValue := (*heap)[leftChildIndex].val + + require.True(t, parentValue <= leftChildValue, + "Min-heap property violated: parent node %d has value %d but left child node %d has smaller value %d", + parentIndex, parentValue, leftChildIndex, leftChildValue) + } + + // Validate right child relationship + if rightChildIndex < heapSize { + parentValue := (*heap)[parentIndex].val + rightChildValue := (*heap)[rightChildIndex].val + + require.True(t, parentValue <= rightChildValue, + "Min-heap property violated: parent node %d has value %d but right child node %d has smaller value %d", + parentIndex, parentValue, rightChildIndex, rightChildValue) + } + } +} +``` + +### 5. Error Message Standards + +Error messages in tests must be: + +- **Specific**: Include actual values, indices, and context +- **Actionable**: Help the reader understand what went wrong +- **Consistent**: Use the same format across similar assertions + +**Bad Error Messages:** + +- "Heap property violated" +- "Values don't match" +- "Invalid state" + +**Good Error Messages:** + +- "Min-heap property violated: parent node 5 has value 100 but left child node 11 has smaller value + 50" +- "Expected user ID 12345 but found 67890 in database record" +- "Queue should be empty after processing all items, but contains 3 remaining items: [item1, item2, + item3]" + +### 6. Code Organization in Tests + +**Structure test functions as:** + +1. **Setup**: Prepare test data and dependencies +2. **Action**: Execute the code under test +3. **Assertion**: Verify the results +4. **Cleanup**: Clean up resources (if needed) + +Use whitespace and comments to separate these phases clearly. + +### 7. Enforcement + +**Before writing any code, ask:** + +- Would a new team member understand this in 30 seconds? +- Are the variable names self-documenting? +- Do the error messages help me debug problems? +- Is the algorithm or approach obvious from reading the code? + +**If the answer to any is "no", refactor for clarity.** + +## Examples to Avoid + +### Don't Do This: + +```go +// Confusing variable names, unclear purpose, poor error messages +func check(t *testing.T, h *uint64Heap) { + for i := 0; i < len(*h); i++ { + if l := 2*i+1; l < len(*h) && (*h)[i].val > (*h)[l].val { + require.Fail(t, "bad heap") + } + if r := 2*i+2; r < len(*h) && (*h)[i].val > (*h)[r].val { + require.Fail(t, "bad heap") + } + } +} +``` + +### Do This Instead: + +```go +// Clear purpose, descriptive names, helpful error messages +func validateMinHeapProperty(t *testing.T, heap *uint64Heap) { + // A min-heap satisfies: parent <= both children for all nodes + heapSize := len(*heap) + + for parentIndex := 0; parentIndex < heapSize; parentIndex++ { + leftChildIndex := 2*parentIndex + 1 + rightChildIndex := 2*parentIndex + 2 + + // Check left child if it exists + if leftChildIndex < heapSize { + assertParentNotGreaterThanChild(t, heap, parentIndex, leftChildIndex, "left") + } + + // Check right child if it exists + if rightChildIndex < heapSize { + assertParentNotGreaterThanChild(t, heap, parentIndex, rightChildIndex, "right") + } + } +} + +func assertParentNotGreaterThanChild(t *testing.T, heap *uint64Heap, parentIndex, childIndex int, childType string) { + parentValue := (*heap)[parentIndex].val + childValue := (*heap)[childIndex].val + + require.True(t, parentValue <= childValue, + "Min-heap property violated: parent node %d (value=%d) is greater than %s child node %d (value=%d)", + parentIndex, parentValue, childType, childIndex, childValue) +} +``` + +This approach makes the code self-documenting and much easier to debug when tests fail. From e58b441f65441da075b4761e7d5283ff60029130 Mon Sep 17 00:00:00 2001 From: nighttrek Date: Thu, 11 Sep 2025 14:39:27 -0700 Subject: [PATCH 3/3] stuff --- .github/CODEOWNERS | 4 - .github/actionlint.yml | 7 - .github/labeler.yml | 82 ----- .github/workflows/cd-dgraph-nightly.yml | 29 -- .github/workflows/cd-dgraph.yml | 327 ------------------ .github/workflows/ci-dgraph-core-tests.yml | 80 ----- .../ci-dgraph-core-upgrade-tests.yml | 58 ---- .github/workflows/ci-dgraph-fuzz.yml | 39 --- .../ci-dgraph-integration2-tests.yml | 55 --- .github/workflows/ci-dgraph-jepsen-tests.yml | 53 --- .github/workflows/ci-dgraph-ldbc-tests.yml | 61 ---- .github/workflows/ci-dgraph-load-tests.yml | 62 ---- .github/workflows/ci-dgraph-oss-build.yml | 44 --- .../ci-dgraph-system-upgrade-tests.yml | 59 ---- .github/workflows/ci-dgraph-systest-tests.yml | 80 ----- .github/workflows/ci-dgraph-tests-arm64.yml | 70 ---- ...ci-dgraph-upgrade-fixed-versions-tests.yml | 42 --- .github/workflows/ci-dgraph-vector-tests.yml | 80 ----- .github/workflows/codeql.yml | 56 --- .github/workflows/labeler.yml | 26 -- 20 files changed, 1314 deletions(-) delete mode 100644 .github/CODEOWNERS delete mode 100644 .github/actionlint.yml delete mode 100644 .github/labeler.yml delete mode 100644 .github/workflows/cd-dgraph-nightly.yml delete mode 100644 .github/workflows/cd-dgraph.yml delete mode 100644 .github/workflows/ci-dgraph-core-tests.yml delete mode 100644 .github/workflows/ci-dgraph-core-upgrade-tests.yml delete mode 100644 .github/workflows/ci-dgraph-fuzz.yml delete mode 100644 .github/workflows/ci-dgraph-integration2-tests.yml delete mode 100644 .github/workflows/ci-dgraph-jepsen-tests.yml delete mode 100644 .github/workflows/ci-dgraph-ldbc-tests.yml delete mode 100644 .github/workflows/ci-dgraph-load-tests.yml delete mode 100644 .github/workflows/ci-dgraph-oss-build.yml delete mode 100644 .github/workflows/ci-dgraph-system-upgrade-tests.yml delete mode 100644 .github/workflows/ci-dgraph-systest-tests.yml delete mode 100644 .github/workflows/ci-dgraph-tests-arm64.yml delete mode 100644 .github/workflows/ci-dgraph-upgrade-fixed-versions-tests.yml delete mode 100644 .github/workflows/ci-dgraph-vector-tests.yml delete mode 100644 .github/workflows/codeql.yml delete mode 100644 .github/workflows/labeler.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 908cced9a26..00000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,4 +0,0 @@ -# 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 \ No newline at end of file diff --git a/.github/actionlint.yml b/.github/actionlint.yml deleted file mode 100644 index 03454752e8b..00000000000 --- a/.github/actionlint.yml +++ /dev/null @@ -1,7 +0,0 @@ -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 diff --git a/.github/labeler.yml b/.github/labeler.yml deleted file mode 100644 index 5d26187207e..00000000000 --- a/.github/labeler.yml +++ /dev/null @@ -1,82 +0,0 @@ -area/graphql: - - changed-files: - - any-glob-to-any-file: graphql/** - -area/documentation: - - changed-files: - - any-glob-to-any-file: - - "**/*.md" - - "**/*.pdf" - - "**/*.tex" - -area/bulk-loader: - - changed-files: - - any-glob-to-any-file: dgraph/cmd/bulk/** - -area/live-loader: - - changed-files: - - any-glob-to-any-file: dgraph/cmd/live/** - -area/querylang: - - changed-files: - - any-glob-to-any-file: dql/** - -area/integrations: - - changed-files: - - any-glob-to-any-file: - - contrib/** - - .github/** - - .travis/** - -area/testing/jepsen: - - changed-files: - - any-glob-to-any-file: contrib/jepsen/** - -area/enterprise: - - changed-files: - - any-glob-to-any-file: ee/** - -area/enterprise/backup: - - changed-files: - - any-glob-to-any-file: ee/backup/** - -area/enterprise/acl: - - changed-files: - - any-glob-to-any-file: ee/acl/** - -area/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/** - -area/core: - - 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" - -python: - - changed-files: - - any-glob-to-any-file: "**/*.py" diff --git a/.github/workflows/cd-dgraph-nightly.yml b/.github/workflows/cd-dgraph-nightly.yml deleted file mode 100644 index 3e3026e67d0..00000000000 --- a/.github/workflows/cd-dgraph-nightly.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Push Docker Image - -on: - schedule: - - cron: 0 0 * * * - -permissions: - contents: read - packages: write - -jobs: - build: - runs-on: warp-ubuntu-latest-x64-4x - steps: - - uses: docker/setup-buildx-action@v3.10.0 - - - name: Log in to GitHub Container Registry - uses: docker/login-action@v3.3.0 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push Docker image - uses: docker/build-push-action@v6.15.0 - with: - push: true - platforms: linux/amd64,linux/arm64 - tags: ghcr.io/hypermodeinc/dgraph-standalone:nightly diff --git a/.github/workflows/cd-dgraph.yml b/.github/workflows/cd-dgraph.yml deleted file mode 100644 index 5e10aec1933..00000000000 --- a/.github/workflows/cd-dgraph.yml +++ /dev/null @@ -1,327 +0,0 @@ -name: cd-dgraph - -on: - workflow_dispatch: - inputs: - latest: - type: boolean - default: false - description: release latest tag docker-images on dockerhub - releasetag: - description: releasetag - required: true - type: string - custom-build: - type: boolean - default: false - 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-4x - timeout-minutes: 15 - steps: - - uses: actions/checkout@v4 - with: - ref: "${{ github.event.inputs.releasetag }}" - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - name: Install protobuf-compiler - run: sudo apt update && sudo apt install -y protobuf-compiler - - name: Check protobuf - run: | - cd ./protos - go mod tidy - make regenerate - git diff --exit-code -- . - - name: Set Badger Release Version - run: | - #!/bin/bash - BADGER_RELEASE_VERSION=$(cat go.mod | grep -i "github.com/dgraph-io/badger" | awk '{print $2}') - echo "setting badger version "$BADGER_RELEASE_VERSION - echo "BADGER_RELEASE_VERSION=$BADGER_RELEASE_VERSION" >> $GITHUB_ENV - - name: Download Badger Artifacts - run: | - #!/bin/bash - mkdir badger - cd badger - wget https://github.com/dgraph-io/badger/releases/download/${{ env.BADGER_RELEASE_VERSION }}/badger-checksum-linux-amd64.sha256 - wget https://github.com/dgraph-io/badger/releases/download/${{ env.BADGER_RELEASE_VERSION }}/badger-linux-amd64.tar.gz - - name: Set Dgraph Release Version - run: | - #!/bin/bash - GIT_TAG_NAME='${{ github.event.inputs.releasetag }}' - if [[ "$GIT_TAG_NAME" == "v"* ]]; - then - echo "this is a release branch" - else - echo "this is NOT a release branch" - exit 1 - fi - DGRAPH_RELEASE_VERSION='${{ github.event.inputs.releasetag }}' - echo "making a new release for dgraph "$DGRAPH_RELEASE_VERSION - echo "DGRAPH_RELEASE_VERSION=$DGRAPH_RELEASE_VERSION" >> $GITHUB_ENV - - name: Make Dgraph Linux Build - run: make dgraph DGRAPH_VERSION=${{ env.DGRAPH_RELEASE_VERSION }} - - name: Generate SHA for Dgraph Linux Build - run: cd dgraph && sha256sum dgraph | cut -c-64 > dgraph-checksum-linux-amd64.sha256 - - name: Tar Archive for Dgraph Linux Build - run: cd dgraph && tar -zcvf dgraph-linux-amd64.tar.gz dgraph - - name: Upload Build Artifacts - uses: actions/upload-artifact@v4 - with: - name: dgraph-amd-release-artifacts - path: | - badger/badger-checksum-linux-amd64.sha256 - badger/badger-linux-amd64.tar.gz - dgraph/dgraph-checksum-linux-amd64.sha256 - dgraph/dgraph-linux-amd64.tar.gz - - name: Move Badger Binary into Linux Directory - run: | - tar -xzf badger/badger-linux-amd64.tar.gz --directory badger - [ -d "linux" ] || mkdir linux - # linux directory will be added to docker image in build step - cp badger/badger-linux-amd64 linux/badger - - name: Make Dgraph Docker Image - run: | - set -e - make docker-image DGRAPH_VERSION=${{ env.DGRAPH_RELEASE_VERSION }}-amd64 - [[ "${{ inputs.latest }}" = true ]] && docker tag dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-amd64 dgraph/dgraph:latest-amd64 || true - [[ "${{ inputs.custom-build }}" = true ]] && docker tag dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-amd64 dgraph/dgraph-custom:${{ env.DGRAPH_RELEASE_VERSION }}-amd64 || true - #Save all tagged images into a single tar file - docker save -o dgraph-docker-amd64.tar \ - dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-amd64 \ - $( [[ "${{ inputs.latest }}" = true ]] && echo "dgraph/dgraph:latest-amd64" ) \ - $( [[ "${{ inputs.custom-build }}" = true ]] && echo "dgraph/dgraph-custom:${{ env.DGRAPH_RELEASE_VERSION }}-amd64" ) - - name: Upload AMD64 Docker Image - uses: actions/upload-artifact@v4 - with: - name: dgraph-docker-amd64 - path: dgraph-docker-amd64.tar - - 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 - make docker-image-standalone DGRAPH_VERSION=${{ env.DGRAPH_RELEASE_VERSION }}-amd64 - [[ "${{ inputs.latest }}" = true ]] && docker tag dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}-amd64 dgraph/standalone:latest-amd64 || true - docker save -o dgraph-standalone-amd64.tar \ - dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}-amd64 \ - $( [[ "${{ inputs.latest }}" = true ]] && echo "dgraph/standalone:latest-amd64" ) - - name: Upload AMD64 Standalone Image - if: inputs.custom-build == false - uses: actions/upload-artifact@v4 - with: - name: dgraph-standalone-amd64 - path: dgraph-standalone-amd64.tar - - dgraph-build-arm64: - runs-on: warp-ubuntu-latest-arm64-4x - timeout-minutes: 15 - steps: - - uses: actions/checkout@v4 - with: - ref: "${{ github.event.inputs.releasetag }}" - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - name: Install protobuf-compiler - run: sudo apt update && sudo apt install -y protobuf-compiler - - name: Check protobuf - run: | - cd ./protos - go mod tidy - make regenerate - git diff --exit-code -- . - - name: Set Badger Release Version - run: | - #!/bin/bash - BADGER_RELEASE_VERSION=$(cat go.mod | grep -i "github.com/dgraph-io/badger" | awk '{print $2}') - echo "setting badger version "$BADGER_RELEASE_VERSION - echo "BADGER_RELEASE_VERSION=$BADGER_RELEASE_VERSION" >> $GITHUB_ENV - - name: Download Badger Artifacts - run: | - #!/bin/bash - mkdir badger - cd badger - wget https://github.com/dgraph-io/badger/releases/download/${{ env.BADGER_RELEASE_VERSION }}/badger-checksum-linux-arm64.sha256 - wget https://github.com/dgraph-io/badger/releases/download/${{ env.BADGER_RELEASE_VERSION }}/badger-linux-arm64.tar.gz - - name: Set Dgraph Release Version - run: | - #!/bin/bash - GIT_TAG_NAME='${{ github.event.inputs.releasetag }}' - if [[ "$GIT_TAG_NAME" == "v"* ]]; - then - echo "this is a release branch" - else - echo "this is NOT a release branch" - exit 1 - fi - DGRAPH_RELEASE_VERSION='${{ github.event.inputs.releasetag }}' - echo "making a new release for dgraph "$DGRAPH_RELEASE_VERSION - echo "DGRAPH_RELEASE_VERSION=$DGRAPH_RELEASE_VERSION" >> $GITHUB_ENV - - name: Make Dgraph Linux Build - run: make dgraph DGRAPH_VERSION=${{ env.DGRAPH_RELEASE_VERSION }} - - name: Generate SHA for Dgraph Linux Build - run: cd dgraph && sha256sum dgraph | cut -c-64 > dgraph-checksum-linux-arm64.sha256 - - name: Tar Archive for Dgraph Linux Build - run: cd dgraph && tar -zcvf dgraph-linux-arm64.tar.gz dgraph - - name: Upload Build Artifacts - uses: actions/upload-artifact@v4 - with: - name: dgraph-arm-release-artifacts - path: | - badger/badger-checksum-linux-arm64.sha256 - badger/badger-linux-arm64.tar.gz - dgraph/dgraph-checksum-linux-arm64.sha256 - dgraph/dgraph-linux-arm64.tar.gz - - name: Move Badger Binary into Linux Directory - run: | - tar -xzf badger/badger-linux-arm64.tar.gz --directory badger - [ -d "linux" ] || mkdir linux - # linux directory will be added to docker image in build step - cp badger/badger-linux-arm64 linux/badger - - name: Make Dgraph Docker Image - run: | - set -e - make docker-image DGRAPH_VERSION=${{ env.DGRAPH_RELEASE_VERSION }}-arm64 - [[ "${{ inputs.latest }}" = true ]] && docker tag dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-arm64 dgraph/dgraph:latest-arm64 || true - [[ "${{ inputs.custom-build }}" = true ]] && docker tag dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-arm64 dgraph/dgraph-custom:${{ env.DGRAPH_RELEASE_VERSION }}-arm64 || true - docker save -o dgraph-docker-arm64.tar \ - dgraph/dgraph:${{ env.DGRAPH_RELEASE_VERSION }}-arm64 \ - $( [[ "${{ inputs.latest }}" = true ]] && echo "dgraph/dgraph:latest-arm64" ) \ - $( [[ "${{ inputs.custom-build }}" = true ]] && echo "dgraph/dgraph-custom:${{ env.DGRAPH_RELEASE_VERSION }}-arm64" ) - - name: Upload ARM64 Docker Image - uses: actions/upload-artifact@v4 - 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 - if: inputs.custom-build == false - run: | - set -e - make docker-image-standalone DGRAPH_VERSION=${{ env.DGRAPH_RELEASE_VERSION }}-arm64 - [[ "${{ inputs.latest }}" = true ]] && docker tag dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}-arm64 dgraph/standalone:latest-arm64 || true - docker save -o dgraph-standalone-arm64.tar \ - dgraph/standalone:${{ env.DGRAPH_RELEASE_VERSION }}-arm64 \ - $( [[ "${{ inputs.latest }}" = true ]] && echo "dgraph/standalone:latest-arm64" ) - - name: Upload ARM64 Standalone Image - if: inputs.custom-build == false - uses: actions/upload-artifact@v4 - with: - name: dgraph-standalone-arm64 - path: dgraph-standalone-arm64.tar - - graph-docker-image-and-manifests-push: - needs: [dgraph-build-amd64, dgraph-build-arm64] - runs-on: warp-ubuntu-latest-x64-4x - timeout-minutes: 15 - steps: - - uses: actions/checkout@v4 - with: - ref: "${{ github.event.inputs.releasetag }}" - - name: Set Dgraph Release Version - run: | - #!/bin/bash - GIT_TAG_NAME='${{ github.event.inputs.releasetag }}' - if [[ "$GIT_TAG_NAME" == "v"* ]]; - then - echo "this is a release branch" - else - echo "this is NOT a release branch" - exit 1 - fi - DGRAPH_RELEASE_VERSION='${{ github.event.inputs.releasetag }}' - echo "making a new release for dgraph "$DGRAPH_RELEASE_VERSION - echo "DGRAPH_RELEASE_VERSION=$DGRAPH_RELEASE_VERSION" >> $GITHUB_ENV - - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD_TOKEN }} - - # Download AMD64 Tar File - - name: Download Dgraph AMD64 Tar - uses: actions/download-artifact@v4 - with: - name: dgraph-docker-amd64 - - # Download Dgraph ARM64 Tar File - - name: Download ARM64 Tar - uses: actions/download-artifact@v4 - with: - name: dgraph-docker-arm64 - - # Load Dgraph AMD64 Image - - name: Load AMD64 Docker Image - run: | - docker load -i dgraph-docker-amd64.tar - - # Load Dgraph ARM64 Image - - 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 - uses: actions/download-artifact@v4 - with: - name: dgraph-standalone-amd64 - - # Load Standalone AMD64 Image - - name: Load Standalone AMD64 Docker Image - 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 - uses: actions/download-artifact@v4 - with: - name: dgraph-standalone-arm64 - - # Load Standalone ARM64 Image - - name: Load Standalone ARM64 Docker Image - 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.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 diff --git a/.github/workflows/ci-dgraph-core-tests.yml b/.github/workflows/ci-dgraph-core-tests.yml deleted file mode 100644 index 06f12eaeaf1..00000000000 --- a/.github/workflows/ci-dgraph-core-tests.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: ci-dgraph-core-tests - -on: - pull_request: - paths: - - "**/*.go" - - "**/go.mod" - - "**/*.yml" - - "**/Dockerfile" - - "**/Makefile" - types: - - opened - - reopened - - synchronize - - ready_for_review - branches: - - main - - release/** - schedule: - - cron: 0 0 * * * # 1 run per day - -permissions: - contents: read - -jobs: - dgraph-core-tests: - if: github.event.pull_request.draft == false - runs-on: warp-ubuntu-latest-x64-4x - timeout-minutes: 30 - steps: - - uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - name: Install protobuf-compiler - run: sudo apt update && sudo apt install -y protobuf-compiler - - name: Install gotestsum - run: go install gotest.tools/gotestsum@latest - - name: Check protobuf - run: | - cd ./protos - go mod tidy - make regenerate - git diff -b --exit-code -- . - - name: Make Linux Build and Docker Image - run: make docker-image - - name: Build Test Binary - run: | - #!/bin/bash - # build the test binary - cd t; go build . - - name: Clean Up Environment - run: | - #!/bin/bash - # clean cache - go clean -testcache - # clean up docker containers before test execution - cd t; ./t -r - - name: Run Core Tests - run: | - #!/bin/bash - # go env settings - export GOPATH=~/go - # move the binary - cp dgraph/dgraph ~/go/bin/dgraph - # run the unit and core tests - cd t; ./t --suite=core - # clean up docker containers after test execution - ./t -r - # sleep - sleep 5 - - name: Upload Test Results - if: always() # Upload the results even if the tests fail - continue-on-error: true # don't fail this job if the upload fails - uses: trunk-io/analytics-uploader@main - with: - junit-paths: ./test-results.xml - org-slug: hypermode - token: ${{ secrets.TRUNK_TOKEN }} diff --git a/.github/workflows/ci-dgraph-core-upgrade-tests.yml b/.github/workflows/ci-dgraph-core-upgrade-tests.yml deleted file mode 100644 index 6cb2464143f..00000000000 --- a/.github/workflows/ci-dgraph-core-upgrade-tests.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: ci-dgraph-core-upgrade-tests - -on: - pull_request: - paths: - - "**/*.go" - - "**/go.mod" - - "**/*.yml" - - "**/Dockerfile" - - "**/Makefile" - types: - - opened - - reopened - - synchronize - - ready_for_review - branches: - - main - - release/** - -permissions: - contents: read - -jobs: - dgraph-upgrade-tests: - if: github.event.pull_request.draft == false - runs-on: warp-ubuntu-latest-x64-4x - timeout-minutes: 60 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - name: Make Linux Build and Docker Image - run: make docker-image - - name: Clean Up Environment - run: | - #!/bin/bash - # clean cache - go clean -testcache - - name: Run Core Upgrade Tests - run: | - #!/bin/bash - # go env settings - export GOPATH=~/go - # move the binary - cp dgraph/dgraph ~/go/bin/dgraph - # run the core upgrade tests - go test -v -timeout=120m -failfast -tags=upgrade \ - github.com/hypermodeinc/dgraph/v24/ee/acl \ - github.com/hypermodeinc/dgraph/v24/worker \ - github.com/hypermodeinc/dgraph/v24/query - # clean up docker containers after test execution - go clean -testcache - # sleep - sleep 5 diff --git a/.github/workflows/ci-dgraph-fuzz.yml b/.github/workflows/ci-dgraph-fuzz.yml deleted file mode 100644 index fcd0c98ec2f..00000000000 --- a/.github/workflows/ci-dgraph-fuzz.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: ci-dgraph-fuzz - -on: - pull_request: - paths: - - "**/*.go" - - "**/go.mod" - - "**/*.yml" - - "**/Dockerfile" - - "**/Makefile" - types: - - opened - - reopened - - synchronize - - ready_for_review - branches: - - main - - release/** - -permissions: - contents: read - -jobs: - fuzz-test: - if: github.event.pull_request.draft == false - runs-on: warp-ubuntu-latest-x64-4x - timeout-minutes: 10 - steps: - - uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - name: Run fuzz tests - run: | - #!/bin/bash - # go env settings - export GOPATH=~/go - go test -v ./dql -fuzz="Fuzz" -fuzztime="300s" -fuzzminimizetime="120s" diff --git a/.github/workflows/ci-dgraph-integration2-tests.yml b/.github/workflows/ci-dgraph-integration2-tests.yml deleted file mode 100644 index d87c39f509e..00000000000 --- a/.github/workflows/ci-dgraph-integration2-tests.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: ci-dgraph-integration2-tests - -on: - pull_request: - paths: - - "**/*.go" - - "**/go.mod" - - "**/*.yml" - - "**/Dockerfile" - - "**/Makefile" - types: - - opened - - reopened - - synchronize - - ready_for_review - branches: - - main - - release/** - -permissions: - contents: read - -jobs: - dgraph-integration2-tests: - if: github.event.pull_request.draft == false - runs-on: warp-ubuntu-latest-x64-4x - timeout-minutes: 15 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - name: Make Linux Build and Docker Image - run: make docker-image - - name: Clean Up Environment - run: | - #!/bin/bash - # clean cache - go clean -testcache - - name: Run Integration2 Tests - run: | - #!/bin/bash - # go env settings - export GOPATH=~/go - # move the binary - cp dgraph/dgraph ~/go/bin/dgraph - # run the tests - go test -v -timeout=30m -failfast -tags=integration2 ./... - # clean up docker containers after test execution - go clean -testcache - # sleep - sleep 5 diff --git a/.github/workflows/ci-dgraph-jepsen-tests.yml b/.github/workflows/ci-dgraph-jepsen-tests.yml deleted file mode 100644 index 8cde69a3282..00000000000 --- a/.github/workflows/ci-dgraph-jepsen-tests.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: ci-dgraph-jepsen-tests - -on: - schedule: - - cron: 0 4 * * 3,6 # run twice weekly - -env: - GOPATH: /home/ubuntu/go - -permissions: - contents: read - -jobs: - dgraph-jepsen-tests: - runs-on: warp-ubuntu-latest-x64-4x - timeout-minutes: 60 - steps: - - name: Checkout dgraph repo - uses: actions/checkout@v4 - - name: Checkout jepsen repo - uses: actions/checkout@v4 - with: - repository: hypermodeinc/jepsen - path: jepsen - ref: master - - name: Set jepsen root - run: | - #!/bin/bash - cd jepsen - JEPSEN_ROOT=$(pwd) - echo "JEPSEN_ROOT=$JEPSEN_ROOT" >> $GITHUB_ENV - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - name: Make dgraph linux build - run: make install - - name: Start jepsen cluster - run: | - #!/bin/bash - cd contrib/jepsen - go build -v . - ./jepsen --jepsen-root ${{ env.JEPSEN_ROOT }} --up-only - - name: Run jepsen tests - run: | - #!/bin/bash - cd contrib/jepsen - ./jepsen --jepsen-root ${{ env.JEPSEN_ROOT }} --jaeger="" --web=false --test-all -l 300 - - name: Stop jepsen cluster - run: | - #!/bin/bash - cd contrib/jepsen - ./jepsen --jepsen-root ${{ env.JEPSEN_ROOT }} --down-only diff --git a/.github/workflows/ci-dgraph-ldbc-tests.yml b/.github/workflows/ci-dgraph-ldbc-tests.yml deleted file mode 100644 index 18fbd3398c9..00000000000 --- a/.github/workflows/ci-dgraph-ldbc-tests.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: ci-dgraph-ldbc-tests - -on: - pull_request: - paths: - - "**/*.go" - - "**/go.mod" - - "**/*.yml" - - "**/Dockerfile" - - "**/Makefile" - types: - - opened - - reopened - - synchronize - - ready_for_review - branches: - - main - - release/** - -permissions: - contents: read - -jobs: - dgraph-ldbc-tests: - if: github.event.pull_request.draft == false - runs-on: warp-ubuntu-latest-x64-4x - timeout-minutes: 10 - steps: - - name: Checkout Dgraph - uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - name: Make Linux Build and Docker Image - run: make docker-image - - name: Install gotestsum - run: go install gotest.tools/gotestsum@latest - - name: Build Test Binary - run: | - #!/bin/bash - # build the test binary - cd t; go build . - - name: Clean Up Environment - run: | - #!/bin/bash - # clean cache - go clean -testcache - # clean up docker containers before test execution - cd t; ./t -r - - name: Run LDBC Tests - run: | - #!/bin/bash - # go env settings - export GOPATH=~/go - # move the binary - cp dgraph/dgraph ~/go/bin/dgraph - # run the ldbc tests - cd t; ./t --suite=ldbc - # clean up docker containers after test execution - ./t -r diff --git a/.github/workflows/ci-dgraph-load-tests.yml b/.github/workflows/ci-dgraph-load-tests.yml deleted file mode 100644 index 2b8b26a08cc..00000000000 --- a/.github/workflows/ci-dgraph-load-tests.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: ci-dgraph-load-tests - -on: - pull_request: - paths: - - "**/*.go" - - "**/go.mod" - - "**/*.yml" - - "**/Dockerfile" - - "**/Makefile" - types: - - opened - - reopened - - synchronize - - ready_for_review - branches: - - main - - release/** - -permissions: - contents: read - -jobs: - dgraph-load-tests: - if: github.event.pull_request.draft == false - runs-on: warp-ubuntu-latest-x64-4x - timeout-minutes: 30 - steps: - - uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - name: Make Linux Build and Docker Image - run: make docker-image # this internally builds dgraph binary - - name: Install gotestsum - run: go install gotest.tools/gotestsum@latest - - name: Build Test Binary - run: | - #!/bin/bash - # build the test binary - cd t; go build . - - name: Clean Up Environment - run: | - #!/bin/bash - # clean cache - go clean -testcache - # clean up docker containers before test execution - cd t; ./t -r - - name: Run Load Tests - run: | - #!/bin/bash - # go env settings - export GOPATH=~/go - # move the binary - cp dgraph/dgraph ~/go/bin/dgraph - # run the load tests - cd t; ./t --suite=load - # clean up docker containers after test execution - ./t -r - # sleep - sleep 5 diff --git a/.github/workflows/ci-dgraph-oss-build.yml b/.github/workflows/ci-dgraph-oss-build.yml deleted file mode 100644 index 93904d1385b..00000000000 --- a/.github/workflows/ci-dgraph-oss-build.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: ci-dgraph-oss-build - -on: - pull_request: - paths: - - "**/*.go" - - "**/go.mod" - - "**/*.yml" - - "**/Dockerfile" - - "**/Makefile" - types: - - opened - - reopened - - synchronize - - ready_for_review - branches: - - main - - release/** - -permissions: - contents: read - -jobs: - dgraph-oss-build: - if: github.event.pull_request.draft == false - runs-on: warp-ubuntu-latest-x64-4x - timeout-minutes: 10 - steps: - - uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - name: Make OSS Linux Build - run: make oss # verify that we can make OSS build - - name: Run OSS Unit Tests - run: | - #!/bin/bash - # go env settings - export GOPATH=~/go - # move the binary - cp dgraph/dgraph ~/go/bin/dgraph - # run OSS unit tests - go test -v -timeout=60m -failfast -tags=oss -count=1 ./... diff --git a/.github/workflows/ci-dgraph-system-upgrade-tests.yml b/.github/workflows/ci-dgraph-system-upgrade-tests.yml deleted file mode 100644 index 8ed7ea89cd1..00000000000 --- a/.github/workflows/ci-dgraph-system-upgrade-tests.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: ci-dgraph-system-upgrade-tests - -on: - pull_request: - paths: - - "**/*.go" - - "**/go.mod" - - "**/*.yml" - - "**/Dockerfile" - - "**/Makefile" - types: - - opened - - reopened - - synchronize - - ready_for_review - branches: - - main - - release/** - -permissions: - contents: read - -jobs: - dgraph-upgrade-tests: - if: github.event.pull_request.draft == false - runs-on: warp-ubuntu-latest-x64-4x - timeout-minutes: 90 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - name: Make Linux Build and Docker Image - run: make docker-image - - name: Clean Up Environment - run: | - #!/bin/bash - # clean cache - go clean -testcache - - name: Run System Upgrade Tests - run: | - #!/bin/bash - # go env settings - export GOPATH=~/go - # move the binary - cp dgraph/dgraph ~/go/bin/dgraph - # run the sytem upgrade tests - go test -v -timeout=120m -failfast -tags=upgrade \ - github.com/hypermodeinc/dgraph/v24/systest/mutations-and-queries \ - github.com/hypermodeinc/dgraph/v24/systest/plugin \ - github.com/hypermodeinc/dgraph/v24/systest/license \ - github.com/hypermodeinc/dgraph/v24/systest/multi-tenancy - # clean up docker containers after test execution - go clean -testcache - # sleep - sleep 5 diff --git a/.github/workflows/ci-dgraph-systest-tests.yml b/.github/workflows/ci-dgraph-systest-tests.yml deleted file mode 100644 index 9df2c33ce83..00000000000 --- a/.github/workflows/ci-dgraph-systest-tests.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: ci-dgraph-system-tests - -on: - pull_request: - paths: - - "**/*.go" - - "**/go.mod" - - "**/*.yml" - - "**/Dockerfile" - - "**/Makefile" - types: - - opened - - reopened - - synchronize - - ready_for_review - branches: - - main - - release/** - schedule: - - cron: 0 0 * * * # 1 run per day - -permissions: - contents: read - -jobs: - dgraph-systest-tests: - if: github.event.pull_request.draft == false - runs-on: warp-ubuntu-latest-x64-16x - timeout-minutes: 60 - steps: - - uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - name: Install protobuf-compiler - run: sudo apt update && sudo apt install -y protobuf-compiler - - name: Check protobuf - run: | - cd ./protos - go mod tidy - make regenerate - git diff -b --exit-code -- . - - name: Make Linux Build and Docker Image - run: make docker-image - - name: Install gotestsum - run: go install gotest.tools/gotestsum@latest - - name: Build Test Binary - run: | - #!/bin/bash - # build the test binary - cd t; go build . - - name: Clean Up Environment - run: | - #!/bin/bash - # clean cache - go clean -testcache - # clean up docker containers before test execution - cd t; ./t -r - - name: Run Systests - run: | - #!/bin/bash - # go env settings - export GOPATH=~/go - # move the binary - cp dgraph/dgraph ~/go/bin/dgraph - # run the unit and systests - cd t; ./t --suite=systest - # clean up docker containers after test execution - ./t -r - # sleep - sleep 5 - - name: Upload Test Results - if: always() # Upload the results even if the tests fail - continue-on-error: true # don't fail this job if the upload fails - uses: trunk-io/analytics-uploader@main - with: - junit-paths: ./test-results.xml - org-slug: hypermode - token: ${{ secrets.TRUNK_TOKEN }} diff --git a/.github/workflows/ci-dgraph-tests-arm64.yml b/.github/workflows/ci-dgraph-tests-arm64.yml deleted file mode 100644 index 16616dcf713..00000000000 --- a/.github/workflows/ci-dgraph-tests-arm64.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: ci-dgraph-tests-arm64 - -on: - pull_request: - paths: - - "**/*.go" - - "**/go.mod" - - "**/*.yml" - - "**/Dockerfile" - - "**/Makefile" - types: - - opened - - reopened - - synchronize - - ready_for_review - branches: - - main - - release/** - -permissions: - contents: read - -jobs: - dgraph-tests: - if: github.event.pull_request.draft == false - runs-on: warp-ubuntu-latest-arm64-4x - timeout-minutes: 60 - steps: - - uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - name: Install protobuf-compiler - run: sudo apt update && sudo apt install -y protobuf-compiler - - name: Check protobuf - run: | - cd ./protos - go mod tidy - make regenerate - git diff --exit-code -- . - - name: Install gotestsum - run: go install gotest.tools/gotestsum@latest - - name: Make Linux Build and Docker Image - run: make docker-image # this internally builds dgraph binary - - name: Build Test Binary - run: | - #!/bin/bash - # build the test binary - cd t; go build . - - name: Clean Up Environment - run: | - #!/bin/bash - # clean cache - go clean -testcache - # clean up docker containers before test execution - cd t; ./t -r - - name: Run Unit Tests - run: | - #!/bin/bash - # go env settings - export GOPATH=~/go - # move the binary - cp dgraph/dgraph ~/go/bin/dgraph - # run the tests - cd t; ./t - # clean up docker containers after test execution - ./t -r - # sleep - sleep 5 diff --git a/.github/workflows/ci-dgraph-upgrade-fixed-versions-tests.yml b/.github/workflows/ci-dgraph-upgrade-fixed-versions-tests.yml deleted file mode 100644 index 91e5b87f4fb..00000000000 --- a/.github/workflows/ci-dgraph-upgrade-fixed-versions-tests.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: ci-dgraph-upgrade-fixed-versions-tests - -on: - schedule: - - cron: 00 20 * * * # 1 run per day - -permissions: - contents: read - -jobs: - dgraph-upgrade-fixed-versions-tests: - runs-on: warp-ubuntu-latest-x64-4x - timeout-minutes: 60 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - name: Make Linux Build and Docker Image - run: make docker-image - - name: Clean Up Environment - run: | - #!/bin/bash - # clean cache - go clean -testcache - - name: Run Upgrade Tests - run: | - #!/bin/bash - # go env settings - export GOPATH=~/go - export DGRAPH_UPGRADE_MAIN_ONLY=false - # move the binary - cp dgraph/dgraph ~/go/bin/dgraph - # run the tests - go test -v -timeout=10h -failfast -tags=upgrade ./... - # clean up docker containers after test execution - go clean -testcache - # sleep - sleep 5 diff --git a/.github/workflows/ci-dgraph-vector-tests.yml b/.github/workflows/ci-dgraph-vector-tests.yml deleted file mode 100644 index d33c13b7ca4..00000000000 --- a/.github/workflows/ci-dgraph-vector-tests.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: ci-dgraph-vector-tests - -on: - pull_request: - paths: - - "**/*.go" - - "**/go.mod" - - "**/*.yml" - - "**/Dockerfile" - - "**/Makefile" - types: - - opened - - reopened - - synchronize - - ready_for_review - branches: - - main - - release/** - schedule: - - cron: 0 0 * * * # 1 run per day - -permissions: - contents: read - -jobs: - dgraph-vector-tests: - if: github.event.pull_request.draft == false - runs-on: warp-ubuntu-latest-x64-4x - timeout-minutes: 30 - steps: - - uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - - name: Install protobuf-compiler - run: sudo apt update && sudo apt install -y protobuf-compiler - - name: Check protobuf - run: | - cd ./protos - go mod tidy - make regenerate - git diff -b --exit-code -- . - - name: Make Linux Build and Docker Image - run: make docker-image - - name: Install gotestsum - run: go install gotest.tools/gotestsum@latest - - name: Build Test Binary - run: | - #!/bin/bash - # build the test binary - cd t; go build . - - name: Clean Up Environment - run: | - #!/bin/bash - # clean cache - go clean -testcache - # clean up docker containers before test execution - cd t; ./t -r - - name: Run Vector Tests - run: | - #!/bin/bash - # go env settings - export GOPATH=~/go - # move the binary - cp dgraph/dgraph ~/go/bin/dgraph - # run the unit and vector tests - cd t; ./t --suite=vector - # clean up docker containers after test execution - ./t -r - # sleep - sleep 5 - - name: Upload Test Results - if: always() # Upload the results even if the tests fail - continue-on-error: true # don't fail this job if the upload fails - uses: trunk-io/analytics-uploader@main - with: - junit-paths: ./test-results.xml - org-slug: hypermode - token: ${{ secrets.TRUNK_TOKEN }} diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index a73c5d1935b..00000000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: CodeQL - -on: - push: - branches: - - main - - release/** - pull_request: - branches: - - main - - release/** - schedule: - - cron: 0 0 * * * - -permissions: - contents: read - -jobs: - analyze: - name: Analyze (${{ matrix.language }}) - runs-on: warp-ubuntu-latest-x64-16x - timeout-minutes: 360 - permissions: - security-events: write - packages: read - - strategy: - fail-fast: false - matrix: - include: - - language: go - build-mode: autobuild - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - build-mode: ${{ matrix.build-mode }} - - - if: matrix.build-mode == 'manual' - run: | - echo 'If you are using a "manual" build mode for one or more of the' \ - 'languages you are analyzing, replace this with the commands to build' \ - 'your code, for example:' - echo ' make bootstrap' - echo ' make release' - exit 1 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: "/language:${{matrix.language}}" diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml deleted file mode 100644 index c25112c363f..00000000000 --- a/.github/workflows/labeler.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: labeler - -on: - pull_request: - types: - - opened - - reopened - - synchronize - - ready_for_review - branches: - - main - - release/** - -permissions: - contents: read - pull-requests: write - -jobs: - label: - permissions: - contents: read - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/labeler@v5