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

need to validate the nuget publication before 1.0 ships #155

Closed
Aaronontheweb opened this issue Dec 22, 2022 · 6 comments
Closed

need to validate the nuget publication before 1.0 ships #155

Aaronontheweb opened this issue Dec 22, 2022 · 6 comments

Comments

@Aaronontheweb
Copy link
Member

    LGTM - need to validate the nuget publication locally (or check what the build server produced.) Don't want to publish any sample projects and need to make sure that the correct `README.md` files are included.

Originally posted by @Aaronontheweb in #148 (review)

@Aaronontheweb
Copy link
Member Author

@Arkatufus guess we'll do this via 1.0.0-beta1 and doing some integration testing into other projects / packages

@CumpsD
Copy link
Contributor

CumpsD commented Jan 6, 2023

I managed to implement 1.0.0-beta1 in my project fyi

For the Akka project I added:

  nuget Akka.HealthCheck 1.0.0-beta1
  nuget Akka.HealthCheck.Persistence 1.0.0-beta1
  nuget Akka.HealthCheck.Hosting.Web 1.0.0-beta1

Called

AkkaHealthCheck.For(actorSystem);

And used hocon:

  healthcheck {
    log-config-on-start = on
    log-info = on

    liveness {
      transport = custom

      providers {
        default = "Akka.HealthCheck.Liveness.DefaultLivenessProvider, Akka.HealthCheck"
        persistence = "Akka.HealthCheck.Persistence.AkkaPersistenceLivenessProbeProvider, Akka.HealthCheck.Persistence"
      }
    }

    readiness {
      transport = custom

      providers {
        default = "Akka.HealthCheck.Readiness.DefaultReadinessProvider, Akka.HealthCheck"
      }
    }
  }

For ASP.NET integration I added:

    using Akka.HealthCheck.Hosting.Web;

    .WithAkkaLivenessProbe()
    .WithAkkaReadinessProbe()
    .WithAkkaPersistenceLivenessProbe()

    endpoints
        .MapAkkaHealthCheckRoutes(
            HealthChecksWriter.HealthCheckEndpoint,
            (_, options) =>
            {
                options.AllowCachingResponses = false;
                options.ResponseWriter = HealthChecksWriter.WriteHealthCheckResponse;
            });

And everything worked for my use case :)

@Arkatufus
Copy link
Contributor

@CumpsD You shouldn't need to set the HOCON settings when you use Akka.HealthCheck.Hosting.Web, and using the web package should pull the other packages as dependency

@CumpsD
Copy link
Contributor

CumpsD commented Jan 6, 2023

I like to be explicit with the packages :)

As for the HOCON, it's WithWebHealthCheck which adds it no? And since I'm not using Akka.Hosting I don't have an AkkaBuilder which does that, no? I haven't converted to .Hosting yet

@Arkatufus
Copy link
Contributor

Got it :)

@Aaronontheweb
Copy link
Member Author

Related: akkadotnet/Akka.Hosting#188

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

No branches or pull requests

3 participants