-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Fixes a bug causing Updates to get stale #2850
Conversation
…internally by update helper
// skip if - An update task is already running | no app is seated | user session is not active | ||
if (UpdateTask.getRunningInstance() == null && | ||
CommCareApplication.instance().currentApp != null && | ||
CommCareApplication.instance().session.isActive) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a clarification, in the previous version, in case there was no active user session the result would be success, so what was causing the errors when there was no active session?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the call to CommCareApplication.instance().session.isActive
would itself error out with a SessionUnavailableException
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh yes, I see it now
@damagatchi retest this please |
Only test failure was |
Summary
https://dimagi.atlassian.net/browse/SC-3923
Bug Fix for App updates.
Background updates were failing due to SessionNotAvailable exception due to us unneccesarily checking for user session being active in the Update Worker. This PR makes 2 important changes to eliminate this -
Safety Assurance
Automated test coverage
Covered in UpdateWorkerTests
Safety story
Mostly relying on tests coverage here plus the change not affecting any functional update code.
cross-request: dimagi/commcare-core#1438