Skip to content
This repository was archived by the owner on Aug 17, 2025. It is now read-only.

Conversation

@matt2e
Copy link
Collaborator

@matt2e matt2e commented Jun 4, 2025

  • Previously if quarkus failed to launch the build would be stuck for 100 mins waiting to connect
  • Now it returns with the actual build errors

@matt2e matt2e requested a review from a team as a code owner June 4, 2025 04:39
logger.Infof("Dev mode process exited")
cancel(errors.Wrap(context.Canceled, "dev mode process exited"))
}
func (s *Service) launchQuarkusProcess(ctx context.Context, devModeBuild string, projectConfig projectconfig.Config, buildCtx buildContext, stdout *errorDetector, errChan chan error) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Passing in the errChan here so that failure to launch is passed back

BuildFailure: &langpb.BuildFailure{
Errors: ers,
}}}), nil
case err := <-errorChan:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

errChan now gets either the failure to launch error, or the error from the above go func() {} (eg connect timeout), whichever fails first

return nil, errors.WithStack(err)
}

release, err := flock.Acquire(ctx, buildCtx.Config.BuildLock, BuildLockTimeout)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

build lock is now locked on each build, not just the first build in runQuarkusDev

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we even need the build lock now?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it still prevents two ftl build s running at once I think. But I think it should be moved out of the plugins now. I'll do that in a separate PR

}

func (s *Service) launchQuarkusProcessAsync(ctx context.Context, devModeBuild string, projectConfig projectconfig.Config, buildCtx buildContext, stdout *errorDetector) {
go func() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

moved the go keyword to the actual function call which I think is more idiomatic

@matt2e matt2e enabled auto-merge (squash) June 4, 2025 04:51
@matt2e matt2e force-pushed the matt2e/fix-quarkus-launch-failure branch from 825e401 to b8d3feb Compare June 4, 2025 04:57
@matt2e matt2e merged commit aa66722 into main Jun 4, 2025
109 checks passed
@matt2e matt2e deleted the matt2e/fix-quarkus-launch-failure branch June 4, 2025 05:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants