Skip to content

Commit

Permalink
chore: update golang and dependencies (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcsanmi authored Jun 30, 2022
1 parent 7cb96ef commit 46a3b78
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 1,043 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO_VERSION: '1.16'
GO_VERSION: '1.18'
INTEGRATION: "mysql"
ORIGINAL_REPO_NAME: ${{ github.event.repository.full_name }}
REPO_FULL_NAME: ${{ github.event.repository.full_name }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
TAG: "v0.0.0" # needed for goreleaser windows builds
REPO_FULL_NAME: ${{ github.event.repository.full_name }}
ORIGINAL_REPO_NAME: "newrelic/nri-mysql"
GO_VERSION: '1.16'
GO_VERSION: '1.18'
DOCKER_LOGIN_AVAILABLE: ${{ secrets.OHAI_DOCKER_HUB_ID }}

jobs:
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 1.8.1 (2022-06-27)
### Changed
- Bump dependencies
### Added
Added support for more distributions:
- RHEL(EL) 9
- Ubuntu 22.04

## 1.8.0 (2022-03-08)
### Added
- `mysql-log.yml.example` is now in Linux packages to help setting up log parsing.
Expand Down
10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,12 @@ GOLANGCI_LINT = github.com/golangci/golangci-lint/cmd/golangci-lint

all: build

build: clean validate compile test
build: clean compile test

clean:
@echo "=== $(INTEGRATION) === [ clean ]: removing binaries and coverage file..."
@rm -rfv bin coverage.xml

validate:
@printf "=== $(INTEGRATION) === [ validate ]: running golangci-lint & semgrep... "
@go run $(GOFLAGS) $(GOLANGCI_LINT) run --verbose
@[ -f .semgrep.yml ] && semgrep_config=".semgrep.yml" || semgrep_config="p/golang" ; \
docker run --rm -v "${PWD}:/src:ro" --workdir /src returntocorp/semgrep -c "$$semgrep_config"

bin/$(BINARY_NAME):
@echo "=== $(INTEGRATION) === [ compile ]: building $(BINARY_NAME)..."
@go build -v -o bin/$(BINARY_NAME) $(GO_FILES)
Expand All @@ -46,4 +40,4 @@ install: bin/$(BINARY_NAME)
include $(CURDIR)/build/ci.mk
include $(CURDIR)/build/release.mk

.PHONY: all build clean validate compile test integration-test install
.PHONY: all build clean compile test integration-test install
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.16-buster
FROM golang:1.18-buster

ARG GH_VERSION='1.9.2'

Expand Down
8 changes: 0 additions & 8 deletions build/ci.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@ ci/debug-container: ci/deps
-e GPG_PRIVATE_KEY_BASE64 \
$(BUILDER_TAG) bash

.PHONY : ci/validate
ci/validate: ci/deps
@docker run --rm -t \
--name "nri-$(INTEGRATION)-validate" \
-v $(CURDIR):/go/src/github.com/newrelic/nri-$(INTEGRATION) \
-w /go/src/github.com/newrelic/nri-$(INTEGRATION) \
$(BUILDER_TAG) make validate

.PHONY : ci/test
ci/test: ci/deps
@docker run --rm -t \
Expand Down
24 changes: 18 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
module github.com/newrelic/nri-mysql

go 1.16
go 1.18

require (
github.com/bitly/go-simplejson v0.5.0
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
github.com/go-sql-driver/mysql v1.6.0
github.com/golangci/golangci-lint v1.39.0
github.com/kr/pretty v0.2.1 // indirect
github.com/newrelic/infra-integrations-sdk v3.6.7+incompatible
github.com/newrelic/infra-integrations-sdk v3.7.3+incompatible
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.7.0
github.com/stretchr/testify v1.7.5
github.com/xeipuuv/gojsonschema v1.2.0
)

require (
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/kr/pretty v0.2.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
golang.org/x/sys v0.0.0-20210228012217-479acdf4ea46 // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
1,018 changes: 8 additions & 1,010 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tests/integration/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.16 as builder
FROM golang:1.18 as builder
ARG CGO_ENABLED=0
WORKDIR /go/src/github.com/newrelic/nri-mysql
COPY . .
Expand Down
7 changes: 0 additions & 7 deletions tools/tools.go

This file was deleted.

0 comments on commit 46a3b78

Please sign in to comment.