-
Notifications
You must be signed in to change notification settings - Fork 48
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
Java app build extension #348
Conversation
State = new($"mvnw exited with {mvnw.ExitCode}", KnownResourceStates.FailedToStart) | ||
}).ConfigureAwait(false); | ||
|
||
throw new InvalidOperationException($"mvnw build failed with exit code {mvnw.ExitCode}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why throw?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's how I've seen other hooks implemented in the past.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does this show up? Wouldn't it be better to show it in the dashboard? Also what happens when the build fails? Do I need to restart the entire apphost to rebuild or can I trigger it from the dashboard? (custom command)
Worth thinking through that I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The notification service reporting shows up on the dashboard and I think the exception bubbles to the console of the resource that it was relative for.
A custom command would be a good idea to run a rebuild, I'll add that.
private static IResourceBuilder<JavaAppExecutableResource> WithJavaDefaults( | ||
this IResourceBuilder<JavaAppExecutableResource> builder, | ||
JavaAppExecutableResourceOptions options) => | ||
builder.WithOtlpExporter() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work without making https work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without HTTPS on the dashboard?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea does this work right now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume so 🤣
60553c9
to
8ae89e2
Compare
This uses an event to run the mvnw build (or it can be customised via options), so it is only used when the app host is running the resource Fixes #339
Allows you to rebuild the java app without having to restart the whole app host.
120e637
to
8e62b75
Compare
Minimum allowed line rate is |
* Migrating sample from dotnet/aspire repo * Adding dapr tests * Adding dapr setup to CI workflow * Following the setup-dapr instructions * Debugging CI * Falling back to looking at PATH * Fixing line endings replacement * Added PATH lookup to Windows * Adding some diagnostic info * Changing log level * init was only running on linux, which I think is wrong * Turning up logging * Bypass logging * Interpolated strings * Adding resource logger service * Java app build extension (#348) * Adding the ability to do a maven build in the app host This uses an event to run the mvnw build (or it can be customised via options), so it is only used when the app host is running the resource Fixes #339 * Adding a 'build with maven' command Allows you to rebuild the java app without having to restart the whole app host. * Expanding test coverage * Some more tests * Windows exe needs a file extension * Rolling back some changes * Renaming step * Tidying up the tests * Requiring docker for dapr tests
* Dapr migration initial import (#378) * Dropping files from Aspire repo * Moving to the right namespace/folder naming * Adding to solution and getting it to compile * Adding in the Dapr tests from the Aspire repo Had to remove the DaprSchemaTests file as we can't do schema tests (missing a lot of infrastructure from the Aspire repo). Had to edit the DaprTests to not use EnvironmentVariableEvaluator, which we can't leverage as it uses some internal types from Aspire.Hosting. This means that our testing of the environment variables is slightly different, and the values we assert against are not the docker internal host endpoints, but the public endpoints * Dapr azure hosting ext (#371) * Create Dap Azure extensions project Create Dapr Azure Redis project Create Example AppHost + ApiService * Work in progress Create Dapr resource for provisioning * Remove specific resource as not generating properly Use AddAzureInfrastructure * Updated to use secret refs * Fix - Remove code used for testing Add AzureDaprComponentResource Start of unit tests * Unit tests + Fixes based on unit tests * remove bicep file * Tests for AzureRedis * Add Readme and perform small cleanup tasks * Update src/CommunityToolkit.Aspire.Hosting.Dapr.AzureExtensions/ApplicationModel/AzureDaprComponentResource.cs Co-authored-by: Aaron Powell <[email protected]> * Apply suggestions from code review Co-authored-by: Aaron Powell <[email protected]> * Revert unintentional change to Java.AppHost * Update tests/CommunityToolkit.Aspire.Hosting.Dapr.AzureRedis.Tests/ResourceCreationTests.cs Co-authored-by: Aaron Powell <[email protected]> * Updated azure redis documentation also added missing xmldocs for api * correct unit test approach * remove unnecessary comment * null checking * More null checking * Update Azure redis readme * Update AzureExtension readme * move extensions to shared files remove Dapr Azure extensions project make dapr azure extensions internal include extensions in dapr redis package include extensions in dapr extensions tests make dapr redis internals visible to dapr redis tests * change redisCache to infra rename source to redisBuilder --------- Co-authored-by: Aaron Powell <[email protected]> * Fixing broken sln * Dapr example and tests (#394) * Migrating sample from dotnet/aspire repo * Adding dapr tests * Adding dapr setup to CI workflow * Following the setup-dapr instructions * Debugging CI * Falling back to looking at PATH * Fixing line endings replacement * Added PATH lookup to Windows * Adding some diagnostic info * Changing log level * init was only running on linux, which I think is wrong * Turning up logging * Bypass logging * Interpolated strings * Adding resource logger service * Java app build extension (#348) * Adding the ability to do a maven build in the app host This uses an event to run the mvnw build (or it can be customised via options), so it is only used when the app host is running the resource Fixes #339 * Adding a 'build with maven' command Allows you to rebuild the java app without having to restart the whole app host. * Expanding test coverage * Some more tests * Windows exe needs a file extension * Rolling back some changes * Renaming step * Tidying up the tests * Requiring docker for dapr tests * Adding codeowners * Moving dapr extensions to use our dapr package * Forgot to update the tests project * Adding some assembly filters * Adding readme updates * Slight break in the markdown --------- Co-authored-by: Brett Smith <[email protected]>
This uses an event to run the mvnw build (or it can be customised via options), so it is only used when the app host is running the resource
Closes #339
PR Checklist
Other information