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

fix(docs): improve instructions for local development #263

Closed
wants to merge 5 commits into from

Conversation

ayewo
Copy link
Contributor

@ayewo ayewo commented Aug 10, 2023

@netlify
Copy link

netlify bot commented Aug 10, 2023

👷 Deploy request for webcapgo accepted.

Name Link
🔨 Latest commit 832740f
🔍 Latest deploy log https://app.netlify.com/sites/webcapgo/deploys/64d50f30647b880008718b32

@ayewo
Copy link
Contributor Author

ayewo commented Aug 10, 2023

@riderx this is ready for review.

@riderx
Copy link
Contributor

riderx commented Aug 10, 2023

Can you delete the commented lines ?

@ayewo
Copy link
Contributor Author

ayewo commented Aug 10, 2023

Done.

By removing the commented out SQL statements, these 4 files became empty so I deleted them. I hope this is fine?

deleted:    supabase/migrations/20230619105940_orgs.sql
deleted:    supabase/migrations/20230726140052_on_user_delete.sql
deleted:    supabase/migrations/20230804040106_add_stripe.sql
deleted:    supabase/migrations/20230804043519_add_big_query.sql

@sonarcloud
Copy link

sonarcloud bot commented Aug 10, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@riderx
Copy link
Contributor

riderx commented Aug 10, 2023

I'm not sure to understand, do you have the org table in your seed now ?

@riderx
Copy link
Contributor

riderx commented Aug 10, 2023

i think you maybe remove a bit too much things ^^
I thought you removed only what was bugging supabase but there also usefull tables in that ^^

@ayewo
Copy link
Contributor Author

ayewo commented Aug 10, 2023

The changes I made were so I could to get supabase start to work without errors so I could run the app locally.

@ayewo
Copy link
Contributor Author

ayewo commented Aug 10, 2023

If you want me to add the org table and others back along with seed data, it's going to be more than what you are offering.

@ayewo
Copy link
Contributor Author

ayewo commented Aug 10, 2023

@riderx what do you suggest?

@riderx
Copy link
Contributor

riderx commented Aug 10, 2023

i'm not sure to understand, it was already in the migration file, it should works, why did you needed to comment them ?

@ayewo
Copy link
Contributor Author

ayewo commented Aug 11, 2023

Yes, it was already there but running the migration gave lots of errors that prevented supabase from starting up, which is why I commented them out rather than delete them as I explained when I opened this PR.

My goal was to get the DB up quickly so I could complete my investigation for Cap-go/capacitor-updater#119.

As per your original request for this ticket: the app can be started successfully and I’ve made the instructions easier to follow, so I think it would be better to accept the temporary fix of commented out lines that I made in 832740f.

Some table names and relationships have changed and there are some pg extensions that are used that first need to be installed, so I humbly suggest creating a separate issue to:

  • fix the migration scripts that are broken and;
  • add seed data for the relevant tables in seed.sql.

@riderx riderx mentioned this pull request Aug 11, 2023
@riderx
Copy link
Contributor

riderx commented Aug 11, 2023

Ok fair, I will tip you for this, and I will work on it to fix it.
Thanks

@riderx
Copy link
Contributor

riderx commented Aug 11, 2023

/tip 50

@algora-pbc
Copy link

algora-pbc bot commented Aug 11, 2023

@ayewo: You just got a $50 tip! 👉 Complete your Algora onboarding to collect your payment.

@ayewo
Copy link
Contributor Author

ayewo commented Aug 11, 2023

@riderx That’s awesome! Thank you 👍.

@riderx
Copy link
Contributor

riderx commented Aug 14, 2023

@ayewo can you try the last commit i made i was able to generate schema file and start the supabase docker with new db.
Without migration files.
If that work i would like to merge your work for the doc only

@ayewo
Copy link
Contributor Author

ayewo commented Aug 14, 2023

OK will do but I don't see your commits on my PR here or on the main repo https://github.com/Cap-go/capgo/tree/main

Perhaps you've not pushed it?

@riderx
Copy link
Contributor

riderx commented Aug 14, 2023

@ayewo
Copy link
Contributor Author

ayewo commented Aug 14, 2023

I tried it on a fresh Linux box and it still fails:

pnpm backend

> capgo-app@10.35.0 backend /home/ubuntu/01_capgo
> supabase start && supabase functions serve

Seeding data supabase/seed.sql...
ERROR: relation "public.app_versions_meta" does not exist (SQLSTATE 42P01)
Try rerunning the command with --debug to troubleshoot the error.
 ELIFECYCLE  Command failed with exit code 1.

These are the versions of docker images for supabase and its middleware that were downloaded when I tested your changes today:

public.ecr.aws/supabase/logflare              1.3.28           b1f3cb1bd8bf   8 days ago      433MB
public.ecr.aws/supabase/edge-runtime          v1.8.1           1cd2cd3edc0e   2 weeks ago     152MB
public.ecr.aws/supabase/postgres              15.1.0.103       b95a2ca21e7f   4 weeks ago     1.2GB
public.ecr.aws/supabase/gotrue                v2.82.4          9d3f77fe0840   4 weeks ago     40.7MB
public.ecr.aws/supabase/studio                v0.23.06         adf9c550b5c2   5 weeks ago     358MB
public.ecr.aws/supabase/storage-api           v0.40.4          6b6caa4ca77f   7 weeks ago     327MB
public.ecr.aws/supabase/postgres-meta         v0.66.3          c21236f55914   2 months ago    277MB
public.ecr.aws/supabase/realtime              v2.10.1          3737100a14c5   4 months ago    180MB
public.ecr.aws/supabase/postgrest             v11.1.0          3314f729eef6   4 months ago    17.1MB
public.ecr.aws/supabase/vector                0.28.1-alpine    f0494e814793   5 months ago    124MB
public.ecr.aws/supabase/imgproxy              v3.8.0           25d21ff36e2b   10 months ago   173MB
public.ecr.aws/supabase/kong                  2.8.1            3cefb958bcd6   10 months ago   139MB
public.ecr.aws/supabase/pgadmin-schema-diff   cli-0.0.5        68f44796bec4   12 months ago   244MB
public.ecr.aws/supabase/inbucket              3.0.3            f5b6afda5922   12 months ago   25.8MB
public.ecr.aws/supabase/migra                 3.0.1621480950   e2d4ea346dcc   2 years ago     66.5MB

Can you share the version of the docker images you have downloaded for supabase?

@algora-pbc
Copy link

algora-pbc bot commented Aug 14, 2023

🎉🎈 @ayewo has been awarded $50! 🎈🎊

@riderx
Copy link
Contributor

riderx commented Aug 15, 2023

oh you are right i have the same weird issue.
I will try to fix it

@riderx
Copy link
Contributor

riderx commented Aug 15, 2023

Fixed ! you can try the latest one !

@ayewo
Copy link
Contributor Author

ayewo commented Aug 15, 2023

I tested the main branch and it worked!!

You did it 💪🎖️!

@riderx
Copy link
Contributor

riderx commented Aug 15, 2023

Can you update the PR to let me merge it :)

@ayewo
Copy link
Contributor Author

ayewo commented Aug 15, 2023

Opening another PR was faster 😁.

Please see #268

@ayewo ayewo closed this Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants