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

Static content deploy - Parallel execution - Not fails in case of exception #22883

Open
ihor-sviziev opened this issue May 14, 2019 · 10 comments
Labels
Area: Content Component: Other Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: ready for dev Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.

Comments

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented May 14, 2019

Preconditions (*)

  1. Magento 2.2.7
  2. Configured Build system according to technical details.

Steps to reproduce (*)

  1. Emulate exception that happened in Static content deploy - Randomly css files not generated #22880 by adding above this line
    $this->tmpDirectory->delete($this->lockFilePath);

    throwing exception:
throw new FileSystemException(__('Test'));
  1. Run php bin/magento setup:static-content:deploy -f --theme Magento/blank
  2. Run $? - it shows 1 - that's expected
  3. Run php bin/magento setup:static-content:deploy -f -j 2 --theme Magento/blank
  4. Run $? - it shows 0 - that's NOT expected

Expected result (*)

  1. In case of any errors - CLI should return error status code

Actual result (*)

  1. In case of any errors - CLI should return 0 status code (success), but writes error messages above

This issue was discovered during testing #22607
and working on reporting #22880

@m2-assistant
Copy link

m2-assistant bot commented May 14, 2019

Hi @ihor-sviziev. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me 2.3-develop instance - upcoming 2.3.x release

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

@ihor-sviziev do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label May 14, 2019
@VasylShvorak VasylShvorak self-assigned this Jun 5, 2019
@m2-assistant
Copy link

m2-assistant bot commented Jun 5, 2019

Hi @VasylShvorak. 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).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.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. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 6. Add label Issue: Confirmed once verification is complete.

  • 7. Make sure that automatic system confirms that report has been added to the backlog.

@VasylShvorak VasylShvorak added Component: Other Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Jun 5, 2019
@ghost ghost unassigned VasylShvorak Jun 5, 2019
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @VasylShvorak
Thank you for verifying the issue. Based on the provided information internal tickets MC-17272, MC-17273 were created

Issue Available: @VasylShvorak, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Jun 5, 2019
@magento-engcom-team magento-engcom-team added this to Ready for Dev in Community Backlog Mar 24, 2020
@ihor-sviziev ihor-sviziev added the Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. label Jul 30, 2020
@sidolov sidolov added this to Ready for Development in Low Priority Backlog Sep 24, 2020
@ghost ghost removed this from Ready for Dev in Community Backlog Oct 20, 2020
@ghost ghost removed this from Ready for Development in Low Priority Backlog Oct 20, 2020
@ghost ghost removed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development labels Oct 20, 2020
@magento-engcom-team magento-engcom-team added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Nov 30, 2020
@m2-community-project m2-community-project bot added this to Ready for Development in High Priority Backlog Nov 30, 2020
@viniciusbordinhao-blueacorn
Copy link
Contributor

@magento I am working on it.

@sippsolutions
Copy link
Member

@viniciusbordinhao-blueacorn any news on this topic?

@ihor-sviziev
Copy link
Contributor Author

I unassigned him, since no updates for a long time

@hostep
Copy link
Contributor

hostep commented Sep 21, 2021

@ihor-sviziev: this issue rang a bell in the back of my head, I believe it was mentioned in the release notes of Magento 2.4.1:

Magento now displays an informative error message when some themes are not deployed after running bin/magento setup:static-content:deploy. Previously, when deployment completed successfully but not all packages were deployed, Magento did not display an error. When the command is executed with enabled parallel processing and each theme requires more time to be deployed then the specified maximum execution time, this command can finish successfully, although themes are not deployed.

It appears that this problem might have been fixed by MC-36231: setup:static-content:deploy exits with success exit code even if not all themes are deployed

Could you maybe confirm this? Thanks! :)

@ihor-sviziev
Copy link
Contributor Author

@hostep, I will double-check it

@robinero
Copy link

@ihor-sviziev, I think this might still be an issue in 2.4.5-p1.

When running a SCD, like setup:static-content:deploy -f en_US de_DE --area=adminhtml --theme="Magento/backend" --jobs=2 -vvv and forcing an exception, either by adding an exception in the code or by forcing faulty CSS files, it will still return a (final) 0 exit code:

...
adminhtml/Magento/backend/en_US         2953/2953           ============================ 100%   2 secs             
adminhtml/Magento/backend/de_DE         2953/2953           ============================ 100%   2 secs

Execution time: 12.602608919144

Exited: adminhtml/Magento/backend/en_US(status: 1)
Exited: adminhtml/Magento/backend/de_DE(status: 1)

Execution time: 14.61189699173
...

echo $?
0

It seems as if the earlier exit codes are overwritten by a final doRun exitCode.

@ihor-sviziev
Copy link
Contributor Author

@robinero, thank you for checking!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Content Component: Other Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: ready for dev Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.
Projects
High Priority Backlog
  
Ready for Development
Development

No branches or pull requests

9 participants