getsentry / self-hosted

Sentry, feature-complete and packaged up for low-volume deployments and proofs-of-concept
https://develop.sentry.dev/self-hosted/
Other
7.65k stars 1.74k forks source link

Upgrading to 23.4.0 fails on DB migration scripts #2094

Closed semblano closed 1 year ago

semblano commented 1 year ago

Self-Hosted Version

21.10.0

CPU Architecture

x86_64

Docker Version

23.0.4

Docker Compose Version

v2.17.2

Steps to Reproduce

We are using our own Postgres instance, running on version 14.

I updated sentry.conf.py to point to our DB and commented the postgres entries on docker-compose.yml

After that, I executed ./install.sh

Expected Result

Installation should upgrade Sentry.io from version 21.10.0 to 23.4.0

Actual Result

▶ Parsing command line ...

▶ Detecting Docker platform Detected Docker platform is linux/amd64

▶ Initializing Docker Compose ...

▶ Setting up error handling ... Sending build context to Docker daemon 2.048kB Step 1/4 : FROM debian:bullseye-slim bullseye-slim: Pulling from library/debian 26c5c85e47da: Pulling fs layer 26c5c85e47da: Verifying Checksum 26c5c85e47da: Download complete 26c5c85e47da: Pull complete Digest: sha256:b29ef9073dba7475c4eb37e071b4e92e3409cb25988faa566db12942be2b741e Status: Downloaded newer image for debian:bullseye-slim ---> d0cf0e3d07c6 Step 2/4 : LABEL MAINTAINER="oss@sentry.io" ---> Running in 85de5608fd58 Removing intermediate container 85de5608fd58 ---> d4b985192155 Step 3/4 : RUN set -x && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends jq && apt-get clean && rm -rf /var/lib/apt/lists/* ---> Running in fec5e3eabf50

Hey, so ... we would love to automatically find out about issues with your Sentry instance so that we can improve the product. Turns out there is an app for that, called Sentry. Would you be willing to let us automatically send data about your instance upstream to Sentry for development and debugging purposes?

y / yes / 1 n / no / 0

(Btw, we send this to our own self-hosted Sentry instance, not to Sentry SaaS, so that we can be in this together.)

Here's the info we may collect:

Thirty (30) day retention. No marketing. Privacy policy at sentry.io/privacy.

y or n? Understood. To avoid this prompt in the future, use one of these flags:

--report-self-hosted-issues --no-report-self-hosted-issues

or set the REPORT_SELF_HOSTED_ISSUES environment variable:

REPORT_SELF_HOSTED_ISSUES=1 to send data REPORT_SELF_HOSTED_ISSUES=0 to not send data

▶ Checking for latest commit ... skipped

▶ Checking minimum requirements ... Found Docker version 19.03.14 Found Docker Compose version 1.29.2

▶ Turning things off ... Removing network sid-sentry-bs01_default Network sid-sentry-bs01_default not found.

▶ Creating volumes for persistent storage ... Created sentry-clickhouse. Created sentry-data. Created sentry-kafka. Created sentry-postgres. Created sentry-redis. Created sentry-symbolicator. Created sentry-zookeeper.

▶ Ensuring files from examples ... sentry/sentry.conf.py already exists, skipped creation. sentry/config.yml already exists, skipped creation. Creating symbolicator/config.yml ...

▶ Ensuring Relay credentials ... Creating relay/config.yml ... Pulling relay ... Pulling relay ... pulling from getsentry/relay Pulling relay ... pull complete Pulling relay ... digest: sha256:c5e282591c38d71ca0... Pulling relay ... status: downloaded newer image fo... Pulling relay ... done Creating network "sid-sentry-bs01_default" with the default driver Creating volume "sid-sentry-bs01_sentry-secrets" with default driver Creating volume "sid-sentry-bs01_sentry-smtp" with default driver Creating volume "sid-sentry-bs01_sentry-nginx-cache" with default driver Creating volume "sid-sentry-bs01_sentry-zookeeper-log" with default driver Creating volume "sid-sentry-bs01_sentry-kafka-log" with default driver Creating volume "sid-sentry-bs01_sentry-smtp-log" with default driver Creating volume "sid-sentry-bs01_sentry-clickhouse-log" with default driver Creating sid-sentry-bs01_relay_run ... Creating sid-sentry-bs01_relay_run ... done Creating sid-sentry-bs01_relay_run ... Creating sid-sentry-bs01_relay_run ... done Relay credentials written to relay/credentials.json.

▶ Generating secret key ... Secret key written to sentry/config.yml

▶ Fetching and updating Docker images ... Some service image(s) must be built from source by running: docker-compose build symbolicator-cleanup post-process-forwarder-errors clickhouse sentry-cleanup ingest-replay-recordings ingest-consumer cron worker web post-process-forwarder-transactions subscription-consumer-transactions subscription-consumer-events 23.4.0: Pulling from getsentry/sentry Digest: sha256:bd4d3e2b3c868eefcb762cbc879474321e0f88dece78c56130dfaee6a2d5396a Status: Downloaded newer image for getsentry/sentry:23.4.0 docker.io/getsentry/sentry:23.4.0

▶ Building and tagging Docker images ... ... Docker images built.

▶ Downloading and installing wal2json ... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 101k 100 101k 0 0 220k 0 --:--:-- --:--:-- --:--:-- 17.4M

▶ Bootstrapping and migrating Snuba ... Creating sid-sentry-bs01_redis_1 ... Creating sid-sentry-bs01_clickhouse_1 ... Creating sid-sentry-bs01_zookeeper_1 ... Creating sid-sentry-bs01_clickhouse_1 ... done Creating sid-sentry-bs01_zookeeper_1 ... done Creating sid-sentry-bs01_redis_1 ... done Creating sid-sentry-bs01_kafka_1 ... Creating sid-sentry-bs01_kafka_1 ... done Creating sid-sentry-bs01_snuba-api_run ... Creating sid-sentry-bs01_snuba-api_run ... done 2023-04-17 15:07:02,450 Initializing Snuba... 2023-04-17 15:07:05,339 Snuba initialization took 2.890596868470311s 2023-04-17 15:07:05,755 Initializing Snuba... 2023-04-17 15:07:08,657 Snuba initialization took 2.9026157297194004s 2023-04-17 15:07:08,658 Attempting to connect to Kafka (attempt 0)... 2023-04-17 15:07:08,722 Connected to Kafka on attempt 0 2023-04-17 15:07:08,724 Creating Kafka topics... 2023-04-17 15:07:09,385 Topic transactions created 2023-04-17 15:07:09,385 Topic snuba-transactions-commit-log created 2023-04-17 15:07:09,386 Topic snuba-metrics-commit-log created 2023-04-17 15:07:09,386 Topic scheduled-subscriptions-metrics created 2023-04-17 15:07:09,386 Topic scheduled-subscriptions-generic-metrics-sets created 2023-04-17 15:07:09,386 Topic scheduled-subscriptions-generic-metrics-distributions created 2023-04-17 15:07:09,386 Topic scheduled-subscriptions-generic-metrics-counters created 2023-04-17 15:07:09,387 Topic metrics-subscription-results created 2023-04-17 15:07:09,387 Topic generic-metrics-subscription-results created 2023-04-17 15:07:09,387 Topic processed-profiles created 2023-04-17 15:07:09,388 Topic profiles-call-tree created 2023-04-17 15:07:09,388 Topic ingest-replay-events created 2023-04-17 15:07:09,388 Topic snuba-generic-metrics created 2023-04-17 15:07:09,388 Topic snuba-generic-metrics-sets-commit-log created 2023-04-17 15:07:09,388 Topic snuba-generic-metrics-distributions-commit-log created 2023-04-17 15:07:09,389 Topic snuba-generic-metrics-counters-commit-log created 2023-04-17 15:07:09,389 Topic generic-events created 2023-04-17 15:07:09,389 Topic snuba-generic-events-commit-log created 2023-04-17 15:07:09,390 Topic snuba-attribution created 2023-04-17 15:07:09,390 Topic snuba-dead-letter-metrics created 2023-04-17 15:07:09,390 Topic snuba-dead-letter-sessions created 2023-04-17 15:07:09,390 Topic snuba-dead-letter-generic-metrics created 2023-04-17 15:07:09,391 Topic snuba-dead-letter-replays created 2023-04-17 15:07:09,391 Topic snuba-dead-letter-generic-events created 2023-04-17 15:07:09,391 Topic snuba-dead-letter-querylog created Creating sid-sentry-bs01_snuba-api_run ... Creating sid-sentry-bs01_snuba-api_run ... done 2023-04-17 15:07:11,809 Initializing Snuba... 2023-04-17 15:07:14,497 Snuba initialization took 2.689092516899109s 2023-04-17 15:07:14,853 Initializing Snuba... 2023-04-17 15:07:17,423 Snuba initialization took 2.571584727615118s 2023-04-17 15:07:17,475 Running migration: 0016_drop_legacy_events 2023-04-17 15:07:17,489 Finished: 0016_drop_legacy_events 2023-04-17 15:07:17,495 Running migration: 0017_errors_add_indexes 2023-04-17 15:07:17,529 Finished: 0017_errors_add_indexes 2023-04-17 15:07:17,537 Running migration: 0018_errors_ro_add_tags_hash_map 2023-04-17 15:07:17,542 Finished: 0018_errors_ro_add_tags_hash_map 2023-04-17 15:07:17,549 Running migration: 0019_add_replay_id_column 2023-04-17 15:07:17,572 Finished: 0019_add_replay_id_column 2023-04-17 15:07:17,579 Running migration: 0020_add_main_thread_column 2023-04-17 15:07:17,596 Finished: 0020_add_main_thread_column 2023-04-17 15:07:17,604 Running migration: 0021_add_replay_id_errors_ro 2023-04-17 15:07:17,610 Finished: 0021_add_replay_id_errors_ro 2023-04-17 15:07:17,617 Running migration: 0022_add_main_thread_column_errors_ro 2023-04-17 15:07:17,622 Finished: 0022_add_main_thread_column_errors_ro 2023-04-17 15:07:17,627 Running migration: 0013_transactions_reduce_spans_exclusive_time 2023-04-17 15:07:17,656 Finished: 0013_transactions_reduce_spans_exclusive_time 2023-04-17 15:07:17,663 Running migration: 0014_transactions_remove_flattened_columns 2023-04-17 15:07:17,758 Finished: 0014_transactions_remove_flattened_columns 2023-04-17 15:07:17,766 Running migration: 0015_transactions_add_source_column 2023-04-17 15:07:17,788 Finished: 0015_transactions_add_source_column 2023-04-17 15:07:17,796 Running migration: 0016_transactions_add_group_ids_column 2023-04-17 15:07:17,820 Finished: 0016_transactions_add_group_ids_column 2023-04-17 15:07:17,828 Running migration: 0017_transactions_add_app_start_type_column 2023-04-17 15:07:17,847 Finished: 0017_transactions_add_app_start_type_column 2023-04-17 15:07:17,853 Running migration: 0018_transactions_add_profile_id 2023-04-17 15:07:17,870 Finished: 0018_transactions_add_profile_id 2023-04-17 15:07:17,878 Running migration: 0019_transactions_add_indexes_and_context_hash 2023-04-17 15:07:18,068 Finished: 0019_transactions_add_indexes_and_context_hash 2023-04-17 15:07:18,074 Running migration: 0020_transactions_add_codecs 2023-04-17 15:07:18,109 Finished: 0020_transactions_add_codecs 2023-04-17 15:07:18,114 Running migration: 0021_transactions_add_replay_id 2023-04-17 15:07:18,148 Finished: 0021_transactions_add_replay_id 2023-04-17 15:07:18,157 Running migration: 0005_outcomes_ttl 2023-04-17 15:07:18,171 Finished: 0005_outcomes_ttl 2023-04-17 15:07:18,178 Running migration: 0006_outcomes_add_size_col 2023-04-17 15:07:18,199 Finished: 0006_outcomes_add_size_col 2023-04-17 15:07:18,207 Running migration: 0007_outcomes_add_event_id_ttl_codec 2023-04-17 15:07:18,223 Finished: 0007_outcomes_add_event_id_ttl_codec 2023-04-17 15:07:18,229 Running migration: 0008_outcomes_add_indexes 2023-04-17 15:07:18,242 Finished: 0008_outcomes_add_indexes 2023-04-17 15:07:18,253 Running migration: 0001_metrics_buckets 2023-04-17 15:07:18,262 Finished: 0001_metrics_buckets 2023-04-17 15:07:18,270 Running migration: 0002_metrics_sets 2023-04-17 15:07:18,308 Finished: 0002_metrics_sets 2023-04-17 15:07:18,319 Running migration: 0003_counters_to_buckets 2023-04-17 15:07:18,333 Finished: 0003_counters_to_buckets 2023-04-17 15:07:18,340 Running migration: 0004_metrics_counters 2023-04-17 15:07:18,368 Finished: 0004_metrics_counters 2023-04-17 15:07:18,375 Running migration: 0005_metrics_distributions_buckets 2023-04-17 15:07:18,384 Finished: 0005_metrics_distributions_buckets 2023-04-17 15:07:18,391 Running migration: 0006_metrics_distributions 2023-04-17 15:07:18,429 Finished: 0006_metrics_distributions 2023-04-17 15:07:18,439 Running migration: 0007_metrics_sets_granularity_10 2023-04-17 15:07:18,449 Finished: 0007_metrics_sets_granularity_10 2023-04-17 15:07:18,456 Running migration: 0008_metrics_counters_granularity_10 2023-04-17 15:07:18,464 Finished: 0008_metrics_counters_granularity_10 2023-04-17 15:07:18,472 Running migration: 0009_metrics_distributions_granularity_10 2023-04-17 15:07:18,483 Finished: 0009_metrics_distributions_granularity_10 2023-04-17 15:07:18,490 Running migration: 0010_metrics_sets_granularity_1h 2023-04-17 15:07:18,499 Finished: 0010_metrics_sets_granularity_1h 2023-04-17 15:07:18,504 Running migration: 0011_metrics_counters_granularity_1h 2023-04-17 15:07:18,512 Finished: 0011_metrics_counters_granularity_1h 2023-04-17 15:07:18,518 Running migration: 0012_metrics_distributions_granularity_1h 2023-04-17 15:07:18,526 Finished: 0012_metrics_distributions_granularity_1h 2023-04-17 15:07:18,533 Running migration: 0013_metrics_sets_granularity_1d 2023-04-17 15:07:18,544 Finished: 0013_metrics_sets_granularity_1d 2023-04-17 15:07:18,552 Running migration: 0014_metrics_counters_granularity_1d 2023-04-17 15:07:18,561 Finished: 0014_metrics_counters_granularity_1d 2023-04-17 15:07:18,567 Running migration: 0015_metrics_distributions_granularity_1d 2023-04-17 15:07:18,575 Finished: 0015_metrics_distributions_granularity_1d 2023-04-17 15:07:18,581 Running migration: 0016_metrics_sets_consolidated_granularity 2023-04-17 15:07:18,589 Finished: 0016_metrics_sets_consolidated_granularity 2023-04-17 15:07:18,600 Running migration: 0017_metrics_counters_consolidated_granularity 2023-04-17 15:07:18,614 Finished: 0017_metrics_counters_consolidated_granularity 2023-04-17 15:07:18,624 Running migration: 0018_metrics_distributions_consolidated_granularity 2023-04-17 15:07:18,634 Finished: 0018_metrics_distributions_consolidated_granularity 2023-04-17 15:07:18,641 Running migration: 0019_aggregate_tables_add_ttl 2023-04-17 15:07:18,660 Finished: 0019_aggregate_tables_add_ttl 2023-04-17 15:07:18,667 Running migration: 0020_polymorphic_buckets_table 2023-04-17 15:07:18,677 Finished: 0020_polymorphic_buckets_table 2023-04-17 15:07:18,684 Running migration: 0021_polymorphic_bucket_materialized_views 2023-04-17 15:07:18,710 Finished: 0021_polymorphic_bucket_materialized_views 2023-04-17 15:07:18,721 Running migration: 0022_repartition_polymorphic_table 2023-04-17 15:07:18,732 Finished: 0022_repartition_polymorphic_table 2023-04-17 15:07:18,739 Running migration: 0023_polymorphic_repartitioned_bucket_matview 2023-04-17 15:07:18,755 Finished: 0023_polymorphic_repartitioned_bucket_matview 2023-04-17 15:07:18,762 Running migration: 0024_metrics_distributions_add_histogram 2023-04-17 15:07:18,790 Finished: 0024_metrics_distributions_add_histogram 2023-04-17 15:07:18,801 Running migration: 0025_metrics_counters_aggregate_v2 2023-04-17 15:07:18,832 Finished: 0025_metrics_counters_aggregate_v2 2023-04-17 15:07:18,841 Running migration: 0026_metrics_counters_v2_writing_matview 2023-04-17 15:07:18,855 Finished: 0026_metrics_counters_v2_writing_matview 2023-04-17 15:07:18,865 Running migration: 0027_fix_migration_0026 2023-04-17 15:07:18,876 Finished: 0027_fix_migration_0026 2023-04-17 15:07:18,883 Running migration: 0028_metrics_sets_aggregate_v2 2023-04-17 15:07:18,911 Finished: 0028_metrics_sets_aggregate_v2 2023-04-17 15:07:18,919 Running migration: 0029_metrics_distributions_aggregate_v2 2023-04-17 15:07:18,945 Finished: 0029_metrics_distributions_aggregate_v2 2023-04-17 15:07:18,952 Running migration: 0030_metrics_distributions_v2_writing_mv 2023-04-17 15:07:18,963 Finished: 0030_metrics_distributions_v2_writing_mv 2023-04-17 15:07:18,969 Running migration: 0031_metrics_sets_v2_writing_mv 2023-04-17 15:07:18,977 Finished: 0031_metrics_sets_v2_writing_mv 2023-04-17 15:07:18,985 Running migration: 0032_redo_0030_and_0031_without_timestamps 2023-04-17 15:07:19,004 Finished: 0032_redo_0030_and_0031_without_timestamps 2023-04-17 15:07:19,010 Running migration: 0033_metrics_cleanup_old_views 2023-04-17 15:07:19,038 Finished: 0033_metrics_cleanup_old_views 2023-04-17 15:07:19,043 Running migration: 0034_metrics_cleanup_old_tables 2023-04-17 15:07:19,056 Finished: 0034_metrics_cleanup_old_tables 2023-04-17 15:07:19,062 Running migration: 0035_metrics_raw_timeseries_id 2023-04-17 15:07:19,072 Finished: 0035_metrics_raw_timeseries_id 2023-04-17 15:07:19,078 Running migration: 0004_sessions_ttl 2023-04-17 15:07:19,092 Finished: 0004_sessions_ttl 2023-04-17 15:07:19,099 Running migration: 0001_replays 2023-04-17 15:07:19,113 Finished: 0001_replays 2023-04-17 15:07:19,119 Running migration: 0002_add_url 2023-04-17 15:07:19,129 Finished: 0002_add_url 2023-04-17 15:07:19,135 Running migration: 0003_alter_url_allow_null 2023-04-17 15:07:19,145 Finished: 0003_alter_url_allow_null 2023-04-17 15:07:19,152 Running migration: 0004_add_error_ids_column 2023-04-17 15:07:19,172 Finished: 0004_add_error_ids_column 2023-04-17 15:07:19,183 Running migration: 0005_add_urls_user_agent_replay_start_timestamp 2023-04-17 15:07:19,255 Finished: 0005_add_urls_user_agent_replay_start_timestamp 2023-04-17 15:07:19,264 Running migration: 0006_add_is_archived_column 2023-04-17 15:07:19,276 Finished: 0006_add_is_archived_column 2023-04-17 15:07:19,284 Running migration: 0007_add_replay_type_column 2023-04-17 15:07:19,296 Finished: 0007_add_replay_type_column 2023-04-17 15:07:19,303 Running migration: 0008_add_sample_rate 2023-04-17 15:07:19,319 Finished: 0008_add_sample_rate 2023-04-17 15:07:19,326 Running migration: 0009_add_dom_index_columns 2023-04-17 15:07:19,390 Finished: 0009_add_dom_index_columns 2023-04-17 15:07:19,401 Running migration: 0010_add_nullable_columns 2023-04-17 15:07:19,429 Finished: 0010_add_nullable_columns 2023-04-17 15:07:19,440 Running migration: 0001_sets_aggregate_table 2023-04-17 15:07:19,474 Finished: 0001_sets_aggregate_table 2023-04-17 15:07:19,483 Running migration: 0002_sets_raw_table 2023-04-17 15:07:19,494 Finished: 0002_sets_raw_table 2023-04-17 15:07:19,500 Running migration: 0003_sets_mv 2023-04-17 15:07:19,509 Finished: 0003_sets_mv 2023-04-17 15:07:19,515 Running migration: 0004_sets_raw_add_granularities 2023-04-17 15:07:19,527 Finished: 0004_sets_raw_add_granularities 2023-04-17 15:07:19,533 Running migration: 0005_sets_replace_mv 2023-04-17 15:07:19,543 Finished: 0005_sets_replace_mv 2023-04-17 15:07:19,549 Running migration: 0006_sets_raw_add_granularities_dist_table 2023-04-17 15:07:19,553 Finished: 0006_sets_raw_add_granularities_dist_table 2023-04-17 15:07:19,560 Running migration: 0007_distributions_aggregate_table 2023-04-17 15:07:19,596 Finished: 0007_distributions_aggregate_table 2023-04-17 15:07:19,604 Running migration: 0008_distributions_raw_table 2023-04-17 15:07:19,615 Finished: 0008_distributions_raw_table 2023-04-17 15:07:19,625 Running migration: 0009_distributions_mv 2023-04-17 15:07:19,636 Finished: 0009_distributions_mv 2023-04-17 15:07:19,644 Running migration: 0010_counters_aggregate_table 2023-04-17 15:07:19,677 Finished: 0010_counters_aggregate_table 2023-04-17 15:07:19,688 Running migration: 0011_counters_raw_table 2023-04-17 15:07:19,702 Finished: 0011_counters_raw_table 2023-04-17 15:07:19,709 Running migration: 0012_counters_mv 2023-04-17 15:07:19,720 Finished: 0012_counters_mv Finished running migrations

▶ Creating additional Kafka topics ... Creating sid-sentry-bs01_kafka_run ... Creating sid-sentry-bs01_kafka_run ... done Created topic ingest-replay-recordings.

▶ Ensuring proper PostgreSQL version ...

▶ Setting up / migrating database ... Creating sid-sentry-bs01_smtp_1 ... Creating sid-sentry-bs01_symbolicator_1 ... Creating sid-sentry-bs01_memcached_1 ... Creating sid-sentry-bs01_snuba-sessions-consumer_1 ... Creating sid-sentry-bs01_snuba-subscription-consumer-events_1 ... Creating sid-sentry-bs01_snuba-outcomes-consumer_1 ... Creating sid-sentry-bs01_snuba-subscription-consumer-transactions_1 ... Creating sid-sentry-bs01_snuba-api_1 ... Creating sid-sentry-bs01_snuba-consumer_1 ... Creating sid-sentry-bs01_snuba-transactions-consumer_1 ... Creating sid-sentry-bs01_snuba-replacer_1 ... Creating sid-sentry-bs01_memcached_1 ... done Creating sid-sentry-bs01_symbolicator_1 ... done Creating sid-sentry-bs01_smtp_1 ... done Creating sid-sentry-bs01_snuba-subscription-consumer-events_1 ... done Creating sid-sentry-bs01_snuba-sessions-consumer_1 ... done Creating sid-sentry-bs01_snuba-outcomes-consumer_1 ... done Creating sid-sentry-bs01_snuba-subscription-consumer-transactions_1 ... done Creating sid-sentry-bs01_snuba-transactions-consumer_1 ... done Creating sid-sentry-bs01_snuba-consumer_1 ... done Creating sid-sentry-bs01_snuba-replacer_1 ... done Creating sid-sentry-bs01_snuba-api_1 ... done Creating sid-sentry-bs01_web_run ... Creating sid-sentry-bs01_web_run ... done Updating certificates in /etc/ssl/certs... 5 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d... done. 15:07:38 [INFO] sentry.plugins.github: apps-not-configured Running migrations for default Operations to perform: Apply all migrations: admin, auth, contenttypes, nodestore, replays, sentry, sessions, sites, social_auth Running migrations: Applying replays.0001_init_replays... OK Applying replays.0002_rename_to_segment_id... OK Applying replays.0003_add_size_to_recording_segment... OK Applying sentry.0240_grouphistory_index... OK Applying sentry.0241_grouphistory_null_actor... OK Project Options: 100% |#########################################| Time: 0:00:00 Applying sentry.0242_delete_removed_plugin_data... OK Repositorys: 100% |#############################################| Time: 0:00:00 Applying sentry.0243_delete_visualstudio_repo_data... OK Applying sentry.0244_organization_and_integration_foreign_keys... OK Applying sentry.0245_delete_itunes_credentials... OK Applying sentry.0246_incident_snapshots_remove_fks... OK Applying sentry.0247_add_color_column... OK Applying sentry.0248_add_popularity_column... OK Applying sentry.0249_add_avatar_type_back... OK Sentry Apps: 100% |#############################################| Time: 0:00:00 Applying sentry.0250_backfill_popularity... OK Applying sentry.0251_sentryappavatar_sentryapp_not_unique... OK Applying sentry.0252_code_mapping_cascade_delete... OK Applying sentry.0253_add_widget_type... OK Applying sentry.0254_org_integration_grace_period_end... OK Applying sentry.0255_delete_code_mappings_with_no_integration... OK Applying sentry.0256_create_docintegration_table... OK Applying sentry.0257_add_target_id_and_type_to_integrationfeature... OK Applying sentry.0258_create_docintegrationavatar_table... OK Applying sentry.0259_delete_codeowners_and_code_mappings_with_no_integration... OK Integration Features: 100% |####################################| Time: 0:00:00 Applying sentry.0260_backfill_integrationfeature... OK Applying sentry.0261_prepare_remove_sentry_app_column... OK Applying sentry.0262_drop_sentry_app_from_integrationfeature... OK Applying sentry.0263_remove_not_null_integrationfeature... OK Applying sentry.0264_use_booleanfield_docintegration... OK Applying sentry.0265_add_userrole... OK Applying sentry.0266_add_dashboard_widget_detail_field... OK Applying sentry.0267_sentry_release_version_btree... OK Applying sentry.0268_rename_issue_widget_query_fields... OK Applying sentry.0269_alertrule_remove_unique_name... OK Applying sentry.0270_group_history_project_date_added_index... OK Applying sentry.0271_add_codeowners_auto_sync_setting... OK Applying sentry.0272_seq_scan_indexes... OK Applying sentry.0273_fix_grouplink_seqscans... OK Applying sentry.0274_add_dashboardwidgetquery_columns_aggregates... OK Applying sentry.0275_rule_fire_history... OK Applying sentry.0276_rulefirehistory_date_added_index... OK Applying sentry.0277_backfill_dashboard_widget_query_columns_aggregates... OK Applying sentry.0278_backfill_codeowners_auto_sync_setting... OK Applying sentry.0279_add_limit_dashboard_widget... OK Applying sentry.0280_extend_commit_author_email_length... OK Applying sentry.0281_add_new_indexer_table... OK Applying sentry.0282_add_field_aliases_dashboard_widget_query... OK Applying sentry.0283_extend_externalissue_key... OK Applying sentry.0284_metrics_indexer_alter_seq... OK Applying sentry.0285_add_organization_member_team_role... OK Applying sentry.0286_backfill_alertrule_organization... OK Applying sentry.0287_backfill_snubaquery_environment... OK Applying sentry.0288_fix_savedsearch_state... OK Applying sentry.0289_dashboardwidgetquery_convert_orderby_to_field... OK Projects: 100% |################################################| Time: 0:00:00 Applying sentry.0290_fix_project_has_releases... OK Applying sentry.0291_add_new_perf_indexer... OK Applying sentry.0292_migrate_sessions_subs_user_counts... OK Applying sentry.0293_restore_metrics_based_alerts... OK Applying sentry.0294_alertrule_type... OK Applying sentry.0295_backfill_alertrule_type... OK Applying sentry.0296_alertrule_type_not_null... OK Applying sentry.0297_backfill_alert_owners... OK Applying sentry.0298_add_dashboard_level_filter_fields... OK Applying sentry.0299_update_commitfilechange_filename_type... OK Applying sentry.0300_deploy_date_finished_index... OK Applying sentry.0301_mep_move_type_to_snuba_query... OK Applying sentry.0302_mep_backfill_and_not_null_snuba_query_type... OK Applying sentry.0303_backfill_msteams_default_installation_type... OK Applying sentry.0304_sentry_functions... OK Applying sentry.0305_create_releaseactivity_table... OK Applying sentry.0306_sentry_functions_code... OK Applying sentry.0307_remove_alert_type_state... OK Applying sentry.0308_remove_alert_type_column... OK Applying sentry.0309_fix_many_to_many_field... OK Applying sentry.0310_sentry_functions_add_webhooks... OK Identity Providers: 100% |######################################| Time: 0:00:00 Applying sentry.0311_backfill_slack_settings... OK Applying sentry.0312_has_profiles_flag... OK Applying sentry.0313_sentry_functions_env_variables... OK Applying sentry.0314_bit_int_for_org_and_project_id... OK Applying sentry.0315_add_type_to_group... OK Applying sentry.0316_add_context_field_to_groupowner... OK Applying sentry.0317_groupedmessage_type_index... OK Applying sentry.0318_add_is_homepage_to_saved_query_model... OK Applying sentry.0319_projectownership_fallthrough_false... OK Applying sentry.0320_rule_history_event_id... OK Applying sentry.0321_suspect_committer_auto_assignment... OK Applying sentry.0322_projectownership_fallthrough_revert... OK Applying sentry.0323_backfill_ownership_for_projects_with_codeowners... OK Applying sentry.0324_set_auto_assignments_true_by_default... OK Applying sentry.0325_turn_off_suspect_committer_auto_assignment_as_default... OK Applying sentry.0326_add_first_transaction_to_release_project... OK Applying sentry.0327_add_appid_str... OK Applying sentry.0328_backfill_app_id_str... OK Applying sentry.0329_make_app_id_nullable... OK Applying sentry.0330_add_project_replay_sent_flag... OK Applying sentry.0331_redirect_app_id... OK Applying sentry.0332_release_user_agent... OK Applying sentry.0333_remove_app_id... OK Applying sentry.0334_repositorypath_automatically_generated... OK Saved Searchs: 100% |###########################################| Time: 0:00:00 Applying sentry.0335_cleanup_old_savedsearches... OK Applying sentry.0336_mark_deprecated_savedsearch_is_default_nullable... OK Applying sentry.0337_drop_deprecated_savedsearch_columns... OK Applying sentry.0338_add_saved_search_visibility... OK Saved Searchs: 100% |###########################################| Time: 0:00:00 Applying sentry.0339_mark_old_pinned_savedsearches... OK Applying sentry.0340_drop_deprecated_savedsearch_columns_db_op... OK Applying sentry.0341_reconstrain_savedsearch_pinning_fields... OK Applying sentry.0342_add_spike_protection_flags_to_project... OK Applying sentry.0343_drop_savedsearch_userdefault_fk_constraints_and_remove_state... OK Applying sentry.0344_add_idp_flags... OK Applying sentry.0345_create_organizationmapping... OK Applying sentry.0346_add_flags_field_to_team_model... OK Applying sentry.0347_add_project_has_minified_stack_trace_flag... OK Applying sentry.0348_add_outbox_and_tombstone_tables... OK Organizations: 100% |###########################################| Time: 0:00:00 Applying sentry.0349_issue_alert_fallback... OK Applying sentry.0350_add_codecov_access_flag... OK Applying sentry.0351_project_has_checkins_monitors... OK Applying sentry.0352_add_org_role_to_team_model... OK Applying sentry.0353_add_missing_uuid_unique_indexes... OK Applying sentry.0354_break_saved_search_foreign_key... OK Applying sentry.0355_break_groupowner_user_foreign_key... OK Applying sentry.0356_break_release_owner_foreign_key... OK Applying sentry.0357_add_region_scheduled_deletions... OK Applying sentry.0358_break_group_related_user_fks... OK Applying sentry.0359_checkin_file_field... OK Applying sentry.0360_authenticator_config_type_change... OK Applying sentry.0361_monitor_environment... OK Applying sentry.0362_break_project_integration_fk... OK Applying sentry.0363_debug_id_artifact_bundle... OK Applying sentry.0364_remove_project_id_from_environment... OK Applying sentry.0365_breaking_more_fks... OK Applying sentry.0366_add_slug_to_monitors... OK Applying sentry.0367_migrate_monitor_guid_to_slug... OK Applying sentry.0368_monitor_remove_slug_nullable... OK Applying sentry.0369_break_useroption_org_fk... OK Applying sentry.0370_integrate_monitor_environment... OK Applying sentry.0371_monitor_make_org_slug_unique...Traceback (most recent call last): File "/usr/local/bin/sentry", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/site-packages/sentry/runner/init.py", line 192, in main func(kwargs) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1128, in call return self.main(args, kwargs) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 754, in invoke return __callback(args, kwargs) File "/usr/local/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), *args, kwargs) File "/usr/local/lib/python3.8/site-packages/sentry/runner/decorators.py", line 29, in inner return ctx.invoke(f, *args, *kwargs) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 754, in invoke return __callback(args, kwargs) File "/usr/local/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), *args, kwargs) File "/usr/local/lib/python3.8/site-packages/sentry/runner/commands/upgrade.py", line 100, in upgrade _upgrade(not noinput, traceback, verbosity, not no_repair, with_nodestore) File "/usr/local/lib/python3.8/site-packages/sentry/runner/commands/upgrade.py", line 51, in _upgrade dj_call_command( File "/usr/local/lib/python3.8/site-packages/django/core/management/init.py", line 148, in call_command return command.execute(*args, *defaults) File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 364, in execute output = self.handle(args, options) File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 83, in wrapped res = handle_func(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 232, in handle post_migrate_state = executor.migrate( File "/usr/local/lib/python3.8/site-packages/django/db/migrations/executor.py", line 117, in migrate state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial) File "/usr/local/lib/python3.8/site-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial) File "/usr/local/lib/python3.8/site-packages/sentry/new_migrations/monkey/executor.py", line 79, in apply_migration return super().apply_migration(state, migration, fake=fake, fake_initial=fake_initial) File "/usr/local/lib/python3.8/site-packages/django/db/migrations/executor.py", line 245, in apply_migration state = migration.apply(state, schema_editor) File "/usr/local/lib/python3.8/site-packages/sentry/new_migrations/migrations.py", line 22, in apply return super().apply(project_state, schema_editor, collect_sql) File "/usr/local/lib/python3.8/site-packages/django/db/migrations/migration.py", line 124, in apply operation.database_forwards(self.app_label, schema_editor, old_state, project_state) File "/usr/local/lib/python3.8/site-packages/django/db/migrations/operations/models.py", line 527, in database_forwards alter_together( File "/usr/local/lib/python3.8/site-packages/django_zero_downtime_migrations/backends/postgres/schema.py", line 347, in alter_index_together super().alter_index_together(model, old_index_together, new_index_together) File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/schema.py", line 379, in alter_index_together self._delete_composed_index(model, fields, {'index': True}, self.sql_delete_index) File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/schema.py", line 394, in _delete_composed_index raise ValueError("Found wrong number (%s) of constraints for %s(%s)" % ( ValueError: Found wrong number (2) of constraints for sentry_monitor(organization_id, slug) 1 Error in install/set-up-and-migrate-database.sh:12. '$dcr web upgrade' exited with status 1 -> ./install.sh:main:34 --> install/set-up-and-migrate-database.sh:source:12

Cleaning up...

Another try....

▶ Parsing command line ...

▶ Detecting Docker platform Detected Docker platform is linux/amd64

▶ Initializing Docker Compose ...

▶ Setting up error handling ... ... ▶ Parsing command line ...

▶ Detecting Docker platform Detected Docker platform is linux/amd64

▶ Initializing Docker Compose ...

▶ Setting up error handling ... ...

▶ Checking for latest commit ... skipped

▶ Checking minimum requirements ... Found Docker version 19.03.14 Found Docker Compose version 1.29.2

▶ Turning things off ... ...

▶ Creating volumes for persistent storage ... Created sentry-clickhouse. Created sentry-data. Created sentry-kafka. Created sentry-postgres. Created sentry-redis. Created sentry-symbolicator. Created sentry-zookeeper.

▶ Ensuring files from examples ... sentry/sentry.conf.py already exists, skipped creation. sentry/config.yml already exists, skipped creation. symbolicator/config.yml already exists, skipped creation.

▶ Ensuring Relay credentials ... relay/config.yml already exists, skipped creation. relay/credentials.json already exists, skipped creation.

▶ Generating secret key ...

▶ Fetching and updating Docker images ... Some service image(s) must be built from source by running: docker-compose build ingest-consumer clickhouse worker sentry-cleanup cron web subscription-consumer-transactions symbolicator-cleanup ingest-replay-recordings subscription-consumer-events post-process-forwarder-errors post-process-forwarder-transactions 23.4.0: Pulling from getsentry/sentry Digest: sha256:bd4d3e2b3c868eefcb762cbc879474321e0f88dece78c56130dfaee6a2d5396a Status: Image is up to date for getsentry/sentry:23.4.0 docker.io/getsentry/sentry:23.4.0

▶ Building and tagging Docker images ... ...

Docker images built.

▶ Downloading and installing wal2json ...

▶ Bootstrapping and migrating Snuba ... Creating network "sid-sentry-bs01_default" with the default driver Creating sid-sentry-bs01_clickhouse_1 ... Creating sid-sentry-bs01_zookeeper_1 ... Creating sid-sentry-bs01_redis_1 ... Creating sid-sentry-bs01_redis_1 ... done Creating sid-sentry-bs01_zookeeper_1 ... done Creating sid-sentry-bs01_clickhouse_1 ... done Creating sid-sentry-bs01_kafka_1 ... Creating sid-sentry-bs01_kafka_1 ... done Creating sid-sentry-bs01_snuba-api_run ... Creating sid-sentry-bs01_snuba-api_run ... done 2023-04-17 15:25:54,109 Initializing Snuba... 2023-04-17 15:25:56,903 Snuba initialization took 2.7951361648738384s 2023-04-17 15:25:57,281 Initializing Snuba... 2023-04-17 15:25:59,857 Snuba initialization took 2.576738476753235s 2023-04-17 15:25:59,858 Attempting to connect to Kafka (attempt 0)... 2023-04-17 15:25:59,912 Connected to Kafka on attempt 0 2023-04-17 15:25:59,912 Creating Kafka topics... Creating sid-sentry-bs01_snuba-api_run ... Creating sid-sentry-bs01_snuba-api_run ... done 2023-04-17 15:26:02,339 Initializing Snuba... 2023-04-17 15:26:05,053 Snuba initialization took 2.714960375800729s 2023-04-17 15:26:05,404 Initializing Snuba... 2023-04-17 15:26:07,962 Snuba initialization took 2.5584304612129927s Finished running migrations

▶ Creating additional Kafka topics ...

▶ Ensuring proper PostgreSQL version ...

▶ Setting up / migrating database ... Creating sid-sentry-bs01_memcached_1 ... Creating sid-sentry-bs01_symbolicator_1 ... Creating sid-sentry-bs01_smtp_1 ... Creating sid-sentry-bs01_snuba-sessions-consumer_1 ... Creating sid-sentry-bs01_snuba-subscription-consumer-events_1 ... Creating sid-sentry-bs01_snuba-api_1 ... Creating sid-sentry-bs01_snuba-consumer_1 ... Creating sid-sentry-bs01_snuba-replacer_1 ... Creating sid-sentry-bs01_snuba-subscription-consumer-transactions_1 ... Creating sid-sentry-bs01_snuba-outcomes-consumer_1 ... Creating sid-sentry-bs01_snuba-transactions-consumer_1 ... Creating sid-sentry-bs01_symbolicator_1 ... done Creating sid-sentry-bs01_smtp_1 ... done Creating sid-sentry-bs01_memcached_1 ... done Creating sid-sentry-bs01_snuba-subscription-consumer-events_1 ... done Creating sid-sentry-bs01_snuba-api_1 ... done Creating sid-sentry-bs01_snuba-sessions-consumer_1 ... done Creating sid-sentry-bs01_snuba-replacer_1 ... done Creating sid-sentry-bs01_snuba-consumer_1 ... done Creating sid-sentry-bs01_snuba-subscription-consumer-transactions_1 ... done Creating sid-sentry-bs01_snuba-outcomes-consumer_1 ... done Creating sid-sentry-bs01_snuba-transactions-consumer_1 ... done Creating sid-sentry-bs01_web_run ... Creating sid-sentry-bs01_web_run ... done Updating certificates in /etc/ssl/certs... 5 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d... done. 15:26:24 [INFO] sentry.plugins.github: apps-not-configured Running migrations for default Operations to perform: Apply all migrations: admin, auth, contenttypes, nodestore, replays, sentry, sessions, sites, social_auth Running migrations: Applying sentry.0371_monitor_make_org_slug_unique...Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/sentry/db/postgres/decorators.py", line 91, in inner return func(self, sql, *args, **kwargs) File "/usr/local/lib/python3.8/site-packages/sentry/db/postgres/base.py", line 86, in execute return self.cursor.execute(sql, clean_bad_params(params)) psycopg2.errors.DuplicateTable: relation "sentry_monitor_organization_id_slug_c4ac3a42_uniq" already exists

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) File "/usr/local/lib/python3.8/site-packages/sentry/db/postgres/decorators.py", line 77, in inner raise_the_exception(self.db, e) File "/usr/local/lib/python3.8/site-packages/sentry/db/postgres/decorators.py", line 75, in inner return func(self, *args, kwargs) File "/usr/local/lib/python3.8/site-packages/sentry/db/postgres/decorators.py", line 18, in inner return func(self, *args, *kwargs) File "/usr/local/lib/python3.8/site-packages/sentry/db/postgres/decorators.py", line 95, in inner raise exc_info0.with_traceback(exc_info[2]) File "/usr/local/lib/python3.8/site-packages/sentry/db/postgres/decorators.py", line 91, in inner return func(self, sql, args, kwargs) File "/usr/local/lib/python3.8/site-packages/sentry/db/postgres/base.py", line 86, in execute return self.cursor.execute(sql, clean_bad_params(params)) psycopg2.errors.DuplicateTable: DuplicateTable('relation "sentry_monitor_organization_id_slug_c4ac3a42_uniq" already exists\n') SQL: CREATE UNIQUE INDEX CONCURRENTLY "sentry_monitor_organization_id_slug_c4ac3a42_uniq" ON "sentry_monitor" ("organization_id", "slug")

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/local/bin/sentry", line 8, in sys.exit(main()) File "/usr/local/lib/python3.8/site-packages/sentry/runner/init.py", line 192, in main func(kwargs) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1128, in call return self.main(args, kwargs) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1053, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1659, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1395, in invoke return ctx.invoke(self.callback, ctx.params) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 754, in invoke return __callback(args, kwargs) File "/usr/local/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), *args, kwargs) File "/usr/local/lib/python3.8/site-packages/sentry/runner/decorators.py", line 29, in inner return ctx.invoke(f, *args, *kwargs) File "/usr/local/lib/python3.8/site-packages/click/core.py", line 754, in invoke return __callback(args, kwargs) File "/usr/local/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), *args, kwargs) File "/usr/local/lib/python3.8/site-packages/sentry/runner/commands/upgrade.py", line 100, in upgrade _upgrade(not noinput, traceback, verbosity, not no_repair, with_nodestore) File "/usr/local/lib/python3.8/site-packages/sentry/runner/commands/upgrade.py", line 51, in _upgrade dj_call_command( File "/usr/local/lib/python3.8/site-packages/django/core/management/init.py", line 148, in call_command return command.execute(*args, *defaults) File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 364, in execute output = self.handle(args, options) File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 83, in wrapped res = handle_func(*args, kwargs) File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 232, in handle post_migrate_state = executor.migrate( File "/usr/local/lib/python3.8/site-packages/django/db/migrations/executor.py", line 117, in migrate state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial) File "/usr/local/lib/python3.8/site-packages/django/db/migrations/executor.py", line 147, in _migrate_all_forwards state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial) File "/usr/local/lib/python3.8/site-packages/sentry/new_migrations/monkey/executor.py", line 79, in apply_migration return super().apply_migration(state, migration, fake=fake, fake_initial=fake_initial) File "/usr/local/lib/python3.8/site-packages/django/db/migrations/executor.py", line 245, in apply_migration state = migration.apply(state, schema_editor) File "/usr/local/lib/python3.8/site-packages/sentry/new_migrations/migrations.py", line 22, in apply return super().apply(project_state, schema_editor, collect_sql) File "/usr/local/lib/python3.8/site-packages/django/db/migrations/migration.py", line 124, in apply operation.database_forwards(self.app_label, schema_editor, old_state, project_state) File "/usr/local/lib/python3.8/site-packages/django/db/migrations/operations/models.py", line 527, in database_forwards alter_together( File "/usr/local/lib/python3.8/site-packages/django_zero_downtime_migrations/backends/postgres/schema.py", line 351, in alter_unique_together super().alter_unique_together(model, old_unique_together, new_unique_together) File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/schema.py", line 367, in alter_unique_together self.execute(self._create_unique_sql(model, columns)) File "/usr/local/lib/python3.8/site-packages/django_zero_downtime_migrations/backends/postgres/schema.py", line 307, in execute super().execute(statement, params) File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/schema.py", line 137, in execute cursor.execute(sql, params) File "/usr/local/lib/python3.8/site-packages/sentry_sdk/integrations/django/init.py", line 582, in execute return real_execute(self, sql, params) File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 67, in execute return self._execute_with_wrappers(sql, params, many=False, executor=self._execute) File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 76, in _execute_with_wrappers return executor(sql, params, many, context) File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) File "/usr/local/lib/python3.8/site-packages/django/db/utils.py", line 89, in exit raise dj_exc_value.with_traceback(traceback) from exc_value File "/usr/local/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) File "/usr/local/lib/python3.8/site-packages/sentry/db/postgres/decorators.py", line 77, in inner raise_the_exception(self.db, e) File "/usr/local/lib/python3.8/site-packages/sentry/db/postgres/decorators.py", line 75, in inner return func(self, *args, *kwargs) File "/usr/local/lib/python3.8/site-packages/sentry/db/postgres/decorators.py", line 18, in inner return func(self, args, kwargs) File "/usr/local/lib/python3.8/site-packages/sentry/db/postgres/decorators.py", line 95, in inner raise exc_info0.with_traceback(exc_info[2]) File "/usr/local/lib/python3.8/site-packages/sentry/db/postgres/decorators.py", line 91, in inner return func(self, sql, *args, **kwargs) File "/usr/local/lib/python3.8/site-packages/sentry/db/postgres/base.py", line 86, in execute return self.cursor.execute(sql, clean_bad_params(params)) django.db.utils.ProgrammingError: DuplicateTable('relation "sentry_monitor_organization_id_slug_c4ac3a42_uniq" already exists\n') SQL: CREATE UNIQUE INDEX CONCURRENTLY "sentry_monitor_organization_id_slug_c4ac3a42_uniq" ON "sentry_monitor" ("organization_id", "slug") 1 Error in install/set-up-and-migrate-database.sh:12. '$dcr web upgrade' exited with status 1 -> ./install.sh:main:34 --> install/set-up-and-migrate-database.sh:source:12

Cleaning up...

Event ID

No response

hubertdeng123 commented 1 year ago

If you're using your own postgres 14 database, you may need to perform additional steps to make sure your db is migrated properly. You might want to take a look at the migrations here and find out what is failing, and edit your database accordingly

semblano commented 1 year ago

I already tried to manually remove the index/constraint, but it gets created again during install and produces the error once more.

hubertdeng123 commented 1 year ago

Ah that's strange, is there anything you can find out on how your Postgres setup differs from the default one?

semblano commented 1 year ago

The only adjustment required to make version 21.10.0 install on Postgres 14 was to enable the citext extension and to create the following table:

CREATE TABLE sentry_widget( mykey integer NOT NULL );

Everything else was handled by the default sentry.io installation.

github-actions[bot] commented 1 year ago

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

ntcong commented 1 year ago

I think there already a uniq constraint created during 0366 which add a index