From 8d1863b0ae07c164e3a67c26ece1d2234f6a4b7d Mon Sep 17 00:00:00 2001 From: dmitryk-dk Date: Tue, 13 Feb 2024 10:12:44 +0100 Subject: [PATCH] cleanup, temporary remove docs action --- .github/workflows/docs.yaml | 77 ------------------------------------- pkg/plugin/response.go | 3 ++ 2 files changed, 3 insertions(+), 77 deletions(-) delete mode 100644 .github/workflows/docs.yaml diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml deleted file mode 100644 index 7e99c47..0000000 --- a/.github/workflows/docs.yaml +++ /dev/null @@ -1,77 +0,0 @@ -name: Update docs - -on: - push: - branches: - - main - paths: - - ".github/workflows/docs.yaml" - - "README.md" - - "docs/**" - -jobs: - update-docs: - runs-on: ubuntu-latest - environment: - name: docs - url: https://docs.victoriametrics.com/ - steps: - - name: Check out code - uses: actions/checkout@v4 - with: - repository: VictoriaMetrics/grafana-logs-datasource - ref: main - token: ${{ secrets.VM_BOT_GH_TOKEN }} - path: "__vm-datasource-repo" - - - name: Check out VM code - uses: actions/checkout@v4 - with: - repository: VictoriaMetrics/VictoriaMetrics - ref: master - token: ${{ secrets.VM_BOT_GH_TOKEN }} - path: "__vm-docs-repo" - - - name: Import GPG key - uses: crazy-max/ghaction-import-gpg@v6 - with: - gpg_private_key: ${{ secrets.VM_BOT_GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.VM_BOT_PASSPHRASE }} - git_user_signingkey: true - git_commit_gpgsign: true - workdir: "__vm-docs-repo" - - # Copies README.md and assets from docs/assets - - name: Update ds docs in VM repo - run: | - echo '--- - sort: 38 - weight: 38 - title: Grafana logs datasource - menu: - docs: - parent: 'victorialogs' - weight: 38 - aliases: - - /grafana-logs-datasource.html - --- - ' > ../__vm-docs-repo/docs/grafana-logs-datasource.md - - cat ./README.md >> ../__vm-docs-repo/docs/grafana-logs-datasource.md - sed -i 's|docs/assets/||g' ../__vm-docs-repo/docs/grafana-logs-datasource.md - - cp docs/assets/* ../__vm-docs-repo/docs/ - working-directory: "__vm-datasource-repo" - - - name: Commit and push changes - run: | - export VM_GIT_BRANCH_NAME="ds-docs-update-$(date +%s)" - export VM_GIT_COMMIT_SHA="$(git rev-parse --short $GITHUB_SHA)" - git checkout -b "${VM_GIT_BRANCH_NAME}" - git add docs/ - git commit -S -m "Automatic update Grafana logs datasource docs from ${GITHUB_REPOSITORY}@${VM_GIT_COMMIT_SHA}" - git push origin ${VM_GIT_BRANCH_NAME} - gh pr create -f - working-directory: "__vm-docs-repo" - env: - GITHUB_TOKEN: ${{ secrets.VM_BOT_GH_TOKEN }} diff --git a/pkg/plugin/response.go b/pkg/plugin/response.go index b29b827..792c420 100644 --- a/pkg/plugin/response.go +++ b/pkg/plugin/response.go @@ -12,6 +12,7 @@ import ( ) const ( + // VictoriaLogs field types messageField = "_msg" streamField = "_stream" timeField = "_time" @@ -26,6 +27,8 @@ const ( // It represents victoria logs response type Response map[string]string +// parseStreamResponse reads data from the reader and collects +// fields and frame with necessary information func parseStreamResponse(reader io.Reader) backend.DataResponse { labelsField := data.NewFieldFromFieldType(data.FieldTypeJSON, 0)