GitHub employs a secondary rate limit for actions that can trigger
notifications, such as opening a new issue. To avoid hitting this
limit, they recommend [1] waiting at least one second between each
request.
This commit attempts to comply with this guidance by adding a
one-second sleep prior to each POST request that opens an issue.
Closes gh-29879
[1] https://docs.github.com/en/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits
Test slices are now longer registered in spring.factories, but
TestSliceMetadata still looked there for them to generate documentation.
Fixed this so that TestSliceMetadata now looks in the right places for
test slices.
See gh-29873
Implements a new AutoConfigurationLoader, which loads
auto-configurations from a file in META-INF/spring-boot.
Adapts the AutoConfigurationImportSelector to use the new loader.
Adapts the ImportAutoConfigurationImportSelector to use the new loader.
Adapts the metadata plugin in the build to additionally load the
auto-configurations from the new file.
Updates the documentation for auto-configurations and test slices.
Closes gh-29872
This involved a small code change to the generated configuration
properties snippets. The section id has to start with
'appendix.', otherwise the section-id asciidoctor extension
complains. To ensure that the anchors that are derived from the
section IDs remain backwards compatible, the anchor-rewrite
properties have been updated.
See gh-29667
To preserve our existing Kotlin 1.3 baseline, we should compile our
Kotlin code with Kotlin 1.3 API and language versions. At the same
time, we want our documentation to use modern Kotlin. This commit
restores the 1.3 convention and overrides it to 1.6 in the docs
project. This maintains our Kotlin 1.3 baseline while also allowing
the Kotlin code examples to use 1.6 API and language features.
Closes gh-29654
Update `ConventionsPluginTests` so that dependency resolution is
not required. This provides a work-around for our currently failing
Windows build.
Closes gh-29490
This commit adds the auto-configuration for setting up the base Spring
GraphQL infrastructure. Because GraphQL doesn't depend on any particular
transport, we must have a separate configuration for creating:
* the `GraphQlSource`, which holds the schema and the `GraphQL` instance
* the `GraphQlService` for executing incoming requests
* the `BatchLoaderRegistry` for batch loading support
* the `AnnotatedControllerConfigurer` for supporting the annotated
controllers programming model
This comes with a starting point for the `"spring.graphql.*"`
configuration properties; we can now configure the locations and file
extensions of GraphQL schema files we should load and configure at
startup.
See gh-29140
Setting the `systemTest` Gradle task output as never up-to-date ensures
that all system tests are executed each time they are run in CI. The
`--rerun-tasks` Gradle option that was used previously had the same
effect but also disabled build caching.
Closes gh-29029
Restore the 'javax.xml.bind:jaxb-api' exclusion from `xmlunit-core`
which is actually required when using Maven on Java 9+.
The `CheckClasspathForUnnecessaryExclusions` cannot deal with profile
specific dependencies so an exception has been hard coded.
See gh-28332
Previously, the project version was used while filtering the apps
source during syncing but it was not considered as an input to
the task. This could result in the syncing being skipped even though
the project's version had changed.
This commit introduces a new custom task to make the configuration
more declarative and to allow the necessary input configuration to be
done in a single place.
Closes gh-28197
Previously, the optional configuration was added to the compile and
runtime classpaths of each source set and the the javadoc classpath
as well. This had a few disadvantages, the most notable of which is
that it meant that the configuration was ifrst resolved and then
the outcome of the resolution was added to the compile and runtime
classpaths. As a result, none of the attributes on the compile and
runtime classpaths were considered to influence variant selection.
This commit reworks the optional dependencies plugin so that the
compile and runtime classpaths of each source set are now configured
to extend from the optional configuration. This allows each
classpath configuration's attributes to influence the dependencies
that are selected from the optional configuration during resolution.
For example, when resolving the compile classpath, compile
dependencies (Usage.JAVA_API) will be selected and when resolving the
runtime classpath, runtime dependencies (Usage.JAVA_RUNTIME) will be
selected.
The above-described change means that runtime dependencies of an
optional dependencies will no longer leak into the compile classpath.
As a result of this, our Gradle plugin's test infrastructure has
been updated so that it no longer references runtime dependencies of
the Kotlin Gradle plugin at compile time.
Closes gh-27965
A new system test plugin is being made available for running test
suites that should be run less frequently than with every commit, such
as tests that verify Spring Boot compatibility with external
projects. CI pipeline configuration for running system tests is also
provided.
The first system tests verify the behavior of the Spring Boot image
building plugins when building images using Paketo buildpacks.
Closes gh-25824
Previously, our conventions configured the source and target
compatibility on the project's JavaCompile tasks. This causes the
settings to be missed when importing the projects into Eclipse [1].
This commit updates the conventions to set the source and target
compatibility on the project-wide JavaPluginExtension. This allows
the Eclipse import to correctly detect and honour the settings.
Closes gh-26932
[1] https://github.com/eclipse/buildship/issues/978
While we're building with Gradle 6.9 at the moment and ConfigureUtil
has only been deprecated in Gradle 7.1, it doesn't do any harm to
stop using it now.
Closes gh-26928
The previous workaround worked but prevented caching of every test
task as the value of system property pointing to the custom security
properties file varied from build to build.
This commit refines the workaround to copy the file into the build
directory of the test task's project and reference it using a URL
that's relative to the task's working directory. This ensures that
the value of the system property doesn't change from build to build.
Closes gh-26252
Previously a number of file- or directory-based task inputs were
configured with specifying their path sensitivity. This meant
that the default absolute path sensitivity was used. For caches
that are cacheable this would result in a cache miss when the
inputs were identical other than being located at a different
absolute path as they are when running a CI build vs a local build.
This commit updates the configuration of additional task inputs
to use relative path sensitivity. A property name for each input has
also been configured. This makes them easier to identify in build
scans.
Closes gh-26270
sun.security.x509.AlgorithmId.get(String) isn't thread-safe and can
lead to null be returned for an algorithm that should be present.
This commit aims to work around this problem by avoiding the call
to AlgorithmId.get(String). It does so by configuring the
PKCS12 key protection algorithm to one that starts with
pbewithhmacsha (case insensitive). This short-circuits the logic
in PKCS12KeyStore.mapPBEAlgorithmToOID(String) and avoids the call to
AlgorithmId.get(String). Thanks again to @dreis2211 for the
suggestion.
The work around is only used when building with Java 8 as the problem
was fixed in Java 9.
Closes gh-26252
Update `MavenPublishingConventions` to add a new `mavenOptional` feature
that allows us to declare optional dependencies that are also published
in the generated POM.
This change allows us to include the maven-shade-plugin in the
spring-boot-maven-plugin POM which fixes an issue with Eclipse m2e.
Fixes gh-21992
This commit adds a new `spring.netty.leak-detection` configuration
property that selects the level of memory leak detection for the Netty
engine.
This configuration is applied statically to Netty; this means all
(non-shaded) Netty usages as client or server will be impacted by this
change.
Developers might use this property during development or tests to find
causes of memory leaks when dealing with Netty buffers.
Closes gh-14338
Previously, the auto-configuration for DataSource initialization and
the properties used to configure it were part of the general
DataSource auto-configuration and properties.
This commit moves the auto-configuration of DataSource initialization
out into a separate top-level auto-configuration class. Similarly,
the properties for configuring DataSource initialization have been
moved from `spring.datasource.*` into `spring.sql.init.*`.
The old initialization-related `spring.datasource.*` properties have
been deprecated but can still be used. When they are used, they new,
separate initialization auto-configuration will back off. In other
words, the initialization related `spring.datasource.*` properties
and the `spring.sql.init.*` properties cannot be used in combination.
Closes gh-25323