Skip to content

Commit

Permalink
[SVLS-5262] remove unnecessary comment and add an exception for futur…
Browse files Browse the repository at this point in the history
…e safety
  • Loading branch information
apiarian-datadog committed Sep 19, 2024
1 parent 5a3ea44 commit 45899d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 5 additions & 0 deletions ddtrace/_trace/utils_botocore/span_pointers.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ def _aws_s3_object_span_pointer_description(


def _aws_s3_object_span_pointer_hash(bucket: str, key: str, etag: str) -> str:
if '"' in etag:
# Some AWS API endpoints put the ETag in double quotes. We expect the
# calling code to have correctly fixed this already.
raise ValueError(f"ETag should not have double quotes: {etag}")

return _standard_hashing_function(
bucket.encode("ascii"),
key.encode("utf-8"),
Expand Down
4 changes: 0 additions & 4 deletions tests/tracer/utils_botocore/test_span_pointers.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ class HashingCase(NamedTuple):
@pytest.mark.parametrize(
"hashing_case",
[
# These test cases are copied from the dd-span-pointer-rules
# pointer_testset.json file. We will add a system test to ensure
# that these hashing functions are consistent now and in the future
# once this code is merged.
HashingCase(
name="a basic S3 object",
bucket="some-bucket",
Expand Down

0 comments on commit 45899d2

Please sign in to comment.