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

Add Native Image Support in Spring Framework on Google Cloud #1565

Closed
mpeddada1 opened this issue Feb 2, 2023 · 17 comments
Closed

Add Native Image Support in Spring Framework on Google Cloud #1565

mpeddada1 opened this issue Feb 2, 2023 · 17 comments
Assignees
Labels
type: enhancement New feature or request

Comments

@mpeddada1
Copy link
Contributor

mpeddada1 commented Feb 2, 2023

While Spring Framework on Google Cloud 4.x adds compatibility for Spring Boot 3.0, we don't currently have support for native image compilation. This issue serves as an umbrella tracker to report on the status of this support in the repository.
Related Issues:

@filipenfst
Copy link

filipenfst commented Feb 8, 2023

Is there any plans or timelines for you guys to work on this issue?

@cpoyatos1

This comment was marked as duplicate.

1 similar comment
@Tera
Copy link

Tera commented Feb 13, 2023

+1

@rkettelerij
Copy link

Would be nice wrt cloud run / cloud functions

@gomezmejiam
Copy link

stuck in this issue, we where making a work around using the gcp rest api via feign but it´s a lot of work and future manteniance

@MusikPolice

This comment was marked as duplicate.

1 similar comment
@laurent-grousset

This comment was marked as duplicate.

@jainsahab
Copy link
Contributor

Hi everyone,

Thanks for showing interest in this feature.

we are planning to take up this work soon and will keep you updated about the progress.

@laurent-grousset
Copy link

Native compilation worked fine with Spring Boot 3 and spring-cloud-gcp-dependencies 3.4.0

@jleonar
Copy link

jleonar commented Mar 2, 2023

Native compilation worked fine with Spring Boot 3 and spring-cloud-gcp-dependencies 3.4.0

It doesn't with the latest version at spring-cloud-gcp-dependencies 4.1.1

@laurent-grousset
Copy link

laurent-grousset commented Mar 2, 2023

@jainsahab moreover, Native execution is all the more important as it allows us to mitigate the cold start of Cloud Run running Spring Boot (this is my case)

@mat-613

This comment was marked as duplicate.

@lutics
Copy link

lutics commented Apr 19, 2023

any update on here?

@dangazineu
Copy link

Thank you for the interest. We don't have an ETA on this feature yet.

@pkutlunin
Copy link

I think I found the reason why in versions 4.x.x it stopped working - it's related to #1287 (upgrade to Spring boot 3.0.0).
As it was mentioned in #1559, the code no longer gets compiled with -parameters argument. If we take a look at the current version of maven-compiler-plugin, we'll see that the configuration is invalid:

<artifactId>${maven-compiler-plugin.version}</artifactId>

Because of the wrong artifact id, the configuration cannot be applied.
The fix should be easy:

<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>

Unfortunately, I couldn't make it work because of errorprone plugin configuration:

Compilation failure
[ERROR] error: invalid flag: -Xep:UnicodeInCode:OFF

If I remove these 2 flags, the project builds fine:

-Xep:UnicodeInCode:OFF \
-Xep:CanIgnoreReturnValue:OFF

Could you try if it works for you with the fix? Maybe it's just my local setup that causes issues with errorprone.

@burkedavison
Copy link
Member

burkedavison commented Apr 27, 2023

#1775 resolves the above compiler profile and ErrorProne configuration issues highlighted by @pkutlunin . These fixes are now available in Spring Cloud GCP 4.3.0.

@zhumin8
Copy link
Contributor

zhumin8 commented Jul 25, 2024

We do not plan to support Native Image in Spring Framework on Google Cloud 4.x. Initial Native Image support is available in Spring Framework on Google Cloud 5.x.

@zhumin8 zhumin8 closed this as completed Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests