Skip to content

Conversation

mfulb
Copy link
Contributor

@mfulb mfulb commented Aug 5, 2025

No description provided.

@newrelic-php-agent-bot
Copy link

newrelic-php-agent-bot commented Aug 5, 2025

Test Suite Status Result
Multiverse 0/16 passing
SOAK 82/85 passing

@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2025

Codecov Report

❌ Patch coverage is 54.38596% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.07%. Comparing base (c395102) to head (e9e6909).

Files with missing lines Patch % Lines
axiom/nr_php_packages.c 53.33% 21 Missing ⚠️
agent/php_txn.c 20.00% 4 Missing ⚠️
agent/lib_composer.c 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1105      +/-   ##
==========================================
- Coverage   78.11%   78.07%   -0.05%     
==========================================
  Files         193      193              
  Lines       27979    28036      +57     
==========================================
+ Hits        21857    21888      +31     
- Misses       6122     6148      +26     
Flag Coverage Δ
agent-for-php-7.2 78.31% <54.38%> (-0.06%) ⬇️
agent-for-php-7.3 78.33% <54.38%> (-0.06%) ⬇️
agent-for-php-7.4 78.19% <54.38%> (-0.06%) ⬇️
agent-for-php-8.0 77.40% <54.38%> (-0.05%) ⬇️
agent-for-php-8.1 77.71% <54.38%> (-0.05%) ⬇️
agent-for-php-8.2 77.33% <54.38%> (-0.05%) ⬇️
agent-for-php-8.3 77.33% <54.38%> (-0.05%) ⬇️
agent-for-php-8.4 77.34% <54.38%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lavarou lavarou force-pushed the fix/cache-composer-api-packages branch from f9fcfcc to 2cf5726 Compare August 6, 2025 12:55
= nr_php_packages_clone(NR_PHP_PROCESS_GLOBALS(composer_php_packages));
nrl_verbosedebug(NRL_FRAMEWORK, "composer packages cloned from cache");
#else
nrl_verbosedebug(NRL_INSTRUMENT, "passing known PHP packages = %p",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This code needs some wrapping conditional so it isn't used if agent is running Composer API every request.

Probably wrapping it with:

if (NR_PHP_PROCESS_GLOBALS(composer_api_per_process_detection)) {
...
}

@mfulb mfulb closed this Aug 7, 2025
@mfulb
Copy link
Contributor Author

mfulb commented Aug 7, 2025

This approach yielded reasonable performance, but the use of process global to store package info persistently is considered problematic. A different approach was discussed and finally adopted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants