Skip to content

Latest commit

 

History

History
420 lines (296 loc) · 23.1 KB

CHANGELOG.md

File metadata and controls

420 lines (296 loc) · 23.1 KB

Backstopper Changelog / Release Notes

All notable changes to Backstopper will be documented in this file. Backstopper adheres to Semantic Versioning.

Note that the nike-internal-util library is technically version-independent even though it is currently living in this repository. Check out that library's CHANGELOG.md for details on its changes. This changelog file is specifically for the backstopper-* libraries.

2.x Releases

1.x Releases

0.x Releases

Released on 2024-09-13.

All changes for 2.0.0 were made by Nic Munroe in pull request #72.

Breaking Changes

  • Backstopper 2.0.0 represents a major change from the old javax ecosystem to the new jakarta ecosystem. All javax based dependencies and references have been replaced with their jakarta counterparts.
  • Java 17 is now the minimum required Java version.
  • Support for many older frameworks has been dropped due to these changes, and some new ones added. For the frameworks currently supported in 2.x, see the Integration Modules section in the main branch readme (includes Servlet API 6.x, Spring 6.x, and Spring Boot 3.x).

NOTE: If you still need support for older Java versions and the javax ecosystem, see the Backstopper 1.x branch. The Backstopper 1.x releases also contain support for JAX-RS 2, Jersey 1 and 2, Spring 4 and 5, and Springboot 1 and 2 - see here.

Updated

  • Migrated all code from javax to the jakarta ecosystem.
  • Updated all libraries to Java 17.
  • Updated all dependencies to the latest versions.

Removed

  • Removed support for JAX-RS 2, Jersey 1 and 2, Spring 4 and 5, and Springboot 1 and 2.
    • These are still supported in the Backstopper 1.x branch - see here. Everything in the 1.x branch should be considered deprecated - it's unlikely to see much further development.

Added

  • Added support for Servlet API 6.x, Spring 6.x, and Spring Boot 3.x.
  • Added sample apps for Spring 6.x and Spring Boot 3.x, for both WebMVC and WebFlux.
    • See the samples section of the main readme for details.

Released on 2024-09-08.

Graduated to 1.x

  • Graduated the version of backstopper to 1.15.2 (from 0.15.1) to reflect the stability and previous work done on the libraries. No functional changes.

Released on 2023-08-09.

Fixed

  • Fixed header-masking comparisons for the backstopper log. Previously it was doing exact string equals to determine if a header name should be masked in the logs or not, but headers are inherently case-insensitive which could lead to header values ending up in the logs due to case sensitivity issues (e.g. an incoming authorization header not being masked because it's not an exact string equals for captial-A Authorization). After this fix, any header with a matching name will be masked regardless of case sensitivity.

Released on 2022-06-03.

Added

Deprecated

Migration notes

Migration from the JUnit-4-based backstopper-reusable-tests to the new JUnit-5-based backstopper-reusable-tests-junit5 is pretty straightforward:

  1. Make sure your project supports running JUnit 5 tests.
  2. Replace your backstopper-reusable-tests dependency with the new backstopper-reusable-tests-junit5 library.
  3. In your application's extension of ReflectionBasedJsr303AnnotationTrollerBase, you'll need to replace the import of com.google.common.base.Predicate with java.util.function.Predicate instead.
  4. Verify that the reusable tests are being run.

Released on 2022-02-28.

Updated

  • Updated dependency versions to the latest for transitive dependencies exported by Backstopper (where possible due to Java 7 restrictions):
    • SLF4J 1.7.7 -> 1.7.36
    • Jackson 2.4.2 -> 2.12.6
    • (backstopper-reusable-tests only) JUnit 4.12 -> 4.13.2
    • (backstopper-reusable-tests only) JUnit Dataprovider 1.10.1 -> 1.13.1
    • (backstopper-reusable-tests only) Javassist 3.18.2-GA -> 3.23.2-GA
    • (backstopper-reusable-tests only) Mockito 1.9.5 -> 2.28.2
    • Updated by Nic Munroe in pull request #63.

Released on 2022-02-28.

No functional changes in version 0.14.0 - this version is just for exercising the Gradle upgrade and migration from Bintray to Maven Central.

Potentially Breaking Changes

  • The upgrade to Gradle required adjusting how library dependencies are declared. Mostly this means dependencies declared in gradle as compile scope turned into api scope. This shouldn't affect you - the resulting POMs published to Maven Central appear to be identical. Just calling it out as a possibility that something unexpected might result.
  • The upgrade to Gradle required updating SpringBoot 2 dependency version, which in turn required changing the backstopper-spring-boot2-webmvc module to build on Java 8. Since SpringBoot 2.x itself requires Java 8 this shouldn't affect anyone, however it is Spring so things may break anyway for some users.

Project Build

  • Cleaned up bit-rot and generally de-rusted the project. The main changes were bringing the project up to gradle 7.4, migrating to Github Actions for CI build, and setting things up to publish directly to Maven Central.

Released on 2020-01-08.

Added

  • Added two new detail key/value pairs to the Backstopper log message when an ApiException is handled: exception_cause_class and exception_cause_message. This lets you always know what the cause of the ApiException was in the case that the ApiError(s) in the ApiException are too generic, the thrower of the ApiException doesn't include any extra logging details, and the whole thing ultimately maps to a 4xx (and therefore no stack trace shows up in the logs).
  • Added a new feature to ApiException to allow you to force stack trace logging on or off, no matter what HTTP response code is associated with the error. This lets you force stack trace logging on for 4xx errors, or off for 5xx errors, on a per-ApiException basis. You specify this using the ApiException builder (see ApiException.Builder.withStackTraceLoggingBehavior(...)).

Fixed

  • The backstopper-reusable-tests module no longer exports the ch.qos.logback:logback-classic dependency (it was moved from from a compile dependency to testCompile). This could conflict with whatever logger impl an importing project happened to be using.

Deprecated

  • Deprecated most of the constructors in ApiException. Please move to using the builder.

Released on 2019-08-23.

Potentially breaking changes

  • Stack dependencies have been moved to compile-only to avoid exporting transitive stack dependencies. This was done to prevent runtime version conflicts with whatever stack version dependencies you're using in your application environment. This should not affect most users since the Backstopper libraries are likely to be used in an environment where the required stack dependencies are already on the classpath at runtime, however if you receive class-not-found errors related to the stack classes then you'll need to pull the necessary dependencies into your project. The stack-specific Backstopper module readmes for your stack will contain details on which dependencies you might need to pull into your project. This includes the following Backstopper libraries and their stack dependencies:
  • The OneOffSpringFrameworkExceptionHandlerListener class has been split to accommodate both Spring Web MVC and Spring WebFlux apps. There's now an abstract OneOffSpringCommonFrameworkExceptionHandlerListener that contains code common to both Web MVC and WebFlux, and specific OneOffSpringWebMvcFrameworkExceptionHandlerListener and OneOffSpringWebFluxFrameworkExceptionHandlerListener classes that should be used in their respective Web MVC and WebFlux environments. This shouldn't affect most Backstopper users unless you were overriding the old now-missing class for some reason. If you are an existing user affected by this change, the fix should simply be to use OneOffSpringWebMvcFrameworkExceptionHandlerListener.

Added

  • Added Spring WebFlux support. If you're running a Spring WebFlux app, you can integrate Backstopper easily with the new backstopper-spring-web-flux library. Click that link to go to the readme with full integration setup instructions. See the new Spring Boot 2 WebFlux Sample App for a concrete example of Backstopper+Spring WebFlux.
  • Added Spring Boot 1 and Spring Boot 2 (Web MVC) Backstopper libraries. If you're using Spring Boot 1 or Spring Boot 2 (with Web MVC, not WebFlux), then you should use these libraries instead of backstopper-spring-web-mvc: backstopper-spring-boot1 or backstopper-spring-boot2-webmvc. See the readmes in those modules for full configuration details. See the new Spring Boot 1 Sample App or Spring Boot 2 Web MVC Sample App for a concrete example.
  • Added support to Spring Web MVC based Backstopper apps for Servlet container errors that happen outside Spring to still be handled by Backstopper (e.g. 404 errors that are caught by the Servlet container and never reach Spring). To utilize this feature on non-Springboot apps you'll need to configure your Servlet container to route Servlet-container-caught errors to /error. For Springboot apps you'll need to pull in and use the new backstopper-spring-boot1 or backstopper-spring-boot2-webmvc library (whichever is appropriate) instead of backstopper-spring-web-mvc, and this new feature will be configured automatically.
  • Added support for a few missing Spring framework exception types and added some extra log details for others. In particular, added support for many Spring Security exceptions (AccessDeniedException will now map to a 403, for example).
  • Added some testonly-spring* modules to this repository to cover all the various Spring combinations: Spring Web MVC 4, Spring Web MVC 5, Spring Boot 1, Spring Boot 2 Web MVC, and Spring Boot 2 WebFlux - testing both direct import of the Backstopper Spring integration bean as well as blanket com.nike.backstopper component scanning in each case.

Changed

  • Changed SpringApiExceptionHandler's order to be highest plus 1, to allow for Spring Boot's DefaultErrorAttributes to execute and populate the request attributes with its error info.

Project Build

  • Upgraded to Gradle 5.5.1 and got rid of plugins for console summaries.
  • Changed the Travis CI config to use openjdk8 instead of oraclejdk8.
  • Upgraded Jacoco to 0.8.4.
  • Upgraded gradle-bintray-plugin to 1.8.4.

Released on 2018-02-19.

Added

  • Added new overridable JaxRsApiExceptionHandler.setContentType(...) method to allow you to send a Content-Type response header other than application/json in JAX-RS based Backstopper projects. Still defaults to application/json as before for backwards compatibility.

Released on 2018-01-19.

Updated

  • Updated the version of org.reflections:reflections (used by the backstopper-reusable-tests module) from 0.9.9-RC1 to 0.9.11.
    • This fixed the following error when a project relied on backstopper-reusable-tests but also a newer version of org.reflections:reflections than what backstopper was compiled with: NoSuchMethodError: org.reflections.util.ClasspathHelper.forPackage(Ljava/lang/String;[Ljava/lang/ClassLoader;)Ljava/util/Set;. One place where this showed up was when using Kotlin in a Backstopper-powered project since Kotlin pulls in org.reflections:reflections:0.9.11. Compiling backstopper with the latest org.reflections:reflections version seems to fix the issue.
    • Fixed by Nic Munroe in pull request #28.

Project Build

  • Upgraded to Jacoco 0.8.0.

Released on 2017-10-26.

Added

  • Updated ApiException constructors to use the ApiError message as the exception's message if no message is provided.
  • Added equals and hashcode methods to ApiErrorBase and ApiErrorWithMetadata. Updated ApiErrorComparator accordingly with equals and hashcode updates and updated sort to check errorCode after name

Released on 2017-08-28.

Fixed

  • SortedApiErrorSet now allows multiple same-named ApiErrors if they have different metadata. Use case example: throwing the same error multiple times for a given object during validation where the only difference is the field affected, and the field is held in the metadata.
  • WrapperException.toString() now guarantees that info about a non-null cause is included.
  • The reusable test to verify @StringConvertsToClassType on enums pointed to enums that could be deserialized in a case insensitive way if specified in the annotation (VerifyEnumsReferencedByStringConvertsToClassTypeJsr303AnnotationsAreJacksonCaseInsensitiveTest) was incorrect. It was doing the case-insensitivity check in the wrong situation.

Project Build

  • Upgraded to Gradle 4.1.

Released on 2017-02-01.

Added

  • Added convenience constructor to ApiErrorWithMetadata that takes a vararg of Pair<String, Object> so that you can inline the extra metadata without having to create and populate a Map separately.

Fixed

  • Fixed the Spring module's OneOffSpringFrameworkExceptionHandlerListener to recognize and properly handle NoHandlerFoundException so that it will be mapped to the "404 not found" ApiError for your project.

Released on 2016-12-01.

Added

  • Added base JAX-RS module for applications running in a non-Jersey JAX-RS environment.

Released on 2016-11-29.

Added

  • Added the ability to specify extra response headers that should be returned to the caller with the response. These can be set in ApiExceptionHandlerListenerResult, so listeners can specify them, and ApiException has been modified to support them directly as well.

Released on 2016-11-04.

Fixed

  • Fixed a bug with ApiErrorWithMetadata where it wasn't including the delegate's metadata.

Released on 2016-10-24.

Fixed

  • Backstopper version 0.9.1 was released pointing to a snapshot version of the nike-internal-util dependency. 0.9.1.1 fixes that to point at the correct nike-internal-util version.

Released on 2016-10-24.

NOTE: The artifacts released for this version point to incorrect dependencies - please use version 0.9.1.1 instead.

Fixed

  • ApiExceptionHandlerUtils.DEFAULT_IMPL was not being initialized correctly, resulting in the "mask sensitive headers" functionality being turned off for DEFAULT_IMPL. DEFAULT_IMPL will now correctly mask the default set of sensitive headers.

Released on 2016-09-20.

Fixed

  • Version 0.9.0 was unable to be published in bintray, so nike-internal-util bintray publishing was split into its own package separate from the backstopper libraries. No functional code changes.

Released on 2016-09-20.

Added

  • Initial open source code drop for Backstopper. NOTE: This release never made it to bintray or maven central. Please use 0.9.0.1 instead.