Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

Deprecate api (was: Upgrade Postgres from 9.6) #482

Open
garyhtou opened this issue Feb 10, 2023 · 5 comments
Open

Deprecate api (was: Upgrade Postgres from 9.6) #482

garyhtou opened this issue Feb 10, 2023 · 5 comments
Assignees

Comments

@garyhtou
Copy link
Member

Deadline: March 11th, 2023

image

@albertchae
Copy link
Collaborator

I tried setting up this project locally and ran into a few issues

While I think we can fix all these issues, I discussed with @maxwofford on Feb 14 and we think this project might be unused enough that we can finish https://github.com/hackclub/bank/issues/3442 and deprecate api.

I don't think api has a log collector set up, so I ran heroku logs -n 1500 -a api-hackclub (1500 is the max number of lines requestable with this command) at 3 separate times in the past 2 days and found these routes being hit

should be covered by https://github.com/hackclub/bank/issues/3442

POST "/v1/users/<USER_ID>/exchange_login_code"
POST "/v1/users/auth"

others

GET "/v1/events/<EVENT_ID>/redirect"
GET "/v1/event_email_subscribers/stats"
GET "/v1/ping"
GET "/v1/users/<USER_ID>"
GET "/v1/users/current"

There's also the occasional request for a few event logos, specifically I've seen this one several times https://api.hackclub.com/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBc2tQIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--a2b2780859b62b5246854dbd29799a2b2f78ca94/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCem9MY21WemFYcGxTU0lKZURFMU1BWTZCa1ZVT2dsMGNtbHRWQT09IiwiZXhwIjpudWxsLCJwdXIiOiJ2YXJpYXRpb24ifX0=--0a3410a893c16b77303680cd0aaa2ada739a06b7/WayCoolHacks%20Logo.png

I also see the occasional sidekiq job running. Any thoughts on these @maxwofford ?

@maxwofford
Copy link
Member

For the other endpoints, here's a breakdown:

  • GET “/v1/events/<EVENT_ID>/redirect”
    • (deprecated) use by hackclub/hackathons-v1
  • GET “/v1/event_email_subscribers/stats”
    • used by hackathons.hackclub.com
  • GET “/v1/ping”
    • used by status.hackclub.com
  • GET “/v1/users/<USER_ID>”
    • (deprecated) used by anti.hackclub.com
    • (deprecated) used by hackclub/v2
  • GET “/v1/users/current”
    • used by bank.hackclub.com

@maxwofford
Copy link
Member

I just checked through the scheduled jobs in heroku_scheduler.rake– all of these are connected to the deprecated versions of our clubs and hackathons APIs and are safe to cancel.

Let's go ahead and turn off their scheduling now to front-load any errors.

As a side note, we'll want to make sure we get a dump of the database– quite a few of these were crawling info that we might want to keep around.

@albertchae
Copy link
Collaborator

I opened #483 to comment out everything in heroku_scheduler.rake and also went through the heroku dashboard to remove everything from the scheduler

image

@albertchae albertchae changed the title Upgrade Postgres from 9.6 Deprecate api (was: Upgrade Postgres from 9.6) Feb 27, 2023
@albertchae
Copy link
Collaborator

Changed title to reflect what we ended up doing instead of upgrading postgres

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants