Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ChannelAlreadyClosed error in RateLimitersApiActionTest.testInvalidDeleteScenarios #4812

Merged

Conversation

cwperks
Copy link
Member

@cwperks cwperks commented Oct 14, 2024

Description

This PR fixes an issue on Delete scenarios for the new AuthFailureListener endpoints where the authfailurelistener is not found. This issue was found here and can lead to Channel already closed because its performing an internal config update request even if the corresponding auth failure listener is not found. This PR prevents the internal transport config update request from happening if the listener is not found.

Tested by adding @RepeatRule on the failing test and ensuring that it passes 10x on a single run.

  • Category (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation)

Bug fix

Check List

  • New functionality includes testing
  • New functionality has been documented
  • New Roles/Permissions have a corresponding security dashboards plugin PR
  • API changes companion pull request created
  • Commits are signed per the DCO using --signoff

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.

…idDeleteScenarios

Signed-off-by: Craig Perkins <cwperx@amazon.com>
Copy link

codecov bot commented Oct 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.68%. Comparing base (47b701d) to head (2583006).
Report is 5 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4812      +/-   ##
==========================================
- Coverage   70.76%   70.68%   -0.08%     
==========================================
  Files         310      310              
  Lines       20938    20938              
  Branches     3326     3326              
==========================================
- Hits        14817    14801      -16     
- Misses       4379     4390      +11     
- Partials     1742     1747       +5     
Files with missing lines Coverage Δ
.../security/dlic/rest/api/RateLimitersApiAction.java 85.85% <100.00%> (ø)

... and 7 files with indirect coverage changes

@willyborankin willyborankin added the backport 2.x backport to 2.x branch label Oct 16, 2024
@willyborankin willyborankin merged commit 2ab9eaf into opensearch-project:main Oct 16, 2024
41 of 42 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/security/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/security/backport-2.x
# Create a new branch
git switch --create backport/backport-4812-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 2ab9eaf182f673d11660fb8121c8bc0b42e16e30
# Push it to GitHub
git push --set-upstream origin backport/backport-4812-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/security/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-4812-to-2.x.

@willyborankin
Copy link
Collaborator

@cwperks, could you please manually backport this to the 2.x branch?

@cwperks
Copy link
Member Author

cwperks commented Oct 16, 2024

@cwperks, could you please manually backport this to the 2.x branch?

The original PR has not been backported yet: #4641

@derek-ho Can you make sure this gets backported when the associated API is backported to 2.x?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport to 2.x branch backport-failed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants