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 shutdown hooks order #14267

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

flovouin
Copy link
Contributor

@flovouin flovouin commented Dec 3, 2024

PR Checklist

Please check if your PR fulfils the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #14118

This issue was already closed. However the fix in #14111 only impacts the onModuleDestroy hook. Other shutdown hooks still have an incorrect behavior (i.e. are called in ascending distance order).

What is the new behavior?

The beforeApplicationShutdown and onApplicationShutdown hooks are called in descending distance order.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

This is purposely extremely similar to #14111, but I'm open to suggestions if needed.
I've targeted 11.0.0 because this was also the case of the aforementioned PR.

Sorry, something went wrong.

@flovouin flovouin changed the base branch from master to 11.0.0 December 3, 2024 15:57
@coveralls
Copy link

Pull Request Test Coverage Report for Build 187deeed-0a4d-4b88-a1f4-1544134f3c4e

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 89.84%

Totals Coverage Status
Change from base Build b74fa188-698c-43d6-90a8-d3bc916169b5: 0.0%
Covered Lines: 7074
Relevant Lines: 7874

💛 - Coveralls

@flovouin flovouin marked this pull request as ready for review December 3, 2024 16:21
@flovouin flovouin mentioned this pull request Dec 3, 2024
15 tasks
@kamilmysliwiec kamilmysliwiec merged commit c341a02 into nestjs:11.0.0 Dec 4, 2024
3 checks passed
@kamilmysliwiec
Copy link
Member

LGTM

@kamilmysliwiec kamilmysliwiec added this to the 11.0.0 milestone Dec 4, 2024
@kamilmysliwiec kamilmysliwiec mentioned this pull request Dec 4, 2024
12 tasks
@flovouin flovouin deleted the fix-shutdown-hooks-order branch December 4, 2024 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants