Skip to content

Commit 9a730a4

Browse files
authored
Remove loader process from heroku package (#43037)
### What does this PR do? Remove the trace-loader process from the heroku package. ### Motivation Reduce package size. The loader is currently unused on Heroku, and we'd rather reduce package size for this build. ### Describe how you validated your changes CI. Manually installing the deb package to make sure it won't break main's CI. ### Additional Notes Somewhat re-apply #42965, but without breaking CI this time. Co-authored-by: pierre.gimalac <pierre.gimalac@datadoghq.com>
1 parent b010c8c commit 9a730a4

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

cmd/loader/main_noop.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
3+
# noop loader for heroku
4+
# shouldn't be needed in practice, but it is used by the systemd service,
5+
# which is used when installing the deb manually
6+
7+
shift # remove the path to the configuration file
8+
exec "$@"

omnibus/config/software/datadog-agent.rb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,15 @@
146146
end
147147

148148
if linux_target?
149-
command "dda inv -- -e loader.build --install-path=#{install_dir}", :env => env, :live_stream => Omnibus.logger.live_stream(:info)
150-
copy "bin/trace-loader/trace-loader", "#{install_dir}/embedded/bin"
149+
if heroku_target?
150+
# shouldn't be needed in practice, but it is used by the systemd service,
151+
# which is used when installing the deb manually
152+
copy "cmd/loader/main_noop.sh", "#{install_dir}/embedded/bin/trace-loader"
153+
command "chmod 0755 #{install_dir}/embedded/bin/trace-loader"
154+
else
155+
command "dda inv -- -e loader.build --install-path=#{install_dir}", :env => env, :live_stream => Omnibus.logger.live_stream(:info)
156+
copy "bin/trace-loader/trace-loader", "#{install_dir}/embedded/bin"
157+
end
151158
end
152159

153160
if windows_target?

0 commit comments

Comments
 (0)