Repository navigation
Set explicit versions when swapping Prometheus Pushgateway and Sleuth autoconfigure artifacts - #1191
Merged
Merged
Conversation
…or prometheus-metrics-exporter-pushgateway
…acts for spring-boot-actuator-autoconfigure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
UpdatePrometheusPushgatewayandMigrateCloudSleuthToMicrometerTracingswap to artifacts whose version history differs from the original's, without anewVersion.ChangeDependencytherefore kept the old version literal, which resulted in versions that don't exist or a mismatched Spring Boot version.Problem
UpdatePrometheusPushgatewaysimpleclient_pushgateway(0.x) →prometheus-metrics-exporter-pushgateway(1.3.0+)prometheus-metrics-exporter-pushgateway:0.16.0→Unable to download POM ... HTTP 404MigrateCloudSleuthToMicrometerTracingspring-cloud-sleuth-otel-autoconfigure(1.1.x) →spring-boot-actuator-autoconfigurespring-boot-actuator-autoconfigure:1.1.4→HTTP 404MigrateCloudSleuthToMicrometerTracingspring-cloud-sleuth-autoconfigure(3.1.x) →spring-boot-actuator-autoconfigureThe recipe writes the unresolvable version and leaves only a warning comment in the POM, so tests that check just the artifact ID still pass.
Solution
UpdatePrometheusPushgateway:newVersion: 1.3.x, matching theprometheus-client.versionthat Spring Boot 3.5 manages (1.3.6–1.3.10).newVersion: 3.0.x, consistent with the3.0.xthe same recipe already uses forspring-boot-starter-actuator.When the version is managed by the Spring Boot BOM, the dependency stays versionless; a new test covers this.
These were found in a catalog-wide check of dependency-swap steps against Maven Central metadata.
Test plan
UpdatePrometheusPushgatewayTest: the explicit-version test fails before the change and passes after; the managed-version test passes either wayMigrateCloudSleuthToMicrometerTracingTestcases fail before the change and pass afterUpgradeSpringBoot_3_5Test,cloud2022.MigrateProjectTestand the other Sleuth test classes pass