121 Commits

Author SHA1 Message Date
Burak Yigit Kaya
49e30a7356
fix: Use js.sentry-cdn.com for JS SDK downloads (#3417)
Since we download JS SDKs in a for loop which invokes a separate docker container for each `curl` run, we seem to be triggering some sort of a DoS protection. And rightfully so as the old method causes TCP and TLS churn although we advertise we support HTTP/1.1 and HTTP/2.

This patch does a few things:

1. Uses `curl`s globbing support to download all files in one go, maxing TCP and TLS reuse. This should fix the DoS protection
2. Uses `curl`'s `--compress` option to make things even more efficient
3. Uses `curl`'s `--create-dirs` to save 1 docker container run per version for creating the directory
4. Removes the `-I` `HEAD` checks in favor of a `-f` fail option combined with `|| true` which makes curl fail and not write the output on a non-200 response while still allowing the script to succeed
5. To make sure the above approach works, it adds a file size test, requiring all downloaded files to be larger than 1kB
2024-11-07 12:25:53 +00:00
Reinaldy Rafli
2a7abf215e
fix(loader): provide js sdk assets from 4.x (#3415)
Hopefully fixes https://github.com/getsentry/sentry/issues/22715#issuecomment-2458066842

### Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.
2024-11-07 10:11:07 +00:00
Reinaldy Rafli
5910c02cc4
ref: allow hosted js sdk bundles (#3365)
* ref: allow hosted js sdk bundles


---------

Co-authored-by: Burak Yigit Kaya <ben@byk.im>
2024-10-07 16:03:28 -07:00
joshuarli
3cf323843a
fix: more leeway for minimum RAM (#3290)
more generous leeway
2024-08-23 12:32:52 -07:00
Hubert Deng
b6de547e45
Mandate minimum requirements for ram/cpu (#3275) 2024-08-17 12:26:50 -07:00
Hubert Deng
0ce7b00b2a
Migrate to zookeeper-less kafka (#3263)
* migrate to kraft

* fix syntax error

* move zookeeper volume removal to end of installation
2024-08-13 14:14:11 -07:00
Michal Kuffa
534a874c0b
Remove cdc and wal2json and use the default postgres entrypoint (#3260)
* Remove cdc and wal2json and use the default postgres entrypoint

* Remove the last bits of wal2json install

* Remove read-only postgres volume bind
2024-08-12 09:12:37 -07:00
Hubert Deng
c18da05a46
Check postgres os before proceeding with install (#3197)
* check postgres os before proceeding

* use dc
2024-07-12 09:33:49 -07:00
Hubert Deng
a6cb076910
Use general kafka topic creation in self-hosted (#3121)
* use general kafka topic creation
2024-06-12 15:37:15 -07:00
Dan Fuller
f8e95ec868
feat: Add crons task consumers (#3106)
We now process tasks via Kafka consumers instead of celerybeat. This needs to be added to self-hosted as well
2024-06-04 10:35:30 -07:00
Jann Kleen
c40b1530d1
Update minimum docker compose requirement (#3078)
* Update minimum docker compose requirement

docker compose down <service> is now required.

* Update docker compose version to new minimum in CI config.
2024-05-29 14:59:22 -07:00
Hubert Deng
0dabb5a4cc
Different approach to editing permissions of docker volumes (#3084)
* different approach to editing permissions of docker volumes
2024-05-29 11:30:44 -07:00
Nicolas Boutet
6032d98025
Fix install: use dynamic docker root dir instead of hardcoded one (#3064)
Fix: use dynamic docker root dir instead of hardcoded
2024-05-21 19:14:52 -07:00
Hubert Deng
9de4b70ece
fix: Make docker volume script respect compose project name (#3039)
make the script a bit more robust in finding compose peojct name
2024-05-13 09:50:28 -07:00
Hubert Deng
1c72fbe612
Add clickhouse healthchecks to upgrade (#3024)
add clickhouse healthchecks
2024-05-06 15:38:15 -07:00
Hubert Deng
67382fd2ab
Upgrade clickhouse to 23.8 (#3009)
* upgrade clickhouse
2024-05-06 09:22:03 -07:00
Hubert Deng
6db528d71a
Bump kafka and zookeeper versions (#2988)
* bump kafka and zookeeper versions
2024-04-30 12:32:22 -07:00
Steffen Zieger
d586cff03a
Use docker compose exec to create additional kafka topics (#2904) 2024-04-17 09:38:21 -07:00
Hubert Deng
746031dda4
Integration test improvements (#2858)
* integration test improvements
2024-03-07 14:49:16 -08:00
Hubert Deng
45a92bdaa5
chore: Use django ORM to perform sql commands (#2827)
* use django orm
2024-02-26 16:22:28 -08:00
Hubert Deng
b15d7ee6c2
Tweak postgres indexing fix (#2792)
* tweak postgres indexing fix

* add exists constraint
2024-02-14 13:20:43 -08:00
Hubert Deng
c3da53d2e7
fix: DB migration script (#2779)
* use different approach to wait for postgres server
2024-02-09 09:20:06 -08:00
Chad Whitacre
faef482109
Check memcached backend in Django (#2778)
Bail if using old memcached backend
2024-02-08 22:15:19 +00:00
Hubert Deng
2346a69767
Fix groupedmessage indexing error (#2777)
* fix groupedmessage indexing error
2024-02-08 13:03:09 -08:00
Hubert Deng
5c7c19246f
Enable crons (#2712)
enable crons
2024-01-16 21:31:17 +00:00
anthony sottile
f43ffd4bb2
ref: use git branch --show-current instead of sed (#2550) 2023-11-07 20:04:45 +00:00
Hubert Deng
ed8cc79483
Upgrade Clickhouse to 21.8 (#2536)
* bump clickhouse images
2023-11-02 12:22:06 -07:00
Hubert Deng
48c30b08c0
Revert "feat: upgrade to zookeeper-less kafka (#2445)" (#2500)
This reverts commit a177142f3569dbd05dc6934eb13d1a40f615bb07.
2023-10-19 12:22:35 -07:00
Joshua Li
a177142f35
feat: upgrade to zookeeper-less kafka (#2445)
* upgrade to zookeeper-less kafka

* clean up sentry-zookeeper volume if it exists

---------

Co-authored-by: hubertdeng123 <hubertdeng123@gmail.com>
2023-10-17 13:50:12 -07:00
Hubert Deng
cad1deb8b2
Add metrics and generic metrics backend (#2355)
* add metrics backend
2023-08-30 16:17:49 -07:00
Hubert Deng
09b623677f
Add issue platform infra (#2309)
* enable issue platform
2023-08-04 13:58:47 -07:00
Chad Whitacre
27c9cc7594
Fix error fingerprinting (#2237) 2023-06-27 02:20:32 +00:00
Alex Zaslavsky
80d4e67d8c
Fix #1684 (#2234)
Previous situation: we do most of our "check minimum requirements" work in the aptly named check-minimum-requirements.sh. This would be a natural home for the "check if docker even exists on this system" verification, but we actually run call into docker info to set some environment variables before this script gets run, in detect-platforms.sh. So I've adde the "does docker exist" check to that file, directly before we call docker info.
2023-06-26 11:29:57 -07:00
Hubert Deng
78cc53fd52
ref: Move all consumers to unified consumer CLI (#2224)
Co-authored-by: Markus Unterwaditzer <markus-tarpit+git@unterwaditzer.net>
2023-06-24 01:48:42 +02:00
Hubert Deng
5c77236dc5
Remove docker compose v1 (#2187)
* remove docker compose v1
2023-06-09 09:04:10 -07:00
Pierre Massat
e07be386ee
feat(profiling): Run profiling on self-hosted (#2154) 2023-06-02 13:58:49 +00:00
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