# Gatling 2.0.0-M3a to 2.0-SNAPSHOT migration

**URL:** https://community.gatling.io/t/gatling-2-0-0-m3a-to-2-0-snapshot-migration/879
**Category:** Gatling (Open-Source)
**Created:** [March 15, 2014, 6:45pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3a-to-2-0-snapshot-migration/879 "2014-03-15T18:45:02Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![Dmytro\_Makhno](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@Dmytro\_Makhno](https://community.gatling.io/u/Dmytro_Makhno)
#### Post date: [March 15, 2014, 6:45pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3a-to-2-0-snapshot-migration/879/1 "2014-03-15T18:45:02Z")

</div>

Hello,

Where I can find the list of changes that expected in M3b or M4a?

Already I found some surprises, just wanted to have an eye on them.  
What I see is:

- CONF\_CORE\_TIMEOUT\_ACTOR - this setting is eliminated, and I cannot find quick replacement of this. (I use custom non-http actions, and this timeout was pretty useful)
- DataWriter.tell is now implemented in trait DataWriterClient by writeRequestData
- **many more errors** in compilation. And want to migrate my code as robust as possible.

Do you have some quick “change log” of backward incompatible changes and suggestions how to cope with them?

Thanks in advance,  
Dmytro

---

<div class="post-metadata">

### Author: ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)
#### Post date: [March 15, 2014, 8:40pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3a-to-2-0-snapshot-migration/879/2 "2014-03-15T20:40:00Z")

</div>

> Hello,
> 
> Where I can find the list of changes that expected in M3b or M4a?
> 
> Already I found some surprises, just wanted to have an eye on them.  
> What I see is:  
> - CONF\_CORE\_TIMEOUT\_ACTOR - this setting is eliminated, and I cannot find  
> quick replacement of this. (I use custom non-http actions, and this timeout  
> was pretty useful)

Most actors are shared and not related to a given request, so it didn't  
make sense to time them out before timing out the simulation.

If you spawn one actor instance per request, you then have to define your  
own. If you depend on an underlying client library, there's a good chance  
that it has a timeout too, so you have to sync them.

> - DataWriter.tell is now implemented in trait DataWriterClient by  
> writeRequestData  
> - \*many more errors\* in compilation. And want to migrate my code as  
> robust as possible.
> 
> Do you have some quick "change log" of backward incompatible changes and  
> suggestions how to cope with them?

Up until know, our documentation was a Github wiki.  
This wiki is great as a starter, but very limited once a project grows:

&nbsp;&nbsp;&nbsp;- community can't help fix documentation with Pull Requests  
&nbsp;&nbsp;&nbsp;- it cannot display multiple versions (like one per branch and tag).

This last point made difficult for use to write the documentation as soon  
as we committed a change.

We're now in the process of migrating the documentation to sphinx, so we'll  
be able to host multiple versions.  
In short: we'll be better on this.

Now, regarding your own protocol support, we can help if we can have a look  
at your code. It would be great if it was hosted on Github.

Cheers,

Stéphane

---

<div class="post-metadata">

### Author: ![Dmytro\_Makhno](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@Dmytro\_Makhno](https://community.gatling.io/u/Dmytro_Makhno)
#### Post date: [March 16, 2014, 1:27pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3a-to-2-0-snapshot-migration/879/3 "2014-03-16T13:27:30Z")

</div>

Unfortunately I cannot show you, this is product specific actions for akka-based product.

If you don’t mind, I’ll post here questions regarded to migration:

1. 

What I’m stub now is  
[https://github.com/excilys/gatling/blob/master/gatling-core/src/main/scala/io/gatling/core/action/builder/ActionBuilder.scala](https://github.com/excilys/gatling/blob/master/gatling-core/src/main/scala/io/gatling/core/action/builder/ActionBuilder.scala)  
have private methods now.

But I have code:

```auto

class DestroyInstanceBuilder(name: Expression[String])(implicit api: ClientApi) extends ActionBuilder {
override def build(next: ActorRef): ActorRef = {
system.actorOf(Props(new DestroyInstanceAction(name, next)))
}
}

```

where I cannot use `build` now since it is private for not gatling namespace.

---

<div class="post-metadata">

### Author: ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)
#### Post date: [March 16, 2014, 1:41pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3a-to-2-0-snapshot-migration/879/4 "2014-03-16T13:41:12Z")

</div>

private modifier removed

---

<div class="post-metadata">

### Author: ![Dmytro\_Makhno](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@Dmytro\_Makhno](https://community.gatling.io/u/Dmytro_Makhno)
#### Post date: [March 16, 2014, 2:22pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3a-to-2-0-snapshot-migration/879/5 "2014-03-16T14:22:21Z")

</div>

wow, this was quick, thanks.

---

<div class="post-metadata">

### Author: ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)
#### Post date: [March 16, 2014, 3:49pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3a-to-2-0-snapshot-migration/879/6 "2014-03-16T15:49:02Z")

</div>

You’re welcome.

Those APIs weren’t public in Gatling 1, and Gatling 2 aims at cleaning them so they can be made public and people can extend them, so any feedback is welcome 🙂

---

<div class="post-metadata">

### Author: ![Dmytro\_Makhno](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@Dmytro\_Makhno](https://community.gatling.io/u/Dmytro_Makhno)
#### Post date: [March 16, 2014, 4:16pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3a-to-2-0-snapshot-migration/879/7 "2014-03-16T16:16:04Z")

</div>

I don’t have experience in 1, I just did something that worked on 2.0.M3a, but have a terrible issue (I don’t understand root cause [https://github.com/excilys/gatling/issues/1316](https://github.com/excilys/gatling/issues/1316)), that cause that reports are never generated in longer cases.  
And what is strange that those api used to be open in 2.0.M3a. Was a surprise.

_Some kind of feedback what I have now, would be nice to extend reports just with custom metrics due to time of testing. E.g. what was cpu, memory and jmx, maybe some specifics, I do know that this is not exactly client, but still, when we do short tests in sbt (server is a fork), it is just convenient to see what have happened with system and garbaging. Adding graphite or any other monitoring in this case, imho, overkill._

---

<div class="post-metadata">

### Author: ![Dmytro\_Makhno](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@Dmytro\_Makhno](https://community.gatling.io/u/Dmytro_Makhno)
#### Post date: [March 16, 2014, 7:03pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3a-to-2-0-snapshot-migration/879/8 "2014-03-16T19:03:45Z")

</div>

Stéphane,

1. 

I have

```nohighlight

class DestroyedCheck() extends Check[Map[RelativeComponentId, ComponentStatus]] {
override def check(statuses: Map[RelativeComponentId, ComponentStatus], session: Session)(implicit cache: mutable.Map[Any, Any]): Validation[Session] = {
if (statuses.isEmpty) session.success
else s"Components ${statuses.keys.mkString("'", "', '", "'") } are still alive".failure
}
}

```

I don’t understand what I should return to make “check” type of “Validation[Session =\> Session]”

Thanks in advance,  
Dmytro

---

<div class="post-metadata">

### Author: ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)
#### Post date: [March 16, 2014, 9:15pm UTC](https://community.gatling.io/t/gatling-2-0-0-m3a-to-2-0-snapshot-migration/879/9 "2014-03-16T21:15:08Z")

</div>

Hi,

In 2M3, checks were directly applied on the Session. Now, they produces changes to be applied on a Session.  
This change was necessary so that we can deal with asynchronous requests in a scatter-gather way.

In your case, you probably just have to change:  
if (statuses.isEmpty) identity.success // or maybe identity[Session].success if the compiler can’t guess the type

---

<div class="post-metadata">

### Author: ![Dmytro\_Makhno](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@Dmytro\_Makhno](https://community.gatling.io/u/Dmytro_Makhno)
#### Post date: [March 17, 2014, 12:59am UTC](https://community.gatling.io/t/gatling-2-0-0-m3a-to-2-0-snapshot-migration/879/10 "2014-03-17T00:59:06Z")

</div>

Thanks for a tip. Following did a compile magic:  
(identity[Session] \_).success

Provided internal comment to keep it memories. Would be nice to have some implicits, to have it nicer.

---

<div class="post-metadata">

### Author: ![Dmytro\_Makhno](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@Dmytro\_Makhno](https://community.gatling.io/u/Dmytro_Makhno)
#### Post date: [March 17, 2014, 1:07am UTC](https://community.gatling.io/t/gatling-2-0-0-m3a-to-2-0-snapshot-migration/879/11 "2014-03-17T01:07:59Z")

</div>

oh, load dsl was totally refactored and InjectionSupport introduced.

```auto
def ramp(users: UserNumber) becomes def rampUsers(users: Int)

```

less humman-like, but easier to understand. What was the goal of this? This seems used since api 1. 🙂

---

<div class="post-metadata">

### Author: ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)
#### Post date: [March 17, 2014, 6:15am UTC](https://community.gatling.io/t/gatling-2-0-0-m3a-to-2-0-snapshot-migration/879/12 "2014-03-17T06:15:15Z")

</div>

Because ramp(10 users) involved an implicit, and it broke several use cases, for example:

val nbUsers = Integer.getInteger(“systemPropName”, 1)

ramp(nbUsers users) // won’t compile because it would involve 2 implicits: one from java.lang.Integer to scala.Int, and one from Int to UserNumber

---

<div class="post-metadata">

### Author: ![Dmytro\_Makhno](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@Dmytro\_Makhno](https://community.gatling.io/u/Dmytro_Makhno)
#### Post date: [March 17, 2014, 8:52am UTC](https://community.gatling.io/t/gatling-2-0-0-m3a-to-2-0-snapshot-migration/879/13 "2014-03-17T08:52:59Z")

</div>

Pitty, seems I’ll need to backport 2.0.0-M3a to apply DataWriter fix.  
Everything caused due to we use akka 2.1.4 and gatling’s 2.2.4 causes runtime issues. I don’t quite understand how it is better to split Gatling and our Product in actors world, both akka-based.

Migration to 2.2.4 is on a roadmap, but too far comparing to the need have a performance tests.

---

<div class="post-metadata">

### Author: ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)
#### Post date: [March 17, 2014, 10:11am UTC](https://community.gatling.io/t/gatling-2-0-0-m3a-to-2-0-snapshot-migration/879/14 "2014-03-17T10:11:00Z")

</div>

Sorry to hear that.  
Akka 2.2.0 was released in June 2013, almost 10 months ago, so it’s quite natural that Gatling latest version targets at least this version.  
Actually, Akka 2.3.0 is already out, but we’re restraining from upgrading in 2M4 as some users mix Gatling and their own actors the way you do, but use Akka 2.2 and are not ready to upgrade to 2.3. 2M5 will target 2.3.

---

<div class="post-metadata">

### Author: ![Dmytro\_Makhno](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@Dmytro\_Makhno](https://community.gatling.io/u/Dmytro_Makhno)
#### Post date: [April 28, 2014, 7:19am UTC](https://community.gatling.io/t/gatling-2-0-0-m3a-to-2-0-snapshot-migration/879/15 "2014-04-28T07:19:58Z")

</div>

Stéphane,

Migration to new gatling snapshot went well.  
With gatling-sbt-plugin, this is amazing and simple.

Regards,  
Dmytro

---

<div class="post-metadata">

### Author: ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)
#### Post date: [April 28, 2014, 7:38am UTC](https://community.gatling.io/t/gatling-2-0-0-m3a-to-2-0-snapshot-migration/879/16 "2014-04-28T07:38:19Z")

</div>

Glad to hear!
