85 Commits

Author SHA1 Message Date
Hubert Deng
ea26ee5e21
Use docker compose exec to account for differences in container names for Postgres upgrade (#2096)
* use docker compose exec instead of docker exec

* use our $dc shortcut instead of docker compose
2023-04-18 20:55:19 -04:00
Hubert Deng
a6d46a900b
Upgrade Postgres to 14 (#2074)
* add postgres upgrade script, this is included in the install script and automatically upgrades users from PG 9.6 to 14
2023-04-11 17:15:13 -07:00
Josh Ferge
19a95c3021
feat(replays): add replays to self hosted (#1990) 2023-02-28 13:24:33 -08:00
Benedikt Franke
ec4f416c26
Reference paths relative to project root (#1800)
* Reference paths relative to the current script or project root

Before this PR:
- some scripts change the current working directory and use relative paths
- different approaches are taken to know which directory a script is running in
- paths are sometimes relative, sometimes absolute, sometimes traversing directories

After this PR:
- scripts do neither change nor care much about the current working directory
- a unified approach determines the directory of the current script
- paths are always relative to the project root

This should resolve an issue I already tried to fix with https://github.com/getsentry/self-hosted/pull/1798,
where the contents of `./sentry` were not copied
into the built container image,
thus `enhance-image.sh` did not apply.

Co-authored-by: Amin Vakil <info@aminvakil.com>
2023-02-17 09:59:48 -08:00
Chad Whitacre
0890133e5a
Handle missing example files gracefully (#1950) 2023-02-01 19:12:29 +00:00
Chad Whitacre
da6c38a5ed
Add wal2json debugging (#1906) 2023-01-09 21:41:34 +00:00
Ethan Smith
47ea7a0346
ref: Move jq build to error-handling.sh, and use proxy config (#1895)
This fixes [errors early in the installer run not getting reported correctly](https://github.com/getsentry/self-hosted/issues/1884) and [jq's docker build not using the proxy config correctly](https://github.com/getsentry/self-hosted/issues/1871)
2023-01-06 12:11:58 -08:00
volokluev
293604afec
fix(CI): use default curl retry mechanism for wal2json install (#1890)
Co-authored-by: Vlad Kluev <vlad.kluev@sentry.io>
2022-12-30 13:49:38 -08:00
Ethan Smith
ee9aea9f44
ref: Retry wal2json download in installer (#1881)
Retry curl calls with exponential backoff.
2022-12-27 14:43:22 -08:00
Ethan Smith
6b09d0aad1
Build each service image individually (#1858)
Fixes https://github.com/getsentry/self-hosted/issues/1847
2022-12-09 11:00:48 -08:00
Owain Jones
fcf0d3599b
Add --skip-sse42-requirements to install.sh and enable SKIP_SSE42_REQUIREMENTS override (#1790)
Not all environments are KVM, and not all virtualized CPUs show SSE4.2 support even if they do support it. This adds an escape hatch if you know what you are doing.
2022-12-07 18:46:39 -08:00
Ethan Smith
433afd9397
Fix jq usage (#1814)
In this PR we fix our usage of jq:
1. Use the container. Before we were accidentally using jq installed in the environment
1. Rewrite generate_breadcrumb_json to read log file all at once
1. Build docker image for jq in unit tests
2022-11-15 13:36:23 -08:00
Hubert Deng
97a4e5cce4
Add context line, error msg to envelope (#1784)
* add context line, error msg to envelope
2022-11-04 08:38:44 -07:00
Hubert Deng
0d3191d9ac
Enforce error reporting (#1777)
enforce error reporting
2022-10-26 18:07:57 -07:00
Ethan Smith
3a07ff4884
Upload end of log as breadcrumbs, use exceptions and stacktrace (#1775)
In this PR, we change the send-event function to write out more information into the envelope we send via sentry-cli, particularly adding breadcrumbs with the end of the log and giving the stack trace in a format Sentry self-hosted can understand.

Fixes getsentry/team-ospo#54 and getsentry/team-ospo#53
Example issue with this formatting: https://self-hosted.getsentry.net/organizations/self-hosted/issues/227/?query=is%3Aunresolved
2022-10-26 14:15:32 -07:00
Ethan Smith
6b9306a17c
Add pre-commit config (#1738) 2022-10-21 13:46:35 -07:00
Hubert Deng
58caa0c7a3
Do not send event on INT signal (#1773)
* do not send event on INT signal
2022-10-20 15:31:55 -07:00
Hubert Deng
65fa3d4b8a
Revert "Enforce error reporting for self-hosted" (#1755)
Revert "Enforce error reporting for self-hosted (#1753)"

This reverts commit 156eef6ebb94875525b6f4906387e7b8c1027815.
2022-10-17 11:21:32 -07:00
Hubert Deng
156eef6ebb
Enforce error reporting for self-hosted (#1753) 2022-10-17 10:16:39 -07:00
Burak Yigit Kaya
54ca9b0817
ref: Remove unused scripts and code (#1710) 2022-10-05 20:39:20 +00:00
Hubert Deng
1920b23d7d
Check to see if docker compose exists, else error out (#1733)
* check to see if docker compose exists

* add check for docker version command doesn't error out

* clean up exception handling of docker commands

* merge master
2022-10-04 15:09:20 -07:00
Hubert Deng
202742c98b
Fix minimum version requirements for docker and docker compose (#1732)
* echo return code to be used in version comparison

* use the not flag to correctly use vergte to compare versions

* include -eq 1 in version matching
2022-10-03 13:54:09 -07:00
Hubert Deng
871c5f6092
Reorganize unit test layout (#1729)
* fix failing unit tests

* fix unit test pipeline

* add newline to unit-test file

* preserve semantics from docker volume test

* add error-handling tests

* reorganize file structure of unit tests

* add comment for using _file format in ensure relay credentials test

* add error handling unit tests

* use unit-test directory

* stack trace should be from the unit test directory

* Slightly better fail signal

* Clearer start as well

Co-authored-by: Chad Whitacre <chadwhitacre@sentry.io>
2022-09-29 14:48:48 -07:00
Hubert Deng
b95e926ae2
Send full logs as an attachment to our dogfood instance (#1715)
* fixed envelope to send full log file

* remove send event function

* don't remove envelope temp files, but use error+traceback for event id hash

Co-authored-by: Ethan Smith <ethan@ethanhs.me>

* clean up some comments

Co-authored-by: Ethan Smith <ethan.smith@sentry.io>
Co-authored-by: Ethan Smith <ethan@ethanhs.me>
2022-09-22 15:48:34 -07:00
Hubert Deng
75990a8154
Fix traceback hash for error monitoring (#1700)
fix traceback hash for error monitoring
2022-09-14 21:34:36 +00:00
Chad Whitacre
2341015bca
Switch from .reporterrors file to flag + envvar (#1697) 2022-09-14 20:34:32 +00:00
Chad Whitacre
9df7e7da30
Rename flag to --skip-user-creation (#1696) 2022-09-14 19:59:12 +00:00
Chad Whitacre
2ef54aaf88
Default to not sending data to Sentry for now (#1695) 2022-09-14 19:11:03 +00:00
Ethan Smith
d298f66a0e
Error monitoring of the self-hosted installer (#1679)
This is the MVP of error monitoring of the self-hosted installer. We have:
- Added a prompt for users to opt into error reporting
- Rewritten the traceback code to give a full stack trace
- Hooked up sending errors to our self-hosted instance

Fixes #740

Co-authored-by: Chad Whitacre <chadwhitacre@sentry.io>
Co-authored-by: hubertdeng123 <hubertdeng123@gmail.com>
2022-09-13 10:25:38 -07:00
Ethan Smith
eb4d70995b
ref: use sort -V to check minimum versions (#1553) 2022-07-12 12:37:28 -07:00
Chad Whitacre
ddbf7cd2d0
Add ARM support (#1538)
Co-authored-by: Ethan Smith <ethan.smith@sentry.io>
2022-07-08 19:03:52 -07:00
Ethan Smith
e028a5ed52
ref: Replace regex with --short flag to get compose version (#1551)
This flag works all the way back to compose 1.4, when the version argument was introduced.
2022-06-30 13:38:59 -07:00
goganchic
2672ce5452
Improve installation through proxy (#1543) 2022-06-28 17:57:21 -04:00
Chad Whitacre
1852fe895a
Cleanup .env{,.custom} handling (#1539) 2022-06-28 13:19:46 -04:00
Benedikt Franke
9eff0c3b4d
Ease modification of base image (#1479) 2022-05-25 12:54:29 -04:00
asottile-sentry
9bd7766dff
fix: replace git.io links with redirect targets (#1430)
see: https://github.blog/changelog/2022-04-25-git-io-deprecation/

Committed via https://github.com/asottile/all-repos
2022-04-26 15:11:07 +00:00
Chad Whitacre
d3164cea5a
Turn off containers under old name as well (#1384) 2022-03-15 17:26:57 -04:00
Timo
3b5fe4369b
fix: unbound variable _group in reset/dc-detect-version script (#1283) (#1284) 2022-02-15 08:31:09 -05:00
drmrbrewer
f3027d08ca
Update set-up-and-migrate-database.sh (#1308) 2022-02-07 21:58:17 +00:00
Chad Whitacre
79292a3e41
Pull relay explicitly to avoid garbage in creds (#1301) 2022-02-04 18:30:05 -05:00
Chad Whitacre
e0a1d0dc77
Improve logging of docker versions and relay creds (#1298) 2022-02-04 17:05:53 -05:00
Chad Whitacre
771e2bc0bd
Remove file again (#1299) 2022-02-04 17:03:31 -05:00
Chad Whitacre
f1fa49d09d
Clean up relay credentials generation (#1289)
Admin override based on external contributor approvals
2022-02-03 17:39:00 -05:00
Chad Whitacre
e3f5670aab
Add CI compose version 1.29.2 / 2.0.1 / 2.2.3 (#1290)
* Revert "Revert "Add CI compose version 1.29.2 / 2.0.1 / 2.2.3 (#1251)" (#1272)"

This reverts commit da8f4903e4cfe47ca4fa5bf68265b62f795c60a0.

* Drop back to -T because long opt is Compose 2+

Admin-merging with approvals from outside contributors (All-seeing eye, are you seeing this? ;)
2022-02-03 15:49:27 -05:00
Chad Whitacre
da8f4903e4
Revert "Add CI compose version 1.29.2 / 2.0.1 / 2.2.3 (#1251)" (#1272)
This reverts commit 3abbb3e8bd3a4d1d2ecbdb0f4fb255507c55aca0.
2022-01-24 16:36:14 -05:00
Amin Vakil
3abbb3e8bd
Add CI compose version 1.29.2 / 2.0.1 / 2.2.3 (#1251) 2022-01-24 12:36:28 -05:00
Chad Whitacre
7eb16f348d
Take some actions to avoid unhealthy containers (#1241) 2022-01-07 09:00:02 -05:00
Amin Vakil
6c26bce20d
Fix reset.sh docker-compose call (#1215)
Co-authored-by: Matti Paksula <matti.paksula@iki.fi>
2021-12-22 08:59:45 -05:00
Chad Whitacre
596be66a0d
Docs and output tinkering for commit check (#1191) 2021-12-07 11:08:45 -05:00
Amin Vakil
3c060fc8d8
Check for latest commit before install.sh (#1186) 2021-12-06 15:41:13 -05:00