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

support semantic versions with snapshots (e.g. 1.3.0-alpha) #701

Merged
merged 7 commits into from Jun 20, 2023

Conversation

artoonie
Copy link
Collaborator

@artoonie artoonie commented Jun 13, 2023

closes #700

@artoonie artoonie force-pushed the feature/issue-700_support-semantic-versioning branch from 68f69df to 0cca150 Compare June 13, 2023 16:30
Copy link
Contributor

@HEdingfield HEdingfield left a comment

Choose a reason for hiding this comment

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

Wow, nice find on that helper library!

src/test/java/network/brightspots/rcv/TabulatorTests.java Outdated Show resolved Hide resolved
src/test/java/network/brightspots/rcv/TabulatorTests.java Outdated Show resolved Hide resolved
@artoonie
Copy link
Collaborator Author

Wow, nice find on that helper library!

There are a lot with nicer APIs, but this one already exists in the codebase, so it's nice that we don't have to add any dependencies for it :)

@artoonie artoonie force-pushed the feature/issue-700_support-semantic-versioning branch from 31b7415 to a1cdeee Compare June 14, 2023 15:30
}

return isNewer;
public static boolean isVersionNewer(String version1, String version2) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is all kind of making me wonder if checkConfigVersionMatchesApp is actually doing anything besides logging?? It doesn't seem like it's stopping the code from running, so I'm a bit confused by this. Would you mind giving checkConfigVersionMatchesApp a sanity check?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It doesn't do anything besides log. Based on the comments, this isn't a problem in the GUI because the GUI tries to migrate versions without any care as to the existing version (which #706 should address). For now, all it does is spit out a SEVERE and continue tabulation.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, this is kind of weird, and I wonder if this code was removed unintentionally... in the past I think we had it block tabulation if the config file version was newer than the tabulator version. Does that make sense to you?

Conversely, if the config file version is older than the tabulator version, I'd think attempting to run via the CLI should block it and say "you need to migrate this via the GUI". What do you think?

@tarheel @chughes297 do either of you have any idea why we apparently don't block tabulation in either of these cases?

Copy link
Contributor

Choose a reason for hiding this comment

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

This PR might be good to go, depending on what @chughes297 and / or @tarheel think about this comment.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure about the history, but I think I agree that 1) it should fail if the config is newer than the app and 2) it should warn but continue and try to auto-migrate if the app is newer than the config.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right on, agreed. Opened #712 for this.

}

return isNewer;
public static boolean isVersionNewer(String version1, String version2) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, this is kind of weird, and I wonder if this code was removed unintentionally... in the past I think we had it block tabulation if the config file version was newer than the tabulator version. Does that make sense to you?

Conversely, if the config file version is older than the tabulator version, I'd think attempting to run via the CLI should block it and say "you need to migrate this via the GUI". What do you think?

@tarheel @chughes297 do either of you have any idea why we apparently don't block tabulation in either of these cases?

Copy link
Contributor

@HEdingfield HEdingfield left a comment

Choose a reason for hiding this comment

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

Awesome job outsourcing this and submitting a PR for Jackson!

}

return isNewer;
public static boolean isVersionNewer(String version1, String version2) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Right on, agreed. Opened #712 for this.

@HEdingfield HEdingfield merged commit a7c9d63 into develop Jun 20, 2023
1 check passed
@HEdingfield HEdingfield deleted the feature/issue-700_support-semantic-versioning branch June 20, 2023 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Support snapshot level info in semantic versioning
3 participants