Skip to content

Conversation

bambuchaAdm
Copy link
Contributor

Implementation and test for #13970

@akka-ci
Copy link

akka-ci commented Jun 4, 2014

Can one of the repo owners verify this patch?

@ktoso
Copy link
Contributor

ktoso commented Jun 4, 2014

Thanks Łukasz!
Although I think it would be more awesome if we pursue what @viktorklang mentioned in the original issue - that stay() does not trigger a transition event, whereas /* in A*/ goto(A) does.

I think this PR will trigger on both cases? Would you try to work a bit more no this?
I expect that the DSL needs to be changed a little for this to work.

OK TO TEST

@ktoso ktoso self-assigned this Jun 4, 2014
@ktoso
Copy link
Contributor

ktoso commented Jun 4, 2014

Ok, this version does what we need it to.

I'm thinking if we could implement it without having to change API... Since it's val's we can't really return the same instance "but change the timeout" (this would have allowed us to check prevState eq currentState), but having a var would not be nice, hm hm. Let's sleep over it but in general looks ok.

Thanks for the contribution and organising the hacker garden, I'll ping you tomorrow about this PR :-)

@akka-ci
Copy link

akka-ci commented Jun 4, 2014

Can one of the repo owners verify this patch?

@ktoso
Copy link
Contributor

ktoso commented Jun 4, 2014

OK TO TEST
PLS BUILD

@patriknw
Copy link
Contributor

patriknw commented Jun 5, 2014

If we go with the change of FSM.State we should perhaps put the the extra field a second parameter list, to avoid breaking unapply and equals. That parameter can be private, I think. The user is not supposed to create instances of FSM.State?

@rkuhn
Copy link
Contributor

rkuhn commented Jun 5, 2014

@patriknw +1

LGTM otherwise

@rkuhn
Copy link
Contributor

rkuhn commented Jun 5, 2014

Ah, of course: this change will also need to be incorporated in the documentation (API docs and reference docs).

@ticktock
Copy link
Contributor

ticktock commented Jun 5, 2014

+1 though I welcome this change, I think it will likely break a lot of
folks who have done workaround to this, so should be
documented/communicated well.

On Thu, Jun 5, 2014 at 4:12 AM, Roland Kuhn notifications@github.com
wrote:

Ah, of course: this change will also need to be incorporated in the
documentation (API docs and reference docs).


Reply to this email directly or view it on GitHub
#15360 (comment).

Add basic information in migration guide. Add custom copy to prevents API.
@ktoso
Copy link
Contributor

ktoso commented Jun 8, 2014

PLS BUILD

@akka-ci
Copy link

akka-ci commented Jun 8, 2014

Pull request validation: SUCCESS 👍
Refer to this link for build results: https://jenkins.akka.io/job/pr-validator-per-commit-jenkins/171/

@ktoso
Copy link
Contributor

ktoso commented Jun 8, 2014

Cool. So this just needs docs in FSM, both java and scala, and the migration guide updated and we can merge it.

@patriknw
Copy link
Contributor

patriknw commented Jun 9, 2014

the second parameter list looks good

FSM notifies on same state trasisions
====================================
``FSM`` notifies their subscribers about state transitions. In ``2.3.x`` when an Actor is in state ``A`` and ``goto(A)`` is invoked,
no notifiaction will be send. In ``2.4.x`` FSMs send notifiaction about transisions which are done using ``goto()``.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/send/sent/

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typos:
notifiaction -> notification
transisions -> transitions

@@ -93,6 +95,36 @@ class FSMTransitionSpec extends AkkaSpec with ImplicitSender {
}
}

"send information of Transision when staying in same state" in {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"when goto() the same state", the use of the word "staying" implies we're testing stay

@ktoso
Copy link
Contributor

ktoso commented Jul 4, 2014

Docs in Internal monitoring should be updated to reflect this change too I think. We only explain it in external monitoring (less often used).

Code is OK, we need improve the docs still a bit though @bambuchaAdm.

@ktoso
Copy link
Contributor

ktoso commented Jul 18, 2014

Merging manually with typo fixes now, after agreeing to do so with @bambuchaAdm.

@ktoso
Copy link
Contributor

ktoso commented Jul 18, 2014

Squashed and will merge the fixed up commit in: #15561

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tested PR that was successfully built and tested by Jenkins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants