Skip to content

Fix issues with refresh polling#1219

Merged
TimHess merged 4 commits into
SteeltoeOSS:release/3.2from
gev-firestorm:FixPolling
Nov 21, 2023
Merged

Fix issues with refresh polling#1219
TimHess merged 4 commits into
SteeltoeOSS:release/3.2from
gev-firestorm:FixPolling

Conversation

@douggish
Copy link
Copy Markdown

Description

If polling was enabled along with the fail fast setting, it was possible for unhandled exceptions to be thrown within a Timer callback, which crashed the application. Also the polling was not disabled when the Enabled configuration was set to false. This PR wraps the load in the Timer callback within a try/catch. It also only starts polling if Enabled is true.

Fixes #1217
Fixes #1218

Quality checklist

  • Your code complies with our Coding Style.
  • You've updated unit and/or integration tests for your change, where applicable.
  • You've updated documentation for your change, where applicable.
    If your change affects other repositories, such as Documentation, Samples and/or MainSite, add linked PRs here.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.
  • You've added required license files and/or file headers (explaining where the code came from with proper attribution), where code is copied from StackOverflow, a blog, or OSS.

Expose defect where application crashes due to an unhandled exception during polling (which can happen when FailFast is enabled)
Refresh polling should also be disabled
- Fixes issue where application crashes when FailFast is enabled and an exception is thrown during refresh polling.
- Fixes issue where refresh polling is not disabled when Enabled is set to false.

Addresses SteeltoeOSS#1217 and SteeltoeOSS#1218
@TimHess
Copy link
Copy Markdown
Member

TimHess commented Nov 20, 2023

/azp run Steeltoe.All

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Comment thread src/Configuration/src/ConfigServerBase/ConfigServerConfigurationProvider.cs Outdated
@TimHess TimHess added Type/bug Something isn't working Component/Configuration Issues related to Configuration providers ReleaseLine/3.x Identified as a feature/fix for the 3.x release line labels Nov 20, 2023
@TimHess TimHess added this to the 3.2.6 milestone Nov 20, 2023
TimHess
TimHess previously approved these changes Nov 20, 2023
Copy link
Copy Markdown
Member

@TimHess TimHess left a comment

Choose a reason for hiding this comment

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

LGTM, just a nit on the log message

@TimHess
Copy link
Copy Markdown
Member

TimHess commented Nov 20, 2023

Thanks for filing the issues and opening the PR! We will need to make sure this change gets applied to main as well

Change the way the exception is logged.
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@douggish
Copy link
Copy Markdown
Author

Thanks for filing the issues and opening the PR! We will need to make sure this change gets applied to main as well

No problem. We are hoping 3.2.6 will be released fairly soon so that we can continue to use the polling feature without the potential for our app to crash.

@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

88.5% 88.5% Coverage
0.0% 0.0% Duplication

@TimHess TimHess merged commit ccb407a into SteeltoeOSS:release/3.2 Nov 21, 2023
@douggish douggish deleted the FixPolling branch November 22, 2023 17:36
@douggish
Copy link
Copy Markdown
Author

Hi @TimHess. We are wondering when the 3.2.6 version will be released with this fix. Are you able to give an update on that?

@TimHess
Copy link
Copy Markdown
Member

TimHess commented Nov 29, 2023

Hi @douggish, Coincidentally, I just kicked off the build to produce the packages. We should be able to ship the fix tomorrow

@douggish
Copy link
Copy Markdown
Author

Hi @douggish, Coincidentally, I just kicked off the build to produce the packages. We should be able to ship the fix tomorrow

OK, that's awesome. Thanks for the quick reply!

TimHess added a commit that referenced this pull request Dec 8, 2023
@TimHess TimHess mentioned this pull request Dec 8, 2023
5 tasks
TimHess added a commit that referenced this pull request Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component/Configuration Issues related to Configuration providers ReleaseLine/3.x Identified as a feature/fix for the 3.x release line Type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants