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: Update beta logic and query to handle empty report_url #141

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mreid-tt
Copy link
Contributor

@mreid-tt mreid-tt commented Jan 20, 2025

  • Updated the beta hybrid property in the Version model to treat both None and empty strings as non-beta.
  • Modified the catalog query to include versions where report_url is either NULL or an empty string when beta=False.
  • Ensured consistent behavior for beta builds in both Python and SQLAlchemy contexts.

Fixes: #140

@mreid-tt mreid-tt self-assigned this Jan 20, 2025
@mreid-tt mreid-tt changed the title Fix: Improve beta property to handle None and empty report_url Fix: Update beta logic and query to handle empty report_url Jan 20, 2025
@mreid-tt
Copy link
Contributor Author

@hgy59, I’ve tested the updates in my test environment and believe I’ve resolved the issue while also covering some edge cases. Here are the details:

Uploaded Versions

I uploaded two versions of Monit to the test environment. They are listed as follows:

Screenshot 2025-01-20 at 7 22 37 PM

Admin Interface Update

The admin interface now correctly reflects the beta status. Previously, both versions were incorrectly marked as beta. This has been resolved:

Screenshot 2025-01-20 at 7 23 44 PM

Synology Device Lookups

The lookups performed by Synology devices have also been updated.

  • Monit v5.17.1-8:

    • The normal query URL does not include Monit: http://localhost:5000/nas/?build=4458&arch=88f628x&language=enu
    • The beta query URL correctly includes Monit: http://localhost:5000/nas/?build=4458&arch=88f628x&language=enu&package_update_channel=beta
    • This matches the previous behavior for the beta channel.
  • Monit v5.29.0-10:

    • The normal query URL now correctly includes this version: http://localhost:5000/nas/?build=15047&arch=88f628x&language=enu.
      This is consistent with its non-beta status as defined by the report_url.
    • The beta query URL still includes this version: http://localhost:5000/nas/?build=15047&arch=88f628x&language=enu&package_update_channel=beta
      This behavior remains unchanged for the beta channel.

Let me know if further adjustments are needed.

@mreid-tt
Copy link
Contributor Author

mreid-tt commented Jan 22, 2025

hey @publicarray, after this is merged, I believe we would need to publish a new spkrepo version and update the server. Would you be able to assist with this?

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.

BETA flag not shown
1 participant