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

Update LL version stringification and make parsing stricter #6334

Merged
merged 7 commits into from Mar 31, 2024

Conversation

Jackenmen
Copy link
Member

Description of the changes

It turns out that the stringification of Lavalink versions with rc and/or red suffixes was broken but the test suite didn't detect it due to being written incorrectly:

  • 3.5.0-rc.4 was incorrectly stringified to: 3.5.0-rc4
  • 3.6.0-rc.1 was incorrectly stringified to: 3.6.0-rc1
  • 3.7.5-rc.1+red.1 was incorrectly stringified to: 3.7.5-rc1_red1
  • 3.7.5-rc.1+red.123 was incorrectly stringified to: 3.7.5-rc1_red123
  • 3.7.5+red.1 was incorrectly stringified to: 3.7.5_red1
  • 3.7.5+red.123 was incorrectly stringified to: 3.7.5_red123

This PR fixes that. Note that the current RC release (3.7.12-rc1+red1) is missing a dot between rc and the number so it is NOT possible to test that the download works correctly by only updating the version:

-    JAR_VERSION: Final[str] = LavalinkVersion(3, 7, 11)
+    JAR_VERSION: Final[str] = LavalinkVersion(3, 7, 12, rc=1, red=1)

I did, however, change the tagged release for a few minutes just so that I can validate this and it is, in fact, downloading the jar without issues.

Additionally, per @aikaterna's suggestion, I made our version parser stricter to prevent incorrect formatting of the version in the future.

Last but not least, the reason for the jar download (first-time download, parsing failure, or outdated version) is now logged.

Have the changes in this PR been tested?

Yes

@Jackenmen Jackenmen added Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing. Type: Enhancement Something meant to enhance existing Red features. labels Mar 30, 2024
@Jackenmen Jackenmen added this to the 3.5.8 milestone Mar 30, 2024
@github-actions github-actions bot added the Category: Cogs - Audio This is related to the Audio cog. label Mar 30, 2024
@Jackenmen Jackenmen modified the milestones: 3.5.9, 3.5.8 Mar 30, 2024
@Jackenmen Jackenmen added the Release Blocker This needs handling prior to the next non-hotfix release. label Mar 30, 2024
@aikaterna aikaterna self-assigned this Mar 31, 2024
@Jackenmen Jackenmen added the Changelog Entry: Added Changelog entry for this PR has already been added to changelog PR. label Mar 31, 2024
Copy link
Member

@aikaterna aikaterna left a comment

Choose a reason for hiding this comment

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

cat

@aikaterna aikaterna merged commit e71312e into Cog-Creators:V3/develop Mar 31, 2024
17 checks passed
@Jackenmen Jackenmen deleted the ll_version_parsing_fixes branch March 31, 2024 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Cogs - Audio This is related to the Audio cog. Changelog Entry: Added Changelog entry for this PR has already been added to changelog PR. Release Blocker This needs handling prior to the next non-hotfix release. Type: Bug Unexpected behavior, result, or exception. In case of PRs, it is a fix for the foregoing. Type: Enhancement Something meant to enhance existing Red features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants