fix bug where the lock is never released for FSx task resource #4088
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.
Summary
There is a typo/bug in the
GetAppliedStatus
method for FSx task resource wherein the lock is never released in the method. This will likely cause the agent to fail tasks with FSx volume since the lock on other methods will never be acquired.Presently, this method is not invoked from any workflow and therefore, we have not seen any impact. Reference: https://github.com/search?q=repo%3Aaws%2Famazon-ecs-agent+path%3A%2F%5Eagent%5C%2F%2F+GetAppliedStatus&type=code
Implementation details
Changed
RLock
toRUnLock
.Testing
New tests cover the changes: NA
Description for the changelog
fix bug where the lock is never released for FSx task resource
Does this PR include breaking model changes? If so, Have you added transformation functions?
NoLicensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.