twitter-archive/ostrich

Scala 2.9.0.1 build

joa opened this issue · 26 comments

joa commented

It would be great to have a Scala 2.9.0.1 build of Ostrich available.

I would love to contribute a patch but I have no experience with sbt so the only JAR I got out of it was missing some class files for unknown reasons.

send me what you have, and i will try to get it working. is it just a matter of changing the scala version to 2.9.0 in build.properties?

joa commented

Hey Robey,

in fact I had to switch to a more recent SBT build to get it working. However as I said I have not much experience with SBT. So I would assume you do not have to upgrade.

I deleted the files already a long time ago but if it helps I can recreate what i have done.

Best,

Joa

I'll happily chip in with any help on this as it would be very useful to me.

d6y commented

This would be useful for us too. So I've started hacking on a fork, in a branch called scala29_specs...

https://github.com/d6y/ostrich/tree/scala29_specs1
Current status: compiles, but tests failing.

I started down the rabbit hole of checking dependent projects....

https://github.com/d6y/util/tree/scala29_specs1
Current status, just one failing test, but it's at a fundamental level: "Could not create an instance of com.twitter.util.FutureSpec"

joa commented

I try to get twitter-util compile using 2.9.1 today.
See my fork, com.twitter.util.FutureSpec compiles and all tests pass.

d6y commented

Thank you @joa - I've merged your changes into master on https://github.com/d6y/util

d6y commented

Status update: a couple of small commits just made to https://github.com/d6y/util and https://github.com/d6y/ostrich (master in both cases), and now both projects pass all specs tests and both will run publish-local successfully.

This is a bit of a surprise as Ostrich still depends on "com.twitter" % "json_2.8.1" % "2.1.6"

I'm having a few problems getting this build into an application for testing as the utils project is publishing to ~/.ivy2/local/com.twitter/ in one format and ostrich is publish-local into ~/.ivy2/local/com/twitter in a slightly different format.

joa commented

Just in time for the Scala 2.9.1.RC1 build ;)

I will upload the artifacts into my local Maven repository and see what happens.

joa commented

I still get an error with JsonStatsFetcherSpec but will see later.

'WrappedArray()' doesn't contain 'bugs=1' (JsonStatsFetcherSpec.scala:43)

d6y commented

Hi @joa - I'm seeing "Passed: : Total 129, Failed 0, Errors 0, Passed 129, Skipped 0". In sbt I ran: clean then clean-lib and then test.

joa commented

@d6y Still the same. But I guess it is json_stats_fetcher and my machine which is causing this issue.

src/scripts/json_stats_fetcher.rb:9:in `require': no such file to load -- rubygems (LoadError)
from src/scripts/json_stats_fetcher.rb:9

So not realted to the actual code I suppose.

Update: Fixed by installing Ruby and some Gems (whatever that means).

joa commented

@d6y I can confirm your build works for me just fine. Would be great if we could get this to maven.twttr.com :)

Hi!

I'm interested in new Ostrich version. I want to update it to use in sbt 0.11.0. There is someone who knows where can I found it?

Thank you!

Or.. if you are working on it, tell me please

d6y commented

Hello jamosa - @joa and I were able to get a 2.9 version building, but I personally wasn't able to get 2.9 packaging properly for maven/sbt, so I've had to stub out the Ostrich calls were were making and move on without it for the time being. Our work is in the d6y forked repositories (ostrich and util) mentioned above, but I suspect Ostrich and Util have both moved on. Good luck with your effort.

joa commented

I built the jars with the patched SBT project and uploaded them to my local Maven repository. Works but quite painful.

Joa, maybe your jar works in sbt 0.7, but I need to work with sbt 0.11.0

Hello Joa and d6y.

I downloaded your project from https://github.com/d6y/ostrich. I'm trying to compile and test it.
The results are the next:

[info] == test-finish ==
[error] Error: Total 127, Failed 4, Errors 4, Passed 119, Skipped 0

I don't know if the problem is mine. If you can help me, I will be grateful.

joa commented

@jamosa You can download and install SBT 0.7.x and build Ostrich with that version for Scala 2.9.0.1. When the build finished you can take the JAR, upload them to a local Maven repository and reference those artifacts via SBT 0.11.x or another Maven project.

I never used SBT so I cannot really help you. But since it supports Maven repositories it should also work for you.

d6y commented

Hello jamosa - what are the specific 4 errors? If they are related to #34 I can't help you. It seems I just happen to have the right Ruby and gems installed (no idea how, must be from something else I was working on).

The tests that fail are the next:

[info] == com.twitter.ostrich.stats.W3CStatsLoggerSpec ==
[error] x W3CStatsLogger should
[info] + log basic stats
[info] + log timings
[error] x log multiple lines

[error] x LatchedStatsListener instance should
[error] x latch to the top of a period
[error] 'Map()' is not equal to 'Map(counter -> 5)' (StatsListenerSpec.scala:162)

[info] == com.twitter.ostrich.stats.W3CStatsSpec ==
[error] x w3c Stats should
[info] + can be called manually
[info] + can be called transactionally
[info] + empty stats returns the empty string
[info] + logging a field not tracked in the fields member shouldn't show up in the logfile
[info] + sum counts within a transaction
[error] x logs metrics only once

And.. @joa, if I build the jar without passing all tests, the plugin could fail.

I try to build it and take the JAR but it also fail because the tests fails. Any ideas?

d6y commented

You've also need to build and installed (somehow) the dependent 2.9 version
of twitter util at: https://github.com/d6y/util

Not sure if you've done that too.

On 18 October 2011 08:23, jamosa <
reply@reply.github.com>wrote:

The tests that fail are the next:

[info] == com.twitter.ostrich.stats.W3CStatsLoggerSpec ==
[error] x W3CStatsLogger should
[info] + log basic stats
[info] + log timings
[error] x log multiple lines

[error] x LatchedStatsListener instance should
[error] x latch to the top of a period
[error] 'Map()' is not equal to 'Map(counter -> 5)'
(StatsListenerSpec.scala:162)

[info] == com.twitter.ostrich.stats.W3CStatsSpec ==
[error] x w3c Stats should
[info] + can be called manually
[info] + can be called transactionally
[info] + empty stats returns the empty string
[info] + logging a field not tracked in the fields member shouldn't show
up in the logfile
[info] + sum counts within a transaction
[error] x logs metrics only once

Reply to this email directly or view it on GitHub:
#29 (comment)

I don't do it.
But I download it and try to compile and test util code, and it failed again.

I explain you what I do to build ostrich jar.

1-Download util code, compile it and test it.
2-Download ostrich code.
3-If point 1 is OK. Include this build in ostrich project.
4-Compile Ostrich and test it.
5-If all these points are OK, then build the jar file of ostrich.

I just comprove in each point that the code that I will be used is compiled and tested.So, I'm sure that if something in my project fails, the problem is not with ostrich and util.

Do you know what I mean?

d6y commented

If you're having problems getting util to compile, that's an issue. At the moment all I can say is "it works for me" :-( Not very helpful, but here's the log of how it builds on my machine: https://gist.github.com/1298988

Perhaps there will be something in there to help you find the issue.