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: java version comparison fails #889

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

davidgamez
Copy link
Member

Summary:
This PR adds a protecting logic to the version comparison. Currently, we are comparing Java versions string with a pip version utility that is not 100% compatible.

Closes #886

Expected behavior:

Explain and/or show screenshots for how you expect the pull request to work in your testing (in case other devices exhibit different behavior).

Testing tips:

The fastest way to test this PR is using a PR that changes the UI deployed to DEV.

  • Open a UI PR, example
  • Open any feed's screen and expect all feed information to be displayed.

From our AI friend

This pull request introduces a new utility function for comparing Java version strings and integrates it into the existing codebase. The most important changes include the creation of the compare_java_versions function, its integration into the GtfsDatasetImpl and LatestDatasetImpl classes, and the addition of unit tests for the new function.

New Utility Function:

  • api/src/utils/model_utils.py: Added the compare_java_versions function to compare two Java version strings, including handling of -SNAPSHOT suffixes.

Integration of Utility Function:

Unit Tests:

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with ./scripts/api-tests.sh to make sure you didn't break anything
  • Add or update any needed documentation to the repo
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues
  • Include screenshot(s) showing how this pull request works and fixes the issue(s)

@davidgamez davidgamez changed the title fix: version comparison is failing due to incompatibility between Java snapshot version and PEP 440 fix: java version comparison fails Jan 21, 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.

Version comparison is failing due to incompatibility between Java snapshot version and PEP 440
1 participant