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

[FEATURE] TaskUtil: Add 'force' flag to cleanup task callback #677

Merged
merged 14 commits into from
Nov 15, 2023

Conversation

d3xter666
Copy link
Contributor

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.

@coveralls
Copy link

coveralls commented Nov 10, 2023

Coverage Status

coverage: 95.955%. remained the same
when pulling bdb51e2 on internal-pass-args-to-cleanup
into 36ef967 on main.

@d3xter666 d3xter666 requested review from RandomByte and a team November 10, 2023 08:56
d3xter666 and others added 2 commits November 10, 2023 15:44
Co-authored-by: Merlin Beutlberger <m.beutlberger@sap.com>
@d3xter666 d3xter666 requested a review from RandomByte November 13, 2023 07:11
@d3xter666 d3xter666 requested a review from RandomByte November 14, 2023 09:15
RandomByte
RandomByte previously approved these changes Nov 14, 2023
@RandomByte
Copy link
Member

Maybe we should have this as a [FEATURE] in the changelog?

@RandomByte
Copy link
Member

We should also update the JSDoc in TaskUtil: https://github.com/SAP/ui5-project/blob/main/lib/build/helpers/TaskUtil.js#L175

@d3xter666 d3xter666 changed the title [INTERNAL] Provide arguments for tasks' cleanup [FEATURE] Provide arguments for tasks' cleanup Nov 14, 2023
@d3xter666
Copy link
Contributor Author

d3xter666 commented Nov 14, 2023

We should also update the JSDoc in TaskUtil: https://github.com/SAP/ui5-project/blob/main/lib/build/helpers/TaskUtil.js#L175

I have added JSDoc for the TaskUtil's cleanup callback.

@KlattG would you take a look, please?

https://github.com/SAP/ui5-project/pull/677/files#diff-1eb3e0af80157c98cab98191c36cc12e4791fb99d59cf6f2aecc6d1a9bf91359R166

@d3xter666 d3xter666 requested a review from KlattG November 14, 2023 13:35
RandomByte
RandomByte previously approved these changes Nov 14, 2023
@RandomByte RandomByte changed the title [FEATURE] Provide arguments for tasks' cleanup [FEATURE] TaskUtil: Add 'force' flag to cleanup task callback Nov 14, 2023
lib/build/helpers/TaskUtil.js Outdated Show resolved Hide resolved
lib/build/helpers/TaskUtil.js Outdated Show resolved Hide resolved
lib/build/helpers/TaskUtil.js Outdated Show resolved Hide resolved
lib/build/helpers/TaskUtil.js Outdated Show resolved Hide resolved
d3xter666 and others added 4 commits November 14, 2023 18:48
Co-authored-by: Günter Klatt <57760635+KlattG@users.noreply.github.com>
Co-authored-by: Günter Klatt <57760635+KlattG@users.noreply.github.com>
Co-authored-by: Günter Klatt <57760635+KlattG@users.noreply.github.com>
@d3xter666 d3xter666 requested a review from matz3 November 15, 2023 07:21
@d3xter666 d3xter666 merged commit a0a21b7 into main Nov 15, 2023
17 checks passed
@d3xter666 d3xter666 deleted the internal-pass-args-to-cleanup branch November 15, 2023 09:52
d3xter666 added a commit to SAP/ui5-builder that referenced this pull request Nov 17, 2023
…953)

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.

---------

Co-authored-by: Merlin Beutlberger <m.beutlberger@sap.com>
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.

5 participants