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

Release 10.19 #854

Merged
merged 10 commits into from
Mar 15, 2024
Merged

Release 10.19 #854

merged 10 commits into from
Mar 15, 2024

Conversation

lavarou
Copy link
Member

@lavarou lavarou commented Mar 15, 2024

No description provided.

ZNeumann and others added 10 commits March 4, 2024 10:26
#839)

Adds support for using "__FILE__" in the metrics which are checked.
This PR adds the transaction ID to all error traces, even when CAT and
DT are disabled.
This is added in two places:
   - the "CatGUID" field of Error Traces
- as a "guid" attribute in the intrinsic attributes of both Error Traces
and Transaction Errors.
 
It takes advantage of the fact that a random transaction ID is generated
when all transactions are started independent of the DT/CAT settings.

Many integration tests were updated to verify the transaction ID field
and "guid" attributes is now populated.

Additional tests were created to verify the value of the transaction ID
is correct. This required adding some internal testing APIs which give
access to internal agent state needed for the integration test. These
internal testing APIs are not built into release artifacts.
The uopz extension breaks JIT functionality in integration tests on PHP
8.0+ due to the way it handles opcodes.
Install and enable uopz on PHP < 8.x only for the Dockerfile-based
development workflow.
This PR changes the detection file for Magento to ensure compatibility
with PHP 8.2 and above because the current file that is used is not
detected because of the empty file optimizations that were introduced in
PHP 8.2
Refactor daemon code from legacy GOPATH project to a Go Module.

New Relic PHP Agent's daemon is a Go project that provides a few binary
commands: `client`, `daemon`, `integration_runner`, `stressor`. These commands
can be installed with `go install` command. It does not provide any public
packages that can be used by other Go projects as dependencies, and installed
with the `go get` command.  Following best practices of Go projects hosted in
GitHub, the import path prefix of the new Go module with the daemon code is
`github.com/newrelic/newrelic-php-agent`

Go Modules give more flexibility in how the code can be stored and organized
within the project and make it possible for the `src` subdirectory to be
renamed to a more meaningful name, e.g. `daemon`. Using `daemon` as a directory
for the source code of the daemon module, gives the full name of the module to
be: `github.com/newrelic/newrelic-php-agent/daemon`.

Additionally, following good practices of ogranizing Go module source code,
daemon module packages and source code directory structure have been
reorganized:
- For the executable code, the `main` packages can now be found under
`daemon/cmd`
- The source code of internal helper packages has been moved to
`daemon/internal`
- JSON test data files now reside under `daemon/test-data`

The Daemon logic previously handled in the root Makefile has been
extracted to a separate `daemon/Makefile`, where the root makefile now
acts as a passthrough.

---------

Co-authored-by: Michal Nowacki <[email protected]>
Adds a "override_versions_file" option for EXPECT_PHP_PACKAGE that
allows specifying overrides for given expected versions detected. This
is useful for when a package did not modify the internal data structure
used to by the agent to detect its version, causing the package test to
fail.

The override file should be in the same directory as the
test_php_package.php test and is a JSON file implementing a simple
dictionary like:

{
    "4.13.0": "4.12.0"
}

In this case this specifies if the packge version "4.13.0" is detected
then override this expectation with the version "4.12.0". In this
example the upstream package bumped up to 4.13.0 but did not change the
internal version variable so the agent still detects it as 4.12.0.
Add remaining error codes listed in
https://github.com/php/php-src/blob/master/Zend/zend_errors.h for
completeness in decoding and prioritizing errors.

Added/modified tests accordingly.
…851)

Remove unwanted error reporting by overwriting zend_error_cb instead of
using OAPI.
@lavarou lavarou requested a review from ZNeumann March 15, 2024 14:19
@codecov-commenter
Copy link

codecov-commenter commented Mar 15, 2024

Codecov Report

Attention: Patch coverage is 89.83051% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 78.76%. Comparing base (e78afe1) to head (c9c6fba).
Report is 1 commits behind head on main.

Files Patch % Lines
agent/php_api_internal.c 71.42% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #854      +/-   ##
==========================================
+ Coverage   78.71%   78.76%   +0.04%     
==========================================
  Files         193      193              
  Lines       27083    27125      +42     
==========================================
+ Hits        21319    21365      +46     
+ Misses       5764     5760       -4     
Flag Coverage Δ
agent-for-php-7.0 77.82% <84.61%> (+0.02%) ⬆️
agent-for-php-7.1 77.58% <89.28%> (+0.05%) ⬆️
agent-for-php-7.2 78.15% <89.28%> (+0.05%) ⬆️
agent-for-php-7.3 78.17% <89.28%> (+0.05%) ⬆️
agent-for-php-7.4 77.87% <89.28%> (+0.09%) ⬆️
agent-for-php-8.0 77.90% <89.47%> (+0.05%) ⬆️
agent-for-php-8.1 77.88% <89.47%> (+0.05%) ⬆️
agent-for-php-8.2 77.48% <89.47%> (+0.05%) ⬆️
agent-for-php-8.3 77.48% <89.47%> (+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.

@lavarou lavarou merged commit 9caf27b into main Mar 15, 2024
117 checks passed
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.

7 participants