sympy / sympy-bot

GitHub bot for SymPy
https://github.com/sympy-bot
Other
22 stars 11 forks source link

Heroku ending free tier #101

Open asmeurer opened 2 years ago

asmeurer commented 2 years ago

Heroku is ending their free tier, starting November 28, 2022. https://blog.heroku.com/next-chapter

Once this happens the bot will stop working, unless we switch to a paid plan. We can request open source credits from them. I am emailing them to make the request.

If they don't give us credits, we should consider moving the bot activities to GitHub actions. This will be easier to maintain, but the downside is that actions run much slower than the bot.

asmeurer commented 2 years ago

There are also Heroku alternatives https://twitter.com/jacobian/status/1562833339345936385. It might be just as much work to move to them as to GitHub Actions, though, so if we are going to move, IMO we should just move to GitHub Actions for the increased maintainability. TBH I would have just used GitHub Actions for this if it had existed when I started, even though I've been pretty happy with the speed and overall reliability of Heroku.

asmeurer commented 1 year ago

Heroku has graciously granted us credits through January with their open source credits program, but they have told me that the program will not be extended further than that, so we need to either come up with an alternative or pay for Heroku credits (the credits they have granted us are $7/mo. so I expect it may cost roughly that much).

CC @certik @oscarbenjamin

moorepants commented 1 year ago

I switched over to render.com. It still has a free tier. Maybe that is an option?

certik commented 1 year ago

I think $7/month is fine to pay if needed.

asmeurer commented 1 year ago

Looks like render does have a free tier https://render.com/docs/free. Here is their Heroku migration guide https://render.com/docs/migrate-from-heroku.

asmeurer commented 1 year ago

Trying render at #102, but currently it isn't working.

I'm also trying replit, which has a Heroku import (https://replit.com/@asmeurer/sympy-bot). I set up the secrets and the webhook for replit, but it isn't working. I get the error

Traceback (most recent call last):
  File "/home/runner/sympy-bot/venv/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
  File "/home/runner/sympy-bot/venv/lib/python3.8/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/home/runner/sympy-bot/sympy_bot/webapp.py", line 33, in main_post
    event = sansio.Event.from_http(request.headers, body, secret=secret)
  File "/home/runner/sympy-bot/venv/lib/python3.8/site-packages/gidgethub/sansio.py", line 131, in from_http
    raise ValidationFailure("secret not provided")
gidgethub.ValidationFailure: secret not provided
asmeurer commented 1 year ago

OK, I got replit to work (it wasn't obvious from the interface, but you have to manually restart it when you add an environment variable). So the bot should be live again for now. Replit is pretty clunky in my experience with it so far, but we'll see.

asmeurer commented 1 year ago

Just opened a PR (https://github.com/sympy/sympy/pull/24361) and the bot didn't show up until I fiddled with it. So that's not a good sign for replit.

Meanwhile, Heroku support isn't being particularly helpful (they're just telling me to do the things I've already tried doing).

asmeurer commented 1 year ago

Got Heroku running again. I have disabled the replit webhook, but it can be reenabled to make it work again (you may also have to go to https://replit.com/@sympy/sympy-bot and manually start it, which probably only I have access to do right now). Replit kept turning off and doesn't seem to consistently wake itself up when it receives a webhook, so I'm not a fan of it.

I never figured out the problem with the render deploy #102.