Skip to content

Fix update check when no update is available#17804

Merged
SaschaCowley merged 3 commits into
nvaccess:masterfrom
christopherpross:fix/17800
Mar 11, 2025
Merged

Fix update check when no update is available#17804
SaschaCowley merged 3 commits into
nvaccess:masterfrom
christopherpross:fix/17800

Conversation

@christopherpross

@christopherpross christopherpross commented Mar 8, 2025

Copy link
Copy Markdown
Contributor

Link to issue number:

Fixes #17800
Follow-up of #17310

Summary of the issue:

The changes introduced in PR #17310 had a bug. If the version being checked for an update is the latest for the given versionType, the server returns an empty response. This caused an error because the required keys for a valid update response were missing.

Description of user facing changes

With the update mirror validation in place, checking for updates while running the latest version will now correctly result in the standard message indicating that no update is available.

Description of development approach

  1. In the checkForUpdate function, check whether the response is an empty string. If so, simply return None, indicating that no updates are available.

Testing strategy:

  1. Implement the fix.
  2. Modify versionInfo.py and buildVersion.py to simulate an alpha version.
  3. Run NVDA and check for updates via Help → Check for Updates.
  4. Ensure that the message is correct and confirms that no updates are available.
  5. Revert changes to versionInfo.py and buildVersion.py to restore the generated source version.
  6. Run NVDA again and ensure that the update check is still valid, confirming that no updates are available for the source version.

Known issues with pull request:

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@coderabbitai summary

@christopherpross christopherpross requested a review from a team as a code owner March 8, 2025 18:43
@AppVeyorBot

Copy link
Copy Markdown

See test results for failed build of commit 37c53ddade

@LeonarddeR

Copy link
Copy Markdown
Collaborator

@christopherpross I'm afraid you commited something wrong here. There's only a versionInfo.py change that adds a random alpha version. Please double check whether this is correct.

@christopherpross

Copy link
Copy Markdown
Contributor Author

@LeonarddeR sorry, something is wrong with my git tool here. I commit now the right file.

@LeonarddeR LeonarddeR left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

Comment thread source/updateCheck.py Outdated
SaschaCowley and others added 2 commits March 11, 2025 13:38
Co-authored-by: Leonard de Ruijter <3049216+LeonarddeR@users.noreply.github.com>
@SaschaCowley SaschaCowley changed the title fix #17800 recression of #17310 Fix update check when no update is available Mar 11, 2025
@SaschaCowley SaschaCowley merged commit a71589d into nvaccess:master Mar 11, 2025
@github-actions github-actions Bot added this to the 2025.1 milestone Mar 11, 2025
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.

An error encountered while checking for updates on latest alpha

4 participants