Skip to content

Commit

Permalink
Merge main into preview 3 (#1032)
Browse files Browse the repository at this point in the history
* Fix botocore tests (#973)

* Bedrock Testing Infrastructure (#937)

* Add AWS Bedrock testing infrastructure

* Cache Package Version Lookups (#946)

* Cache _get_package_version

* Add Python 2.7 support to get_package_version caching

* [Mega-Linter] Apply linters fixes

* Bump tests

---------

Co-authored-by: SlavaSkvortsov <29122694+SlavaSkvortsov@users.noreply.github.com>
Co-authored-by: TimPansino <TimPansino@users.noreply.github.com>

* Fix Redis Generator Methods (#947)

* Fix scan_iter for redis

* Replace generator methods

* Update instance info instrumentation

* Remove mistake from uninstrumented methods

* Add skip condition to asyncio generator tests

* Add skip condition to asyncio generator tests

---------

Co-authored-by: Lalleh Rafeei <lrafeei@newrelic.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Automatic RPM System Updates (#948)

* Checkout old action

* Adding RPM action

* Add dry run

* Incorporating action into workflow

* Wire secret into custom action

* Enable action

* Correct action name

* Fix syntax

* Fix quoting issues

* Drop pre-verification. Does not work on python

* Fix merge artifact

* Remove OpenAI references

---------

Co-authored-by: Uma Annamalai <uannamalai@newrelic.com>
Co-authored-by: SlavaSkvortsov <29122694+SlavaSkvortsov@users.noreply.github.com>
Co-authored-by: TimPansino <TimPansino@users.noreply.github.com>
Co-authored-by: Lalleh Rafeei <lrafeei@newrelic.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Bedrock Sync Chat Completion Instrumentation (#953)

* Add AWS Bedrock testing infrastructure

* Squashed commit of the following:

commit 2834663
Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Date:   Mon Oct 9 17:42:05 2023 -0700

    OpenAI Mock Backend (#929)

    * Add mock external openai server

    * Add mocked OpenAI server fixtures

    * Set up recorded responses.

    * Clean mock server to depend on http server

    * Linting

    * Pin flask version for flask restx tests. (#931)

    * Ignore new redis methods. (#932)

    Co-authored-by: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>

    * Remove approved paths

    * Update CI Image (#930)

    * Update available python versions in CI

    * Update makefile with overrides

    * Fix default branch detection for arm builds

    ---------

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    * Add mocking for embedding endpoint

    * [Mega-Linter] Apply linters fixes

    * Add ratelimit headers

    * [Mega-Linter] Apply linters fixes

    * Only get package version once (#928)

    * Only get package version once

    * Add disconnect method

    * Add disconnect method

    ---------

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    * Add datalib dependency for embedding testing.

    * Add OpenAI Test Infrastructure (#926)

    * Add openai to tox

    * Add OpenAI test files.

    * Add test functions.

    * [Mega-Linter] Apply linters fixes

    ---------

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <mergify[bot]@users.noreply.github.com>

    * Add mock external openai server

    * Add mocked OpenAI server fixtures

    * Set up recorded responses.

    * Clean mock server to depend on http server

    * Linting

    * Remove approved paths

    * Add mocking for embedding endpoint

    * [Mega-Linter] Apply linters fixes

    * Add ratelimit headers

    * [Mega-Linter] Apply linters fixes

    * Add datalib dependency for embedding testing.

    ---------

    Co-authored-by: Uma Annamalai <uannamalai@newrelic.com>
    Co-authored-by: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
    Co-authored-by: TimPansino <TimPansino@users.noreply.github.com>
    Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>
    Co-authored-by: mergify[bot] <mergify[bot]@users.noreply.github.com>

commit db63d45
Author: Uma Annamalai <uannamalai@newrelic.com>
Date:   Mon Oct 2 15:31:38 2023 -0700

    Add OpenAI Test Infrastructure (#926)

    * Add openai to tox

    * Add OpenAI test files.

    * Add test functions.

    * [Mega-Linter] Apply linters fixes

    ---------

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <mergify[bot]@users.noreply.github.com>

* Squashed commit of the following:

commit 182c7a8
Author: Uma Annamalai <uannamalai@newrelic.com>
Date:   Fri Oct 13 10:12:55 2023 -0700

    Add request/ response IDs.

commit f6d13f8
Author: Uma Annamalai <uannamalai@newrelic.com>
Date:   Thu Oct 12 13:23:39 2023 -0700

    Test cleanup.

commit d057663
Author: Uma Annamalai <uannamalai@newrelic.com>
Date:   Tue Oct 10 10:23:00 2023 -0700

    Remove commented code.

commit dd29433
Author: Uma Annamalai <uannamalai@newrelic.com>
Date:   Tue Oct 10 10:19:01 2023 -0700

    Add openai sync instrumentation.

commit 2834663
Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Date:   Mon Oct 9 17:42:05 2023 -0700

    OpenAI Mock Backend (#929)

    * Add mock external openai server

    * Add mocked OpenAI server fixtures

    * Set up recorded responses.

    * Clean mock server to depend on http server

    * Linting

    * Pin flask version for flask restx tests. (#931)

    * Ignore new redis methods. (#932)

    Co-authored-by: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>

    * Remove approved paths

    * Update CI Image (#930)

    * Update available python versions in CI

    * Update makefile with overrides

    * Fix default branch detection for arm builds

    ---------

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    * Add mocking for embedding endpoint

    * [Mega-Linter] Apply linters fixes

    * Add ratelimit headers

    * [Mega-Linter] Apply linters fixes

    * Only get package version once (#928)

    * Only get package version once

    * Add disconnect method

    * Add disconnect method

    ---------

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    * Add datalib dependency for embedding testing.

    * Add OpenAI Test Infrastructure (#926)

    * Add openai to tox

    * Add OpenAI test files.

    * Add test functions.

    * [Mega-Linter] Apply linters fixes

    ---------

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <mergify[bot]@users.noreply.github.com>

    * Add mock external openai server

    * Add mocked OpenAI server fixtures

    * Set up recorded responses.

    * Clean mock server to depend on http server

    * Linting

    * Remove approved paths

    * Add mocking for embedding endpoint

    * [Mega-Linter] Apply linters fixes

    * Add ratelimit headers

    * [Mega-Linter] Apply linters fixes

    * Add datalib dependency for embedding testing.

    ---------

    Co-authored-by: Uma Annamalai <uannamalai@newrelic.com>
    Co-authored-by: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
    Co-authored-by: TimPansino <TimPansino@users.noreply.github.com>
    Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>
    Co-authored-by: mergify[bot] <mergify[bot]@users.noreply.github.com>

commit db63d45
Author: Uma Annamalai <uannamalai@newrelic.com>
Date:   Mon Oct 2 15:31:38 2023 -0700

    Add OpenAI Test Infrastructure (#926)

    * Add openai to tox

    * Add OpenAI test files.

    * Add test functions.

    * [Mega-Linter] Apply linters fixes

    ---------

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <mergify[bot]@users.noreply.github.com>

* Cache Package Version Lookups (#946)

* Cache _get_package_version

* Add Python 2.7 support to get_package_version caching

* [Mega-Linter] Apply linters fixes

* Bump tests

---------

Co-authored-by: SlavaSkvortsov <29122694+SlavaSkvortsov@users.noreply.github.com>
Co-authored-by: TimPansino <TimPansino@users.noreply.github.com>

* Fix Redis Generator Methods (#947)

* Fix scan_iter for redis

* Replace generator methods

* Update instance info instrumentation

* Remove mistake from uninstrumented methods

* Add skip condition to asyncio generator tests

* Add skip condition to asyncio generator tests

---------

Co-authored-by: Lalleh Rafeei <lrafeei@newrelic.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* TEMP

* Automatic RPM System Updates (#948)

* Checkout old action

* Adding RPM action

* Add dry run

* Incorporating action into workflow

* Wire secret into custom action

* Enable action

* Correct action name

* Fix syntax

* Fix quoting issues

* Drop pre-verification. Does not work on python

* Fix merge artifact

* Bedrock titan extraction nearly complete

* Cleaning up titan bedrock implementation

* TEMP

* Tests for bedrock passing

Co-authored-by: Lalleh Rafeei <lrafeei@users.noreply.github.com>

* Cleaned up titan testing

Co-authored-by: Lalleh Rafeei <lrafeei@users.noreply.github.com>
Co-authored-by: Hannah Stepanek <hmstepanek@users.noreply.github.com>

* Parametrized bedrock testing

* Add support for AI21-J2 models

* Change to dynamic no conversation id events

* Drop all openai refs

* [Mega-Linter] Apply linters fixes

* Adding response_id and response_model

* Drop python 3.7 tests for Hypercorn (#954)

* Apply suggestions from code review

* Remove unused import

---------

Co-authored-by: Uma Annamalai <uannamalai@newrelic.com>
Co-authored-by: SlavaSkvortsov <29122694+SlavaSkvortsov@users.noreply.github.com>
Co-authored-by: TimPansino <TimPansino@users.noreply.github.com>
Co-authored-by: Lalleh Rafeei <lrafeei@newrelic.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Lalleh Rafeei <lrafeei@users.noreply.github.com>
Co-authored-by: Hannah Stepanek <hmstepanek@users.noreply.github.com>
Co-authored-by: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>

* Feature bedrock cohere instrumentation (#955)

* Add AWS Bedrock testing infrastructure

* Squashed commit of the following:

commit 2834663
Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Date:   Mon Oct 9 17:42:05 2023 -0700

    OpenAI Mock Backend (#929)

    * Add mock external openai server

    * Add mocked OpenAI server fixtures

    * Set up recorded responses.

    * Clean mock server to depend on http server

    * Linting

    * Pin flask version for flask restx tests. (#931)

    * Ignore new redis methods. (#932)

    Co-authored-by: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>

    * Remove approved paths

    * Update CI Image (#930)

    * Update available python versions in CI

    * Update makefile with overrides

    * Fix default branch detection for arm builds

    ---------

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    * Add mocking for embedding endpoint

    * [Mega-Linter] Apply linters fixes

    * Add ratelimit headers

    * [Mega-Linter] Apply linters fixes

    * Only get package version once (#928)

    * Only get package version once

    * Add disconnect method

    * Add disconnect method

    ---------

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    * Add datalib dependency for embedding testing.

    * Add OpenAI Test Infrastructure (#926)

    * Add openai to tox

    * Add OpenAI test files.

    * Add test functions.

    * [Mega-Linter] Apply linters fixes

    ---------

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <mergify[bot]@users.noreply.github.com>

    * Add mock external openai server

    * Add mocked OpenAI server fixtures

    * Set up recorded responses.

    * Clean mock server to depend on http server

    * Linting

    * Remove approved paths

    * Add mocking for embedding endpoint

    * [Mega-Linter] Apply linters fixes

    * Add ratelimit headers

    * [Mega-Linter] Apply linters fixes

    * Add datalib dependency for embedding testing.

    ---------

    Co-authored-by: Uma Annamalai <uannamalai@newrelic.com>
    Co-authored-by: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
    Co-authored-by: TimPansino <TimPansino@users.noreply.github.com>
    Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>
    Co-authored-by: mergify[bot] <mergify[bot]@users.noreply.github.com>

commit db63d45
Author: Uma Annamalai <uannamalai@newrelic.com>
Date:   Mon Oct 2 15:31:38 2023 -0700

    Add OpenAI Test Infrastructure (#926)

    * Add openai to tox

    * Add OpenAI test files.

    * Add test functions.

    * [Mega-Linter] Apply linters fixes

    ---------

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <mergify[bot]@users.noreply.github.com>

* Squashed commit of the following:

commit 182c7a8
Author: Uma Annamalai <uannamalai@newrelic.com>
Date:   Fri Oct 13 10:12:55 2023 -0700

    Add request/ response IDs.

commit f6d13f8
Author: Uma Annamalai <uannamalai@newrelic.com>
Date:   Thu Oct 12 13:23:39 2023 -0700

    Test cleanup.

commit d057663
Author: Uma Annamalai <uannamalai@newrelic.com>
Date:   Tue Oct 10 10:23:00 2023 -0700

    Remove commented code.

commit dd29433
Author: Uma Annamalai <uannamalai@newrelic.com>
Date:   Tue Oct 10 10:19:01 2023 -0700

    Add openai sync instrumentation.

commit 2834663
Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Date:   Mon Oct 9 17:42:05 2023 -0700

    OpenAI Mock Backend (#929)

    * Add mock external openai server

    * Add mocked OpenAI server fixtures

    * Set up recorded responses.

    * Clean mock server to depend on http server

    * Linting

    * Pin flask version for flask restx tests. (#931)

    * Ignore new redis methods. (#932)

    Co-authored-by: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>

    * Remove approved paths

    * Update CI Image (#930)

    * Update available python versions in CI

    * Update makefile with overrides

    * Fix default branch detection for arm builds

    ---------

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    * Add mocking for embedding endpoint

    * [Mega-Linter] Apply linters fixes

    * Add ratelimit headers

    * [Mega-Linter] Apply linters fixes

    * Only get package version once (#928)

    * Only get package version once

    * Add disconnect method

    * Add disconnect method

    ---------

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

    * Add datalib dependency for embedding testing.

    * Add OpenAI Test Infrastructure (#926)

    * Add openai to tox

    * Add OpenAI test files.

    * Add test functions.

    * [Mega-Linter] Apply linters fixes

    ---------

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <mergify[bot]@users.noreply.github.com>

    * Add mock external openai server

    * Add mocked OpenAI server fixtures

    * Set up recorded responses.

    * Clean mock server to depend on http server

    * Linting

    * Remove approved paths

    * Add mocking for embedding endpoint

    * [Mega-Linter] Apply linters fixes

    * Add ratelimit headers

    * [Mega-Linter] Apply linters fixes

    * Add datalib dependency for embedding testing.

    ---------

    Co-authored-by: Uma Annamalai <uannamalai@newrelic.com>
    Co-authored-by: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
    Co-authored-by: TimPansino <TimPansino@users.noreply.github.com>
    Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>
    Co-authored-by: mergify[bot] <mergify[bot]@users.noreply.github.com>

commit db63d45
Author: Uma Annamalai <uannamalai@newrelic.com>
Date:   Mon Oct 2 15:31:38 2023 -0700

    Add OpenAI Test Infrastructure (#926)

    * Add openai to tox

    * Add OpenAI test files.

    * Add test functions.

    * [Mega-Linter] Apply linters fixes

    ---------

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
    Co-authored-by: mergify[bot] <mergify[bot]@users.noreply.github.com>

* TEMP

* Bedrock titan extraction nearly complete

* Cleaning up titan bedrock implementation

* TEMP

* Tests for bedrock passing

Co-authored-by: Lalleh Rafeei <lrafeei@users.noreply.github.com>

* Cleaned up titan testing

Co-authored-by: Lalleh Rafeei <lrafeei@users.noreply.github.com>
Co-authored-by: Hannah Stepanek <hmstepanek@users.noreply.github.com>

* Parametrized bedrock testing

* Add support for AI21-J2 models

* Change to dynamic no conversation id events

* Add cohere model

* Remove openai instrumentation from this branch

* Remove OpenAI from newrelic/config.py

---------

Co-authored-by: Uma Annamalai <uannamalai@newrelic.com>
Co-authored-by: Tim Pansino <timpansino@gmail.com>
Co-authored-by: Lalleh Rafeei <lrafeei@users.noreply.github.com>
Co-authored-by: Hannah Stepanek <hmstepanek@users.noreply.github.com>

* AWS Bedrock Embedding Instrumentation (#957)

* AWS Bedrock embedding instrumentation

* Correct symbol name

* Add support for bedrock claude (#960)

Co-authored-by: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>

* Combine Botocore Tests (#959)

* Initial file migration

* Enable DT on all span tests

* Add pytest skip for older botocore versions

* Fixup: app name merge conflict

---------

Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>

* Initial bedrock error tracing commit

* Add status code to mock bedrock server

* Updating error response recording logic

* Work on bedrock errror tracing

* Chat completion error tracing

* Adding embedding error tracing

* Delete comment

* Update moto

* Fix botocore tests & re-structure

* [Mega-Linter] Apply linters fixes

---------

Co-authored-by: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Co-authored-by: Uma Annamalai <uannamalai@newrelic.com>
Co-authored-by: SlavaSkvortsov <29122694+SlavaSkvortsov@users.noreply.github.com>
Co-authored-by: TimPansino <TimPansino@users.noreply.github.com>
Co-authored-by: Lalleh Rafeei <lrafeei@newrelic.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Lalleh Rafeei <lrafeei@users.noreply.github.com>
Co-authored-by: Hannah Stepanek <hmstepanek@users.noreply.github.com>
Co-authored-by: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
Co-authored-by: Tim Pansino <timpansino@gmail.com>

* Package Version Performance Regression (#970)

* Fix package version performance regression

* Update tests/agent_unittests/test_package_version_utils.py

* Update tests/agent_unittests/test_package_version_utils.py

* Update tests/agent_unittests/test_package_version_utils.py

* Skip test in python 2

---------

Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>

* Synthetics Info Header Support (#896)

* Add support for new synthetics info header

* Add testing for new synthetics headers

* Linting

* Fixup tests for synthetics headers

* Add tests for snake and camel casing

---------

Co-authored-by: Uma Annamalai <uannamalai@newrelic.com>

* Fix CI Image Permissions for Non-Root Users (#969)

* Use shared directory for pyenv

* Simplify permissions

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Add package_capturing.enabled setting (#982)

* Add capture_dependencies.enabled setting

* Change setting name

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Revert "Synthetics Info Header Support (#896)" (#983)

This reverts commit 3980127.

* Remove accidental quote from api keys (#985)

* Synthetics Info Header Support (#984)

* Add support for new synthetics info header

* Add testing for new synthetics headers

* Linting

* Fixup tests for synthetics headers

* Add tests for snake and camel casing

---------

Co-authored-by: Uma Annamalai <uannamalai@newrelic.com>

* Docker CGroups v2 Utilization Support (#980)

* Docker cgroups v2 utilization

* Update docker cross agent tests with cgroups v2

* Updated cgroups detection logic

* Remove unnecessary grouping

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Testing for supported frameworks in Python 3.12 (#897)

* Replaced pkg_resources with importlib.metadata

* Add tested/working tests to tox

* importlib.metadata version and entry_points logic (#898)

* Replaced pkg_resources with importlib.metadata

* Fix entry_points logic for Py312

* Fix logic for entry_points

* Check to see if list or string

* Add Python 3.12 to container setup

* Pin dev CI image SHA

* Revert sha to latest

* Datastores: Replace __version__ with get_package_version (#899)

* Replaced pkg_resources with importlib.metadata

* Replace pkg_resources in wrapt/importer.py

* Add get_package_version from datastores

* [Mega-Linter] Apply linters fixes

* Push empty commit

* Add assert statements for version

---------

Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>

* Lambdas and Boto: Replace __version__ with get_package_version (#902)

* Replaced pkg_resources with importlib.metadata

* Replace pkg_resources in wrapt/importer.py

* Add get_package_version for lambdas/boto

* Unpin moto version in tests

* Fix graphql imports in tox

* Add 3.12 release candidate 2 to python versions

* Add remaining working 3.12 tests

* [Mega-Linter] Apply linters fixes

* Trigger test run

* [Mega-Linter] Apply linters fixes

* Fix some merge issues

* Fix some (more) merge issues

* Remove old tests in tox

* Remove unsupported Django testing (< v2.0)

* Fix some tests for agent_features

* Fix cherrypy test env in tox

* Pin hypercorn (for now)

* Add more py312 runs and unpin hypercorn

* Adding known working test suites

* Add remaining non-working test suites

* Fix SKLearn Py 3.12

* Fix typos in odbc

* Fix fixture scopes for hypercorn

* Add settings patch to fix local testing

---------

Co-authored-by: lrafeei <lrafeei@users.noreply.github.com>
Co-authored-by: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Co-authored-by: Tim Pansino <timpansino@gmail.com>

* Remove all references to NR staging (#989)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Fix bug with Structlog CallsiteParameter processor (#990)

* Fix bug with CallsiteParameters.

Co-authored-by: Tim Pansino <tpansino@newrelic.com>
Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>

* Add test for structlog processors.

* Add test file for structlog processors.

* Fix import ordering.

* Move asssertion logic into test file.

---------

Co-authored-by: Tim Pansino <tpansino@newrelic.com>
Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>

* Update wrapt (#993)

* Update wrapt to 1.16.0

* Import duplicate functions directly from wrapt

* Update object wrappers for wrapt 1.16.0

* Add warning to wrapt duplicate code

* Linting

* Use super rather than hard coded Object proxy

* Formatting

* Add test file for wrapper attributes

* Linting

* Add descriptions to assertions

* Overhaul test suite for clarity

* Move functions into fixtures

* [Mega-Linter] Apply linters fixes

* Bump tests

* Fix typo

* Larger timeout for protobuf

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: TimPansino <TimPansino@users.noreply.github.com>

* Patch sentinel bug (#997)

Co-authored-by: Timothy Pansino <TimPansino@users.noreply.github.com>
Co-authored-by: Hannah Stepanek <hmstepanek@users.noreply.github.com>
Co-authored-by: Uma Annamalai <umaannamalai@users.noreply.github.com>

* Update flaskrestx testing (#1004)

* Update flaskrestx testing

* Update tastypie testing

* Reformat tox

* Fix tox typo

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Remove RPM config workflow. (#1007)

* Nonced CSP Support (#998)

* Add nonce to CSP in browser agent

* Adjust nonce position

* Add testing for browser timing nonces

* Drop py27 from memcache testing. (#1018)

* Temporarily pin hypercorn version in tests (#1021)

* Temporarily pin hypercorn to <0.16

* Temporarily pin hypercorn to <0.16

* Add comment to tox.ini

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Remove case sensitive check in ASGIBrowserMiddleware check. (#1017)

* Remove case sensitive check in should_insert_html.

* [Mega-Linter] Apply linters fixes

* Remove header decoding.

---------

Co-authored-by: umaannamalai <umaannamalai@users.noreply.github.com>

* Parallel Wheel Builds (#1024)

* Fix import issue in tests

* Parallelize wheel building and add muslinux support

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Deprecate get_browser_timing_footer API (#999)

* Add nonce to CSP in browser agent

* Adjust nonce position

* Add testing for browser timing nonces

* Deprecated browser timing footer APIs.

* Full rip out of browser timing footer

* Remove cross agent tests for RUM footer (per repo)

* Update cat_map tests

* Adjust browser header generation timing accuracy

* Fix browser tests

* Linting

* Apply suggestions from code review

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Deprecate ObjectWrapper API (#996)

* Update wrapt to 1.16.0

* Import duplicate functions directly from wrapt

* Update object wrappers for wrapt 1.16.0

* Add warning to wrapt duplicate code

* Linting

* Use super rather than hard coded Object proxy

* Formatting

* Add test file for wrapper attributes

* Unify ObjectWrapper with FunctionWrapper

* Remove ObjectWrapper from httplib

* Remove ObjectWrapper from tastypie

* Replace ObjectWrapper use in console

* Remove ObjectWrapper from celery

* Remove extra import

* Update agent APIs

* Deprecate ObjectWrapper

* Fix object wrapper imports

* More import issues

* Fix taskwrapper in celery

* Pin last supported flask restx version for 3.7

* Undo tox changes

* Change all api.object_wrapper references to use new locations

* Fixup: callable_name import

* Fixup: callable_name import

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>

* Add checkout actions to deploy workflow (#1027)

* Remove Slack section in CONTRIBUTING.rst. (#1029)

* Update newrelic/hooks/external_botocore.py

* Update newrelic/hooks/external_botocore.py

* Update newrelic/hooks/external_botocore.py

* Update newrelic/hooks/external_botocore.py

* Update tox.ini

* Remove unused imports

  /github/workspace/newrelic/api/web_transaction.py:36:1: F401 'newrelic.core.attribute.create_attributes' imported but unused
  /github/workspace/newrelic/api/web_transaction.py:36:1: F401 'newrelic.core.attribute.process_user_attribute' imported but unused
  /github/workspace/newrelic/api/web_transaction.py:37:1: F401 'newrelic.core.attribute_filter.DST_NONE' imported but unused

* Fix lint errors

  /github/workspace/newrelic/common/utilization.py:20:1: F401 'threading' imported but unused
  /github/workspace/newrelic/common/utilization.py:183:26: E711 comparison to None should be 'if cond is None:'

* Fix lint errors

  /github/workspace/newrelic/console.py:74:1: E402 module level import not at top of file
  /github/workspace/newrelic/console.py:75:1: E402 module level import not at top of file
  /github/workspace/newrelic/console.py:76:1: E402 module level import not at top of file
  /github/workspace/newrelic/console.py:77:1: E402 module level import not at top of file

* Fix lint errors

  /github/workspace/newrelic/core/internal_metrics.py:15:1: F401 'functools' imported but unused
  /github/workspace/newrelic/core/internal_metrics.py:16:1: F401 'sys' imported but unused
  /github/workspace/newrelic/core/internal_metrics.py:17:1: F401 'types' imported but unused

* Fix lint errors

/github/workspace/newrelic/hooks/external_feedparser.py:16:1: F401 'types' imported but unused

* Fix lint errors

/github/workspace/newrelic/hooks/framework_webpy.py:15:1: F401 'sys' imported but unused

* Fix lint errors

/github/workspace/newrelic/hooks/template_genshi.py:15:1: F401 'types' imported but unused

* Fix lint errors

/github/workspace/tests/agent_features/test_configuration.py:49:1: E302 expected 2 blank lines, found 1

* Fix lint errors

/github/workspace/tests/agent_features/test_error_events.py:30:1: F401 'testing_support.validators.validate_error_trace_attributes.validate_error_trace_attributes' imported but unused

* Fix lint errors

  /github/workspace/tests/cross_agent/test_docker_container_id.py:16:1: F401 'mock' imported but unused
  /github/workspace/tests/cross_agent/test_docker_container_id_v2.py:16:1: F401 'mock' imported but unused

* Fix lint errors

  /github/workspace/tests/framework_bottle/test_application.py:18:1: F401 'webtest' imported but unused
  /github/workspace/tests/framework_bottle/test_application.py:37:1: F811 redefinition of unused 'version' from line 19
  /github/workspace/tests/framework_bottle/test_application.py:229:5: F401 'newrelic.agent' imported but unused

* Fix lint errors

  /github/workspace/tests/logger_structlog/conftest.py:15:1: F401 'logging' imported but unused
  /github/workspace/tests/logger_structlog/conftest.py:19:1: F401 'testing_support.fixtures.collector_available_fixture' imported but unused

* Fix lint errors

  /github/workspace/tests/testing_support/external_fixtures.py:57:5: E125 continuation line with same indent as next logical line
  /github/workspace/tests/testing_support/external_fixtures.py:113:9: E303 too many blank lines (2)
  /github/workspace/tests/testing_support/external_fixtures.py:154:19: W292 no newline at end of file

* Fix lint errors

/github/workspace/tests/testing_support/fixtures.py:813:1: W293 blank line contains whitespace

* Fix lint errors

  /github/workspace/tests/testing_support/validators/validate_synthetics_event.py:21:1: E302 expected 2 blank lines, found 1
  /github/workspace/tests/testing_support/validators/validate_synthetics_event.py:71:1: W391 blank line at end of file

* Logging Attributes (#1033)

* Log Forwarding User Attributes (#682)

* Add context data setting

Co-authored-by: Uma Annamalai <umaannamalai@users.noreply.github.com>
Co-authored-by: Hannah Stepanek <hmstepanek@users.noreply.github.com>
Co-authored-by: Lalleh Rafeei <lrafeei@users.noreply.github.com>

* Update record_log_event signature with attributes

* Logging attributes initial implementation

* Fix settings attribute error

* Update logging instrumentation with attributes

* Update log handler API

* Add loguru support for extra attrs

* Add more explicit messaging to validator

* Expanding testing for record_log_event

* Expand record log event testing

* Fix settings typo

* Remove missing loguru attributes from test

* Adjust safe log attr encoding

* Correct py2 issues

* Fix missing record attrs in logging.

Co-authored-by: Uma Annamalai <umaannamalai@users.noreply.github.com>
Co-authored-by: Hannah Stepanek <hmstepanek@users.noreply.github.com>
Co-authored-by: Lalleh Rafeei <lrafeei@users.noreply.github.com>
Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>

* Log Attribute Filtering (#1008)

* Expand validator for log events

* Add settings for context data filtering

* Add attribute filtering for log events

* Linting

* Apply suggestions from code review

* Remove none check on attributes

* Squashed commit of the following:

commit 3962f54
Author: Uma Annamalai <uannamalai@newrelic.com>
Date:   Thu Jan 4 12:50:58 2024 -0800

    Remove case sensitive check in ASGIBrowserMiddleware check. (#1017)

    * Remove case sensitive check in should_insert_html.

    * [Mega-Linter] Apply linters fixes

    * Remove header decoding.

    ---------

    Co-authored-by: umaannamalai <umaannamalai@users.noreply.github.com>

commit c3314ae
Author: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
Date:   Tue Jan 2 17:17:20 2024 -0800

    Temporarily pin hypercorn version in tests (#1021)

    * Temporarily pin hypercorn to <0.16

    * Temporarily pin hypercorn to <0.16

    * Add comment to tox.ini

    ---------

    Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

commit 1357145
Author: Uma Annamalai <uannamalai@newrelic.com>
Date:   Tue Jan 2 16:17:08 2024 -0800

    Drop py27 from memcache testing. (#1018)

commit 23f969f
Author: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Date:   Wed Dec 20 17:01:50 2023 -0800

    Nonced CSP Support (#998)

    * Add nonce to CSP in browser agent

    * Adjust nonce position

    * Add testing for browser timing nonces

commit 8bfd2b7
Author: Uma Annamalai <uannamalai@newrelic.com>
Date:   Mon Dec 18 13:58:10 2023 -0800

    Remove RPM config workflow. (#1007)

* Add Dictionary Log Message Support (#1014)

* Add tests for logging's json logging

* Upgrade record_log_event to handle dict logging

* Update logging to capture dict messages

* Add attributes for dict log messages

* Implementation of JSON message filtering

* Correct attributes only log behavior

* Testing for logging attributes

* Add logging context test for py2

* Logically separate attribute tests

* Clean out imports

* Fix failing tests

* Remove logging instrumentation changes for new PR

* Add test for record log event edge cases

* Update record_log_event for code review

* Fix truncation

* Move safe_json_encode back to api.log as it's unused elsewhere

* Black formatting

* Add missing import

* Fixup warning message

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Logging Attribute Instrumentation (#1015)

* Add tests for logging's json logging

* Upgrade record_log_event to handle dict logging

* Update logging to capture dict messages

* Add attributes for dict log messages

* Implementation of JSON message filtering

* Correct attributes only log behavior

* Testing for logging attributes

* Add logging context test for py2

* Logically separate attribute tests

* Clean out imports

* Fix failing tests

* Linting

* Ignore path hash

* Fix linter errors

* Fix linting issues

* Apply suggestions from code review

* StructLog Attribute Instrumentation (#1026)

* Add tests for logging's json logging

* Upgrade record_log_event to handle dict logging

* Update logging to capture dict messages

* Add attributes for dict log messages

* Implementation of JSON message filtering

* Correct attributes only log behavior

* Testing for logging attributes

* Add logging context test for py2

* Logically separate attribute tests

* Clean out imports

* Fix failing tests

* Structlog cleanup

* Attempting list instrumentation

* Structlog attributes support

Co-authored-by: Lalleh Rafeei <lrafeei@users.noreply.github.com>
Co-authored-by: Uma Annamalai <umaannamalai@users.noreply.github.com>

* Remove other frameworks changes

* Bump tests

* Change cache to lru cache

* Linting

* Remove TODO

* Remove unnecessary check

---------

Co-authored-by: Lalleh Rafeei <lrafeei@users.noreply.github.com>
Co-authored-by: Uma Annamalai <umaannamalai@users.noreply.github.com>

* Loguru Attribute Instrumentation (#1025)

* Add tests for logging's json logging

* Upgrade record_log_event to handle dict logging

* Update logging to capture dict messages

* Add attributes for dict log messages

* Implementation of JSON message filtering

* Correct attributes only log behavior

* Testing for logging attributes

* Add logging context test for py2

* Logically separate attribute tests

* Clean out imports

* Fix failing tests

* Structlog cleanup

* Attempting list instrumentation

* Structlog attributes support

Co-authored-by: Lalleh Rafeei <lrafeei@users.noreply.github.com>
Co-authored-by: Uma Annamalai <umaannamalai@users.noreply.github.com>

* Loguru instrumentation refactor

* New attribute testing

* Move exception settings

* Clean up testing

* Remove unneeded option

* Remove other framework changes

* [Mega-Linter] Apply linters fixes

* Bump tests

---------

Co-authored-by: Lalleh Rafeei <lrafeei@users.noreply.github.com>
Co-authored-by: Uma Annamalai <umaannamalai@users.noreply.github.com>
Co-authored-by: TimPansino <TimPansino@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Temporarily pin starlette tests

* Update web_transaction.py

---------

Co-authored-by: Uma Annamalai <umaannamalai@users.noreply.github.com>
Co-authored-by: Hannah Stepanek <hmstepanek@users.noreply.github.com>
Co-authored-by: Lalleh Rafeei <lrafeei@users.noreply.github.com>
Co-authored-by: Hannah Stepanek <hstepanek@newrelic.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: TimPansino <TimPansino@users.noreply.github.com>

* Obfuscate License Keys in Logs (#1031)

* Obfuscate license keys

* Run formatter

* Fix None errors in obfuscate_license_key

* Obfuscate API keys from headers

* Add lowercase api-key to denied headers

* Change audit log header filters to be case insensitive

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

* Instrument Lantern vectorstore

* Fix instrumentation for openai 1.8.0

---------

Co-authored-by: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
Co-authored-by: Uma Annamalai <uannamalai@newrelic.com>
Co-authored-by: SlavaSkvortsov <29122694+SlavaSkvortsov@users.noreply.github.com>
Co-authored-by: TimPansino <TimPansino@users.noreply.github.com>
Co-authored-by: Lalleh Rafeei <lrafeei@newrelic.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Lalleh Rafeei <lrafeei@users.noreply.github.com>
Co-authored-by: Hannah Stepanek <hmstepanek@users.noreply.github.com>
Co-authored-by: Lalleh Rafeei <84813886+lrafeei@users.noreply.github.com>
Co-authored-by: Tim Pansino <timpansino@gmail.com>
Co-authored-by: Tim Pansino <tpansino@newrelic.com>
Co-authored-by: Uma Annamalai <umaannamalai@users.noreply.github.com>
  • Loading branch information
13 people authored Jan 17, 2024
1 parent dae9c79 commit 9b55775
Show file tree
Hide file tree
Showing 151 changed files with 4,733 additions and 3,590 deletions.
10 changes: 4 additions & 6 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@ FROM ghcr.io/newrelic/newrelic-python-agent-ci:${IMAGE_TAG}
# Setup non-root user
USER root
ARG UID=1000
ARG GID=$UID
ARG GID=${UID}
ENV HOME /home/vscode
RUN mkdir -p ${HOME} && \
groupadd --gid ${GID} vscode && \
useradd --uid ${UID} --gid ${GID} --home ${HOME} vscode && \
chown -R ${UID}:${GID} /home/vscode

# Move pyenv installation
ENV PYENV_ROOT="${HOME}/.pyenv"
ENV PATH="$PYENV_ROOT/bin:$PYENV_ROOT/shims:${PATH}"
RUN mv /root/.pyenv /home/vscode/.pyenv && \
chown -R vscode:vscode /home/vscode/.pyenv
# Fix pyenv installation
RUN echo 'eval "$(pyenv init -)"' >>${HOME}/.bashrc && \
chown -R vscode:vscode ${PYENV_ROOT}

# Set user
USER ${UID}:${GID}
109 changes: 0 additions & 109 deletions .github/actions/update-rpm-config/action.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/containers/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ ENV HOME /root
WORKDIR "${HOME}"

# Install pyenv
ENV PYENV_ROOT="${HOME}/.pyenv"
ENV PYENV_ROOT="/usr/local/pyenv"
RUN curl https://pyenv.run/ | /bin/bash
ENV PATH="$PYENV_ROOT/bin:$PYENV_ROOT/shims:${PATH}"
RUN echo 'eval "$(pyenv init -)"' >>$HOME/.bashrc && \
ENV PATH="${PYENV_ROOT}/bin:${PYENV_ROOT}/shims:${PATH}"
RUN echo 'eval "$(pyenv init -)"' >>${HOME}/.bashrc && \
pyenv update

# Install Python
Expand Down
158 changes: 123 additions & 35 deletions .github/workflows/deploy-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,125 @@ on:
- published

jobs:
deploy-linux:
build-linux-py3:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
wheel:
- cp37-manylinux
- cp37-musllinux
- cp38-manylinux
- cp38-musllinux
- cp39-manylinux
- cp39-musllinux
- cp310-manylinux
- cp310-musllinux
- cp311-manylinux
- cp311-musllinux
- cp312-manylinux
- cp312-musllinux

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0

- name: Setup QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3

- name: Build Wheels
uses: pypa/cibuildwheel@v2.16.2
env:
CIBW_PLATFORM: linux
CIBW_BUILD: "${{ matrix.wheel }}*"
CIBW_ARCHS_LINUX: x86_64 aarch64
CIBW_ENVIRONMENT: "LD_LIBRARY_PATH=/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:/opt/rh/devtoolset-8/root/usr/lib64/dyninst:/opt/rh/devtoolset-8/root/usr/lib/dyninst:/usr/local/lib64:/usr/local/lib"
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: "PYTHONPATH={project}/tests pytest {project}/tests/agent_unittests -vx"

- name: Upload Artifacts
uses: actions/upload-artifact@v4.0.0
with:
name: ${{ github.job }}-${{ matrix.wheel }}
path: ./wheelhouse/*.whl
retention-days: 1

build-linux-py2:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0

- name: Setup QEMU
uses: docker/setup-qemu-action@v3

- name: Build Wheels
uses: pypa/cibuildwheel@v1.12.0
env:
CIBW_PLATFORM: linux
CIBW_BUILD: cp27-manylinux_x86_64
CIBW_ARCHS_LINUX: x86_64
CIBW_ENVIRONMENT: "LD_LIBRARY_PATH=/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:/opt/rh/devtoolset-8/root/usr/lib64/dyninst:/opt/rh/devtoolset-8/root/usr/lib/dyninst:/usr/local/lib64:/usr/local/lib"
CIBW_TEST_REQUIRES: pytest==4.6.11
CIBW_TEST_COMMAND: "PYTHONPATH={project}/tests pytest {project}/tests/agent_unittests -vx"

- name: Upload Artifacts
uses: actions/upload-artifact@v4.0.0
with:
name: ${{ github.job }}
path: ./wheelhouse/*.whl
retention-days: 1

build-sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0

- name: Install Dependencies
run: |
pip install -U pip
pip install -U setuptools
- name: Build Source Package
run: |
python setup.py sdist
- name: Prepare MD5 Hash File
run: |
tarball="$(python setup.py --fullname).tar.gz"
md5_file=${tarball}.md5
openssl md5 -binary dist/${tarball} | xxd -p | tr -d '\n' > dist/${md5_file}
- name: Upload Artifacts
uses: actions/upload-artifact@v4.0.0
with:
name: ${{ github.job }}-sdist
path: |
./dist/*.tar.gz
./dist/*.tar.gz.md5
retention-days: 1

deploy:
runs-on: ubuntu-latest

needs:
- build-linux-py3
- build-linux-py2
- build-sdist

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0

- uses: actions/setup-python@v2
with:
Expand All @@ -42,32 +150,22 @@ jobs:
pip install -U pip
pip install -U wheel setuptools twine
- name: Build Source Package
run: python setup.py sdist

- name: Build Manylinux Wheels (Python 2)
uses: pypa/cibuildwheel@v1.12.0
env:
CIBW_PLATFORM: linux
CIBW_BUILD: cp27-manylinux_x86_64
CIBW_ARCHS: x86_64
CIBW_ENVIRONMENT: "LD_LIBRARY_PATH=/opt/rh/=vtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:/opt/rh/devtoolset-8/root/usr/lib64/dyninst:/opt/rh/devtoolset-8/root/usr/lib/dyninst:/usr/local/lib64:/usr/local/lib"
- name: Download Artifacts
uses: actions/download-artifact@v4.1.0
with:
path: ./artifacts/

- name: Build Manylinux Wheels (Python 3)
uses: pypa/cibuildwheel@v2.11.1
env:
CIBW_PLATFORM: linux
CIBW_BUILD: cp37-manylinux* cp38-manylinux* cp39-manylinux* cp310-manylinux* cp311-manylinux*
CIBW_ARCHS: x86_64 aarch64
CIBW_ENVIRONMENT: "LD_LIBRARY_PATH=/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:/opt/rh/devtoolset-8/root/usr/lib64/dyninst:/opt/rh/devtoolset-8/root/usr/lib/dyninst:/usr/local/lib64:/usr/local/lib"
- name: Unpack Artifacts
run: |
mkdir -p dist/
mv artifacts/**/*{.whl,.tar.gz,.tar.gz.md5} dist/
- name: Upload Package to S3
run: |
tarball="$(python setup.py --fullname).tar.gz"
md5_file=$(mktemp)
openssl md5 -binary dist/$tarball | xxd -p | tr -d '\n' > $md5_file
aws s3 cp $md5_file $S3_DST/${tarball}.md5
aws s3 cp dist/$tarball $S3_DST/$tarball
md5_file=${tarball}.md5
aws s3 cp dist/${md5_file} $S3_DST/${md5_file}
aws s3 cp dist/${tarball} $S3_DST/${tarball}
env:
S3_DST: s3://nr-downloads-main/python_agent/release
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
Expand All @@ -76,17 +174,7 @@ jobs:

- name: Upload Package to PyPI
run: |
twine upload --non-interactive dist/*.tar.gz wheelhouse/*-manylinux*.whl
twine upload --non-interactive dist/*.tar.gz dist/*.whl
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}

- name: Update RPM Config
uses: ./.github/actions/update-rpm-config
with:
agent-language: "python"
target-system: "all"
agent-version: "${{ github.ref_name }}"
dry-run: "false"
production-api-key: ${{ secrets.NEW_RELIC_API_KEY_PRODUCTION }}"
staging-api-key: ${{ secrets.NEW_RELIC_API_KEY_STAGING }}"
Loading

0 comments on commit 9b55775

Please sign in to comment.