PSPDFKit-labs / bypass

Bypass provides a quick way to create a custom plug that can be put in place instead of an actual HTTP server to return prebaked responses to client requests.
https://hex.pm/packages/bypass
MIT License
964 stars 111 forks source link

Support latest Cowboy #101

Closed josevalim closed 3 years ago

josevalim commented 4 years ago

Cowboy 2 has a different process model where it shuts down processes when the request completes, so we had to improve Bypass.Plug to also track expectations through exits.

princemaple commented 4 years ago

Are the test failures relevant?

josevalim commented 4 years ago

It should be good now. I have also updated the deps and required Elixir v1.7 which allows us to get rid of other warnings.

anthonator commented 4 years ago

Anything else that needs to get done for this to be merged and released?

stastnyd commented 4 years ago

Hello,

Thank you so much for fixing this. We are also hitting the same issue. Can we get some information when is this going to be released?

Cheers 🍻

danielefongo commented 4 years ago

Waiting for godot. 😭

princemaple commented 4 years ago

Maybe ping @ream88 ?

mhsdef commented 4 years ago

We're seeing this too, would love a release. ❤️

smn commented 3 years ago

A release with this would be greatly appreciated 😀

ThunderHeavyIndustries commented 3 years ago

bump: Just ran in to the cowlib issue today.

ream88 commented 3 years ago

I'm trying to get this done by this week and release a 2.1.

ream88 commented 3 years ago

Hey sorry for the long silence. I just merged this PR because all tests were green.

However, because I want to prevent the debacle of the 2.0 release, could everybody in this thread please test their apps against the master branch? And please give me feedback, either via comments or 👍's!

josevalim commented 3 years ago

Thank you @ream88! One option is for you to release it as 2.1.0-rc.0. This way people can upgrade their apps and give it a try without having to necessarily depend on master. :)

ream88 commented 3 years ago

2.1.0-rc.0 is now available! Don't ask me why, but CI takes for ages atm.

amcvitty commented 3 years ago

Not sure where you want the feedback, but 2.1.0-rc.0 is working for our build. We're not heavy bypass users (yet! It's great!)

On Wed, Nov 4, 2020 at 5:14 PM Mario Uher notifications@github.com wrote:

2.1.0-rc.0 is now available! Don't ask me why, but CI takes for ages atm.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PSPDFKit-labs/bypass/pull/101#issuecomment-721610660, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4KSALAMFARRLJOS2OMLKTSOELQNANCNFSM4QGMWDFQ .

--

Andy McVitty

Co-founder & CTO

WodUp +1-917-830-6831 andy@wodup.com https://www.wodup.com

[image: instagram]WodUp is a platform for delivering and tracking functional fitness workouts. It is used by group fitness gyms, online programs, personal trainers and individual athletes. If you're not using WodUp yet in your gym, feel free to schedule a demo https://forms.gle/rWzQSeAgrmpfh3Eg9, or start a free trial https://www.wodup.com/signup today!

BobbyMcWho commented 3 years ago

Works in our test suite on

smn commented 3 years ago

Works for us as well. Thank you!

ream88 commented 3 years ago

Ok one last thing before we ship it: The README claims about "Bypass supports Elixir 1.7 and OTP 20 and up. It works with Cowboy 1 and 2". I would really love to extend the build matrix to test bypass with Cowboy 1 and 2. Does anybody have an idea how to do this (on Travis, but I'm already thinking about moving CI to GitHub, so GH as well)?

josevalim commented 3 years ago

You can have two lock files, like Phoenix did here: https://github.com/phoenixframework/phoenix/blob/v1.5/mix.exs#L18

But I also think it is ok to require only Cowboy 2. Especially that Cowboy 1 is no longer supported and Phoenix has ditched support for it on master too.

ream88 commented 3 years ago

Just talked to @MSch. We'll ditch Cowboy 1!

ream88 commented 3 years ago

v2.1.0 is out!