diff --git a/.github/workflows/build-ci-image.yml b/.github/workflows/build-ci-image.yml index 147f633f7a..54cb2390cb 100644 --- a/.github/workflows/build-ci-image.yml +++ b/.github/workflows/build-ci-image.yml @@ -89,8 +89,6 @@ jobs: platforms: ${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} outputs: type=image,name=ghcr.io/${{ steps.image-name.outputs.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true - cache-from: type=gha,scope=build-${{ matrix.cache_tag }} - cache-to: type=gha,scope=build-${{ matrix.cache_tag }} - name: Export Digest run: | diff --git a/.github/workflows/trivy.yml b/.github/workflows/trivy.yml index c6a9ddd982..d9cdc60372 100644 --- a/.github/workflows/trivy.yml +++ b/.github/workflows/trivy.yml @@ -61,6 +61,6 @@ jobs: - name: Upload Trivy scan results to GitHub Security tab if: ${{ github.event_name == 'schedule' }} - uses: github/codeql-action/upload-sarif@f1f6e5f6af878fb37288ce1c627459e94dbf7d01 # 3.30.1 + uses: github/codeql-action/upload-sarif@192325c86100d080feab897ff886c34abd4c83a3 # 3.30.3 with: sarif_file: "trivy-results.sarif" diff --git a/newrelic/config.py b/newrelic/config.py index cdd69671f0..82d95ce8e5 100644 --- a/newrelic/config.py +++ b/newrelic/config.py @@ -20,6 +20,7 @@ import threading import time import traceback +from datetime import datetime, timezone from pathlib import Path import newrelic.api.application @@ -54,6 +55,8 @@ _logger = logging.getLogger(__name__) +DEPRECATED_MODULES = {"aioredis": datetime(2022, 2, 22, 0, 0, tzinfo=timezone.utc)} + def _map_aws_account_id(s): return newrelic.core.config._map_aws_account_id(s, _logger) @@ -1105,6 +1108,18 @@ def _module_import_hook(target, module, function): def _instrument(target): _logger.debug("instrument module %s", ((target, module, function),)) + # Deprecation warning for archived/unsupported modules + library_name = target.__package__.split(".")[0] + + if library_name in DEPRECATED_MODULES: + _logger.warning( + "%(module)s has been archived by the developers " + "and has not been supported since %(date)s. %(module)s " + "support will be removed from New Relic in a future " + "release.", + {"module": library_name, "date": DEPRECATED_MODULES[library_name].strftime("%B %d, %Y")}, + ) + try: instrumented = target._nr_instrumented except AttributeError: