Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into postgres
Browse files Browse the repository at this point in the history
* origin/master: (288 commits)
  chore: update go from v1.18.1 to v1.18.3 (influxdata#11248)
  chore: rename circleci executor (influxdata#11247)
  chore: upgrade windows circleci size (influxdata#11249)
  fix: re-add event to splunk serializer (influxdata#11237)
  docs: update test-container docs (influxdata#11244)
  test: remove docker-compose.yml test file (influxdata#11243)
  fix: update moby/ipvs dependency from v1.0.1 to v1.0.2 (influxdata#11242)
  feat(inputs.sqlserver): Update query store and latch performance counters (influxdata#11216)
  test: migrate elasticsearch to testcontainers (influxdata#11207)
  chore: Bump apcupds and remove the replacement as issue is fixed upstream. (influxdata#11239)
  test: migrate postgres to testcontainers (influxdata#11209)
  test: migrate mcrouter to test-containers (influxdata#11208)
  test: migrate kafka to testcontainers (influxdata#11206)
  docs: Initial update of integration test docs (influxdata#11210)
  chore: Bump riemann-go-client and remove replacement (influxdata#11236)
  fix: Upgrade xpath and fix code (influxdata#11241)
  feat(inputs.nginx_plus_api): Gather slab metrics (influxdata#10448)
  fix(inputs/modbus): influxdata#11105 fix requests starting with an omitted field (influxdata#11202)
  fix: (outputs/sql) table existence cache (influxdata#10812)
  fix: Update sample.conf for prometheus (influxdata#11217)
  fix: bump github.com/nats-io/nats-server/v2 from 2.7.4 to 2.8.4 (influxdata#11221)
  test: enable logging with testcontainers (influxdata#11211)
  chore: update github.com/opencontainers/runc from v1.0.2 to v1.1.2 (influxdata#11212)
  chore: update gopkg.in/yaml.v3 from v3.0.0 to v3.0.1 (influxdata#11213)
  fix(inputs/snmp): switch new Reconnect method to be a value receiver (influxdata#11197)
  test: refactor testcontainer port lookup (influxdata#11198)
  test: actually skip flaky snmp test (influxdata#11199)
  chore: correctly spell embed (influxdata#11200)
  fix: bump go.opentelemetry.io/otel/metric from 0.28.0 to 0.30.0 (influxdata#11088)
  chore: update OpenTelmetry plugins (influxdata#11194)
  docs: remove recommendation for prometheus metric_version=2 (influxdata#11158)
  fix: bump github.com/sensu/sensu-go/api/core/v2 from 2.13.0 to 2.14.0 (influxdata#11021)
  test: migrate zookeeper to test-containers (influxdata#11185)
  fix(plugins/amqp): move from `streadway/amqp` to `rabbitmq/amqp091-go` (influxdata#11192)
  feat: Add constant 'algorithm' to the mock plugin (influxdata#11188)
  fix: redis plugin goroutine leak triggered by auto reload config mechanism (influxdata#11143)
  fix: update golangci-lint from v1.45.2 to v1.46.2 (influxdata#11191)
  fix(inputs/snmp): Reconnect TCP agents if needed (influxdata#11163)
  test: migrate pgbouncer to test-containers (influxdata#11186)
  test: remove rabbitmq container not used (influxdata#11175)
  ...
  • Loading branch information
phemmer committed Jun 3, 2022
2 parents dd0e5bb + c6ed8bb commit d671e21
Show file tree
Hide file tree
Showing 1,305 changed files with 31,415 additions and 17,741 deletions.
96 changes: 67 additions & 29 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ orbs:
aws-cli: circleci/[email protected]

executors:
go-1_17:
telegraf-ci:
working_directory: '/go/src/github.com/influxdata/telegraf'
resource_class: large
docker:
- image: 'quay.io/influxdb/telegraf-ci:1.17.7'
- image: 'quay.io/influxdb/telegraf-ci:1.18.3'
environment:
GOFLAGS: -p=4
mac:
Expand Down Expand Up @@ -37,6 +37,14 @@ commands:
check-changed-files-or-halt:
steps:
- run: ./scripts/check-file-changes.sh
rebase-on-master:
steps:
- run: |
git config --global user.email "[email protected]"
git config --global user.name "telegraf"
git remote add upstream https://github.com/influxdata/telegraf
git fetch upstream
git rebase upstream/master
test-go:
parameters:
os:
Expand All @@ -54,6 +62,7 @@ commands:
steps:
- checkout
- check-changed-files-or-halt
- rebase-on-master
- when:
condition:
equal: [ linux, << parameters.os >> ]
Expand Down Expand Up @@ -86,8 +95,7 @@ commands:
steps:
- run: echo 'export RACE="-race"' >> $BASH_ENV
- run: |
PACKAGE_NAMES=$(go list ./... | circleci tests split --split-by=timings --timings-type=classname)
GOARCH=<< parameters.arch >> ./<< parameters.gotestsum >> --junitfile test-results/gotestsum-report.xml -- ${RACE} -short $PACKAGE_NAMES
GOARCH=<< parameters.arch >> ./<< parameters.gotestsum >> --junitfile test-results/gotestsum-report.xml -- ${RACE} -short ./...
- store_test_results:
path: test-results
- when:
Expand Down Expand Up @@ -121,7 +129,6 @@ commands:
paths:
- 'C:\Go'
- 'C:\Users\circleci\project\gotestsum.exe'

package-build:
parameters:
type:
Expand All @@ -133,6 +140,7 @@ commands:
steps:
- checkout
- check-changed-files-or-halt
- rebase-on-master
- attach_workspace:
at: '/go'
- when:
Expand All @@ -143,13 +151,17 @@ commands:
- when:
condition: << parameters.nightly >>
steps:
- run: 'NIGHTLY=1 make package include_packages="$(make << parameters.type >>)"'
- run:
command: 'NIGHTLY=1 make package include_packages="$(make << parameters.type >>)"'
no_output_timeout: 30m
- unless:
condition:
or:
- << parameters.nightly >>
steps:
- run: 'make package include_packages="$(make << parameters.type >>)"'
- run:
command: 'make package include_packages="$(make << parameters.type >>)"'
no_output_timeout: 30m
- store_artifacts:
path: './build/dist'
destination: 'build/dist'
Expand All @@ -159,8 +171,7 @@ commands:
- 'dist'
jobs:
test-go-linux:
executor: go-1_17
parallelism: 4
executor: telegraf-ci
steps:
- checkout
- restore_cache:
Expand All @@ -181,8 +192,7 @@ jobs:
paths:
- '*'
test-go-linux-386:
executor: go-1_17
parallelism: 4
executor: telegraf-ci
steps:
- checkout
- restore_cache:
Expand All @@ -198,23 +208,22 @@ jobs:
steps:
- test-go:
os: darwin
parallelism: 4
test-go-windows:
executor:
name: win/default
shell: bash.exe
size: xlarge
steps:
- test-go:
os: windows
gotestsum: "gotestsum.exe"
parallelism: 4

windows-package:
parameters:
nightly:
type: boolean
default: false
executor: go-1_17
executor: telegraf-ci
steps:
- package-build:
type: windows
Expand All @@ -224,7 +233,7 @@ jobs:
nightly:
type: boolean
default: false
executor: go-1_17
executor: telegraf-ci
steps:
- package-build:
type: darwin-amd64
Expand All @@ -234,7 +243,7 @@ jobs:
nightly:
type: boolean
default: false
executor: go-1_17
executor: telegraf-ci
steps:
- package-build:
type: darwin-arm64
Expand All @@ -244,7 +253,7 @@ jobs:
nightly:
type: boolean
default: false
executor: go-1_17
executor: telegraf-ci
steps:
- package-build:
type: i386
Expand All @@ -254,7 +263,7 @@ jobs:
nightly:
type: boolean
default: false
executor: go-1_17
executor: telegraf-ci
steps:
- package-build:
type: ppc64le
Expand All @@ -264,7 +273,7 @@ jobs:
nightly:
type: boolean
default: false
executor: go-1_17
executor: telegraf-ci
steps:
- package-build:
type: riscv64
Expand All @@ -274,7 +283,7 @@ jobs:
nightly:
type: boolean
default: false
executor: go-1_17
executor: telegraf-ci
steps:
- package-build:
type: s390x
Expand All @@ -284,7 +293,7 @@ jobs:
nightly:
type: boolean
default: false
executor: go-1_17
executor: telegraf-ci
steps:
- package-build:
type: armel
Expand All @@ -294,7 +303,7 @@ jobs:
nightly:
type: boolean
default: false
executor: go-1_17
executor: telegraf-ci
steps:
- package-build:
type: amd64
Expand All @@ -304,7 +313,7 @@ jobs:
nightly:
type: boolean
default: false
executor: go-1_17
executor: telegraf-ci
steps:
- package-build:
type: arm64
Expand All @@ -314,7 +323,7 @@ jobs:
nightly:
type: boolean
default: false
executor: go-1_17
executor: telegraf-ci
steps:
- package-build:
type: mipsel
Expand All @@ -324,7 +333,7 @@ jobs:
nightly:
type: boolean
default: false
executor: go-1_17
executor: telegraf-ci
steps:
- package-build:
type: mips
Expand All @@ -334,7 +343,7 @@ jobs:
nightly:
type: boolean
default: false
executor: go-1_17
executor: telegraf-ci
steps:
- package-build:
type: static
Expand All @@ -344,13 +353,13 @@ jobs:
nightly:
type: boolean
default: false
executor: go-1_17
executor: telegraf-ci
steps:
- package-build:
type: armhf
nightly: << parameters.nightly >>
nightly:
executor: go-1_17
executor: telegraf-ci
steps:
- attach_workspace:
at: '/build'
Expand All @@ -363,6 +372,32 @@ jobs:
--include "*.rpm" \
--include "*.zip" \
--acl public-read
docker-nightly:
machine:
image: ubuntu-2004:current
steps:
- run:
name: login to quay.io
command: docker login --username="${QUAY_USER}" --password="${QUAY_PASS}" quay.io
- run:
name: clone influxdata/influxdata-docker
command: git clone https://github.com/influxdata/influxdata-docker
- run:
name: build and push telegraf:nightly
command: |
cd influxdata-docker/telegraf/nightly
docker build -t telegraf .
docker tag telegraf quay.io/influxdb/telegraf-nightly:latest
docker image ls
docker push quay.io/influxdb/telegraf-nightly:latest
- run:
name: build and push telegraf:nightly-alpine
command: |
cd influxdata-docker/telegraf/nightly/alpine
docker build -t telegraf-alpine .
docker tag telegraf-alpine quay.io/influxdb/telegraf-nightly:alpine
docker image ls
docker push quay.io/influxdb/telegraf-nightly:alpine
package-sign-windows:
executor:
name: win/default
Expand Down Expand Up @@ -426,7 +461,7 @@ jobs:
printf -v payload '{ "pullRequestNumber": "%s" }' "$PR"
curl -X POST "https://182c7jdgog.execute-api.us-east-1.amazonaws.com/prod/shareArtifacts" --data "$payload"
generate-config:
executor: go-1_17
executor: telegraf-ci
steps:
- generate-config
generate-config-win:
Expand Down Expand Up @@ -708,6 +743,9 @@ workflows:
- 'static-package-nightly'
- 'arm64-package-nightly'
- 'armhf-package-nightly'
- docker-nightly:
requires:
- 'nightly'
triggers:
- schedule:
cron: "0 7 * * *"
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ body:
attributes:
label: Logs from Telegraf
description: Please include the Telegraf logs, ideally with `--debug` used.
render: text
validations:
required: true
- type: input
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ jobs:
name: lint-pr-changes
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.42.1
version: v1.46.2
only-new-issues: true
golangci-master:
if: github.ref == 'refs/heads/master'
Expand All @@ -30,6 +31,6 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.42.1
version: v1.46.2
only-new-issues: true
args: --issues-exit-code=0
3 changes: 2 additions & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ jobs:
# Run Linter against code base #
################################
- name: Lint Code Base
uses: github/super-linter@v4.8.1
uses: github/super-linter@v4.9.2
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LINTER_RULES_PATH: '.'
MARKDOWN_CONFIG_FILE: .markdownlint.yml
VALIDATE_MARKDOWN: true
VALIDATE_BASH: true
23 changes: 23 additions & 0 deletions .github/workflows/readme-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lint plugin readmes
on:
# push:
# branches-ignore: master
pull_request:
branches: # Names of target branches, not source branches
- master
jobs:
run-readme-linter:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/[email protected]
with:
base_sha: ${{ github.event.pull_request.base.sha }}
files: plugins/**/README.md
- name: Run readme linter on changed files
run: go run ./tools/readme_linter ${{ steps.changed-files.outputs.all_changed_files }}
15 changes: 15 additions & 0 deletions .github/workflows/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: "Semantic PR and Commit Messages"

on:
pull_request:
types: [opened, reopened, synchronize, edited]
branches:
- master

jobs:
semantic:
uses: influxdata/validate-semantic-github-messages/.github/workflows/semantic.yml@main
with:
CHECK_PR_TITLE_OR_ONE_COMMIT: true

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/telegraf
/telegraf.exe
/telegraf.gz
/tools/readme_config_includer/generator
/vendor
.DS_Store
process.yml
Expand Down
Loading

0 comments on commit d671e21

Please sign in to comment.