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

Only stage auto-epoch when creating new file #2947

Merged
merged 2 commits into from
Jan 7, 2020

Conversation

HebaruSan
Copy link
Member

Motivation

A lot of auto-epoching pull requests have been updates for versions that were created in previous PRs, see KSP-CKAN/CKAN-meta#1621 and KSP-CKAN/CKAN-meta#1694 for an example. In this case we have already confirmed in the first PR that the version should exist, so manual review isn't needed for later ones.

Changes

Now we only enable staging if the resulting version after auto-epoching is greater than the previous highest version. If we're updating a version that already exists, staging isn't needed.

@HebaruSan HebaruSan added Easy This is easy to fix Pull request Netkan Issues affecting the netkan data labels Dec 18, 2019
@HebaruSan HebaruSan requested a review from DasSkelett December 18, 2019 10:46
@DasSkelett
Copy link
Member

DasSkelett commented Jan 7, 2020

Code-wise it looks fine. Though I'm thinking whether we should add a --highest-version commandline option, so we can test changes like this in action without needing to set up the dev queues and stuff?

@HebaruSan
Copy link
Member Author

Good idea, added.

@HebaruSan HebaruSan merged commit 667e169 into KSP-CKAN:master Jan 7, 2020
@techman83
Copy link
Member

I'm not finished my coffee. How does netkan know there is a new or existing file?

@HebaruSan
Copy link
Member Author

If the file is new, its version will be higher than the highest version.
If the file exists, it will be equal to the highest version.

(If it's lower, it will be auto-epoched until one of the above is true.)

@HebaruSan HebaruSan deleted the fix/auto-epoch-stage branch January 8, 2020 01:35
@techman83
Copy link
Member

Ok Cool! Makes sense 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Easy This is easy to fix Netkan Issues affecting the netkan data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants