Commit Graph

11455 Commits

Author SHA1 Message Date
Artem Bilan
e210234d98 Upgrade to Hibernate 6.2.22.Final
* Fix JPA test for the latest Hibernate
2024-02-16 18:21:53 -05:00
dependabot[bot]
678766230c Bump org.springframework.ws:spring-ws-bom from 4.0.8 to 4.0.10 (#8916)
Bumps [org.springframework.ws:spring-ws-bom](https://github.com/spring-projects/spring-ws) from 4.0.8 to 4.0.10.
- [Release notes](https://github.com/spring-projects/spring-ws/releases)
- [Commits](https://github.com/spring-projects/spring-ws/compare/v4.0.8...v4.0.10)

---
updated-dependencies:
- dependency-name: org.springframework.ws:spring-ws-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 23:08:44 +00:00
dependabot[bot]
3baa163469 Bump org.apache.groovy:groovy-bom from 4.0.15 to 4.0.18 (#8926)
Bumps [org.apache.groovy:groovy-bom](https://github.com/apache/groovy) from 4.0.15 to 4.0.18.
- [Commits](https://github.com/apache/groovy/commits)

---
updated-dependencies:
- dependency-name: org.apache.groovy:groovy-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 22:51:11 +00:00
dependabot[bot]
a214553a39 Bump graalvmVersion from 22.3.4 to 22.3.5 (#8919)
Bumps `graalvmVersion` from 22.3.4 to 22.3.5.

Updates `org.graalvm.sdk:graal-sdk` from 22.3.4 to 22.3.5
- [Release notes](https://github.com/oracle/graal/releases)
- [Commits](https://github.com/oracle/graal/commits)

Updates `org.graalvm.js:js` from 22.3.4 to 22.3.5
- [Release notes](https://github.com/graalvm/graaljs/releases)
- [Changelog](https://github.com/oracle/graaljs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/graalvm/graaljs/commits)

---
updated-dependencies:
- dependency-name: org.graalvm.sdk:graal-sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.graalvm.js:js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 22:45:09 +00:00
dependabot[bot]
33f19ecaf3 Bump org.springframework.data:spring-data-bom from 2023.0.6 to 2023.0.9 (#8917)
Bumps [org.springframework.data:spring-data-bom](https://github.com/spring-projects/spring-data-bom) from 2023.0.6 to 2023.0.9.
- [Release notes](https://github.com/spring-projects/spring-data-bom/releases)
- [Commits](https://github.com/spring-projects/spring-data-bom/compare/2023.0.6...2023.0.9)

---
updated-dependencies:
- dependency-name: org.springframework.data:spring-data-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 22:44:49 +00:00
dependabot[bot]
34d07a7733 Bump org.jruby:jruby-complete from 9.4.3.0 to 9.4.5.0 (#8915)
Bumps org.jruby:jruby-complete from 9.4.3.0 to 9.4.5.0.

---
updated-dependencies:
- dependency-name: org.jruby:jruby-complete
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 22:41:36 +00:00
dependabot[bot]
9b8d9d6532 Bump org.apache.camel:camel-bom from 3.20.8 to 3.20.9 (#8920)
Bumps org.apache.camel:camel-bom from 3.20.8 to 3.20.9.

---
updated-dependencies:
- dependency-name: org.apache.camel:camel-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 22:39:53 +00:00
dependabot[bot]
ddb4e1527f Bump io.micrometer:micrometer-bom from 1.11.6 to 1.11.9 (#8925)
Bumps [io.micrometer:micrometer-bom](https://github.com/micrometer-metrics/micrometer) from 1.11.6 to 1.11.9.
- [Release notes](https://github.com/micrometer-metrics/micrometer/releases)
- [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.11.6...v1.11.9)

---
updated-dependencies:
- dependency-name: io.micrometer:micrometer-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 22:39:36 +00:00
dependabot[bot]
0569e32703 Bump org.springframework.retry:spring-retry from 2.0.4 to 2.0.5 (#8921)
Bumps [org.springframework.retry:spring-retry](https://github.com/spring-projects/spring-retry) from 2.0.4 to 2.0.5.
- [Release notes](https://github.com/spring-projects/spring-retry/releases)
- [Commits](https://github.com/spring-projects/spring-retry/compare/v2.0.4...v2.0.5)

---
updated-dependencies:
- dependency-name: org.springframework.retry:spring-retry
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 22:39:21 +00:00
dependabot[bot]
9efc1f4c96 Bump org.codelibs:jcifs from 2.1.36 to 2.1.37 (#8923)
Bumps [org.codelibs:jcifs](https://github.com/codelibs/jcifs) from 2.1.36 to 2.1.37.
- [Commits](https://github.com/codelibs/jcifs/compare/jcifs-2.1.36...jcifs-2.1.37)

---
updated-dependencies:
- dependency-name: org.codelibs:jcifs
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 22:38:25 +00:00
Artem Bilan
1400822d5b Upgrade reusable workflows to the latest 2024-02-16 17:24:14 -05:00
Artem Bilan
3695e6bbd1 Migrate from findbugs to spotbugs 2024-02-16 15:05:19 -05:00
Artem Bilan
9babe5cd65 Make PR & Dependabot WFs working against support branches
(cherry picked from commit 1f4d27d71f)

# Conflicts:
#	.github/workflows/merge-dependabot-pr.yml
2024-02-16 14:58:43 -05:00
Artem Bilan
116284af91 Add auto-cherry-pick.yml GHA workflow
**Auto-cherry-pick to `6.1.x`**
2024-02-08 15:46:16 -05:00
Václav Haisman
5ea36e42c9 Fix LogMessage placeholders in MqttHeaderMapper
Fixes: #8888

* Fix `LogMessage` formatting placeholders in `MqttHeaderMapper`

**cherry-pick to `6.2.x` & `6.1.x`

(cherry picked from commit 8b877fc887)
2024-02-07 11:01:43 -05:00
Václav Haisman
9ad3991adc GH-8879: Add MQTT subscription identifier
Fixes: #8879

To work around the problem with `$share/` subscriptions the `Mqttv5PahoMessageDrivenChannelAdapter` must provide a `subscriptionIdentifier` into `MqttProperties` on `subscribe()`

* Introduce a `Mqttv5PahoMessageDrivenChannelAdapter.subscriptionIdentifierCounter` according to the MQTT specification:
> 3.8.2.1.2 Subscription Identifier: [..]The Subscription Identifier is associated with any subscription created or modified as the result of this SUBSCRIBE packet. If there is a Subscription Identifier, it is stored with the subscription.

This one is associated with the MQTT session for the current subscriber and does not interfere into other sessions even if identifier is same from the counter.
It works because the Subscription identifier is per session and because you cannot have multiple connection with the same client ID.

**Cherry-pick to `6.2.x` & `6.1.x`**
# Conflicts:
#	spring-integration-mqtt/src/main/java/org/springframework/integration/mqtt/inbound/Mqttv5PahoMessageDrivenChannelAdapter.java
2024-02-02 15:15:10 -05:00
Artem Bilan
5996db5a9a GH-8873: Fix on-demand subscription for MQTT v5
Fixes: #8873

The `mqttClient.subscribe()` API does not check if properties are provided and fails on the
`subscriptionProperties.getSubscriptionIdentifiers().get(0)` call with an `IndexOutOfBoundsException`

* Use another `mqttClient.subscribe()` API in the `Mqttv5PahoMessageDrivenChannelAdapter` where there is not such a check
* Ensure that `addTopic(NAME)` works as expected in the `Mqttv5BackToBackTests`

**Cherry-pick to `6.2.x` & `6.1.x`**

# Conflicts:
#	spring-integration-mqtt/src/main/java/org/springframework/integration/mqtt/inbound/Mqttv5PahoMessageDrivenChannelAdapter.java
2024-01-30 17:09:54 -05:00
Neville Bonavia
00bd3d86aa GH-8869: Fix NPE in RedisLockRegistry.setExecutor
Fixes: #8869

Do not set the `redisMessageListenerContainer`'s executor in the setter method
since the Redis Message Listener container is not initialised during configuration due to lazy loading

**Cherry-pick to `6.2.x` & `6.0.x`**

(cherry picked from commit 62fd3e6c20)
2024-01-30 13:02:55 -05:00
Artem Bilan
0f402ca2e6 GH-8852: Fix TcpNetServerConnectionFactory.run loop
Fixes: #8852

The `while (true) {` causes the thread to be blocked forever.
The `stop()` waits on the `if (!executorService.awaitTermination(10, TimeUnit.SECONDS)) {` the whole time

* Fix with the `while (isActive()) {`
* Remove the `ConnectionFactoryTests.testEarlyCloseNet()` since we cannot reach expectations because of
race condition between `start()` and `stop()`

**Cherry-pick to `6.2.x` & `6.1.x`**

(cherry picked from commit 0b60dfc9d1)
2024-01-05 15:54:44 -05:00
Artem Bilan
383361a32a Migrate GHAs for repo from Spring IO org
**Cherry-pick to `6.1.x`**

(cherry picked from commit 075613c4a1)
2023-12-20 17:05:01 -05:00
Roman Zabaluev
ec707e71fa GH-8803: RedisLockRegistry: Log for lock acquired
Fixes: #8803

Would be great to have an `Acquired lock; RedisLock...`  logging message as we already have `Released lock; RedisLock ...`

* Improve `RedisLockRegistry.RedisLock.tryRedisLock()` to emit `Acquired lock; RedisLock...` debug message

**Cherry-pick to `6.0.x`**

(cherry picked from commit 9bd8001a61)
2023-12-11 17:07:00 -05:00
Artem Bilan
8c18dc553a Rework verify staging WF for Gradle init script
* Fix verify staging WF without JFrog
* Use `ARTIFACTORY` secrets for `libs-staging-local`

**Cherry-pick to `6.1.x`**
2023-12-07 18:04:36 -05:00
Artem Bilan
ff57907efc Add new line in the end of FileTailMessProdTests
**Cherry-pick to `6.1.x`**

(cherry picked from commit 940ec888f7)
2023-12-06 13:27:52 -05:00
Artem Bilan
5beb1bd9d2 Remove unused imports from FileTailMessProdTests
The Checkstyle violation for unused imports in the `FileTailingMessageProducerTests`
Leftover from the previous fix for this class

**Cherry-pick to `6.1.x`**

(cherry picked from commit a6f826e1cf)
2023-12-06 13:12:30 -05:00
Artem Bilan
961d769f09 Add backport-issue.yml GHA workflow
(cherry picked from commit 6d2bf330d1)
2023-12-06 12:57:28 -05:00
Artem Bilan
1151cc7c32 Fix FileTailingMessProducerTests for tail events
The `OSDelegatingFileTailingMessageProducer` publishes event from scheduled task

* Modify `FileTailingMessageProducerTests.testGuts()` to use `CountDownLatch`
to wait for those asynchronous events

**Cherry-pick to `6.1.x`**

(cherry picked from commit a3d347eddd)
2023-12-06 12:56:52 -05:00
Artem Bilan
0531832a0e GH-8800: Fix SMB Gateway for recursive MGET
Fixes: gh-8800

The `SmbFile.getName()` returns plain file name, not with a
sub-directory as it is expected by the `AbstractRemoteFileOutboundGateway`
for (S)FTP protocols

* Introduce `AbstractRemoteFileOutboundGateway.getFullFileName()`
with dir and file name concatenation by default (as it was before)
and override it in the `SmbOutboundGateway` to return the full path according this protocol.
* Fix `SmbOutboundGateway.enhanceNameWithSubDirectory()` to return an `SmbFile` instance
since it has all the info about remote file, include requested directory
* Fix `SmbOutboundGateway.getFilename()` to remove the trailing `/` in the dir name
since this is not what expected by the `AbstractRemoteFileOutboundGateway` logic

**Cherry-pick to `6.1.x`**
2023-12-06 18:06:40 +01:00
Artem Bilan
45a32cf13c Add explicit ref to verify-staged-artifacts.yml
**Cherry-pick to `6.1.x`**

(cherry picked from commit 9f7acd7d9d)
2023-12-01 17:35:23 -05:00
Artem Bilan
0d85f2a464 Migrate CI/CD to GitHub Actions
* Remove JFrog plugin since it is supplied from CI/CD by Gradle init script
* Remove Sonar and Jacoco since we don't manage those service anymore

# Conflicts:
#	.github/release-files-spec.json
#	.github/workflows/central-sync-close.yml
#	.github/workflows/central-sync-create.yml
#	.github/workflows/central-sync-release.yml
#	.github/workflows/ci-snapshot.yml
#	.github/workflows/pr-build-workflow.yml
#	build.gradle
2023-12-01 17:15:57 -05:00
Spring Builds
b4dd400d13 [artifactory-release] Next development version 2023-11-21 19:58:46 +00:00
Spring Builds
590d701fa3 [artifactory-release] Release version 6.1.5 2023-11-21 19:58:43 +00:00
Artem Bilan
ed1bfc6d45 Upgrade to Spring GraphQL 1.2.4 2023-11-21 13:26:26 -05:00
Artem Bilan
c4e30a0b54 Revert to SSHD 2.9.2
The Apache `sshd-core-2.9.3` has some breaking changing for path resolution in Linux
2023-11-20 17:10:26 -05:00
Artem Bilan
5cb99d32e7 Fix Spring Data version 2023-11-20 15:56:54 -05:00
Artem Bilan
fb913e194f Upgrade dependencies; prepare for release 2023-11-20 15:47:57 -05:00
Artem Bilan
5d93c6ae6c GH-8792: Fix File StreamingMS for one file filter
Fixes https://github.com/spring-projects/spring-integration/issues/8792

1. Use a `SftpStreamingMessageSource` with a `maxFetchSize = 5` and a `ChainFileListFilter` filter composed with
`SftpSystemMarkerFilePresentFileListFilter` which `supportsSingleFileFiltering == false`
2. Put 2 files in the folder and invoke `SftpStreamingMessageSource.receive()` method twice.
3. Put 5 files in the folder and invoke `SftpStreamingMessageSource.receive()`` method five times.
4. The last two files won't be received.

When you set max fetch size to a number bigger than one (for example 5) and at a certain point
it is necessary to `this.toBeReceived.clear()` inside `AbstractRemoteFileStreamingMessageSource.doReceive()`,
those removed elements from toBeReceived are not rolled back.

* Fix `AbstractRemoteFileStreamingMessageSource.listFiles()` to calculate `maxFetchSize` as `getMaxFetchSize() - this.fetched.get()`

**Cherry-pick to `6.1.x`, `6.0.x` & `5.5.x`**

(cherry picked from commit 22c4db291b)
2023-11-17 16:40:02 -05:00
Gary Russell
ef2575a751 Increase Timeouts in FTP RotatingServersTests
Some unknown delays on MacOS cause the tests to fail.
2023-11-14 09:25:58 +01:00
Artem Bilan
9227acd732 GH-8786: Make FtpSession.finalizeRaw() robust
Fixes https://github.com/spring-projects/spring-integration/issues/8786

If `FtpSession.readRaw()` fails, the next `FtpSession.finalizeRaw()` call
would lead to `FTPClient.completePendingCommand()` failure since
there is no command to finish.

* Fix `FtpSession.finalizeRaw()` to exit earlier positively in case of
`FTPReply.isNegativePermanent()` for the current reply code set by the failure
from a previous `FtpSession.readRaw()`

**Cherry-pick to `6.1.x`, `6.0.x` & `5.5.x`**
2023-11-14 09:10:22 +01:00
Artem Bilan
59df2b9110 GH-8785: Propagate WebSocket client connect fail
Fixes https://github.com/spring-projects/spring-integration/issues/8785

The `ClientWebSocketContainer.start()` delegates to the `IntegrationWebSocketConnectionManager`
which performs an async connection to the server.

* Wait for `connectionLatch` in the `ClientWebSocketContainer.start()`
and check for `this.openConnectionException != null` to re-throw.
Mark `ClientWebSocketContainer` as stopped in that case

**Cherry-pick to `6.1.x` & `6.0.x`**

# Conflicts:
#	spring-integration-websocket/src/main/java/org/springframework/integration/websocket/ClientWebSocketContainer.java
2023-11-09 10:30:12 -05:00
Artem Bilan
72ce758593 Fix KV store for group-to-message relationship
The `this.messagePrefix + groupId + '_' + messageId` logic
is introduced since `6.2` via: 64f8ed5bab

The current fix for new `getMessageFromGroup()` and `removeMessageFromGroupById()`
is to retrieve group and then perform plain `get` and `delete` against just message id

Related to: https://github.com/spring-projects/spring-integration/issues/8773
2023-11-03 17:09:37 -04:00
Artem Bilan
cf5427f87d GH-8773: Fix MGS for removal from group
Fixes https://github.com/spring-projects/spring-integration/issues/8773

The https://github.com/spring-projects/spring-integration/issues/8732 introduced a filtering for messages in group.
So, plain `removeMessage()` doesn't work any more if message is connected to some group yet.
Therefore, `DelayHandler` is failing.

* Introduce `getMessageFromGroup()` and `removeMessageFromGroupById()` into `MessageGroupStore` API
and implement it respectively in all the stores
* Remove `@LongRunningTest` from delayer integration tests and adjust its config to delay not for a long

**Cherry-pick to `6.1.x`**

# Conflicts:
#	spring-integration-core/src/main/java/org/springframework/integration/handler/DelayHandler.java
2023-11-03 16:39:28 -04:00
Artem Bilan
8cdead4a44 GH-8778: Fix KafkaMessageSource deadlock (#8780)
* GH-8778: Fix KafkaMessageSource deadlock

Fixes https://github.com/spring-projects/spring-integration/issues/8778

The `KafkaMessageSource.doReceive()` have a lock around its whole body.
That includes the `pollRecord()` which can be blocked on the `KafkaConsumer.poll()`.
This way the rest of lifecycle management callbacks can be blocked until `KafkaConsumer.poll()` returns.

* Rework lifecycle management flags to `AtomicBoolean` since there is not too much work
in their respective callbacks
* Decrease a locking block in the `doReceive()` just to consumer setup part.
Leave `pollRecord()` outside of the lock
* Add `this.consumer.wakeup()` into `stopConsumer()` to break a `poll()` cycle
and return immediately for the next `close()` call

**Cherry-pick to `6.1.x` & `6.0.x`**

* * Use `compareAndSet` in `start` & `stop`
2023-10-26 15:34:04 -04:00
Artem Bilan
6ec2b88e1b GH-8779: MongoDbMS Fix distinct result conversion (#8781)
Fixes https://github.com/spring-projects/spring-integration/issues/8779

The `MongoTemplate` has now a `findDistinct()` API with a smart
result conversion instead of native driver plain expectations

**Cherry-pick to `6.1.x` & `6.0.x`**
2023-10-26 15:29:30 -04:00
Artem Bilan
991d29eb15 KafkaMessageSource: Lock instead of synchronized
Related to https://github.com/spring-projects/spring-integration/issues/8778

**Cherry-pick to `6.0.x`**
2023-10-26 13:28:40 -04:00
Artem Bilan
91e806afc5 GH-8770: Add PostgresSubsChannel.errorHandler (#8777)
* GH-8770: Add `PostgresSubsChannel.errorHandler`

Fixes https://github.com/spring-projects/spring-integration/issues/8770

The problem with the `PostgresSubscribableChannel.notifyUpdate()` is that the try-catch block is outside the loop,
so the loop will die on an exception, leaving further messages unprocessed.

* Add ``PostgresSubscribableChannel.errorHandler` option to be invoked
after a `RetryTemplate` and for every failed message.
* The `askForMessage()` new logic is to catch an exception on a message and call `errorHandler`
returning a `FALLBACK_STUB` to continue an outer loop in the `notifyUpdate()`

**Cherry-pick to `6.1.x` & `6.0.x`**

* * Rename private `PostgresSubscribableChannel.askForMessage()` method to more specific `pollAndDispatchMessage()`
2023-10-25 13:28:37 -04:00
Artem Bilan
4907316c4d Fix PostgresSubscribableChannel race condition
The `PostgresSubscribableChannel` uses a task executor
for dispatching messages.
Even if we stop `PostgresChannelMessageTableSubscriber` and
unsubscribe from the channel, the task might be ongoing.

* Use explicit `ThreadPoolTaskExecutor` in the test
to shout it down and wait for tasks to be completed before
verifying DB status
* Optimize `PostgresSubscribableChannel` to mark TX for rollback
when we got a message from DB, but no handlers subscribed

# Conflicts:
#	spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/channel/PostgresChannelMessageTableSubscriberTests.java
2023-10-25 09:56:21 -04:00
Spring Builds
7c2e8c47ec [artifactory-release] Next development version 2023-10-17 15:21:02 +00:00
Spring Builds
db3249a310 [artifactory-release] Release version 6.1.4 2023-10-17 15:20:53 +00:00
Artem Bilan
3fc372b68e Update dependencies; prepare for release
* Adapt AMQP module for the latest Spring AMQP changes
2023-10-17 10:09:11 -04:00
Christian Tzolov
68f977a588 Streamline UUIDConverter
* Use `StandardCharsets.UTF_8` as a charset configuration instead of string.
   Later remove the necessity of handling encoder errors.
* Use regular expressions to validate the `UUID` string standard representation.
   Later obsolete the need for try/catch exceptions.
* Deprecate `UUIDConverter.DEFAULT_CHARSET` since it is out of use.

**Cherry-pick to `6.1.x` & `6.0.x`**

Code clean up for `UUIDConverter`
2023-10-16 14:14:29 -04:00