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

check longtext data type for json types in mariadb #18722

Merged
merged 2 commits into from
Oct 18, 2021
Merged

Conversation

isacikgoz
Copy link
Member

Summary

Fixes migration check fail for JSON types against MariaDB databases.

Release Note

Fixed an issue where migration check failed for MariaDB databases. The data type JSON is aliased to LONGTEXT and the check was failing and causing the db migrations to run every restart.

@isacikgoz isacikgoz added the 2: Dev Review Requires review by a developer label Oct 16, 2021
@mm-cloud-bot mm-cloud-bot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Oct 16, 2021
@amyblais
Copy link
Member

@isacikgoz Can you help resubmit this to the master branch, and then it can be cherry-picked to cloud and 6.0 branches?
@streamer45 Can you help prioritize PR review? I'd like to cut RC-1 today for 6.0.1.

@amyblais amyblais added the CherryPick/Approved Meant for the quality or patch release tracked in the milestone label Oct 18, 2021
@amyblais amyblais added this to the v6.0.0 milestone Oct 18, 2021
@isacikgoz
Copy link
Member Author

@amyblais we don't have migration checks for master branch. These checks are only on cloud branch.

store/sqlstore/upgrade.go Outdated Show resolved Hide resolved
@streamer45 streamer45 added 4: Reviews Complete All reviewers have approved the pull request and removed 2: Dev Review Requires review by a developer labels Oct 18, 2021
@amyblais
Copy link
Member

@isacikgoz Thanks, so this fix is not needed for 6.0.1?

@isacikgoz
Copy link
Member Author

@amyblais It is needed for that one as well. The release branches and 6.0.1 are based on cloud branch IIRC. I'm going to do open a PR for release branch as well.

@isacikgoz isacikgoz merged commit bb3ac88 into cloud Oct 18, 2021
@mattermod
Copy link
Contributor

Cherry pick is scheduled.

@isacikgoz isacikgoz deleted the mariadb-json-fix branch October 18, 2021 13:57
@mattermod
Copy link
Contributor

Error trying doing the automated Cherry picking. Please do this manually

+++ Updating remotes...
Fetching upstream
Failed to add the RSA host key for IP address '140.82.112.4' to the list of known hosts (/app/.ssh/known_hosts).
From github.com:mattermost/mattermost-server
 * [new branch]          MM-38445-dont-always-set-isfollowing-false -> upstream/MM-38445-dont-always-set-isfollowing-false
   5bbcfbd5f..4b68def82  MM-39053               -> upstream/MM-39053
 * [new branch]          ci-updates             -> upstream/ci-updates
   6ed1208a2..bb3ac887e  cloud                  -> upstream/cloud
   4f09fd7fe..8310805d8  crossTeamAuto          -> upstream/crossTeamAuto
   af8ce7fb6..e12fe3f30  custom_groups          -> upstream/custom_groups
   f7eef2cf4..a0f1b9290  internal-billing-price -> upstream/internal-billing-price
   ba3a911c9..fc712f5fd  master                 -> upstream/master
 * [new branch]          pre-package-playbooks-1.20.2 -> upstream/pre-package-playbooks-1.20.2
 * [new branch]          raceTest               -> upstream/raceTest
   2f394a1e5..aa1c03c27  release-6.0            -> upstream/release-6.0
Fetching origin
Failed to add the RSA host key for IP address '140.82.112.4' to the list of known hosts (/app/.ssh/known_hosts).
+++ Updating remotes done...
+++ Creating local branch automated-cherry-pick-of-mattermost-server-#18722-upstream-release-6.0-1634565455
Switched to a new branch 'automated-cherry-pick-of-mattermost-server-#18722-upstream-release-6.0-1634565455'
Branch 'automated-cherry-pick-of-mattermost-server-#18722-upstream-release-6.0-1634565455' set up to track remote branch 'release-6.0' from 'upstream'.

+++ About to attempt cherry pick of PR #18722 with merge commit bb3ac887e038b7d505c848db2febd8b08f3dbc51.


*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'mattermod@mattermod-bf85fdfb8-fd6s2.(none)')
!!! git cherry-pick failed

+++ Aborting in-progress git cherry-pick.

+++ Returning you to the master branch and cleaning up.

@isacikgoz
Copy link
Member Author

/cherry-pick release-6.0

@mattermod
Copy link
Contributor

Cherry pick is scheduled.

@mattermod
Copy link
Contributor

Error trying doing the automated Cherry picking. Please do this manually

+++ Updating remotes...
Fetching upstream
Failed to add the RSA host key for IP address '140.82.112.4' to the list of known hosts (/app/.ssh/known_hosts).
Fetching origin
Failed to add the RSA host key for IP address '140.82.112.4' to the list of known hosts (/app/.ssh/known_hosts).
+++ Updating remotes done...
+++ Creating local branch automated-cherry-pick-of-mattermost-server-#18722-upstream-release-6.0-1634565481
Switched to a new branch 'automated-cherry-pick-of-mattermost-server-#18722-upstream-release-6.0-1634565481'
Branch 'automated-cherry-pick-of-mattermost-server-#18722-upstream-release-6.0-1634565481' set up to track remote branch 'release-6.0' from 'upstream'.

+++ About to attempt cherry pick of PR #18722 with merge commit bb3ac887e038b7d505c848db2febd8b08f3dbc51.


*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'mattermod@mattermod-bf85fdfb8-fd6s2.(none)')
!!! git cherry-pick failed

+++ Aborting in-progress git cherry-pick.

+++ Returning you to the master branch and cleaning up.

isacikgoz added a commit that referenced this pull request Oct 18, 2021
* check longtext data type for json types in mariadb

* reflect review comments
@amyblais amyblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation and removed CherryPick/Approved Meant for the quality or patch release tracked in the milestone labels Oct 18, 2021
isacikgoz added a commit that referenced this pull request Oct 18, 2021
* check longtext data type for json types in mariadb

* reflect review comments
@amyblais
Copy link
Member

@isacikgoz Since this is not in the master branch, what happens when we next time merge the master branch into the cloud branch? Will this fix be included in future releases, e.g. 6.2, or is this fix not needed for future releases?

@isacikgoz
Copy link
Member Author

@amyblais This is similar to what happens in cloud sync PRs. At the cloud branch, we have checks for whether the migrations are missing for every DB version. If they are missing we apply the required DB migrations. Those checks are not present in the master branch. That's why we are doing these FF's manually. This fix is going to live in cloud branch so yes this will be included in the future releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants