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 nil panic on lifecycle OnStart/OnStop #917

Merged
merged 1 commit into from Aug 8, 2022

Conversation

sywhang
Copy link
Contributor

@sywhang sywhang commented Aug 8, 2022

If fx lifecycle OnStart/OnStop is called with a nil context, we
panic.

Added tests that test this.

Also tagging another release with this fix.

If fx lifecycle OnStart/OnStop is called with a nil context, we
panic.

Added tests that test this.

Also tagging another release with this fix.
@sywhang sywhang requested a review from abhinav August 8, 2022 18:18
@codecov
Copy link

codecov bot commented Aug 8, 2022

Codecov Report

Merging #917 (0792c04) into master (1973f9f) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #917   +/-   ##
=======================================
  Coverage   98.71%   98.72%           
=======================================
  Files          30       30           
  Lines        1328     1332    +4     
=======================================
+ Hits         1311     1315    +4     
  Misses         11       11           
  Partials        6        6           
Impacted Files Coverage Δ
internal/lifecycle/lifecycle.go 100.00% <100.00%> (ø)

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@sywhang sywhang merged commit b220b95 into uber-go:master Aug 8, 2022
@sywhang sywhang deleted the nilpanic branch August 8, 2022 18:25
sywhang added a commit to sywhang/fx that referenced this pull request Oct 11, 2022
If fx lifecycle OnStart/OnStop is called with a nil context, we
panic.

Added tests that test this.

Also tagging another release with this fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants