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

Bump okhttp-eventsource from 2.3.1 to 4.1.0 #134

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 10, 2023

Bumps okhttp-eventsource from 2.3.1 to 4.1.0.

Release notes

Sourced from okhttp-eventsource's releases.

4.1.0

[4.1.0] - 2023-01-09

This release is identical to 4.0.1. It exists for Semantic Versioning compliance: a new API was added (the StreamClosedWithIncompleteMessageException class) since 4.0.0, therefore the next version number should have been 4.1.0 rather than 4.0.1.

4.0.1

[4.0.1] - 2023-01-09

Added:

  • StreamClosedWithIncompleteMessageException (see below).

Fixed:

  • When using streaming data mode (see EventSource.Builder.streamEventData), if the stream connection was lost before the MessageEvent was fully read-- that is, before encountering a blank line-- the Reader returned by MessageEvent.getDataReader() was treating this as a regular EOF condition. That was incorrect; the SSE specification says that in such a case, the incomplete message is invalid and its contents should not be used. Therefore, in this case reading from the Reader will throw a StreamClosedWithIncompleteMessageException. The caller should handle this by simply throwing away the MessageEvent.

4.0.0

[4.0.0] - 2022-12-19

This release revises the implementation of EventSource so that it does not create its own worker threads. The methods for starting and reading a stream now perform synchronous I/O, and the caller is responsible for choosing what thread to start the stream and read the stream on. This makes the core implementation simpler and more efficient, and reduces possibilities for deadlock. If you want to continue using the old asynchronous push model, see the com.launchdarkly.eventsource.background package.

The configuration API has also been revised to separate out the HTTP functionality and the backoff/retry logic into subcomponents which can be customized or replaced.

Added:

  • EventSource methods readMessage(), readAnyEvents(), messages(), and anyEvents() for synchronously reading events.
  • EventSource.Builder(ConnectStrategy) constructor and the ConnectStrategy and HttpConnectStrategy classes, for customizing connection parameters.
  • EventSource.Builder(URI), (URL), and (HttpUrl) constructors, as shortcuts for minimal HTTP configuration.
  • EventSource.Builder.errorStrategy and the ErrorStrategy class, for customizing error recovery behavior.
  • EventSource.Builder.retryDelayStrategy and the RetryDelayStrategy and DefaultRetryDelayStrategy classes, for customizing or replacing backoff/jitter behavior.
  • StreamEvent, CommentEvent, StartedEvent, and FaultEvent classes, representing types of information other than MessageEvent that you can read synchronously from the stream.
  • The com.launchdarkly.eventsource.background package, containing the BackgroundEventSource wrapper for emulating the old push model.

Changed:

  • EventSource.Builder.restart is renamed to interrupt, to clarify that the restarting of the stream is not done immediately but only happens if you continue trying to read events after interrupt().
  • EventSource.Builder.backoffResetThreshold is renamed to retryDelayResetThreshold, to clarify that it applies to whatever kind of RetryDelayStrategy is being used even if that is not the default backoff strategy.
  • EventSource.Builder.reconnectTime is renamed to retryDelay, to clarify that it is describing a duration rather than a moment in time.
  • UnsuccessfulResponseException is renamed to StreamHttpErrorException, to clarify that it is specifically referring to an HTTP response with an error status.
  • The implementation of streamEventData mode is now simpler and no longer uses PipedInputStream and PipedOutputStream internally.

Removed:

  • ConnectionHandler and EventSource.Builder.connectionHandler(): replaced by ErrorStrategy.
  • EventHandler and the EventSource.Builder(URI, EventHandler) constructor: replaced by BackgroundEventHandler if you are using BackgroundEventSource.
  • EventSource.Builder methods connectTimeout, readTimeout, writeTimeout, method, body, headers, proxy, proxyAuthenticator, and requestTransformer: replaced by methods in HttpConnectStrategy.
  • EventSource.Builder.maxReconnect: replaced by DefaultRetryDelayStrategy.maxDelay.
  • EventSource.Builder.maxEventTasksInFlight: replaced by an equivalent option in BackgroundEventSource.

3.0.0

[3.0.0] - 2022-12-02

This release expands compatibility of the library with Android by removing Java 8 API usages that are not always available in Android. In effect, it restores the broader compatibility of the 1.x version while preserving the other API/functionality improvements that were added in 2.x. It also removes the previous dependency on SLF4J.

Changed:

  • Every EventSource and EventSource method that previously took a java.time.Duration parameter now takes (long, TimeUnit) parameters instead. This is to allow the library to be used from Android code on older platform versions that do not support the java.time types. It undoes an API change that was made in the 2.0.0 release.
  • SLF4J is no longer a dependency. Logging is done entirely through the com.launchdarkly.logging facade; see EventSource.Builder.logger.
  • Previously, if no logging destination was specified, the default behavior was to send log output to SLF4J. Now, the default behavior is to do no logging. If you still want to use SLF4J, do this (for "log.name", substitute whatever you want the logger name to be in SLF4J):

... (truncated)

Changelog

Sourced from okhttp-eventsource's changelog.

[4.1.0] - 2023-01-09

This release is identical to 4.0.1. It exists for Semantic Versioning compliance: a new API was added (the StreamClosedWithIncompleteMessageException class) since 4.0.0, therefore the next version number should have been 4.1.0 rather than 4.0.1.

[4.0.1] - 2023-01-09

Added:

  • StreamClosedWithIncompleteMessageException (see below).

Fixed:

  • When using streaming data mode (see EventSource.Builder.streamEventData), if the stream connection was lost before the MessageEvent was fully read-- that is, before encountering a blank line-- the Reader returned by MessageEvent.getDataReader() was treating this as a regular EOF condition. That was incorrect; the SSE specification says that in such a case, the incomplete message is invalid and its contents should not be used. Therefore, in this case reading from the Reader will throw a StreamClosedWithIncompleteMessageException. The caller should handle this by simply throwing away the MessageEvent.

[4.0.0] - 2022-12-19

This release revises the implementation of EventSource so that it does not create its own worker threads. The methods for starting and reading a stream now perform synchronous I/O, and the caller is responsible for choosing what thread to start the stream and read the stream on. This makes the core implementation simpler and more efficient, and reduces possibilities for deadlock. If you want to continue using the old asynchronous push model, see the com.launchdarkly.eventsource.background package.

The configuration API has also been revised to separate out the HTTP functionality and the backoff/retry logic into subcomponents which can be customized or replaced.

Added:

  • EventSource methods readMessage(), readAnyEvents(), messages(), and anyEvents() for synchronously reading events.
  • EventSource.Builder(ConnectStrategy) constructor and the ConnectStrategy and HttpConnectStrategy classes, for customizing connection parameters.
  • EventSource.Builder(URI), (URL), and (HttpUrl) constructors, as shortcuts for minimal HTTP configuration.
  • EventSource.Builder.errorStrategy and the ErrorStrategy class, for customizing error recovery behavior.
  • EventSource.Builder.retryDelayStrategy and the RetryDelayStrategy and DefaultRetryDelayStrategy classes, for customizing or replacing backoff/jitter behavior.
  • StreamEvent, CommentEvent, StartedEvent, and FaultEvent classes, representing types of information other than MessageEvent that you can read synchronously from the stream.
  • The com.launchdarkly.eventsource.background package, containing the BackgroundEventSource wrapper for emulating the old push model.

Changed:

  • EventSource.Builder.restart is renamed to interrupt, to clarify that the restarting of the stream is not done immediately but only happens if you continue trying to read events after interrupt().
  • EventSource.Builder.backoffResetThreshold is renamed to retryDelayResetThreshold, to clarify that it applies to whatever kind of RetryDelayStrategy is being used even if that is not the default backoff strategy.
  • EventSource.Builder.reconnectTime is renamed to retryDelay, to clarify that it is describing a duration rather than a moment in time.
  • UnsuccessfulResponseException is renamed to StreamHttpErrorException, to clarify that it is specifically referring to an HTTP response with an error status.
  • The implementation of streamEventData mode is now simpler and no longer uses PipedInputStream and PipedOutputStream internally.

Removed:

  • ConnectionHandler and EventSource.Builder.connectionHandler(): replaced by ErrorStrategy.
  • EventHandler and the EventSource.Builder(URI, EventHandler) constructor: replaced by BackgroundEventHandler if you are using BackgroundEventSource.
  • EventSource.Builder methods connectTimeout, readTimeout, writeTimeout, method, body, headers, proxy, proxyAuthenticator, and requestTransformer: replaced by methods in HttpConnectStrategy.
  • EventSource.Builder.maxReconnect: replaced by DefaultRetryDelayStrategy.maxDelay.
  • EventSource.Builder.maxEventTasksInFlight: replaced by an equivalent option in BackgroundEventSource.

[3.0.0] - 2022-12-02

This release expands compatibility of the library with Android by removing Java 8 API usages that are not always available in Android. In effect, it restores the broader compatibility of the 1.x version while preserving the other API/functionality improvements that were added in 2.x. It also removes the previous dependency on SLF4J.

Changed:

  • Every EventSource and EventSource method that previously took a java.time.Duration parameter now takes (long, TimeUnit) parameters instead. This is to allow the library to be used from Android code on older platform versions that do not support the java.time types. It undoes an API change that was made in the 2.0.0 release.
  • SLF4J is no longer a dependency. Logging is done entirely through the com.launchdarkly.logging facade; see EventSource.Builder.logger.
  • Previously, if no logging destination was specified, the default behavior was to send log output to SLF4J. Now, the default behavior is to do no logging. If you still want to use SLF4J, do this (for "log.name", substitute whatever you want the logger name to be in SLF4J):
// import com.launchdarkly.logging.*;
// EventSource.Builder builder =
//   new EventSource.Builder(myHandler, streamUri);
</tr></table> 

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [okhttp-eventsource](https://github.com/launchdarkly/okhttp-eventsource) from 2.3.1 to 4.1.0.
- [Release notes](https://github.com/launchdarkly/okhttp-eventsource/releases)
- [Changelog](https://github.com/launchdarkly/okhttp-eventsource/blob/main/CHANGELOG.md)
- [Commits](launchdarkly/okhttp-eventsource@2.3.1...4.1.0)

---
updated-dependencies:
- dependency-name: com.launchdarkly:okhttp-eventsource
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants