Skip to content

fix: prevent duplicating metrics middleware#3087

Merged
stobrien89 merged 3 commits intoaws:masterfrom
yenfryherrerafeliz:fix_multiple_metrics_middleware_add
Feb 17, 2025
Merged

fix: prevent duplicating metrics middleware#3087
stobrien89 merged 3 commits intoaws:masterfrom
yenfryherrerafeliz:fix_multiple_metrics_middleware_add

Conversation

@yenfryherrerafeliz
Copy link
Contributor

Issue #3086

Description of changes:

  • Prevent adding the same metrics middleware multiple times.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

- Prevent adding the same metrics middleware multiple times.
- Add a hasMiddleware method into HandlerList implementation to check if a middleware was already appended.
@yenfryherrerafeliz yenfryherrerafeliz force-pushed the fix_multiple_metrics_middleware_add branch from e12412d to f9e42a7 Compare February 17, 2025 17:42
@yenfryherrerafeliz
Copy link
Contributor Author

vendor/bin/behat --format=progress --tags=integ
...................................................................... 70
...................................................................... 140
...................................................................... 210
......................................

66 scenarios (66 passed)
248 steps (248 passed)
9m4.85s (42.06Mb)
vendor/bin/behat --format=progress --suite=smoke --tags='~@noassumerole'
...................................................................... 70
...................................................................... 140
...................................................................... 210
..............

112 scenarios (112 passed)
224 steps (224 passed)
0m36.32s (95.28Mb)

Copy link
Member

@stobrien89 stobrien89 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a doc nit and an extra assertion needed on the test. We need a changelog entry for this as well

- Use added instead of appended to specify when a middleware is added.
- Add change log entry.
@stobrien89 stobrien89 merged commit c118caa into aws:master Feb 17, 2025
10 checks passed
avery-kuo pushed a commit to avery-kuo/aws-sdk-php that referenced this pull request Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants