Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v7.10.5 #1462

Merged
merged 60 commits into from
Jul 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
972dbe7
feat(rn-cli): suggest plugin v7 if AGPv7 is used
lemnik Jun 22, 2021
886a705
test(rn-cli): test for Maven-style versions in build.gradle
lemnik Jun 22, 2021
6fbf01d
Peg out new pipeline steps
twometresteve Jun 25, 2021
9fcd65e
Create RN 0.64 test fixture
twometresteve Jun 25, 2021
de61fb1
Ignore entries
twometresteve Jun 25, 2021
7f8316b
Test fixture changes needed for Android
twometresteve Jun 25, 2021
03caae3
Changes for iOS
twometresteve Jun 25, 2021
b09fd1c
Instructions for creating new RN CLI test fixtures
twometresteve Jun 25, 2021
ad5d31e
Tidy-up
twometresteve Jun 25, 2021
0d76883
Add service for RN 0.64 fixture
twometresteve Jun 25, 2021
efd10dd
Add bugsnag buttons
twometresteve Jun 27, 2021
b451578
Copy App.js from existing fixture
twometresteve Jun 27, 2021
0d2aeac
Copy native modules in
twometresteve Jun 27, 2021
2bb699f
Remove lock file
twometresteve Jun 27, 2021
8e93318
Disable flipper
twometresteve Jun 27, 2021
9aa2436
Add modules
twometresteve Jun 27, 2021
6b4e101
Set Bugsnag development team
twometresteve Jun 27, 2021
872519f
More steps for iOS
twometresteve Jun 27, 2021
aec1899
Newly generated 0.64 Hermes test fixture
twometresteve Jun 28, 2021
cde1aac
iOS updates
twometresteve Jun 28, 2021
4a78902
Copy App.js from existing fixture
twometresteve Jun 28, 2021
04be35d
Updates for Android
twometresteve Jun 28, 2021
0d31bc5
Updates for iOS
twometresteve Jun 28, 2021
ae72d3e
Reorder instructions for readability
twometresteve Jun 28, 2021
47f4d98
Add Hermes steps to pipeline
twometresteve Jun 28, 2021
77eb292
Enable Hermes
twometresteve Jun 28, 2021
097075c
Merge pull request #1448 from bugsnag/tms/rn-cli-64
twometresteve Jun 29, 2021
b1124f1
Merge pull request #1451 from bugsnag/tms/rn-cli-64-hermes-2
twometresteve Jun 29, 2021
4412a9c
fix(rn-cli): emit a compatibility warning if AGP > 7 is detected and …
lemnik Jun 24, 2021
785fec5
build: Dockerise release process
bengourley Jun 28, 2021
c45a331
docs: Update contributing guide
bengourley Jun 29, 2021
77e5283
docs: Fix typos
bengourley Jun 29, 2021
0d694dc
build: enable publishing
bengourley Jun 29, 2021
2ead682
Merge branch 'bengourley/docker-release-process' of github.com:bugsna…
bengourley Jun 29, 2021
eddd5e1
fix(plugin-console-breadcrumbs): Ensure off by default in Expo dev
bengourley Jun 29, 2021
4ce82d6
chore: Update changelog
bengourley Jun 29, 2021
cdfc432
feat(plugin-expo-device): Use device id as default user id
bengourley Jun 29, 2021
ae8e2f3
Merge pull request #1445 from bugsnag/PLAT-6662/bugsnag-android-gradl…
lemnik Jun 29, 2021
2101ef6
test(expo): Fix user test scenarios
bengourley Jun 30, 2021
9f02995
build: Handle curl non-zero exit codes
bengourley Jun 30, 2021
22b6fdc
Apply suggestions from code review
bengourley Jun 30, 2021
6fcc997
Merge pull request #1453 from bugsnag/bengourley/expo-dev-console-bre…
bengourley Jun 30, 2021
a24ec03
deps(react-native): Update bugsnag-cocoa to v6.10.0
nickdowell Jun 30, 2021
a9414ae
Merge branch 'next' into bengourley/expo-device-id-default-user-id
bengourley Jun 30, 2021
9994ec2
chore: Update changelog
bengourley Jun 30, 2021
8f3466e
Merge pull request #1454 from bugsnag/bengourley/expo-device-id-defau…
bengourley Jun 30, 2021
b1c4c81
Merge pull request #1455 from bugsnag/nickdowell/bugsnag-cocoa-v6.10.0
nickdowell Jul 1, 2021
534551f
build: Remove command grouping braces
bengourley Jul 1, 2021
20b9b84
feat(plugin-browser-device): Use device id as default user id
bengourley Jun 30, 2021
cf51e5d
test(plugin-browser-device): Apply suggestions from code review
bengourley Jul 1, 2021
2c63a90
test(browser): Update ip redaction tests
bengourley Jul 1, 2021
8bc5a2c
chore: Update changelog
bengourley Jul 1, 2021
38689f2
Merge pull request #1456 from bugsnag/bengourley/browser-device-id-de…
bengourley Jul 1, 2021
31d4180
fix(browser): Loaded breadcrumb should have type state
bengourley Jul 1, 2021
5cfd5f2
chore: Update changelog
bengourley Jul 5, 2021
5aed36f
Merge pull request #1450 from bugsnag/bengourley/docker-release-process
bengourley Jul 5, 2021
5d4d4f8
Merge pull request #1460 from bugsnag/bengourley/loaded-breadcrumb-type
bengourley Jul 5, 2021
5c1aacd
fix(plugin-react-native-unhandled-rejection): Remove flow syntax
bengourley Jul 5, 2021
fa63707
Merge pull request #1461 from bugsnag/bengourley/rn-flow-syntax
bengourley Jul 5, 2021
47e5121
chore: Prep changelog for release
bengourley Jul 5, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 147 additions & 2 deletions .buildkite/react-native-cli-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,19 @@ steps:
env:
REACT_NATIVE_VERSION: "rn0_63_expo_ejected"

- label: ':runner: RN 0.64 CLI tests'
depends_on: "cli-maze-image"
timeout_in_minutes: 20
plugins:
docker-compose#v3.7.0:
run: react-native-cli-tool-maze-runner
use-aliases: true
command: ["features/cli-tests"]
env:
REACT_NATIVE_VERSION: "rn0_64"

#
# Built app test fixtures
# Built app test fixtures - Android
#
- label: ':docker: Build RN Android Builder image'
key: 'android-builder-image'
Expand Down Expand Up @@ -161,6 +172,39 @@ steps:
artifact_paths:
- build/rn0_63_expo_ejected.apk

- label: ':android: Init and build RN 0.64 apk (non-Hermes)'
key: 'rn-0-64-apk'
depends_on:
- 'android-builder-image'
timeout_in_minutes: 15
env:
DEBUG: true
REACT_NATIVE_VERSION: rn0_64
plugins:
- docker-compose#v3.7.0:
run: react-native-cli-android-builder
command: ["features/build-app-tests/build-android-app.feature"]
artifact_paths:
- build/rn0_64.apk

- label: ':android: Init and build RN 0.64 apk (Hermes)'
key: 'rn-0-64-hermes-apk'
depends_on:
- 'android-builder-image'
timeout_in_minutes: 15
env:
DEBUG: true
REACT_NATIVE_VERSION: rn0_64_hermes
plugins:
- docker-compose#v3.7.0:
run: react-native-cli-android-builder
command: ["features/build-app-tests/build-android-app.feature"]
artifact_paths:
- build/rn0_64_hermes.apk

#
# Built app test fixtures - iOS
#
- label: ':ios: Init and build RN 0.60 ipa'
key: 'rn-0-60-ipa'
timeout_in_minutes: 30
Expand Down Expand Up @@ -216,8 +260,30 @@ steps:
commands:
- test/react-native-cli/scripts/init-and-build-test.sh rn0_63_expo_ejected

- label: ':ios: Init and build RN 0.64 ipa (non-Hermes)'
key: 'rn-0-64-ipa'
timeout_in_minutes: 30
agents:
queue: 'opensource-mac-cocoa-11'
env:
DEBUG: true
artifact_paths: build/rn0_64.ipa
commands:
- test/react-native-cli/scripts/init-and-build-test.sh rn0_64

- label: ':ios: Init and build RN 0.64 ipa (Hermes)'
key: 'rn-0-64-hermes-ipa'
timeout_in_minutes: 30
agents:
queue: 'opensource-mac-cocoa-11'
env:
DEBUG: true
artifact_paths: build/rn0_64_hermes.ipa
commands:
- test/react-native-cli/scripts/init-and-build-test.sh rn0_64_hermes

#
# Init, build and notify end-to-end tests
# Init, build and notify end-to-end tests - Android
#
- label: ':runner: RN 0.60 Android end-to-end tests'
depends_on: "rn-0-60-apk"
Expand Down Expand Up @@ -314,6 +380,47 @@ steps:
concurrency: 9
concurrency_group: 'browserstack-app'

- label: ':runner: RN 0.64 Android end-to-end tests (non-Hermes)'
depends_on: "rn-0-64-apk"
timeout_in_minutes: 10
plugins:
artifacts#v1.2.0:
download: "build/rn0_64.apk"
docker-compose#v3.7.0:
pull: react-native-cli-maze-runner
run: react-native-cli-maze-runner
use-aliases: true
command:
- --app=build/rn0_64.apk
- --farm=bs
- --device=ANDROID_11_0
- --a11y-locator
- features/run-app-tests
concurrency: 9
concurrency_group: 'browserstack-app'

- label: ':runner: RN 0.64 Android end-to-end tests (Hermes)'
depends_on: "rn-0-64-hermes-apk"
timeout_in_minutes: 10
plugins:
artifacts#v1.2.0:
download: "build/rn0_64_hermes.apk"
docker-compose#v3.7.0:
pull: react-native-cli-maze-runner
run: react-native-cli-maze-runner
use-aliases: true
command:
- --app=build/rn0_64_hermes.apk
- --farm=bs
- --device=ANDROID_11_0
- --a11y-locator
- features/run-app-tests
concurrency: 9
concurrency_group: 'browserstack-app'

#
# Init, build and notify end-to-end tests - iOS
#
- label: ':runner: RN 0.60 iOS end-to-end tests'
depends_on: "rn-0-60-ipa"
timeout_in_minutes: 10
Expand Down Expand Up @@ -408,3 +515,41 @@ steps:
- features/run-app-tests
concurrency: 9
concurrency_group: 'browserstack-app'

- label: ':runner: RN 0.64 iOS end-to-end tests (non-Hermes)'
depends_on: "rn-0-64-ipa"
timeout_in_minutes: 10
plugins:
artifacts#v1.2.0:
download: "build/rn0_64.ipa"
docker-compose#v3.7.0:
pull: react-native-cli-maze-runner
run: react-native-cli-maze-runner
use-aliases: true
command:
- --app=build/rn0_64.ipa
- --farm=bs
- --device=IOS_14
- --a11y-locator
- features/run-app-tests
concurrency: 9
concurrency_group: 'browserstack-app'

- label: ':runner: RN 0.64 iOS end-to-end tests (Hermes)'
depends_on: "rn-0-64-hermes-ipa"
timeout_in_minutes: 10
plugins:
artifacts#v1.2.0:
download: "build/rn0_64_hermes.ipa"
docker-compose#v3.7.0:
pull: react-native-cli-maze-runner
run: react-native-cli-maze-runner
use-aliases: true
command:
- --app=build/rn0_64_hermes.ipa
- --farm=bs
- --device=IOS_14
- --a11y-locator
- features/run-app-tests
concurrency: 9
concurrency_group: 'browserstack-app'
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## 7.10.5 (2021-07-05)

### Fixed

- (plugin-console-breadcrumbs): Ensure console breadcrumbs do not run in Expo's dev environment and obscure log line numbers [#1453](https://github.com/bugsnag/bugsnag-js/pull/1453)
- (browser): "Bugsnag" loaded breadcrumb now has the type "state" rather than "navigation" [#1460](https://github.com/bugsnag/bugsnag-js/pull/1460)
- (plugin-react-native-unhandled-rejections): Remove flow syntax [#1461](https://github.com/bugsnag/bugsnag-js/pull/1461)

### Added

- (expo): User ID now defaults to `device.id` if no user is set [#1454](https://github.com/bugsnag/bugsnag-js/pull/1454)
- (browser): User ID now defaults to `device.id` if no user is set (when `collectUserIp=false`) [#1456](https://github.com/bugsnag/bugsnag-js/pull/1456)

### Changed

- (react-native): Update bugsnag-cocoa to v6.10.0
- Fix an issue that could cause C++ exceptions with very long descriptions to not be reported. [bugsnag-cocoa#1137](https://github.com/bugsnag/bugsnag-cocoa/pull/1137)
- Improve performance of adding metadata by using async file I/O. [bugsnag-cocoa#1133](https://github.com/bugsnag/bugsnag-cocoa/pull/1133)
- Improve performance of leaving breadcrumbs by using async file I/O. [bugsnag-cocoa#1124](https://github.com/bugsnag/bugsnag-cocoa/pull/1124)

## 7.10.4 (2021-06-28)

### Fixed
Expand Down
68 changes: 39 additions & 29 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@ CI runs on Buildkite. Tests are run automatically on any branch from within this

## Releases

Before creating any release:

- run `npm install` in the root of the project and `npm run bootstrap` to ensure the top-level node_modules and leaf node_modules are all correct for the branch you have checked out.
- ensure you are logged in to npm and that you have access to publish to the following on npm
- any packages in the `@bugsnag` namespace
- the `bugsnag-expo-cli` package
- ensure you have an AWS key pair with access to our S3 bucket and cloudfront distribution. Export these in your environment as `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` (if you're going to publish to the CDN)

To start a release:

- decide on a version number
Expand All @@ -83,23 +75,39 @@ To start a release:
Once the release PR has been approved:

- merge the PR into master
- `git checkout master` and `git pull`

You are now ready to make the release:
You are now ready to make the release. Releases are done using Docker and Docker compose. You do not need to have the release branch checked out on your local machine to make a release – the container pulls a fresh clone of the repo down from GitHub. Prerequisites:

```
lerna version [major | minor | patch]
lerna publish from-git
```
- You will need to clone the repository and have Docker running on your local machine.
- Ensure you are logged in to npm and that you have access to publish to the following on npm
- any packages in the `@bugsnag` namespace
- the `bugsnag-expo-cli` package
- Ensure you have an AWS key pair with access to our S3 bucket and cloudfront distribution. Export these in your environment as `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` (if you're going to publish to the CDN)
- Ensure your `.gitconfig` file in your home directory is configured to contain your name and email address
- Generate a [personal access token](https://github.com/settings/tokens/new) on GitHub and store it somewhere secure

<small>Note: if a prerelease was made, to graduate it into a normal release you will want to use `patch` as the version.</small>
Build the release container:

At this point it is sensible to perform some manual smoke tests to ensure the new version on npm works as expected. Only then publish to the CDN:
`docker-compose build release`

Then make the release:

```
npm run cdn-upload
GITHUB_USER=<your github username> \
GITHUB_ACCESS_TOKEN=<generate a personal access token> \
AWS_ACCESS_KEY_ID=xxx \
AWS_SECRET_ACCESS_KEY=xxx \
RELEASE_BRANCH=master \
VERSION=patch \
docker-compose run release
```

This process is interactive and will require you to confirm that you want to publish the changed packages. It will also prompt for 2FA.

Browser bundles are automatically uploaded to the CDN if they have changed.

<small>Note: if a prerelease was made, to graduate it into a normal release you will want to use `patch` as the version.</small>

Finally:

- create a release on GitHub https://github.com/bugsnag/bugsnag-js/releases/new
Expand All @@ -115,28 +123,30 @@ Finally:

### Prereleases

If you are starting a new prerelease, use one of the following commands:
If you are starting a new prerelease, use one of the following values for the `VERSION` variable in the release command:

```
lerna version [premajor | preminor | prepatch]
VERSION=[premajor | preminor | prepatch]
```

For subsequent iterations on that release, run:
For subsequent iterations on that release, use:

```
lerna version prerelease
VERSION=prerelease
```

If you want to publish the release to npm, use the following command:
For example:

```
lerna publish from-git --dist-tag next
GITHUB_USER=<your github username> \
GITHUB_ACCESS_TOKEN=<generate a personal access token> \
AWS_ACCESS_KEY_ID=xxx \
AWS_SECRET_ACCESS_KEY=xxx \
RELEASE_BRANCH=master \
VERSION=preminor \
docker-compose run
```

The `--dist-tag next` part ensures that it is not installed by unsuspecting users who do not specify a version – npm automatically adds the `latest` tag to a published module unless one is specified.

If you want to publish the release to the CDN, use the following command:
Prereleases will automatically be published to npm with the dist tag `next` and browser bundles are automatically uploaded to the CDN.

```
lerna run cdn-upload
```
The dist tag ensures that prereleases are not installed by unsuspecting users who do not specify a version – npm automatically adds the `latest` tag to a published module unless one is specified.
43 changes: 43 additions & 0 deletions bin/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env bash

set -euxo pipefail

error_missing_field () {
echo "Missing required env var: $1"
exit 1
}

# Ensure all required variables are set before doing any work
if [[ -z ${GITHUB_USER:-} ]]; then error_missing_field "GITHUB_USER"; fi
if [[ -z ${GITHUB_ACCESS_TOKEN:-} ]]; then error_missing_field "GITHUB_ACCESS_TOKEN"; fi
if [[ -z ${RELEASE_BRANCH:-} ]]; then error_missing_field "RELEASE_BRANCH"; fi
if [[ -z ${VERSION:-} ]]; then error_missing_field "VERSION"; fi
if [[ -z ${AWS_ACCESS_KEY_ID:-} ]]; then error_missing_field "AWS_ACCESS_KEY_ID"; fi
if [[ -z ${AWS_SECRET_ACCESS_KEY:-} ]]; then error_missing_field "AWS_SECRET_ACCESS_KEY"; fi

git clone --single-branch \
--branch "$RELEASE_BRANCH" \
https://"$GITHUB_USER":"$GITHUB_ACCESS_TOKEN"@github.com/bugsnag/bugsnag-js.git

cd /app/bugsnag-js

# "ci" rather than "install" ensures the process doesn't make the work tree dirty by modifying lockfiles
npm ci
npm run bootstrap -- --ci

# check if the browser package changed – if it didn't we don't need to upload to the CDN
BROWSER_PACKAGE_CHANGED=$(npx lerna changed --parseable | grep -c packages/js$ || test $? = 1;)

case $VERSION in
"prerelease" | "prepatch" | "preminor" | "premajor")
npx lerna publish "$VERSION" --dist-tag next
;;

*)
npx lerna publish "$VERSION"
;;
esac

if [ "$BROWSER_PACKAGE_CHANGED" -eq 1 ]; then
npm run cdn-upload
fi
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,22 @@ services:
- ./build:/app/build
- ./test/react-native-cli/features/:/app/features/

release:
build:
context: .
dockerfile: dockerfiles/Dockerfile.release
environment:
GITHUB_USER:
GITHUB_ACCESS_TOKEN:
RELEASE_BRANCH:
AWS_ACCESS_KEY_ID:
AWS_SECRET_ACCESS_KEY:
VERSION:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
volumes:
- ~/.gitconfig:/home/releaser/.gitconfig
- ~/.npmrc:/home/releaser/.npmrc

networks:
default:
name: ${BUILDKITE_JOB_ID:-js-maze-runner}
14 changes: 14 additions & 0 deletions dockerfiles/Dockerfile.release
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:lts-alpine
RUN apk add --update git bash python3 make gcc g++ openssh-client curl

RUN addgroup -S admins
RUN adduser -S releaser -G admins

WORKDIR /app

RUN chown -R releaser:admins /app
USER releaser

COPY ./bin/release.sh ./

CMD ./release.sh
Loading