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

EventEnvelope unapply is broken in 2.6.2 and 2.5.28 #28532

Closed
nvollmar opened this issue Jan 28, 2020 · 3 comments
Closed

EventEnvelope unapply is broken in 2.6.2 and 2.5.28 #28532

nvollmar opened this issue Jan 28, 2020 · 3 comments
Assignees
Milestone

Comments

@nvollmar
Copy link
Contributor

@nvollmar nvollmar commented Jan 28, 2020

EventEnvelope's unapply for backwards compatibility is currently broken:

object EventEnvelope extends AbstractFunction4[Offset, String, Long, Any, EventEnvelope] {
def apply(offset: Offset, persistenceId: String, sequenceNr: Long, event: Any, timestamp: Long): EventEnvelope =
new EventEnvelope(offset, persistenceId, sequenceNr, event, timestamp)
@deprecated("for binary compatibility", "2.6.2")
override def apply(offset: Offset, persistenceId: String, sequenceNr: Long, event: Any): EventEnvelope =
new EventEnvelope(offset, persistenceId, sequenceNr, event)
def unapply(arg: EventEnvelope): Option[(Offset, String, Long, Any)] =
Some((arg.offset, arg.persistenceId, arg.sequenceNr, arg.timestamp))
}

The last parameter provided by unapply should be arg.event to be backwards compatible with Akka 2.6.1

@patriknw I think this is major bug as it breaks persistence query when the unapply is used and will not be catched by the compiler

@johanandren

This comment has been minimized.

Copy link
Member

@johanandren johanandren commented Jan 28, 2020

Ouch.

@patriknw

This comment has been minimized.

Copy link
Member

@patriknw patriknw commented Jan 28, 2020

um, that is really bad - thinking that we might have to cut a 2.6.3 right away

@patriknw patriknw added this to the 2.6.3 milestone Jan 28, 2020
@johanandren johanandren assigned nvollmar and unassigned johanandren Jan 28, 2020
@patriknw

This comment has been minimized.

Copy link
Member

@patriknw patriknw commented Jan 28, 2020

2.5.28 is equally broken because we backported that change. Will release 2.5.29 without announcing 2.5.28

@patriknw patriknw changed the title EventEnvelope unapply is broken in 2.6.2 EventEnvelope unapply is broken in 2.6.2 and 2.5.28 Jan 28, 2020
@patriknw patriknw modified the milestones: 2.6.3, 2.5.29 Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.