diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 81ed0c6..7a8afa6 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -16,8 +16,12 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ['3.6', '3.7', '3.8', '3.9'] - + python-version: ['3.7', '3.8', '3.9'] + include: + - os: macos-latest + python-version: '3.6' + - os: windows-latest + python-version: '3.6' steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} diff --git a/codeguru_profiler_agent/codeguru_client_builder.py b/codeguru_profiler_agent/codeguru_client_builder.py index bb9b767..876b565 100644 --- a/codeguru_profiler_agent/codeguru_client_builder.py +++ b/codeguru_profiler_agent/codeguru_client_builder.py @@ -42,8 +42,11 @@ def _create_codeguru_client(self): region = self._get_region_or_default() # the default retry mode is 'legacy', not 'standard' + # retry at most once to avoid retry storms + # see https://boto3.amazonaws.com/v1/documentation/api/latest/guide/retries.html standard_config = Config( - retries={ + retries = { + 'max_attempts': 1, 'mode': 'standard' } ) diff --git a/release_layer.py b/release_layer.py index 0d1f336..a7da27c 100755 --- a/release_layer.py +++ b/release_layer.py @@ -8,7 +8,7 @@ # The following values are used in the documentation, so any change of them requires updates to the documentation. LAYER_NAME = 'AWSCodeGuruProfilerPythonAgentLambdaLayer' -SUPPORTED_VERSIONS = ['3.6', '3.7', '3.8', '3.9'] +SUPPORTED_VERSIONS = ['3.7', '3.8', '3.9'] EXEC_SCRIPT_FILE_NAME = 'codeguru_profiler_lambda_exec' # We should release in all the regions that lambda layer is supported, not just the ones CodeGuru Profiler Service supports. diff --git a/test/unit/metrics/test_with_timer.py b/test/unit/metrics/test_with_timer.py index 29c830e..b25303a 100644 --- a/test/unit/metrics/test_with_timer.py +++ b/test/unit/metrics/test_with_timer.py @@ -15,7 +15,9 @@ def foo_wall(self): @with_timer(metric_name="test-foo-cpu", measurement="cpu-time") def foo_cpu(self): # Run something to make sure the cpu clock does tick (https://bugs.python.org/issue37859) - len(str(2 ** 500_000)) + sum_x = 0 + for i in range(10000000): + sum_x += i return