-
Notifications
You must be signed in to change notification settings - Fork 53
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
Document Zold::Upgrades #343 #353
base: master
Are you sure you want to change the base?
Conversation
Job #353 is now in scope, role is |
This pull request #353 is assigned to @ledestin/z, here is why; the budget is 15 minutes, see §4; please, read §27 and when you decide to accept the changes, inform @yegor256/z (the architect) right in this ticket; if you decide that this PR should not be accepted ever, also inform the architect; this blog post will help you understand what is expected from a code reviewer; there will be a monetary reward for this job |
@@ -2,6 +2,22 @@ | |||
|
|||
module Zold | |||
# Class to manage data upgrades (when zold itself upgrades). | |||
# | |||
# This class will write the version file to the zoldata directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@botanicus what happened to the draft? This text doesn't explain the case of missing version file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ledestin added.
@botanicus thanks, please see my comment |
Codecov Report
@@ Coverage Diff @@
## master #353 +/- ##
==========================================
+ Coverage 33.44% 33.76% +0.31%
==========================================
Files 54 50 -4
Lines 2470 2343 -127
==========================================
- Hits 826 791 -35
+ Misses 1644 1552 -92
Continue to review full report at Codecov.
|
@ledestin added. Is it good now? |
lib/zold/upgrades.rb
Outdated
# `upgrades/` have to run. They are named `<version>.rb`, so for | ||
# instance `upgrades/0.0.1.rb` etc. | ||
# | ||
# Only the scripts from the data version up need to run. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@botanicus greater than the data version? Or >=?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're on 0.1 and want to migrate to 0.2, we should run 0.2.rb
, 0.1.rb
run already when we upgraded to 0.1, I'd say. So I think this is correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@botanicus I have a hard time understanding it, and one of my mates too. Could you please change it in the docs?
@botanicus thanks, but one more question |
@botanicus what happened? you didn't reply to my last comment. |
@ledestin sorry, I'm traveling and didn't have time. Let me rephrase it. |
@ledestin I just changed that. |
# up to date. | ||
# | ||
# If the data version is lower than Zold::VERSION, we will look into | ||
# the `upgrades/` directory and any scripts from the data version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@botanicus please don't use data version up
, it's ambiguous at least to me. You can also ask @yegor256 to resolve our conflict.
@botanicus unfortunately, not the change I requested |
This is the
Zold::Upgrades
documentation requested by @ledestin in #343.