Skip to content

Increase the size of the flag_data field #13579

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

Closed

Conversation

renevogl
Copy link

@renevogl renevogl commented Feb 9, 2018

The flag_data field in the flag table is too small to reimport a config generated by bin/magento app:config:dump with more than 64KB size.
Increasing this field should be considered, as exporting the config and reimporting it is the suggested way for pipeline deployment.

Description

If a bin/magento app:config:dump produces a config.php with more than 64KB of size, the bin/magento app:config:import or bin/magento setup:upgrade will fail because of the TEXT field limitation from flag_data in the flag table.

This PR increases the flag_data field to MEDIUMTEXT accepting 16MB.

Fixed Issues (if relevant)

  1. app:config:import fails - flag column 'flag_data' is too short ? #11657: app:config:import fails - flag column 'flag_data' is too short ?

Manual testing scenarios

  1. Run bin/magento setup:install
  2. Before applying the PR, the flag_data field is a TEXT field accepting 64KB
  3. After applying the PR, the flag_data field is a MEDIUMTEXT field accepting 16MB

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

The flag_data field in the flag-table was to small for reimport
of app:config:dump exports.
@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Feb 9, 2018

CLA assistant check
All committers have signed the CLA.

@miguelbalparda
Copy link
Contributor

Hi @aschrammel! Thanks for your contribution!
Shouldn't this be implemented in an update instead of modifying the installer?

@aschrammel
Copy link

Hi @miguelbalparda!
Normally I also think such changes should be implemented in an update. Is there a possibility to implement updates on the initial setup process that are applied immediately during setup?
I think in this case it is important that the table is set up correctly from beginning on - i.e. after the initial bin/magento setup:install.

@orlangur
Copy link
Contributor

orlangur commented Feb 9, 2018

@aschrammel initial bin/magento setup:install applies all data upgrades immediately :)

Copy link
Contributor

@orlangur orlangur left a comment

Choose a reason for hiding this comment

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

@renevogl please rework this change as data upgrade, do amend commit and force push.

@aschrammel
Copy link

@orlangur I've now had a look, but where should we place the upgrade script? The Installer itself is in setup directory and the flag management isn't a module itself, but contained in the lib/.
And I'm not quite sure if the Config module is the right place.

@miguelbalparda
Copy link
Contributor

@dmanners anything to add here?

@dmanners
Copy link
Contributor

dmanners commented Mar 6, 2018

Hey @miguelbalparda I think there should be something that could be done in the setupFlagTable method so that we cover the cases when there is already a database and we install Magento as well as the case for a clean installation.

I am not really sure if or how the setup module works with upgrade scripts.

@miguelbalparda
Copy link
Contributor

Closing due to lack of activity, feel free to reopen if anything changes.

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

Successfully merging this pull request may close these issues.

6 participants