-
Notifications
You must be signed in to change notification settings - Fork 1
Synchronise migrations to 15fc8592d #55
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
base: stable/sap/3.0
Are you sure you want to change the base?
Conversation
This change picks only the added databag items. This way the data bag migrations will not cause an issue if people want to update the package from released 3.0 to the SAP version.
| end | ||
|
|
||
| def downgrade(ta, td, a, d) | ||
| unless ta.key? "migration" |
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.
Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
| @@ -0,0 +1,13 @@ | |||
| def upgrade(ta, td, a, d) | |||
| unless a.key? "migration" | |||
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.
Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
| end | ||
|
|
||
| def downgrade(ta, td, a, d) | ||
| unless ta.key? "cross_az_attach" |
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.
Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
| @@ -0,0 +1,13 @@ | |||
| def upgrade(ta, td, a, d) | |||
| unless a.key? "cross_az_attach" | |||
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.
Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
| end | ||
|
|
||
| def downgrade(ta, td, a, d) | ||
| unless ta["zvm"].key? "zvm_xcat_network" |
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.
Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
| @@ -0,0 +1,15 @@ | |||
| def upgrade(ta, td, a, d) | |||
| unless a["zvm"].key? "zvm_xcat_network" | |||
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.
Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
| end | ||
|
|
||
| def downgrade(ta, td, a, d) | ||
| if a.key?("ovs") |
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.
Style/IfUnlessModifier: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
| end | ||
|
|
||
| def downgrade(ta, td, a, d) | ||
| unless ta.key? "use_multipath" |
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.
Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
| @@ -0,0 +1,13 @@ | |||
| def upgrade(ta, td, a, d) | |||
| unless a.key? "use_multipath" | |||
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.
Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
We had multiple 55 migrations in the code. As a fix the newer 55 migration 055_add_tunnel_csum has been merged to 56, so it will be executed.
| a.delete("rpc_workers") | ||
|
|
||
| # From 055_add_tunnel_csum | ||
| if a.key?("ovs") |
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.
Style/IfUnlessModifier: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
| a["ovs"] ||= {} | ||
| a["ovs"]["tunnel_csum"] = ta["ovs"]["tunnel_csum"] | ||
|
|
||
|
|
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.
Layout/EmptyLines: Extra blank line detected. (https://github.com/bbatsov/ruby-style-guide#two-or-more-empty-lines)
This change picks only the added databag items. This way the data bag
migrations will not cause an issue if people want to update the package
from released 3.0 to the SAP version.