Skip to content

Commit

Permalink
Merge pull request #2378 from DataDog/ivoanjo/prof-6566-ci-installati…
Browse files Browse the repository at this point in the history
…on-issue

[PROF-6566] Fix ddtrace installation issue when users have CI=true
  • Loading branch information
ivoanjo authored Nov 18, 2022
2 parents bf1be0e + 2eefe99 commit 5e66be3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 204 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ test_containers:
GRPC_RUBY_BUILD_PROCS: 6
DD_INSTRUMENTATION_TELEMETRY_ENABLED: false
TEST_REDIS_OLD_HOST: redis_old
DDTRACE_CI: true
- &container_parameters_environment
- *container_base_environment
- TEST_DATADOG_INTEGRATION: 1
Expand Down
220 changes: 18 additions & 202 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
- redis
- redis_old
env_file: ./.env
environment:
environment: &common-environment
- BUNDLE_GEMFILE=/app/Gemfile
- DD_AGENT_HOST=ddagent
- TEST_DATADOG_INTEGRATION=1
Expand All @@ -30,6 +30,7 @@ services:
- TEST_REDIS_HOST=redis
- TEST_REDIS_OLD_HOST=redis_old
- TEST_REDIS_OLD_PORT=6379
- DDTRACE_CI=true
stdin_open: true
tty: true
volumes:
Expand All @@ -52,20 +53,7 @@ services:
- redis
- redis_old
env_file: ./.env
environment:
- BUNDLE_GEMFILE=/app/Gemfile
- DD_AGENT_HOST=ddagent
- TEST_DATADOG_INTEGRATION=1
- TEST_ELASTICSEARCH_HOST=elasticsearch
- TEST_MEMCACHED_HOST=memcached
- TEST_MONGODB_HOST=mongodb
- TEST_MYSQL_HOST=mysql
- TEST_POSTGRES_HOST=postgres
- TEST_PRESTO_HOST=presto
- TEST_PRESTO_PORT=8080
- TEST_REDIS_HOST=redis
- TEST_REDIS_OLD_HOST=redis_old
- TEST_REDIS_OLD_PORT=6379
environment: *common-environment
stdin_open: true
tty: true
volumes:
Expand All @@ -88,20 +76,7 @@ services:
- redis
- redis_old
env_file: ./.env
environment:
- BUNDLE_GEMFILE=/app/Gemfile
- DD_AGENT_HOST=ddagent
- TEST_DATADOG_INTEGRATION=1
- TEST_ELASTICSEARCH_HOST=elasticsearch
- TEST_MEMCACHED_HOST=memcached
- TEST_MONGODB_HOST=mongodb
- TEST_MYSQL_HOST=mysql
- TEST_POSTGRES_HOST=postgres
- TEST_PRESTO_HOST=presto
- TEST_PRESTO_PORT=8080
- TEST_REDIS_HOST=redis
- TEST_REDIS_OLD_HOST=redis_old
- TEST_REDIS_OLD_PORT=6379
environment: *common-environment
stdin_open: true
tty: true
volumes:
Expand All @@ -124,20 +99,7 @@ services:
- redis
- redis_old
env_file: ./.env
environment:
- BUNDLE_GEMFILE=/app/Gemfile
- DD_AGENT_HOST=ddagent
- TEST_DATADOG_INTEGRATION=1
- TEST_ELASTICSEARCH_HOST=elasticsearch
- TEST_MEMCACHED_HOST=memcached
- TEST_MONGODB_HOST=mongodb
- TEST_MYSQL_HOST=mysql
- TEST_POSTGRES_HOST=postgres
- TEST_PRESTO_HOST=presto
- TEST_PRESTO_PORT=8080
- TEST_REDIS_HOST=redis
- TEST_REDIS_OLD_HOST=redis_old
- TEST_REDIS_OLD_PORT=6379
environment: *common-environment
stdin_open: true
tty: true
volumes:
Expand All @@ -160,20 +122,7 @@ services:
- redis
- redis_old
env_file: ./.env
environment:
- BUNDLE_GEMFILE=/app/Gemfile
- DD_AGENT_HOST=ddagent
- TEST_DATADOG_INTEGRATION=1
- TEST_ELASTICSEARCH_HOST=elasticsearch
- TEST_MEMCACHED_HOST=memcached
- TEST_MONGODB_HOST=mongodb
- TEST_MYSQL_HOST=mysql
- TEST_POSTGRES_HOST=postgres
- TEST_PRESTO_HOST=presto
- TEST_PRESTO_PORT=8080
- TEST_REDIS_HOST=redis
- TEST_REDIS_OLD_HOST=redis_old
- TEST_REDIS_OLD_PORT=6379
environment: *common-environment
stdin_open: true
tty: true
volumes:
Expand All @@ -196,20 +145,7 @@ services:
- redis
- redis_old
env_file: ./.env
environment:
- BUNDLE_GEMFILE=/app/Gemfile
- DD_AGENT_HOST=ddagent
- TEST_DATADOG_INTEGRATION=1
- TEST_ELASTICSEARCH_HOST=elasticsearch
- TEST_MEMCACHED_HOST=memcached
- TEST_MONGODB_HOST=mongodb
- TEST_MYSQL_HOST=mysql
- TEST_POSTGRES_HOST=postgres
- TEST_PRESTO_HOST=presto
- TEST_PRESTO_PORT=8080
- TEST_REDIS_HOST=redis
- TEST_REDIS_OLD_HOST=redis_old
- TEST_REDIS_OLD_PORT=6379
environment: *common-environment
stdin_open: true
tty: true
volumes:
Expand All @@ -232,20 +168,7 @@ services:
- redis
- redis_old
env_file: ./.env
environment:
- BUNDLE_GEMFILE=/app/Gemfile
- DD_AGENT_HOST=ddagent
- TEST_DATADOG_INTEGRATION=1
- TEST_ELASTICSEARCH_HOST=elasticsearch
- TEST_MEMCACHED_HOST=memcached
- TEST_MONGODB_HOST=mongodb
- TEST_MYSQL_HOST=mysql
- TEST_POSTGRES_HOST=postgres
- TEST_PRESTO_HOST=presto
- TEST_PRESTO_PORT=8080
- TEST_REDIS_HOST=redis
- TEST_REDIS_OLD_HOST=redis_old
- TEST_REDIS_OLD_PORT=6379
environment: *common-environment
stdin_open: true
tty: true
volumes:
Expand All @@ -267,7 +190,7 @@ services:
- redis
- redis_old
env_file: ./.env
environment:
environment: &common-environment-3x
- BUNDLE_GEMFILE=/app/Gemfile
- DD_AGENT_HOST=ddagent
- TEST_DATADOG_INTEGRATION=1
Expand Down Expand Up @@ -299,18 +222,7 @@ services:
- redis
- redis_old
env_file: ./.env
environment:
- BUNDLE_GEMFILE=/app/Gemfile
- DD_AGENT_HOST=ddagent
- TEST_DATADOG_INTEGRATION=1
- TEST_ELASTICSEARCH_HOST=elasticsearch
- TEST_MEMCACHED_HOST=memcached
- TEST_MONGODB_HOST=mongodb
- TEST_MYSQL_HOST=mysql
- TEST_POSTGRES_HOST=postgres
- TEST_REDIS_HOST=redis
- TEST_REDIS_OLD_HOST=redis_old
- TEST_REDIS_OLD_PORT=6379
environment: *common-environment-3x
stdin_open: true
tty: true
volumes:
Expand All @@ -332,18 +244,7 @@ services:
- redis
- redis_old
env_file: ./.env
environment:
- BUNDLE_GEMFILE=/app/Gemfile
- DD_AGENT_HOST=ddagent
- TEST_DATADOG_INTEGRATION=1
- TEST_ELASTICSEARCH_HOST=elasticsearch
- TEST_MEMCACHED_HOST=memcached
- TEST_MONGODB_HOST=mongodb
- TEST_MYSQL_HOST=mysql
- TEST_POSTGRES_HOST=postgres
- TEST_REDIS_HOST=redis
- TEST_REDIS_OLD_HOST=redis_old
- TEST_REDIS_OLD_PORT=6379
environment: *common-environment-3x
stdin_open: true
tty: true
volumes:
Expand All @@ -364,18 +265,7 @@ services:
- redis
- redis_old
env_file: ./.env
environment:
- BUNDLE_GEMFILE=/app/Gemfile
- DD_AGENT_HOST=ddagent
- TEST_DATADOG_INTEGRATION=1
- TEST_ELASTICSEARCH_HOST=elasticsearch
- TEST_MEMCACHED_HOST=memcached
- TEST_MONGODB_HOST=mongodb
- TEST_MYSQL_HOST=mysql
- TEST_POSTGRES_HOST=postgres
- TEST_REDIS_HOST=redis
- TEST_REDIS_OLD_HOST=redis_old
- TEST_REDIS_OLD_PORT=6379
environment: *common-environment-3x
stdin_open: true
tty: true
volumes:
Expand All @@ -397,18 +287,7 @@ services:
- redis
- redis_old
env_file: ./.env
environment:
- BUNDLE_GEMFILE=/app/Gemfile
- DD_AGENT_HOST=ddagent
- TEST_DATADOG_INTEGRATION=1
- TEST_ELASTICSEARCH_HOST=elasticsearch
- TEST_MEMCACHED_HOST=memcached
- TEST_MONGODB_HOST=mongodb
- TEST_MYSQL_HOST=mysql
- TEST_POSTGRES_HOST=postgres
- TEST_REDIS_HOST=redis
- TEST_REDIS_OLD_HOST=redis_old
- TEST_REDIS_OLD_PORT=6379
environment: *common-environment-3x
stdin_open: true
tty: true
volumes:
Expand All @@ -429,18 +308,7 @@ services:
- redis
- redis_old
env_file: ./.env
environment:
- BUNDLE_GEMFILE=/app/Gemfile
- DD_AGENT_HOST=ddagent
- TEST_DATADOG_INTEGRATION=1
- TEST_ELASTICSEARCH_HOST=elasticsearch
- TEST_MEMCACHED_HOST=memcached
- TEST_MONGODB_HOST=mongodb
- TEST_MYSQL_HOST=mysql
- TEST_POSTGRES_HOST=postgres
- TEST_REDIS_HOST=redis
- TEST_REDIS_OLD_HOST=redis_old
- TEST_REDIS_OLD_PORT=6379
environment: *common-environment-3x
stdin_open: true
tty: true
volumes:
Expand All @@ -465,20 +333,7 @@ services:
- redis
- redis_old
env_file: ./.env
environment:
- BUNDLE_GEMFILE=/app/Gemfile
- DD_AGENT_HOST=ddagent
- TEST_DATADOG_INTEGRATION=1
- TEST_ELASTICSEARCH_HOST=elasticsearch
- TEST_MEMCACHED_HOST=memcached
- TEST_MONGODB_HOST=mongodb
- TEST_MYSQL_HOST=mysql
- TEST_POSTGRES_HOST=postgres
- TEST_PRESTO_HOST=presto
- TEST_PRESTO_PORT=8080
- TEST_REDIS_HOST=redis
- TEST_REDIS_OLD_HOST=redis_old
- TEST_REDIS_OLD_PORT=6379
environment: *common-environment
stdin_open: true
tty: true
volumes:
Expand All @@ -500,20 +355,7 @@ services:
- redis
- redis_old
env_file: ./.env
environment:
- BUNDLE_GEMFILE=/app/Gemfile
- DD_AGENT_HOST=ddagent
- TEST_DATADOG_INTEGRATION=1
- TEST_ELASTICSEARCH_HOST=elasticsearch
- TEST_MEMCACHED_HOST=memcached
- TEST_MONGODB_HOST=mongodb
- TEST_MYSQL_HOST=mysql
- TEST_POSTGRES_HOST=postgres
- TEST_PRESTO_HOST=presto
- TEST_PRESTO_PORT=8080
- TEST_REDIS_HOST=redis
- TEST_REDIS_OLD_HOST=redis_old
- TEST_REDIS_OLD_PORT=6379
environment: *common-environment
stdin_open: true
tty: true
volumes:
Expand All @@ -535,20 +377,7 @@ services:
- redis
- redis_old
env_file: ./.env
environment:
- BUNDLE_GEMFILE=/app/Gemfile
- DD_AGENT_HOST=ddagent
- TEST_DATADOG_INTEGRATION=1
- TEST_ELASTICSEARCH_HOST=elasticsearch
- TEST_MEMCACHED_HOST=memcached
- TEST_MONGODB_HOST=mongodb
- TEST_MYSQL_HOST=mysql
- TEST_POSTGRES_HOST=postgres
- TEST_PRESTO_HOST=presto
- TEST_PRESTO_PORT=8080
- TEST_REDIS_HOST=redis
- TEST_REDIS_OLD_HOST=redis_old
- TEST_REDIS_OLD_PORT=6379
environment: *common-environment
stdin_open: true
tty: true
volumes:
Expand All @@ -571,20 +400,7 @@ services:
- redis
- redis_old
env_file: ./.env
environment:
- BUNDLE_GEMFILE=/app/Gemfile
- DD_AGENT_HOST=ddagent
- TEST_DATADOG_INTEGRATION=1
- TEST_ELASTICSEARCH_HOST=elasticsearch
- TEST_MEMCACHED_HOST=memcached
- TEST_MONGODB_HOST=mongodb
- TEST_MYSQL_HOST=mysql
- TEST_POSTGRES_HOST=postgres
- TEST_PRESTO_HOST=presto
- TEST_PRESTO_PORT=8080
- TEST_REDIS_HOST=redis
- TEST_REDIS_OLD_HOST=redis_old
- TEST_REDIS_OLD_PORT=6379
environment: *common-environment
stdin_open: true
tty: true
volumes:
Expand Down
2 changes: 1 addition & 1 deletion ext/ddtrace_profiling_loader/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def add_compiler_flag(flag)

# Because we can't control what compiler versions our customers use, shipping with -Werror by default is a no-go.
# But we can enable it in CI, so that we quickly spot any new warnings that just got introduced.
add_compiler_flag '-Werror' if ENV['CI'] == 'true'
add_compiler_flag '-Werror' if ENV['DDTRACE_CI'] == 'true'

# Older gcc releases may not default to C99 and we need to ask for this. This is also used:
# * by upstream Ruby -- search for gnu99 in the codebase
Expand Down
2 changes: 1 addition & 1 deletion ext/ddtrace_profiling_native_extension/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def add_compiler_flag(flag)

# Because we can't control what compiler versions our customers use, shipping with -Werror by default is a no-go.
# But we can enable it in CI, so that we quickly spot any new warnings that just got introduced.
add_compiler_flag '-Werror' if ENV['CI'] == 'true'
add_compiler_flag '-Werror' if ENV['DDTRACE_CI'] == 'true'

# Older gcc releases may not default to C99 and we need to ask for this. This is also used:
# * by upstream Ruby -- search for gnu99 in the codebase
Expand Down

0 comments on commit 5e66be3

Please sign in to comment.