ci(botocore): fix flaky botocore tests [backport 2.18] #11968
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport 505d148 from #11872 to 2.18.
Botocore sensitive data redaction sets
AWSPayloadTagging.request_redaction_paths
andAWSPayloadTagging.response_redaction_paths
the first time AWSPayloadTagging.expand_payload_as_tags(...) is called.In tests overriding
config.botocore.payload_tagging_request
andconfig.botocore.payload_tagging_request
usingtests.utils.override_config(..)
is not sufficient. We also need to setddtrace._trace.utils_botocore.span_tags._PAYLOAD_TAGGER.validated
toFalse
. This ensures the overriden botocore configurations are actually used.Note: This PR does not fix the underlying issue of
AWSPayloadTagging
configurations becoming out of sync withddtrace.config.botocore
. We will need to address this bug in a future PR.Depending on the order the tests were run the following snapshot test would fail: https://app.circleci.com/pipelines/github/DataDog/dd-trace-py/80321/workflows/54bb5dd9-9c50-4e2a-afeb-e168c6c1e6d9/jobs/4394672
Checklist
Reviewer Checklist