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

Making Supabase work in production #3556

Closed
TueeNguyen opened this issue Apr 23, 2022 · 7 comments
Closed

Making Supabase work in production #3556

TueeNguyen opened this issue Apr 23, 2022 · 7 comments
Labels
type: bug Something isn't working

Comments

@TueeNguyen
Copy link
Contributor

Kong perhaps doesn't play right with our nginx which make our parser service in production can't interact with Supabase database.

Seeding feeds into Prod Supabase also results in the same error An invalid response was received from the upstream server

Related issue Kong/kong#3314

{"level":30,"time":1650669868347,"pid":8,"hostname":"35bbf749cafa","msg":"Loading all feeds into feed queue for processing"}
{"level":50,"time":1650669868463,"pid":8,"hostname":"35bbf749cafa","error":{"message":"An invalid response was received from the upstream server"}}
{"level":50,"time":1650669868464,"pid":8,"hostname":"35bbf749cafa","err":{"type":"Error","message":"An invalid response was received from the upstream server","stack":"Error: An invalid response was received from the upstream server\n    at getAllFeeds (/app/src/utils/supabase.js:23:13)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)\n    at async processAllFeeds (/app/src/parser.js:62:19)"},"msg":"Error queuing feeds"}
@TueeNguyen TueeNguyen added the type: bug Something isn't working label Apr 23, 2022
@DukeManh
Copy link
Contributor

Kong didn't work because it made requests to supabase-rest which failed to connect to the DB using the connection string.

I notice the Postgres password has a "@" in it, and that's a problem because the connection string is in the form postgres://user:pass@host, notice the "@" in the middle. If the password contains a "@", we'd have to escape it or use a different password.

I updated the password on the production run migration and data seeding, and it seems to be working.

@TueeNguyen, please test the production supabase and let me know
@humphd, I just used a uuid for the password, maybe you want to use a different one, it doesn't have to be a JWT.

@humphd
Copy link
Contributor

humphd commented Apr 23, 2022

Great detective work! I've made updates to the values we put in the secret envs, and sent to @manekenpix to be set on staging and production. Once he does that, we'll need to do new builds (e.g., push something to master and deploy a new tag) for them to get picked up properly. Hopefully we can pair this with landing @DukeManh's work in #3558.

@TueeNguyen
Copy link
Contributor Author

Seems like it's working on production now with the new password

@humphd
Copy link
Contributor

humphd commented Apr 23, 2022

@TueeNguyen only temporarily. A push/tag will re-create the old env vars. We need it fixed in the secrets env files for this to stick.

@TueeNguyen
Copy link
Contributor Author

Right, I just looked at Slack's convo

@humphd
Copy link
Contributor

humphd commented Apr 23, 2022

@manekenpix reports that this is now done on staging/production. Hurray!

We need a push/tag to update staging/production to use these, and to confirm the fix.

@humphd
Copy link
Contributor

humphd commented Apr 23, 2022

I'm going to close, and we can do follow-ups as we discover new problems.

@humphd humphd closed this as completed Apr 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants