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

Fixes a bug causing Updates to get stale #2842

Closed
wants to merge 7 commits into from

Conversation

shubham1g5
Copy link
Contributor

@shubham1g5 shubham1g5 commented Sep 10, 2024

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 -

  1. Remove the check for user session from UpdateWrapper, we already perform user updates outside user sessions.
  2. If the error is caused by the wrapper code in UpdateWorker, we can simply result a task failure instead of handling it as an update code error and resetting the update downloads.

Safety Assurance

  • If the PR is high risk, "High Risk" label is set
  • I have confidence that this PR will not introduce a regression for the reasons below
  • Do we need to enhance manual QA test coverage ? If yes, "QA Note" label is set correctly

Automated test coverage

Covered in UpdateWorkerTests

Safety story

Mostly relying on tests coverage here plus the change not affecting any functional update code.

@avazirna
Copy link
Contributor

I'm excited to see this fixed.

@shubham1g5 shubham1g5 added this to the 2.53.1 milestone Sep 10, 2024
@shubham1g5
Copy link
Contributor Author

shubham1g5 commented Sep 10, 2024

@avazirna Think we should roll this out in 2.54.1 as well with GD stuff.

@shubham1g5 shubham1g5 marked this pull request as ready for review September 10, 2024 12:32
@avazirna avazirna modified the milestones: 2.53.1, 2.54.1 Sep 11, 2024
@shubham1g5
Copy link
Contributor Author

Bumping this for review

@shubham1g5
Copy link
Contributor Author

PR'ed directly for hotfixing #2850

@shubham1g5 shubham1g5 closed this Sep 17, 2024
@shubham1g5 shubham1g5 deleted the errorHandlingForWorkers branch September 17, 2024 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants