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

Build for 2.13.0 #771

Closed
28 tasks done
rnd4222 opened this issue Jun 13, 2019 · 54 comments
Closed
28 tasks done

Build for 2.13.0 #771

rnd4222 opened this issue Jun 13, 2019 · 54 comments

Comments

@rnd4222
Copy link

rnd4222 commented Jun 13, 2019

Scala 2.13.0 was released, so it would be great to have finagle build for it.

If it's marked with an asterisk, it doesn't have any dependencies and will be easy to target next. If you want to discover what the dependencies of a given project are, take a peek inside of the build.sbt file.

If you start working on one of these subprojects, please add a comment on this thread and I'll add your name next to it so people know not to duplicate your work.

@erwan
Copy link

erwan commented Jul 3, 2019

There is at least a dependency on utils: twitter/util#248

Scalatest also needs to be updated, probably other dependencies as well

@yaroot
Copy link

yaroot commented Jul 3, 2019

and twitter/scrooge#308

@luciferous
Copy link
Collaborator

As this will be a lot of work, we plan to coordinate it with the community in a similar fashion to how we did 2.11 (#290) and 2.12 (#505).

@SethTisue
Copy link

the next step here is scrooge, I believe

@mosesn
Copy link
Contributor

mosesn commented Aug 22, 2019

we can start work on some of the pieces, like finagle-core (basically anything that doesn't depend on scrooge within finagle), if people want to start taking stabs at subprojects!

@mosesn
Copy link
Contributor

mosesn commented Aug 30, 2019

Now that everything in scrooge is working except for scrooge-generator-tests, we're unblocked on everything in finagle.

@clhodapp
Copy link

clhodapp commented Sep 9, 2019

What is the significance of the asterisks on items in the issue description?

@martijnhoekstra
Copy link
Contributor

If I had to guess, I'd say those are not blocked by dependencies and open to port atm.

@mosesn
Copy link
Contributor

mosesn commented Sep 11, 2019

Yep, @martijnhoekstra is right. I updated the original post to note that, sorry for the confusion

@mosesn
Copy link
Contributor

mosesn commented Sep 11, 2019

If you start working on one of these subprojects, please add a comment on this thread and I'll add your name next to it so people know not to duplicate your work.

@martijnhoekstra
Copy link
Contributor

finagle-netty4 is already complete on develop

@mosesn
Copy link
Contributor

mosesn commented Sep 12, 2019

Whoops! I marked it as complete and updated some new ones to be marked as "ready to go".

@martijnhoekstra
Copy link
Contributor

early warning: base-http depends on implementation details of the pre-2.13 hash sets that are no longer exposed, and possibly no longer present. That's going to be a pain.

@mosesn
Copy link
Contributor

mosesn commented Sep 12, 2019

😿 where's the problem? we can start thinking about how we want to handle it

@martijnhoekstra
Copy link
Contributor

martijnhoekstra commented Sep 12, 2019 via email

@martijnhoekstra
Copy link
Contributor

thrift, mux and thriftmux at #794

@martijnhoekstra
Copy link
Contributor

martijnhoekstra commented Sep 16, 2019

following up on base-http - the biggest issue I'm running in to is Header. This is conceptually a mutable multimap case-insentitive string -> string. It accomplishes this by overriding the elementHash and elementEquality. This is no longer possible in 2.13. Hopefully someone sees an option beyond using a different (hand-rolled? copy-pasted? 3rd party dependency?) map implementation, or wrapping all keys and overriding equals and hashcode, because those options are pretty unappealing.

EDIT: Actually, hand-rolled might actually be a good idea. A HashMap doesn't fit that well in the first place due to the sparsity of the data. I'll hand-roll a trie with case-insensitive prefix path, and run that through the benchmarks. We can take it from there.

@mosesn
Copy link
Contributor

mosesn commented Sep 18, 2019

Sorry, I just saw this now. Let me talk to the team and see if I can get a consensus on what other testing we would have to do to be comfortable with that kind of change.

@mosesn
Copy link
Contributor

mosesn commented Sep 18, 2019

@martijnhoekstra are you imagining that we would stop extending HashMap?

@martijnhoekstra
Copy link
Contributor

@mosesn yes, my current plan is to re-implement Headers which is used as the backing store for DefaultHeaderMap to become a mutable prefix tree on case-insentive char values, with Header at the leaves, and then run the benchmarks to check my suspicion that it's a strict win in terms of performance.

Headers is not exposed publicly, or even internally really, and this change shouldn't (TM) change any visible interface.

@martijnhoekstra
Copy link
Contributor

@mosesn there is a very WIP-y WIP in https://github.com/martijnhoekstra/finagle/tree/http_base_213

The mutable Headers trie implementation is https://github.com/martijnhoekstra/finagle/blob/http_base_213/finagle-base-http/src/main/scala/com/twitter/finagle/http/Headers.scala

I'm currently working on getting 2.12 correct on this design so that I can bench against the baseline.

@mosesn
Copy link
Contributor

mosesn commented Sep 19, 2019

The trie approach seems pretty simple so far. Another idea folks were floating internally was to just go with a List and call it a day. Did you try benchmarking that?

@martijnhoekstra
Copy link
Contributor

martijnhoekstra commented Sep 19, 2019

just a List[Header], with linear search add/put/remove and toLowerCase'ing both sides? The original code did try very hard to be clever enough to be fast, but I can give it a try. I haven't benchmarked a thing yet.

@mosesn
Copy link
Contributor

mosesn commented Sep 19, 2019

well since you're building the trie anyway, let's start with that and see how it goes, and see how much worse List[Header] is?

@martijnhoekstra
Copy link
Contributor

The current trie inplementation I have is hilariously slow on iteration - 10x vs the baseline. I probably messed something up.

@martijnhoekstra
Copy link
Contributor

Looking for guiding review on #797

@DieBauer
Copy link
Contributor

DieBauer commented Oct 2, 2019

I've addressed finagle-exp in #802

@DieBauer
Copy link
Contributor

DieBauer commented Oct 3, 2019

And took on finagle-zipkin-core in #803 . will look into finagle-exception next.

twitter-service pushed a commit that referenced this issue Oct 24, 2019
Problem

no 2.13 cross build

Solution

Add Scala 2.13 to the project settings.

Result

finagle-benchmark-thrift compiles on 2.13

Ref #771

Signed-off-by: Ruben Oanta <roanta@twitter.com>
GitOrigin-RevId: 13c353672ef7acfd9d6d9a9cb0686297dada23ad
finaglehelper pushed a commit that referenced this issue Oct 24, 2019
Problem

no 2.13 cross build

Solution

Add Scala 2.13 to the project settings.

Result

finagle-benchmark-thrift compiles on 2.13

Ref #771

Signed-off-by: Ruben Oanta <roanta@twitter.com>

Differential Revision: https://phabricator.twitter.biz/D386687
twitter-service pushed a commit that referenced this issue Oct 28, 2019
Problem

no 2.13 cross build

Solution

Use scala.jdk.CollectionConverters from collection-compat
Replace usages of Unit as a value with ()
EntryTest - don't observe the order of keys in a map
Result

finagle-serversets compiles on 2.13 and tests are passing.

Ref #771

Signed-off-by: Ruben Oanta <roanta@twitter.com>
GitOrigin-RevId: 92aaae349043300c5d6cc64b6f45710cced007ca
finaglehelper pushed a commit that referenced this issue Oct 28, 2019
Problem

no 2.13 cross build

Solution

Use scala.jdk.CollectionConverters from collection-compat
Replace usages of Unit as a value with ()
EntryTest - don't observe the order of keys in a map
Result

finagle-serversets compiles on 2.13 and tests are passing.

Ref #771

Signed-off-by: Ruben Oanta <roanta@twitter.com>

Differential Revision: https://phabricator.twitter.biz/D386670
@chrisbenincasa
Copy link
Contributor

Any update on when this will be available?

@yufangong
Copy link
Contributor

Hi @chrisbenincasa, the progress of this is up-to-date, we just merged in finagle-base-http. We are taking an OSS community collaboration approach for this work so we don't have an accurate estimation, sorry.

@chrisbenincasa
Copy link
Contributor

Thanks for the update, Yufan. Is there anything I can do to help? 

@ryanoneill
Copy link
Contributor

@chrisbenincasa if you want to take one of the unaccounted for libraries listed above, that would be great.

@yufangong
Copy link
Contributor

to add on what @ryanoneill said, the one with * (right now finagle-memcached*) means it should not be blocked by other dependencies.

@chrisbenincasa
Copy link
Contributor

Gotcha, thanks. Was looking into memcached a bit today but it looks like it's blocked on 2.13 in bijection (handled here twitter/bijection#287 by @martijnhoekstra). Other than that, it seems other modules are still blocked?

@hderms
Copy link
Contributor

hderms commented Jan 2, 2020

@martijnhoekstra I am going to try to tackle finagle-stats and finagle-stats-core

@yufangong
Copy link
Contributor

@chrisbenincasa Thanks for looking at it, good find, we will need to work on the bijection dep first. I took another look at the project list, I think the finagle-opencensus-tracing might be unblocked by the recent http projects.

@hderms
Copy link
Contributor

hderms commented Jan 2, 2020

@martijnhoekstra @yufangong I am handling finagle-opencensus-tracing as well #822

@hderms
Copy link
Contributor

hderms commented Jan 2, 2020

How can we identify whether there will be performance regressions on a given upgrade like what happened in #797 ? Is there a benchmark that is run automatically and set to fail if performance falls below some threshold, or some other mechanism I can use to determine if one of my update PRs regresses?

Curious because I'm about to do finagle-memcached, and did finagle-stats before, and both seem like the kind of modules that could actually experience some kind of measurable performance regression.

@martijnhoekstra
Copy link
Contributor

martijnhoekstra commented Jan 14, 2020

twitter-bijection 2.13 support was merged, but it's not part of the dodo build, so when a release comes around, maybe the last loose ends can be tied down. On a related note, have you tried building on dotty yet?

@chrisbenincasa
Copy link
Contributor

It seems we are waiting on the version of bijection to be updated in the private version of this repo before we can move forward, right? Is that the last blocker here?

@martijnhoekstra
Copy link
Contributor

No, bijection is through. There is a PR for memcached and benchmarks: #827

That blocks integration and example. I think that's the last of it.

Then I think it would be nice to get all CI on 2.13 too.

@chrisbenincasa
Copy link
Contributor

Gotcha, sorry, I fell a bit behind on what was happening here. Is there anything I can do to help?

@martijnhoekstra
Copy link
Contributor

I have no idea how finagle-doc works, but it's not blocked by any subprojects anymore. Maybe that can be upgraded too.

Cross-project, twitter/twitter-server doesn't seem blocked anymore either. I'm not entirely sure what's still left to do for other projects, maybe it would be good to make a matrix for what's left to do and what's blocked (by what) for all OSS projects. For example, Finatra is blocked by twitter-server, and there is no CI for scrooge on 2.13. Having an overview of all project statuses would definitely help to find the places that are unblocked for further progress, and what is still todo but blocked.

@felixbr
Copy link
Contributor

felixbr commented Feb 10, 2020

twitter/twitter-server doesn't seem blocked anymore either

Technically it isn't blocked anymore as all finagle modules it uses are available for 2.13. Because of the way dodo works, however, it needs the full finagle project to build for 2.13, so the CI currently fails.

PR for reference: twitter/twitter-server#60

@felixbr
Copy link
Contributor

felixbr commented Mar 3, 2020

Just to keep track of everything:
finagle-benchmark is still marked as missing but it seems it was already included in #827.

This leaves only finagle-integration.
I can take a stab at it if no one else has already started on it 🙂

@yufangong
Copy link
Contributor

@felixbr thanks! it seems covered in finagle-memcached. Please go ahead with finagle-integration. I'm planning to do a March release soon and willing to wait for all subjects on 2.13.

@martijnhoekstra
Copy link
Contributor

There also is the otherwise unmentioned finagle-doc which looks to depend on other tooling (I didn't try getting it to build or run for very long)

@martinffx
Copy link
Contributor

@yufangong did this make it into the release?

@yufangong
Copy link
Contributor

@martinffx this will be in April release which will happen in the next couple days.

@yufangong
Copy link
Contributor

We believe the most recent release 20.4.1 should have everything cross-building with Scala 2.13, I'm going to close this issue.
Thanks all for making this happen!!! ❤️ ❤️ ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests