Open mfulb opened 1 month ago
Test Suite | Status | Result |
---|---|---|
Multiverse | :x: | 4/9 passing |
SOAK | :x: | 50/56 passing |
Attention: Patch coverage is 80.00000%
with 6 lines
in your changes missing coverage. Please review.
Please upload report for BASE (
feat/env-configuration@787c147
). Learn more about missing BASE report.
Files | Patch % | Lines |
---|---|---|
agent/php_nrini.c | 76.92% | 6 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR adds a new feature for the
newrelic-install.sh
script which will scan environment variables for properly named variables and inject these values into thenewrelic.ini
file. This will only be available when freshly installing the agent and a freshnewrelic.ini
is being created. For the feature to be triggered the environment variableNR_CONFIG_WITH_ENVIRON
must be set to a non-empty string.A manually maintained mapping file (
newrelic-install-php-cfg-mappings.php
) is used to track the mapping from INI entry name to the matching environment variable name. Whenever INI entries for the agent are added or removed this file must be updated as well.A new test only API was added to the agent which returns a PHP array containing the INI entry names and the corresponding environment variable names. This list is built dynamically from the INI entry definitions in the agent.
A new test target called
verify-inject-script
is added which runs two tests:newrelic-install-php-cfg-mappings.php
filenewrelic-install-inject-envvars.php
script can properly inject INI values from environment variablesThe
verify-inject-script
was added to the GHA workflow for PR runs so it is checked regularly.