feat: Add set_attribute, remove_attribute to global API
#17786
ci.yml
on: pull_request
Lint Sources
1m 28s
Build Package
24s
Build SDK API Doc
31s
Annotations
2 warnings
|
Test does not verify remove_attribute functionality due to typo in attribute name:
tests/test_attributes.py#L13
The test sets an attribute named `"remove"` (line 12) but then calls `remove_attribute("removed")` (line 13) with a different key that was never set. The assertion `"removed" not in metric["attributes"]` (line 24) will always pass since `"removed"` was never set in the first place. This means the test doesn't actually verify that `remove_attribute` successfully removes an existing attribute - it only verifies that removing a non-existent attribute doesn't raise (which is separately covered by line 15).
|
|
Test does not verify remove_attribute removes an existing attribute:
tests/test_attributes.py#L13
The test sets an attribute with key "remove" (line 12) but then calls `remove_attribute("removed")` (line 13) with a different key that was never set. The assertion `assert "removed" not in metric["attributes"]` passes trivially because the key was never set, not because remove_attribute works. This leaves the actual removal functionality untested.
|
Artifacts
Produced during runtime
| Name | Size | Digest | |
|---|---|---|---|
|
artifact-build_lambda_layer
|
1.47 MB |
sha256:ea5f080b05107c6a5d243c97e69db62c01870714ee650a38a8310380c0e203d5
|
|
|
artifact-docs
|
891 KB |
sha256:3f0c0f2bdd3a9bf1a96a5a0bf95f8cde970e1db9488bd95069fbfc32da3882a1
|
|