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

Prevent "Overwrite the existing configuration for db-ssl-verify?" question #26818

Closed
wants to merge 3 commits into from
Closed

Conversation

flancer64
Copy link
Contributor

@flancer64 flancer64 commented Feb 11, 2020

This question is occurred every time I run:

$ ./bin/magento setup:config:set

after upgrade to 2.3.4

Also see #26762

We should ask this question only if new value of configuration option is not equal to the old value,.

Resolved issues:

  1. resolves [Issue] Prevent "Overwrite the existing configuration for db-ssl-verify?" question #29612: Prevent "Overwrite the existing configuration for db-ssl-verify?" question

Don't display question w/o real overwrite (if new value equals to current value).
@m2-assistant
Copy link

m2-assistant bot commented Feb 11, 2020

Hi @flancer64. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@sidolov sidolov added Priority: P3 May be fixed according to the position in the backlog. Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. labels Aug 17, 2020
@sidolov
Copy link
Contributor

sidolov commented Aug 17, 2020

@magento create issue

Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

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

Hi @flancer64,

Thank you for your contribution!
Seems like the listed above issue was already fixed in #26763.
Could you confirm that?

@flancer64
Copy link
Contributor Author

@ihor-sviziev , I can confirm that the issue is not fixed in #26763.

I've reverted my patch in my local project (based on Magento 2.4.0) and I have the same warning:

$ ./work/bin/magento setup:config:set
Overwrite the existing configuration for db-ssl-verify?[Y/n]

I see code from #26763 in

  • ./vendor/magento/magento2-base/setup/src/Magento/Setup/Model/ConfigOptionsList/DriverOptions.php
  • ./setup/src/Magento/Setup/Model/ConfigOptionsList/DriverOptions.php

It looks like:

    private function optionExists($options, $driverOptionKey): bool
    {
        return isset($options[$driverOptionKey])
            && ($options[$driverOptionKey] === false || !empty($options[$driverOptionKey]));
    }

I've re-apply my patch and the warning is disappeared.

So, I can confirm that #26763 was not fix the issue listed above.

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Sep 9, 2020

@flancer64 thank you so much for checking it, so I'll review this PR.
do you think it's possible to cover your change with any type of automated test?
Seems to me it will be really hard, for now will put "Auto-Tests: Not Required", but in case if it will be quite simple - would be good to cover it.

@ihor-sviziev ihor-sviziev added the Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests label Sep 9, 2020
@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-8168 has been created to process this Pull Request

@flancer64
Copy link
Contributor Author

do you think it's possible to cover your change with any type of automated test?

Yes, I think it is possible but I cannot do it. I know nothing about Magento Testing Framework. Sorry.

@engcom-Delta engcom-Delta self-assigned this Sep 10, 2020
@engcom-Delta
Copy link
Contributor

✔️ QA passed
Result:
Before:
Overwrite the existing configuration for db-ssl-verify? is shown, when 'driver_options' has no changes in env.php
image

After:
✔️ Overwrite the existing configuration for db-ssl-verify? message is not shown, when 'driver_options' has no changes in env.php
image
✔️ Overwrite the existing configuration for db-ssl-verify? message is shown, when 'driver_options' has new value in env.php
image

@engcom-Foxtrot engcom-Foxtrot self-assigned this Sep 11, 2020
@engcom-Foxtrot engcom-Foxtrot added the QA: Ready to add to Regression Scope Should be analyzed and added to Regression Testing Scope(if applicable) label Sep 11, 2020
@engcom-Delta engcom-Delta added QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope and removed QA: Ready to add to Regression Scope Should be analyzed and added to Regression Testing Scope(if applicable) labels Sep 11, 2020
@sidolov sidolov removed the Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests label Sep 14, 2020
@sidolov
Copy link
Contributor

sidolov commented Sep 16, 2020

@flancer64 looks like something went wrong with the source branch, it's removed now. I'm closing the PR since we cannot proceed without the source code. Feel free to reopen it in case you want to continue. Thank you for your contribution!

@sidolov sidolov closed this Sep 16, 2020
@m2-assistant
Copy link

m2-assistant bot commented Sep 16, 2020

Hi @flancer64, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@ihor-sviziev
Copy link
Contributor

@flancer64 could you create new PR with the same changes?

@flancer64
Copy link
Contributor Author

flancer64 commented Sep 16, 2020

I've removed source branch because I've found another bug in Magento (#30052). I don't know how can I create two different PRs from one fork :(

@flancer64
Copy link
Contributor Author

I found I can use a branch in my fork.

@flancer64
Copy link
Contributor Author

flancer64 commented Sep 16, 2020

@sidolov , done.

I'm sorry, @ihor-sviziev , of cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Setup Priority: P3 May be fixed according to the position in the backlog. Progress: extended testing QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4 Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue] Prevent "Overwrite the existing configuration for db-ssl-verify?" question
6 participants