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

fix #17800 recression of #17310 #17804

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

christopherpross
Copy link
Contributor

Link to issue number:

#17800

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

See test results for failed build of commit 37c53ddade

@LeonarddeR
Copy link
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
Contributor Author

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

Copy link
Collaborator

@LeonarddeR LeonarddeR left a comment

Choose a reason for hiding this comment

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

Thanks!

Comment on lines 255 to +258
try:
# if data is empty, we return None, because the server returns an empty response if there is no update.
if not data:
return None
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you can safely leave this out of the try block, like this.

Suggested change
try:
# if data is empty, we return None, because the server returns an empty response if there is no update.
if not data:
return None
# if data is empty, we return None, because the server returns an empty response if there is no update.
if not data:
return None
try:

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.

3 participants