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

Builds failing as spring-cloud-bindings not accessible from repo.spring.io #304

Closed
bbegw opened this issue Jan 5, 2023 · 3 comments · Fixed by #306
Closed

Builds failing as spring-cloud-bindings not accessible from repo.spring.io #304

bbegw opened this issue Jan 5, 2023 · 3 comments · Fixed by #306
Labels
type:dependency-upgrade A dependency upgrade

Comments

@bbegw
Copy link

bbegw commented Jan 5, 2023

Per https://spring.io/blog/2022/12/14/notice-of-permissions-changes-to-repo-spring-io-january-2023, Spring team is restricting anonymous access to their "release" path on repo.spring.io (among others). In the default configuration, the Spring Boot buildpack attempts to fetch pring-cloud-bindings at a URL like https://repo.spring.io/release/org/springframework/cloud/spring-cloud-bindings/1.10.0/spring-cloud-bindings-1.10.0.jar. This no longer works with the new policy on repo.spring.io.

Expected Behavior

Buildpack build with Spring Boot buildpack and default settings should succeed.

Current Behavior

Buildpack build with Spring Boot buildpack and default settings fails. Error below:

    [creator]     Paketo Buildpack for Spring Boot 5.20.0
    [creator]       https://github.com/paketo-buildpacks/spring-boot
    [creator]       Build Configuration:
    [creator]         $BP_SPRING_CLOUD_BINDINGS_DISABLED   false  whether to contribute Spring Boot cloud bindings support
    [creator]       Launch Configuration:
    [creator]         $BPL_SPRING_CLOUD_BINDINGS_DISABLED  false  whether to auto-configure Spring Boot environment properties from bindings
    [creator]         $BPL_SPRING_CLOUD_BINDINGS_ENABLED   true   Deprecated - whether to auto-configure Spring Boot environment properties from bindings
    [creator]       Creating slices from layers index
    [creator]         dependencies (73.8 MB)
    [creator]         spring-boot-loader (282.2 KB)
    [creator]         snapshot-dependencies (0.0 B)
    [creator]         application (8.9 MB)
    [creator]       Launch Helper: Contributing to layer
    [creator]         Creating /layers/paketo-buildpacks_spring-boot/helper/exec.d/spring-cloud-bindings
    [creator]       Spring Cloud Bindings 1.10.0: Contributing to layer
    [creator]         Downloading from https://repo.spring.io/release/org/springframework/cloud/spring-cloud-bindings/1.10.0/spring-cloud-bindings-1.10.0.jar
    [creator]     unable to invoke layer creator
    [creator]     unable to contribute spring-cloud-bindings layer
    [creator]     unable to get dependency spring-cloud-bindings
    [creator]     unable to download https://repo.spring.io/release/org/springframework/cloud/spring-cloud-bindings/1.10.0/spring-cloud-bindings-1.10.0.jar
    [creator]     could not download https://repo.spring.io/release/org/springframework/cloud/spring-cloud-bindings/1.10.0/spring-cloud-bindings-1.10.0.jar: 401
    [creator]     ERROR: failed to build: exit status 1

Possible Solution

Spring Boot buildpack should fetch the spring-cloud-bindings release artifact from Maven Central or some other anonymous-access public repository.

Temporary workaround: disable Spring Cloud Bindings support by setting "BP_SPRING_CLOUD_BINDINGS_DISABLED": "true"

Steps to Reproduce

  1. Create a sample buildpack Java application with the Spring Boot buildpack selected and the SpringBoot Gradle plugin included.
  2. Run gradle bootBuildImage

Motivations

Need builds to work :). Thank you!

@dmikusa
Copy link
Contributor

dmikusa commented Jan 5, 2023

For now, this is just temporary. We're about halfway through the brownout for today. After that ends, builds will start working again one the brownout is over. As mentioned above, you can work around this for now by setting BP_SPRING_CLOUD_BINDINGS_DISABLED=true. That will skip the bindings and continue on with the build.

We are working on moving this resource over to Maven Central, and we hope to have that done before the next brownout (Jan 12th). There is a caveat though. We can only change that in new buildpack releases. When that fix is released everyone will need to update to the latest buildpack to pick up that change.

I'll keep this issue open & we'll post a note here when we have cut a new buildpack release that pulls from Maven Central.

Thanks for being patient through this. It’s hard on everyone when a major infrastructure change happens.

@dmikusa dmikusa added the type:dependency-upgrade A dependency upgrade label Jan 5, 2023
@bbegw
Copy link
Author

bbegw commented Jan 5, 2023

Thank you so much @dmikusa ! Really appreciate all your efforts and the detailed comment 😀

@bbegw
Copy link
Author

bbegw commented Jan 10, 2023

Thank you again @dmikusa ! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:dependency-upgrade A dependency upgrade
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants