Skip to content

Add nullable annotations to Healthchecks #22785

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

Merged
2 commits merged into from
Jun 12, 2020
Merged

Conversation

pranavkm
Copy link
Contributor

No description provided.

@Pilchie Pilchie added the area-healthchecks Includes: Healthchecks (some bugs also in Extensions repo) label Jun 10, 2020
@BrennanConroy BrennanConroy added the api-ready-for-review API is ready for formal API review - https://github.com/dotnet/apireviews label Jun 11, 2020
@ghost
Copy link

ghost commented Jun 11, 2020

Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:

  • The PR contains changes to the reference-assembly that describe the API change. Or, you have included a snippet of reference-assembly-style code that illustrates the API change.
  • The PR describes the impact to users, both positive (useful new APIs) and negative (breaking changes).
  • Someone is assigned to "champion" this change in the meeting, and they understand the impact and design of the change.

@pranavkm pranavkm added this to the 5.0.0-preview7 milestone Jun 11, 2020
@@ -8,6 +8,6 @@ public sealed class HealthCheckContext
/// <summary>
/// Gets or sets the <see cref="HealthCheckRegistration"/> of the currently executing <see cref="IHealthCheck"/>.
/// </summary>
public HealthCheckRegistration Registration { get; set; }
public HealthCheckRegistration Registration { get; set; } = default!;
Copy link
Member

Choose a reason for hiding this comment

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

Was this only nullable for testing? Should add comment why it has been forced to non-nullable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, the calling code assumes this is non-null.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -243,7 +243,7 @@ public async Task CheckHealthAsync_SetsRegistrationForEachCheck()
public async Task CheckHealthAsync_Cancellation_CanPropagate()
{
// Arrange
var insideCheck = new TaskCompletionSource<object>();
var insideCheck = new TaskCompletionSource<object?>();
Copy link
Member

Choose a reason for hiding this comment

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

Non generic TaskCompletionSource is merged in runtime. We should have it soon 🙏

@ghost
Copy link

ghost commented Jun 12, 2020

Hello @pranavkm!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

Copy link
Member

@BrennanConroy BrennanConroy left a comment

Choose a reason for hiding this comment

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

We no longer bringing these to API review?

@ghost ghost merged commit 8c1bf1f into master Jun 12, 2020
@ghost ghost deleted the prkrishn/nullable-healthcheck branch June 12, 2020 17:17
@pranavkm
Copy link
Contributor Author

@BrennanConroy the suggestion was to review these together rather than individually. I'll set up a separate review once we've had more of these projects updated.

@pranavkm pranavkm removed the api-ready-for-review API is ready for formal API review - https://github.com/dotnet/apireviews label Mar 22, 2021
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-healthchecks Includes: Healthchecks (some bugs also in Extensions repo)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants