Fix allowed_warnings takes no effect for the yaml test in 75_update.yml#16764
Merged
reta merged 1 commit intoopensearch-project:mainfrom Dec 3, 2024
Merged
Fix allowed_warnings takes no effect for the yaml test in 75_update.yml#16764reta merged 1 commit intoopensearch-project:mainfrom
reta merged 1 commit intoopensearch-project:mainfrom
Conversation
Signed-off-by: Gao Binlong <gbinlong@amazon.com>
Contributor
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #16764 +/- ##
============================================
- Coverage 72.16% 72.01% -0.16%
+ Complexity 65257 65163 -94
============================================
Files 5318 5318
Lines 303988 303988
Branches 43987 43987
============================================
- Hits 219358 218902 -456
- Misses 66674 67151 +477
+ Partials 17956 17935 -21 ☔ View full report in Codecov by Sentry. |
reta
approved these changes
Dec 3, 2024
akolarkunnu
pushed a commit
to akolarkunnu/OpenSearch
that referenced
this pull request
Jan 21, 2025
…ml (opensearch-project#16764) Signed-off-by: Gao Binlong <gbinlong@amazon.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
In this PR, we have some yaml tests to verify that the update API can return deprecation warning header under some condition, but by accident, I found that the
allowed_warningscommand in the second test case in 75_update.yml takes no effect, change the warning message to a random string and even remove theallowed_warnings, the test case still passes, after diving deep into this, I found the reason is that we only log the deprecation log and return the warning header once for every singleX-Opaque-Id, both the first update request and second update request in the yaml test file have emptyX-Opaque-Idheader, so the second update request receives no warning header.This PR fixes this test bug by specifying different
X-Opaque-Idheader for the two update requests and changing theallowed_warningcommand towarningswhich can verify that the API request really returns warning header.Related Issues
No issue.
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.