Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PROF-6566] Fix ddtrace installation issue when users have CI=true #2378

Merged
merged 3 commits into from
Nov 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹

- 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