Closed eddiejaoude closed 3 years ago
Hey, @eddiejaoude would like to work on this. One quick question though, will this command be supported by EddieBot?
Thanks @Souvikns . As the Discord request comes into this API project, this API project will go and get the data. This project should not be aware of EddieBot, only that it will have the user's Discord information. I hope that makes sense
As it is hitting up the discord service to check for a GitHub connection, I think the URL should be /discord/github
, also all we need is the discord user id, which is called by the bot will be easy to get, and rest is fine.
One more thing, I am having some issue with installing the dependencies once I figure it out I will make a PR.
hey @eddiejaoude I was thinking of creating a PR and discuss all the work there but I guess I can push code until all the test cases pass, and I am having some issues with this because I have made no changes but still test cases are failing, and also the development server is not starting.
I think i missed something but I followed the readme for setup, can you help me with this.
hey @Souvikns , sorry for my slow reply. You need the database running, that port is for AstraDB - maybe the documentation is not clear.
Can you share the whole output from your terminal? Did you run docker-compose up
?
no, I didn't run docker-compose
, and this is all I am getting in the terminal
I am missing these in the .env file could this be the problem
ASTRA_APPLICATION_TOKEN=
ASTRA_DATABASE_ID=
ASTRA_DATABASE_REGION=
Do you have docker installed?
Those missing config is fine, we usually use docker locally but you could use AstraDB in the cloud instead.
You would have to sign up here http://links.eddiejaoude.io/t/CiEQRydj4GdT on DataStax's AstraDB serverless (it is free), then get your credentials to put it in the config you mentioned above.
@eddiejaoude actually docker is not installed, also I am using windows. I think signing up is the only option open to me.
ok, sign up and try it 👍 any questions let us know 🤓
Am I doing it right because it says $0.25/1M
for read request ?
I did generate all the tokens reading their documentation, but still getting the same issue, do GitHub codespaces support docker-compose, Or should I install linux.
Am I doing it right because it says $0.25/1M for read request ?
This is from their docs Each plan includes a $25.00 free credit per month. The $25 credit is good for approximately 30 million reads, 5 million writes, and 40GB of storage per month.
Link if you want to read more info https://docs.datastax.com/en/astra/docs/pricing-and-billing.html
I did generate all the tokens reading their documentation, but still getting the same issue, do GitHub codespaces support docker-compose, Or should I install linux.
I just tested it using AstraDB in the cloud and it worked, but I noticed that if the .env
file contains any of the STARGATE_*
config then it is looking for the local database not in the cloud, even if the config for the cloud is set.
So I suggest removing any config in .env
that has STARGATE_*
and so it should only have...
APPROVED_TOKENS=abc,def
DEBUG=false
ASTRA_APPLICATION_TOKEN="AstraCS: ..."
ASTRA_DATABASE_ID=""
ASTRA_DATABASE_REGION="europe-west1"
Thank you for persisting with this, it is good for us to work through these issues, so that it is better for the next person. Thank you again, let us know how you get on 🤓
I did generate all the tokens reading their documentation, but still getting the same issue, do GitHub codespaces support docker-compose, Or should I install linux.
I just tested it using AstraDB in the cloud and it worked, but I noticed that if the
.env
file contains any of theSTARGATE_*
config then it is looking for the local database not in the cloud, even if the config for the cloud is set.So I suggest removing any config in
.env
that hasSTARGATE_*
and so it should only have...APPROVED_TOKENS=abc,def DEBUG=false ASTRA_APPLICATION_TOKEN="AstraCS: ..." ASTRA_DATABASE_ID="" ASTRA_DATABASE_REGION="europe-west1"
Thanks, this solves everything, will be making my PR soon 👍🏻
so e2e tests are failing and so I am unable to commit my code this is something new to me I am unable to understand what e2e is.
@Souvikns there might be something hardcoded, I will check. Can you share the error you get? Thank you for working through this with us and helping us make improvements to the project 👍
I checked, our automated tests are hardcoded to use localhost not the cloud https://github.com/EddieHubCommunity/api/blob/ae135e465fdd6ac7e635eb2d79e4b4dcdd35c17d/test/step-definitions/requests.ts#L23
@Cahllagerfeld I think we can make this read the environment file?
We could do this, although I don't think running the tests against a (potentially) paid online DB isn't a great idea, is it?
Actually, the error code is pretty big, when I am trying to commit first it checks lint
, then jest
then e2e test
I am just pasting that my terminal is showing
The line you mentioned is in the Setup for the local Stargate
instance.
We would probably have to steer which environment variables are set in order to get info weather to use online config or local.
In case the config is meant to setup the local instance I think the line you marked in fine.
We could do this, although I don't think running the tests against a (potentially) paid online DB isn't a great idea, is it?
You are right, it is not great, but I think most people will only run it occasionally, and the free tier on AstraDB is super generous
i opened a pr #119 which might fixes this. You can take a look at it.
Thanks @Cahllagerfeld 👍
@Souvikns I think the issue is it is trying to connect locally
I will test @Cahllagerfeld 's changes now
We are almost there @Souvikns with a solution 🤓 - if you are interested in the details, the conversation is happening here https://github.com/EddieHubCommunity/api/pull/119/files#r646007743
Also this might help @Souvikns , I created a PR that removes forcing running the tests https://github.com/EddieHubCommunity/api/pull/122
@Souvikns #122 PR has now been merged, if you pull down the latest changes, you should be able to make a commit without forcing you to run the tests locally. But we are still working on getting the tests running locally against the cloud, as I think that could be an option for some people even if not ideal.
PS. sorry for so many messages in the last 24 hours, but we are getting there to solving it and making the project better for everyone 🎉
@eddiejaoude I pulled the changes can you specify the commit lint that I should follow, I am getting this error
Oh, we should put some examples in the README, sorry and thank you 👍
The format is...
<type>[optional scope]: <description> (#<issue-no>)
I am not sure what your commit message looked like?
Here are examples from the commit history https://github.com/EddieHubCommunity/api/commits/main
A simple example would be fix: I improved something (#123)
I hope that helps
Stale issue message
Environment variables
connections
Workflow
!github
(if user has connected GitHub)GET: /github/trigger
header to include platform (discord) + uid