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

Magento option --magento-init-params never used when running cli? #39248

Open
2 of 5 tasks
stijnveeke opened this issue Oct 9, 2024 · 7 comments
Open
2 of 5 tasks

Magento option --magento-init-params never used when running cli? #39248

stijnveeke opened this issue Oct 9, 2024 · 7 comments
Labels
Area: Framework Component: Console Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: ready for dev Reported on 2.4.7-p2 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it

Comments

@stijnveeke
Copy link

stijnveeke commented Oct 9, 2024

Preconditions and environment

  • Magento version: 2.4.7-p2
  • Default magento example project.

Steps to reproduce

  1. Create a new Magento project
  2. Enable Xdebug or any other tool to debug the CLI process
  3. Setup breakpoint in the execute function of the command you want to run.
  4. Execute command with the --magento-init-params option.

For my command I used the setup:upgrade command with the init params following the example.
magento setup:upgrade --magento-init-params="MAGE_MODE=production"
I also tried to run it without "In both instances, the command is run, but the params never change," following the exact example given when running setup:upgrade --help.

Expected result

I expect a change in the MAGE_MODE to production instead of development.

Actual result

MAGE_MODE does not change.
image

Additional information

I placed a breakpoint in the framework/console/Cli.php file on line 82. On line 81, a variable named $application is created, which contains another variable called serviceManager. Inside serviceManager, there is an array called services. Within this array is a key named config, which includes a key called magento-init-params. This key, in turn, contains argv, where the entire command is present.

This confirms that the parameters are correctly passed to the serviceManager, but they are not being utilized for some reason.
image
image
image

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Copy link

m2-assistant bot commented Oct 9, 2024

Hi @stijnveeke. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce.


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

@engcom-Bravo engcom-Bravo added Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it Reported on 2.4.7-p2 Indicates original Magento version for the Issue report. labels Oct 9, 2024
@engcom-Hotel
Copy link
Contributor

Hello @stijnveeke,

Thanks for the report and collaboration!

We have tried to reproduce the issue in the latest development branch i.e. 2.4-develop and the issue is reproducible for us. Please refer to the below screenshot for reference:

image

Hence confirming the issue.

Thanks

@engcom-Hotel engcom-Hotel self-assigned this Oct 10, 2024
Copy link

m2-assistant bot commented Oct 10, 2024

Hi @engcom-Hotel. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
  • 5. Add label Issue: Confirmed once verification is complete.
  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Hotel engcom-Hotel added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Component: Console Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Area: Framework and removed Issue: ready for confirmation labels Oct 10, 2024
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.adobe.com/browse/AC-13231 is successfully created for this GitHub issue.

Copy link

m2-assistant bot commented Oct 10, 2024

✅ Confirmed by @engcom-Hotel. Thank you for verifying the issue.
Issue Available: @engcom-Hotel, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@stijnveeke
Copy link
Author

stijnveeke commented Oct 24, 2024

Hey @engcom-Hotel, Can I get an update on this issue? Is it currently being worked on? It is confirmed, but I've not received feedback since last week. Is the removal from the Issue Confirmation and Triage Board a mistake or as intended? (I ask this because I see different issues that already have a PR, like Issue 39262, and they are still in the Triage Board, so the removal of this issue confuses me.)

@engcom-Hotel
Copy link
Contributor

Hello @stijnveeke,

As I checked in its related JIRA i.e. https://jira.corp.adobe.com/browse/AC-13231, the status is implementation. But it is still waiting for the developer from internal and community.

Issue removal from Issue confirmation and triage board is expected, confirmed issue has been moved as per the process. And the #39262 is On hold that's why it is in this board.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Framework Component: Console Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: ready for dev Reported on 2.4.7-p2 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
None yet
Development

No branches or pull requests

4 participants