Skip to content

Commit e54c5bc

Browse files
authored
ci: mark bedrock span sampling tests as flaky (#13437)
> botocore.exceptions.ClientError: An error occurred (UnrecognizedClientException) when calling the InvokeModel operation: The security token included in the request is invalid. ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
1 parent dba2b3e commit e54c5bc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/contrib/botocore/test_bedrock.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
from tests.subprocesstest import run_in_subprocess
1818
from tests.utils import DummyTracer
1919
from tests.utils import DummyWriter
20+
from tests.utils import flaky
2021
from tests.utils import override_global_config
2122

2223

@@ -140,18 +141,22 @@ def _test_span_sampling(self, rate):
140141
sampled += 1
141142
assert (rate * num_completions - 30) < sampled < (rate * num_completions + 30)
142143

144+
@flaky(until=1752686557)
143145
@run_in_subprocess(env_overrides=dict(DD_BEDROCK_SPAN_PROMPT_COMPLETION_SAMPLE_RATE="0.0"))
144146
def test_span_sampling_0(self):
145147
self._test_span_sampling(rate=float(os.getenv("DD_BEDROCK_SPAN_PROMPT_COMPLETION_SAMPLE_RATE")))
146148

149+
@flaky(until=1752686557)
147150
@run_in_subprocess(env_overrides=dict(DD_BEDROCK_SPAN_PROMPT_COMPLETION_SAMPLE_RATE="0.25"))
148151
def test_span_sampling_25(self):
149152
self._test_span_sampling(rate=float(os.getenv("DD_BEDROCK_SPAN_PROMPT_COMPLETION_SAMPLE_RATE")))
150153

154+
@flaky(until=1752686557)
151155
@run_in_subprocess(env_overrides=dict(DD_BEDROCK_SPAN_PROMPT_COMPLETION_SAMPLE_RATE="0.75"))
152156
def test_span_sampling_75(self):
153157
self._test_span_sampling(rate=float(os.getenv("DD_BEDROCK_SPAN_PROMPT_COMPLETION_SAMPLE_RATE")))
154158

159+
@flaky(until=1752686557)
155160
@run_in_subprocess(env_overrides=dict(DD_BEDROCK_SPAN_PROMPT_COMPLETION_SAMPLE_RATE="1.0"))
156161
def test_span_sampling_100(self):
157162
self._test_span_sampling(rate=float(os.getenv("DD_BEDROCK_SPAN_PROMPT_COMPLETION_SAMPLE_RATE")))

0 commit comments

Comments
 (0)