-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Init backend part of the plugin (#1)
* init backend part of the plugin * add run query * fix health check, fix build, add maxlines limit * parse reponse in stream mode * small fixes (prepare for framing) * show data in UI * parse labels * small fix * cleanup * simplify fields * simplify query logic * update ci * update ci * update node version * remove package manager * small fixes * fix no test * cleanup, temporary remove docs action * add filter by labels * add check operators for removeLabelFromQuery * fix comments --------- Co-authored-by: Yury Moladau <[email protected]>
- Loading branch information
1 parent
86694fc
commit 40e1b4b
Showing
41 changed files
with
12,038 additions
and
700 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: main | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- "src/**" | ||
- "**.md" | ||
pull_request: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- "src/**" | ||
- "**.md" | ||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Code checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.21.6 | ||
check-latest: true | ||
cache: true | ||
|
||
- name: Dependencies | ||
run: | | ||
make check-all | ||
git diff --exit-code | ||
test: | ||
needs: lint | ||
strategy: | ||
matrix: | ||
scenario: ["golang-test", "golang-test-race"] | ||
name: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Code checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.21.6 | ||
check-latest: true | ||
cache: true | ||
|
||
- name: run tests | ||
run: | | ||
make ${{ matrix.scenario}} | ||
build: | ||
needs: test | ||
name: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Code checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Go | ||
id: go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.21.6 | ||
check-latest: true | ||
cache: true | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: gocache-for-docker | ||
key: gocache-docker-${{ runner.os }}-${{ steps.go.outputs.go-version }}-${{ hashFiles('go.mod') }} | ||
|
||
- name: Build | ||
run: | | ||
make victorialogs-backend-plugin-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Name of this action | ||
name: check frontend | ||
|
||
# Event triggers on pull request event | ||
# For more detail visit https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#on | ||
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- '**/*.ts' | ||
- '**/*.tsx' | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- '**/*.ts' | ||
- '**/*.tsx' | ||
|
||
# The jobs this action will run. You can write as many jobs as you want. | ||
# For more detail on this section visit https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobs | ||
jobs: | ||
# ID of the job | ||
run-jest-tests: | ||
# Name of the job as it will be displayed in GitHub | ||
name: Jest Tests | ||
# Machine which this action will be run on. For a list of all the machines available/how to run on self hosted machine visit | ||
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps this job must take to complete | ||
steps: | ||
# Reference the main branch. For more information visit https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsuses | ||
- name: Checkout under $GITHUB_WORKSPACE | ||
uses: actions/checkout@main | ||
|
||
# Specify which version of Node this project is using. For more information visit. | ||
# https://docs.github.com/en/actions/guides/building-and-testing-nodejs#specifying-the-nodejs-version | ||
- name: Set up node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 20.9.0 | ||
|
||
- name: Install all dependencies | ||
run: yarn install | ||
|
||
- name: Run Jest Tests | ||
run: npm run test | ||
|
||
run-build: | ||
needs: run-jest-tests | ||
name: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Code checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 20.9.0 | ||
|
||
- name: Install all dependencies | ||
run: yarn install | ||
|
||
- name: Build | ||
shell: 'script -q -e -c "bash {0}"' | ||
run: | | ||
make victorialogs-frontend-plugin-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL for PR / golang" | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
paths-ignore: | ||
- "src/**" | ||
- "**.md" | ||
- "**.txt" | ||
- "**.js" | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [main] | ||
paths-ignore: | ||
- "src/**" | ||
- "**.md" | ||
- "**.txt" | ||
- "**.js" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: ["go"] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] | ||
# Learn more about CodeQL language support at https://git.io/codeql-language-support | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.21.6 | ||
check-latest: true | ||
cache: true | ||
if: ${{ matrix.language == 'go' }} | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
# queries: ./path/to/local/query, your-org/your-repo/queries@main | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 https://git.io/JvXDl | ||
|
||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||
# and modify them (or add more) to build your code if your project | ||
# uses a compiled language | ||
|
||
#- run: | | ||
# make bootstrap | ||
# make release | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: "CodeQL for PR / javascript" | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- '**/*.ts' | ||
- '**/*.tsx' | ||
- '!**/*.test.ts' | ||
- '!**/*.test.tsx' | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- '**/*.ts' | ||
- '**/*.tsx' | ||
- '!**/*.test.ts' | ||
- '!**/*.test.tsx' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
# We must fetch at least the immediate parents so that if this is | ||
# a pull request then we can checkout the head. | ||
fetch-depth: 2 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: "javascript" | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 |
Oops, something went wrong.