Skip to content

Commit

Permalink
release v2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kattrali authored Apr 19, 2021
2 parents 698874e + d347330 commit 13b1fff
Show file tree
Hide file tree
Showing 14 changed files with 133 additions and 19 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ jobs:
runs-on: ${{ matrix.os }}-latest
defaults:
run:
working-directory: 'go/src/github.com/bugsnag/bugsnag-go' # relative to $GITHUB_WORKSPACE
working-directory: 'go/src/github.com/bugsnag/bugsnag-go/v2' # relative to $GITHUB_WORKSPACE
strategy:
fail-fast: false
matrix:
os: [ubuntu, windows]
go-version: ['1.11', '1.12', '1.13', '1.14', '1.15']
major-version: ['v2']
go-version: ['1.11', '1.12', '1.13', '1.14', '1.15', '1.16']

steps:
- uses: actions/checkout@v2
Expand All @@ -32,13 +31,13 @@ jobs:
with:
go-version: ${{ matrix.go-version }}
- name: install dependencies
run: go get -v -d ./${{ matrix.major-version }}/...
run: go get -v -d ./...
- name: run tests
run: go test ./${{ matrix.major-version }}/...
run: go test ./...
- name: vet package
# go1.12 vet shows spurious 'unknown identifier' issues
if: matrix.go-version != '1.12'
run: go vet ./${{ matrix.major-version }}/...
run: go vet ./...

- name: install integration dependencies
if: matrix.os == 'ubuntu'
Expand All @@ -47,6 +46,7 @@ jobs:
sudo gem install bundler
bundle install
- name: maze tests
working-directory: go/src/github.com/bugsnag/bugsnag-go # relative to $GITHUB_WORKSPACE
if: matrix.os == 'ubuntu'
env:
GO_VERSION: ${{ matrix.go-version }}
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 2.1.1 (2021-04-19)

### Enhancements

* Update panicwrap dependency to 1.3.2, adding support for darwin arm64

## 2.1.0 (2021-01-27)

### Enhancements
Expand Down
55 changes: 55 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
GIT
remote: https://github.com/bugsnag/maze-runner
revision: 7377529a77eb7585afc66cd2080fcdc4eea3306a
branch: v1
specs:
bugsnag-maze-runner (1.1.0)
cucumber (~> 3.1.0)
cucumber-expressions (= 5.0.15)
minitest (~> 5.0)
os (~> 1.0.0)
rack (~> 2.0.0)
rake (~> 12.3.3)
test-unit (~> 3.2.0)

GEM
remote: https://rubygems.org/
specs:
backports (3.21.0)
builder (3.2.4)
cucumber (3.1.0)
builder (>= 2.1.2)
cucumber-core (~> 3.1.0)
cucumber-expressions (~> 5.0.4)
cucumber-wire (~> 0.0.1)
diff-lcs (~> 1.3)
gherkin (~> 5.0)
multi_json (>= 1.7.5, < 2.0)
multi_test (>= 0.1.2)
cucumber-core (3.1.0)
backports (>= 3.8.0)
cucumber-tag_expressions (~> 1.1.0)
gherkin (>= 5.0.0)
cucumber-expressions (5.0.15)
cucumber-tag_expressions (1.1.1)
cucumber-wire (0.0.1)
diff-lcs (1.4.4)
gherkin (5.1.0)
minitest (5.14.4)
multi_json (1.15.0)
multi_test (0.1.2)
os (1.0.1)
power_assert (2.0.0)
rack (2.0.9)
rake (12.3.3)
test-unit (3.2.9)
power_assert

PLATFORMS
ruby

DEPENDENCIES
bugsnag-maze-runner!

BUNDLED WITH
2.1.4
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
TEST?=./...

export GO111MODULE=auto

default: alldeps test

deps:
Expand Down
12 changes: 10 additions & 2 deletions features/fixtures/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,21 @@ RUN apk update && apk upgrade && apk add git bash
ENV GOPATH /app

COPY testbuild /app/src/github.com/bugsnag/bugsnag-go
WORKDIR /app/src/github.com/bugsnag/bugsnag-go
WORKDIR /app/src/github.com/bugsnag/bugsnag-go/v2

RUN go get . ./sessions ./headers ./errors
RUN go get ./...

# Copy test scenarios
COPY ./app /app/src/test
WORKDIR /app/src/test

# Ensure subsequent steps are re-run if the GO_VERSION variable changes
ARG GO_VERSION
# Create app module - avoid locking bugsnag dep by not checking it in
# Skip on old versions of Go which pre-date modules
RUN if [[ $GO_VERSION != '1.11' && $GO_VERSION != '1.12' ]]; then \
go mod init && go mod tidy; \
fi

RUN chmod +x run.sh
CMD ["/app/src/test/run.sh"]
13 changes: 11 additions & 2 deletions features/fixtures/autoconfigure/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,22 @@ RUN apk update && apk upgrade && apk add git bash
ENV GOPATH /app

COPY testbuild /app/src/github.com/bugsnag/bugsnag-go
WORKDIR /app/src/github.com/bugsnag/bugsnag-go
WORKDIR /app/src/github.com/bugsnag/bugsnag-go/v2

RUN go get . ./sessions ./headers ./errors
# Get bugsnag dependencies
RUN go get ./...

# Copy test scenarios
COPY ./autoconfigure /app/src/test
WORKDIR /app/src/test

# Ensure subsequent steps are re-run if the GO_VERSION variable changes
ARG GO_VERSION
# Create app module - avoid locking bugsnag dep by not checking it in
# Skip on old versions of Go which pre-date modules
RUN if [[ $GO_VERSION != '1.11' && $GO_VERSION != '1.12' ]]; then \
go mod init && go mod tidy; \
fi

RUN chmod +x run.sh
CMD ["/app/src/test/run.sh"]
13 changes: 11 additions & 2 deletions features/fixtures/net_http/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,19 @@ RUN apk update && \
ENV GOPATH /app

COPY testbuild /app/src/github.com/bugsnag/bugsnag-go
WORKDIR /app/src/github.com/bugsnag/bugsnag-go
WORKDIR /app/src/github.com/bugsnag/bugsnag-go/v2

RUN go get -v -d . ./sessions ./headers ./errors
# Get bugsnag dependencies
RUN go get ./...

# Copy test scenarios
COPY ./net_http /app/src/test
WORKDIR /app/src/test

# Ensure subsequent steps are re-run if the GO_VERSION variable changes
ARG GO_VERSION
# Create app module - avoid locking bugsnag dep by not checking it in
# Skip on old versions of Go which pre-date modules
RUN if [[ $GO_VERSION != '1.11' && $GO_VERSION != '1.12' ]]; then \
go mod init && go mod tidy; \
fi
2 changes: 1 addition & 1 deletion features/handled.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Scenario: A handled error sends a report
And the event "unhandled" is false
And the event "severity" equals "warning"
And the event "severityReason.type" equals "handledError"
And the exception "errorClass" equals "*os.PathError"
And the exception is a PathError for request 0
And the "file" of stack frame 0 equals "main.go"

Scenario: A handled error sends a report with a custom name
Expand Down
2 changes: 1 addition & 1 deletion features/net-http/handled.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Scenario: A handled error sends a report
And the event "unhandled" is false for request 0
And the event "severity" equals "warning" for request 0
And the event "severityReason.type" equals "handledError" for request 0
And the exception "errorClass" equals "*os.PathError" for request 0
And the exception is a PathError for request 0
And the "file" of stack frame 0 equals "main.go" for request 0

Scenario: A handled error sends a report with a custom name
Expand Down
10 changes: 10 additions & 0 deletions features/steps/go_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@
}
end

Then(/^the exception is a PathError for request (\d+)$/) do |request_index|
body = find_request(request_index)[:body]
error_class = body["events"][0]["exceptions"][0]["errorClass"]
if ['1.11', '1.12', '1.13', '1.14', '1.15'].include? ENV['GO_VERSION']
assert_equal(error_class, '*os.PathError')
else
assert_equal(error_class, '*fs.PathError')
end
end

Then(/^the request(?: (\d+))? is a valid session report with api key "(.*)"$/) do |request_index, api_key|
request_index ||= 0
steps %Q{
Expand Down
2 changes: 1 addition & 1 deletion features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Dir.mkdir testBuildFolder

# Copy the existing dir
`find . -name '*.go' \
`find . -name '*.go' -o -name 'go.sum' -o -name 'go.mod' \
-not -path "./examples/*" \
-not -path "./testutil/*" \
-not -path "./v2/testutil/*" \
Expand Down
2 changes: 1 addition & 1 deletion v2/bugsnag.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
)

// Version defines the version of this Bugsnag notifier
const Version = "2.1.0"
const Version = "2.1.1"

var panicHandlerOnce sync.Once
var sessionTrackerOnce sync.Once
Expand Down
5 changes: 4 additions & 1 deletion v2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ go 1.15

require (
github.com/bitly/go-simplejson v0.5.0
github.com/bugsnag/panicwrap v1.3.1
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
github.com/bugsnag/panicwrap v1.3.2
github.com/gofrs/uuid v4.0.0+incompatible
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect
github.com/kr/pretty v0.2.1 // indirect
github.com/pkg/errors v0.9.1
)
16 changes: 14 additions & 2 deletions v2/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y=
github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA=
github.com/bugsnag/panicwrap v1.3.1 h1:pmuhHlhbUV4OOrGDvoiMjHSZzwRcL+I9cIzYKiW4lII=
github.com/bugsnag/panicwrap v1.3.1/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
github.com/bugsnag/panicwrap v1.3.2 h1:pNcbtPtH4Y6VwK+oZVNV/2H6Hh3jOL0ZNVFZEfd/eA4=
github.com/bugsnag/panicwrap v1.3.2/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE=
github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw=
github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 h1:iQTw/8FWTuc7uiaSepXwyf3o52HaUYcV+Tu66S3F5GA=
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0/go.mod h1:1NbS8ALrpOvjt0rHPNLyCIeMtbizbir8U//inJ+zuB8=
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=

0 comments on commit 13b1fff

Please sign in to comment.