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

Fixes #17666 - prevent migration failures on counter cache #4109

Merged
merged 1 commit into from
Dec 14, 2016

Conversation

tbrisker
Copy link
Member

Removal of counter cache causes migrations relying on the
reset_counters method to fail. The migrations are changes to not
update the counters (which are now removed anyways).

@mention-bot
Copy link

@tbrisker, thanks for your PR! By analyzing the history of the files in this pull request, we identified @stbenjam, @ShimShtein and @shlomizadok to be potential reviewers.

Removal of counter cache causes migrations relying on the
`reset_counters` method to fail. The migrations are changed to not
update the counters (which are now removed anyways).
Copy link
Member

@ohadlevy ohadlevy left a comment

Choose a reason for hiding this comment

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

Looks fine, but will this also address the linked bz? Afaiu counter cache still exists at that stage.

@tbrisker
Copy link
Member Author

@ohadlevy the reason this was hit in the BZ is that satellite 6.2.5 includes the counter cache removal. This will however hit foreman users as well if attempting to upgrade several releases at once, since the reset_counters method will fail to run with the current models (as the relations have no counter_cache defined on them).

@mccun934
Copy link

@tbrisker so if a user goes from Foreman 1.7 -> 1.13 they most likely will hit this right?

@tbrisker
Copy link
Member Author

@mccun934 even 1.10->1.13, the last of these migrations was only included in 1.11

@lzap lzap merged commit 1f6cc22 into theforeman:develop Dec 14, 2016
@lzap
Copy link
Member

lzap commented Dec 14, 2016

Thanks, this indeed helps to mitigate the upgrade hop issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants