Skip to content

Commit

Permalink
feat: remove sentry (#368)
Browse files Browse the repository at this point in the history
* build: update packages

* chore: add type casts

* chore: remove sentry

* build: add open

* chore: update depcheckrc
  • Loading branch information
Cafe137 authored Aug 12, 2023
1 parent ac01891 commit a98eb59
Show file tree
Hide file tree
Showing 15 changed files with 5,958 additions and 5,092 deletions.
3 changes: 2 additions & 1 deletion .depcheckrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"ts-node",
"concurrently",
"cross-env",
"cpy"
"cpy",
"open"
]
}
42 changes: 0 additions & 42 deletions .github/workflows/assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ jobs:
- name: Install all dependencies
run: npm ci && cd ./ui && npm ci

- name: Configure secrets
uses: jossef/action-set-json-field@v1
with:
file: src/.sentry.json
field: KEY
value: ${{ secrets.SENTRY_KEY }}

- name: Set MacOS signing certs
run: .github/tools/add-macos-cert.sh
env:
Expand Down Expand Up @@ -65,13 +58,6 @@ jobs:
- name: Install dependencies
run: npm ci && cd ./ui && npm ci

- name: Configure secrets
uses: jossef/action-set-json-field@v1
with:
file: src/.sentry.json
field: KEY
value: ${{ secrets.SENTRY_KEY }}

- name: Set MacOS signing certs
if: matrix.os == 'macos-latest'
run: .github/tools/add-macos-cert.sh
Expand All @@ -90,8 +76,6 @@ jobs:

- name: Build
run: npm run build
env:
REACT_APP_SENTRY_KEY: ${{ secrets.SENTRY_KEY_UI }}

- name: Copy dashboard lib
run: cp ./ui/node_modules/@ethersphere/bee-dashboard/lib/* ./dist/ui/static/js
Expand All @@ -114,29 +98,3 @@ jobs:
run: npm run publish:linux:arm64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Sentry release for Desktop
if: matrix.os == 'ubuntu-latest'
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
ignore_missing: true
ignore_empty: true
sourcemaps: ./dist/desktop/src
version: ${{ github.event.client_payload.version }}
# TODO: https://github.com/ethersphere/swarm-desktop/issues/250
# - name: Create Sentry release for UI
# if: matrix.os == 'ubuntu-latest'
# uses: getsentry/action-release@v1
# env:
# SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
# SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
# SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
# with:
# ignore_missing: true
# ignore_empty: true
# sourcemaps: ./dist/ui/static/js
# version: ${{ github.event.client_payload.version }}
30 changes: 0 additions & 30 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@ jobs:
field: version
value: ${{ github.event.inputs.version }}

- name: Configure secrets
uses: jossef/action-set-json-field@v1
with:
file: src/.sentry.json
field: KEY
value: ${{ secrets.SENTRY_KEY }}

- name: Set MacOS signing certs
run: .github/tools/add-macos-cert.sh
env:
Expand Down Expand Up @@ -101,13 +94,6 @@ jobs:
field: version
value: ${{ github.event.inputs.version }}

- name: Configure secrets
uses: jossef/action-set-json-field@v1
with:
file: src/.sentry.json
field: KEY
value: ${{ secrets.SENTRY_KEY }}

- name: Set MacOS signing certs
if: matrix.os == 'macos-latest'
run: .github/tools/add-macos-cert.sh
Expand All @@ -126,9 +112,6 @@ jobs:

- name: Build
run: npm run build
env:
REACT_APP_SENTRY_KEY: ${{ secrets.SENTRY_KEY_UI }}
REACT_APP_SENTRY_ENVIRONMENT: 'prerelease'

- name: Purge ui src
run: npx rimraf ./ui
Expand All @@ -147,16 +130,3 @@ jobs:
run: npm run publish:linux:arm64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Sentry release
if: matrix.os == 'ubuntu-latest'
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
ignore_missing: true
ignore_empty: true
sourcemaps: ./dist/desktop/src
version: ${{ github.event.inputs.version }}
65 changes: 34 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

> Electron Desktop app that helps you easily spin up and manage Swarm's Bee node
**Warning: Swarm Desktop is in Beta and currently includes the [Sentry](https://sentry.io/welcome/) application monitoring and bug reporting software which automatically collects data in order to help improve the software.**
**Warning: This project is in beta state. There might (and most probably will) be changes in the future to its API and
working. Also, no guarantees can be made about its stability, efficiency, and security at this stage.**

**Warning: This project is in beta state. There might (and most probably will) be changes in the future to its API and working. Also, no guarantees can be made about its stability, efficiency, and security at this stage.**

Stay up to date by joining the [official Discord](https://discord.gg/GU22h2utj6) and by keeping an eye on the [releases tab](https://github.com/ethersphere/swarm-desktop/releases).
Stay up to date by joining the [official Discord](https://discord.gg/GU22h2utj6) and by keeping an eye on the
[releases tab](https://github.com/ethersphere/swarm-desktop/releases).

## Table of Contents

Expand All @@ -27,17 +27,17 @@ Stay up to date by joining the [official Discord](https://discord.gg/GU22h2utj6)

## Install

Go to the [releases page](https://github.com/ethersphere/swarm-desktop/releases/latest) and download the correct build for your operation system:

- Windows: `Swarm.Desktop-***.Setup.exe`
- macOS: `Swarm.Desktop-darwin-x64-***.zip`
- Linux: `swarm-desktop_***_amd64.deb` or `swarm-desktop-***-1.x86_64.rpm`
Go to the [releases page](https://github.com/ethersphere/swarm-desktop/releases/latest) and download the correct build
for your operation system:

> Until 1.0 release, all our developer releases has automatically enabled error tracking and reporting using sentry.io which is not possible to opt-out!
- Windows: `Swarm.Desktop-***.Setup.exe`
- macOS: `Swarm.Desktop-darwin-x64-***.zip`
- Linux: `swarm-desktop_***_amd64.deb` or `swarm-desktop-***-1.x86_64.rpm`

### macOS

macOS may not allow you to run the .app after unzipping. To solve this, right click the .app and click Open. You will have an option to ignore the warning.
macOS may not allow you to run the .app after unzipping. To solve this, right click the .app and click Open. You will
have an option to ignore the warning.

## Usage

Expand All @@ -49,57 +49,60 @@ There are some ways you can make this module better:

- Consult our [open issues](https://github.com/ethersphere/swarm-desktop/issues) and take on one of them
- Help our tests reach 100% coverage!
- Join us in our [Discord chat](https://discord.gg/wdghaQsGq5) in the #develop-on-swarm channel if you have questions or want to give feedback
- Join us in our [Discord chat](https://discord.gg/wdghaQsGq5) in the #develop-on-swarm channel if you have questions or
want to give feedback

### Architecture

Swarm Desktop consists of two components:

1. Electron back-end that provides orchestration API that retrieve, spins, stops and manage the Bee node
2. Bundled [Bee Dashboard](https://github.com/ethersphere/bee-dashboard) that provides UI to manage Bee node and provides access to Swarm network
1. Electron back-end that provides orchestration API that retrieve, spins, stops and manage the Bee node
2. Bundled [Bee Dashboard](https://github.com/ethersphere/bee-dashboard) that provides UI to manage Bee node and
provides access to Swarm network

The Electron back-end is placed in `src` folder.

The Bee Desktop stores logs of both itself and Bee in the application's logs folder:

- macOS: `~/Library/Logs/Swarm Desktop/`
- Windows: `%LOCALAPPDATA%\Swarm Desktop\Log\` (for example, `C:\Users\USERNAME\AppData\Local\Swarm Desktop\Log\`)
- Linux: `~/.local/state/Swarm Desktop/`
- macOS: `~/Library/Logs/Swarm Desktop/`
- Windows: `%LOCALAPPDATA%\Swarm Desktop\Log\` (for example, `C:\Users\USERNAME\AppData\Local\Swarm Desktop\Log\`)
- Linux: `~/.local/state/Swarm Desktop/`

It also stores configuration files, Bee assets and other things in application's data folder:

- Windows: `%LOCALAPPDATA%\Swarm Desktop\Data` (for example, `C:\Users\USERNAME\AppData\Local\Swarm Desktop\Data`)
- Mac OS: `~/Library/Application Support/Swarm Desktop`
- Linux: `~/.local/share/Swarm Desktop` (or `$XDG_DATA_HOME/Swarm Desktop`)
- Windows: `%LOCALAPPDATA%\Swarm Desktop\Data` (for example, `C:\Users\USERNAME\AppData\Local\Swarm Desktop\Data`)
- Mac OS: `~/Library/Application Support/Swarm Desktop`
- Linux: `~/.local/share/Swarm Desktop` (or `$XDG_DATA_HOME/Swarm Desktop`)

### Development

As there are several independent components it bit depends on what you want to develop.

**Be aware!** The UI won't automatically open during development in order not to confuse on which
environment they are running. You have to open them manually.
**Be aware!** The UI won't automatically open during development in order not to confuse on which environment they are
running. You have to open them manually.

#### Electron Desktop

To work on the Electron Desktop back-end you just need to do your work and then run `npm start`. This will launch the
Electron app and shows the Tray icon. No UI will be opened automatically. If you need to make more adjustment you have to exit
the process with `SIGINT (CTRL+C)` and relaunch.
Electron app and shows the Tray icon. No UI will be opened automatically. If you need to make more adjustment you have
to exit the process with `SIGINT (CTRL+C)` and relaunch.

#### UI (Dashboard)

To work on the Dashboard, run first `npm start` that will spin up the Electron Desktop back-end. Then go to your locally cloned `bee-dashboard` repo and
in it start the development server with `npm start`. Dashboard also needs to have API key injected in order to use the
Desktop's API. You can inject it by running `npm run desktop` in the Dashboard repo that will open the Dashboard UI with API key in the URL.
Changes are automatically hot-reloaded.
To work on the Dashboard, run first `npm start` that will spin up the Electron Desktop back-end. Then go to your locally
cloned `bee-dashboard` repo and in it start the development server with `npm start`. Dashboard also needs to have API
key injected in order to use the Desktop's API. You can inject it by running `npm run desktop` in the Dashboard repo
that will open the Dashboard UI with API key in the URL. Changes are automatically hot-reloaded.

The UI served by the Desktop itself is updated only when you update the `@ethersphere/bee-dashboard` NPM package in the Desktop repo.
The UI served by the Desktop itself is updated only when you update the `@ethersphere/bee-dashboard` NPM package in the
Desktop repo.

#### Maintenance tasks

There are several handy scripts:

- `npm run purge:data` that purge's the Desktop's data folder
- `npm run purge:logs` that purge's the Desktop's logs folder
- `npm run purge:data` that purge's the Desktop's data folder
- `npm run purge:logs` that purge's the Desktop's logs folder

## Maintainers

Expand Down
Loading

0 comments on commit a98eb59

Please sign in to comment.