9 Commits

Author SHA1 Message Date
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
da6c38a5ed
Add wal2json debugging (#1906) 2023-01-09 21:41:34 +00: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
6b9306a17c
Add pre-commit config (#1738) 2022-10-21 13:46:35 -07:00
Burak Yigit Kaya
e17faecd10
fix: Fix curl image to version 7.77.0 (#1049)
Turns out the latest, `7.78.0` may have issues with DNS resolution from time to time (I experienced this locally). It is also a good practice to fix it to a specific version.
2021-08-04 22:36:48 +03:00
Florian Kaiser
bd8fbf960d
fix(wal2json): Respect http_proxy/https_proxy/no_proxy when installing (#1026)
`http_proxy`, `https_proxy` and `no_proxy` environment variables should be forwarded to the curl container.
2021-07-07 14:10:54 +00:00
Filippo Pacifici
d24a7b3ac6
fix(install) Make wal2json copy more robust (#1024)
There is a potential conrner case where we may end up with the wal2json library in the `postgres/wal2json/VERSION/file` but not in `postgres/wal2json/wal2json.so`.

Not sure exactly how likely this could be, but thechnically it is possible that the download succeeds and `cp "../postgres/wal2json/$VERSION/$FILE_NAME" "$FILE_TO_USE"` does not. The next attempt the copy would not be attempted.

This fix ensures the copy always happens
2021-07-06 12:31:12 +03:00
Filippo Pacifici
8dc84600c5
feat(cdc): Prepare the self hosted environment for the Change Data Capture pipeline (#938)
We will use Change Data Capture to stream WAL updates from postgres into clickhouse so that features like issue search will be able to join event data and metadata (from postgres) through Snuba.

This requires the followings:

A logical replicaiton plugin to be installed in postgres (https://github.com/getsentry/wal2json)
A service to run that streams from the replication log to Kafka (https://github.com/getsentry/cdc)
Datasets in Snuba.
This PR is preparing postgres to stream updates via the replication log.
The idea is to

download the the replication log plugin binary during install.sh
mount a volume with the binary when starting postgres
providing a new entrypoint to postgres that ensures everything is correctly configured.
There is a difference between how this is set up and how we do the same in the development environment.
In the development environment we download the library from the entrypoint itself and store it in a persistent volume, so we do not have to download it every time.
Unfortunately this does not work here as the postgres image is postgres:9.6 while it is postgres:9.6-alpine. This one does not come with either wget or curl. I don't think installing that in the entrypoint would be a good idea, so the download happens in install.sh. I actually think this way is safer so we never depend on connectivity for postgres to start properly.
2021-05-24 17:51:36 -07:00