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

[FIX] Handle graceful termination of workerpool for parallel builds #953

Merged
merged 13 commits into from
Nov 17, 2023

Conversation

d3xter666
Copy link
Contributor

@d3xter666 d3xter666 commented Nov 8, 2023

fixes: SAP/ui5-tooling#894
JIRA: CPOUI5FOUNDATION-751
depends on: SAP/ui5-project#677

Workerpool needs to wait for all the active tasks to complete before terminating.

@coveralls
Copy link

coveralls commented Nov 8, 2023

Coverage Status

coverage: 94.384% (-0.08%) from 94.461%
when pulling bbff751 on fix-workerpool-termination
into f99c469 on main.

Copy link
Member

@RandomByte RandomByte left a comment

Choose a reason for hiding this comment

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

Just to get a clear picture: Can the issue being fixed here occur in regular UI5 CLI builds? Or only in scenarios like SAP/ui5-tooling#894 where multiple minify tasks run in parallel?

lib/processors/minifier.js Show resolved Hide resolved
RandomByte
RandomByte previously approved these changes Nov 13, 2023
Copy link
Member

@RandomByte RandomByte left a comment

Choose a reason for hiding this comment

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

LGTM but depends on SAP/ui5-project#677

lib/processors/minifier.js Outdated Show resolved Hide resolved
lib/tasks/buildThemes.js Outdated Show resolved Hide resolved
@RandomByte RandomByte changed the title [FIX] Tasks' workerpool unexpected termination [FIX] Handle graceful termination of workerpool for parallel builds Nov 14, 2023
d3xter666 added a commit to SAP/ui5-project that referenced this pull request Nov 15, 2023
JIRA: CPOUI5FOUNDATION-751
\@ui5/builder PR that depends on this change:
SAP/ui5-builder#953

When cleaning up after tasks run, it can happen in couple cases:
- When the project is build
- When there's a SIGTERM signal
- (Maybe) on some error

We need to be able to distinguish between those cases as in some places
we rely on graceful termination and cleanup. Especially, after the
project has been build successfully. On the other hand when the user
presses `Ctrl + C`, for example, we need to enforce the termination.

This cahnge provides this context.

---------

Co-authored-by: Merlin Beutlberger <m.beutlberger@sap.com>
Co-authored-by: Günter Klatt <57760635+KlattG@users.noreply.github.com>
@RandomByte RandomByte closed this Nov 17, 2023
@RandomByte RandomByte reopened this Nov 17, 2023
@d3xter666 d3xter666 merged commit f7b9f27 into main Nov 17, 2023
17 checks passed
@d3xter666 d3xter666 deleted the fix-workerpool-termination branch November 17, 2023 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mnification in parallel execution
4 participants