question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] `IgnoredHeaders` are not excluded from result comparison

See original GitHub issue

Library name and version

Azure.Core.TestFramework

Describe the bug

According to the guide, adding headers through IgnoredHeaders.Add("XXX") should exclude those headers from result comparison.

However, I have a PR which will add repeatable request headers in some SDKs. Those headers should be excluded, because their value is automatically set by SDK and its value will change each time. So I add those headers as ignored headers. But the test still fails.

Here is a failed case:

Expected behavior

IgnoredHeaders should be excluded from result comparison.

Actual behavior

IgnoredHeaders is not excluded from result comparison.

Reproduction Steps

See the description.

Environment

No response

Issue Analytics

  • State:closed
  • Created 2 months ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
JoshLove-msftcommented, Jul 13, 2023

There is a back compat property that has the behavior that is being requested here - https://github.com/Azure/azure-sdk-for-net/blob/8ff2023034367ab4936bf285372a0c8aae625baf/sdk/core/Azure.Core.TestFramework/src/RecordedTestBase.cs#L173

We intentionally hid this property for all the reasons that @m-nash mentioned.

0reactions
archerzzcommented, Jul 17, 2023

Lets address bullet 3 independently as that is separate from the repeatability use case here.

I do understand the challenges with bullet 1 and 2, how many tests would we need to re-record here?

In dataplane where we have reliable live test I would be fine with simply modifying the recordings to have a new header and no need to re-record.

In mgmtplane one of the reasons I would push for re-recording here is that we can’t rely on live testing for the same reasons you list. There is some regression danger in relying on the same recordings for too long since the service can change its behavior over time and we wouldn’t necessarily know.

Periodically re-recording is a necessary thing until we have the time to get our live testing solution in place.

@m-nash for the repeatability request header changes, 8 SDKs are impacted. And 4 of them require re-recording. 2 of 4 have good test cases so that re-recording is done easily. The remaining 2 SDKs have their test cases tightly bound to service teams’ own testing environments.

  • Azure.Communication.CallingServer: 18 of 155 test cases failed
  • Azure.Analytics.Purview.Share: 6 of 36 test cases failed

I’ve modified the test recordings to make the tests pass. I agree that for such number of impacted test cases, modifying test recordings is a better option.

Closing this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

archerzz (Mingzhe Huang) · GitHub
[BUG] IgnoredHeaders are not excluded from result comparison ... Describe the bug According to the guide, adding headers through IgnoredHeaders.
Read more >
What's the difference between zuul.ignoredHeaders and ...
Ignored headers are the headers that are totally ignored once traffic reaches Zuul. In other words, Zuul ignores such headers when sending ...
Read more >
bug-gnu-emacs (date)
January 31, 2021 ·, Stefan Monnier, 23:37 ·, Eli Zaretskii, 22:37 ·, Basil L. Contovounesios, 22:22 ·, Stefan Monnier, 21:46 ·, Dmitry Gutov,...
Read more >
Spring Cloud Netflix
RELEASE. This project provides Netflix OSS integrations for Spring Boot apps through autoconfiguration and binding to the Spring Environment and other ...
Read more >
Spring Cloud Netflix
When calls to a particular service reach a certain threshold (20 failures in 5 seconds is the default in Hystrix), the circuit opens...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found