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

Collect exceptions caught during shutdown #297

Merged
merged 7 commits into from
Dec 17, 2021
Merged

Conversation

DeLaGuardo
Copy link
Contributor

@DeLaGuardo DeLaGuardo commented Dec 10, 2021

fix #292

@DeLaGuardo DeLaGuardo requested a review from a team December 10, 2021 12:01
@CLAassistant
Copy link

CLAassistant commented Dec 10, 2021

CLA assistant check
All committers have signed the CLA.

e (ex-info msg {:errors errors})]
(log/error e msg)
(when throw?
(throw e)))

Choose a reason for hiding this comment

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

Possible regression: Perhaps (if thrown? (throw e) this) to avoid breaking changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks!

(map (fn [[service-id s]]
(try
(run-lifecycle-fn! app-context s/stop "stop" service-id s)
:ok

Choose a reason for hiding this comment

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

Style: Perhaps we could return nil here and use keep instead of map. Maybe then we could remove the promise-chan transducer.

Copy link
Contributor Author

@DeLaGuardo DeLaGuardo Dec 10, 2021

Choose a reason for hiding this comment

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

I think you are right, it looks much cleaner. Actually I begin with that idea but later my thought drifted towards "results-chan" instead of "errors-chan" as a holder for statuses not only for "failed to stop" services but also for the others, like "service finished but there is a list of pending jobs"

@justinstoller
Copy link
Member

Excellent! Thank you both so much for working on this. Would you mind also updating the CHANGELOG file? We can then do a release with these changes on Monday.

@DeLaGuardo
Copy link
Contributor Author

DeLaGuardo commented Dec 17, 2021

Looking forward for the Monday release :)

Also there was three releases missing in CHANGELOG.md. I added some notes based of comparing the tags but please check them out.

And have a great weekend :)

@Magisus Magisus merged commit 8780276 into puppetlabs:main Dec 17, 2021
@DeLaGuardo
Copy link
Contributor Author

Hi! @justinstoller, sorry for bothering you. Are you still planning to cut the release any time soon? The release is not urgent; I want to ensure that I didn't miss something obvious in my PR.

@Magisus
Copy link
Contributor

Magisus commented Jan 7, 2022

Thanks for the reminder, we should get on this. I'll look into it today 🙂

@Magisus
Copy link
Contributor

Magisus commented Jan 7, 2022

@DeLaGuardo
Copy link
Contributor Author

Amazing! Thank you very much for the quick response!

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.

Add option to not swallow exceptions during shutdown!
5 participants