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

Take into account "fallback to container" when determining where native-image gets executed #32236

Merged

Commits on Apr 3, 2023

  1. Take into account "fallback to container" when determining where nati…

    …ve-image gets executed
    
    Sometimes we need to do things differently based on whether the native
    build happens within a container or not.
    
    Before this patch, we used to determine that based exclusively on explicit
    configuration.
    
    After this patch, we correctly take into account that we sometimes need
    to "fall back" to containers even though the configuration didn't mention
    anything about containers, simply because native-image isn't installed.
    
    The previous behavior used to lead to at least one bug: when debugging
    GraalVM's JVM, we determined the address to bind to based on whether
    we're running in a container or not, and
    [here we used to make the wrong choice](https://github.com/quarkusio/quarkus/blob/635a848bb8022e4ca6e945af7e62edc32a288588/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java#L780-L784),
    resulting in the JVM debug agent being inaccessible from the Docker host.
    
    See also https://quarkusio.zulipchat.com/#narrow/stream/187038-dev/topic/quarkus.2Enative.2Edebug-build-process/near/345399379
    
    Co-Authored-By: Foivos Zakkak <fzakkak@redhat.com>
    yrodiere and zakkak committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    862a94e View commit details
    Browse the repository at this point in the history