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 the mongo connection string in INSTALLATION.md #1093

Closed
adi-uchiha opened this issue Feb 26, 2023 · 21 comments
Closed

Fix the mongo connection string in INSTALLATION.md #1093

adi-uchiha opened this issue Feb 26, 2023 · 21 comments
Assignees
Labels
bug Something isn't working feature request

Comments

@adi-uchiha
Copy link

adi-uchiha commented Feb 26, 2023

Describe the bug
A clear and concise description of what the bug is.
In the setup.
The steps should include to mention default development db in the connection string.
String mentioned in guide : mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.6.2

Correct String: mongodb://127.0.0.1:27017/TalawaDb?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+1.6.2

We should note a step to edit the string and provide a default db name

To Reproduce
Steps to reproduce the behavior:

  1. Follow the instructions in INSTALLATION.md
    2.Use the connection string mentioned in the steps (Local or cloud)
  2. Try to login or register
  3. The database is not created.

Expected behavior
A database should be created in the mongodb.

Actual behavior
The database is not created as we do not provide the default db in connection string

Screenshots
If applicable, add screenshots to help explain your problem.
chrome_HJpr0pE41u

Additional details

Potential internship candidates
Please read this if you are planning to apply for a Palisadoes Foundation internship PalisadoesFoundation/talawa#359

@adi-uchiha adi-uchiha added the bug Something isn't working label Feb 26, 2023
@github-actions
Copy link

Congratulations on making your first Issue! 🎊 If you haven't already, check out our Contributing Guidelines and Issue Reporting Guidelines to ensure that you are following our guidelines for contributing and making issues.

@github-actions github-actions bot added discussion feature request unapproved Unapproved for Pull Request labels Feb 26, 2023
@palisadoes
Copy link
Contributor

@adi-uchiha please take the time to fill in the form. It helps to provide a record of why this PR was created.

The slack link will be invalid in 90 days.

We created the forms so that it would be easier for persons approving the PR to get the context immediately.

@adi-uchiha
Copy link
Author

@palisadoes I've updated the form

@xoldd
Copy link
Contributor

xoldd commented Feb 26, 2023

@adi-uchiha When you didn't provide the db name the server wasn't running at all? Or it was running, the data was not being created? Or you just didn't know what database the data was being stored in because there was no database name?

@adi-uchiha
Copy link
Author

@xoldyckk The connection was successful there was no error. But no changes were made in the database. No database was created.

@xoldd
Copy link
Contributor

xoldd commented Feb 26, 2023

@xoldyckk The connection was successful there was no error. But no changes were made in the database. No database was created.

Was data being created when you tried creating organization or something from talawa-admin? The data you created would show up in talawa-admin if it was being created. Did it happen or not?

@adi-uchiha
Copy link
Author

adi-uchiha commented Feb 26, 2023

@xoldyckk That might be happening in local mongo server. I was using Cloud. I couldn't see the 'talawa-admin' show up

@xoldd
Copy link
Contributor

xoldd commented Feb 26, 2023

@xoldyckk That might be happening in local mongo server. I was using Cloud. I couldn't see the 'talawa-admin' show up

There won't be any talawa-admin named db showing up. talawa-api uses whatever you passed in as default database. If object creation was working even without mentioning database in connection string, that means the data was stored somewhere on your mongodb atlas. IDK where tho.

But anyway you can go ahead and update the docs.

@xoldd xoldd removed the unapproved Unapproved for Pull Request label Feb 26, 2023
@xoldd
Copy link
Contributor

xoldd commented Feb 26, 2023

@adi-uchiha I just found out that mongodb uses a default database name if it's not provided. The name is test. You can mention this in the docs too.

@adi-uchiha
Copy link
Author

@xoldyckk yeah we should do that. we should give readers a step to register from panel too before editing the user object. Then only the user object will appear. One new comer was stuck in this on Slack It is just a minor issue. We should provide clear steps for those who are new to this. Should I start working on this PR ?

@xoldd
Copy link
Contributor

xoldd commented Feb 26, 2023

@adi-uchiha Already assigned you. Btw what do u mean register from panel?

@adi-uchiha
Copy link
Author

@adi-uchiha Already assigned you. Btw what do u mean register from panel?

The user object don't appear in the db unless we trigger a register from admin panel. Right ? This step isn't talked about.

@xoldd
Copy link
Contributor

xoldd commented Feb 26, 2023

@adi-uchiha Already assigned you. Btw what do u mean register from panel?

The user object don't appear in the db unless we trigger a register from admin panel. Right ? This step isn't talked about.

Isn't that how it's supposed to work? How can you have anything in database without creating it?

@adi-uchiha
Copy link
Author

adi-uchiha commented Feb 26, 2023

@xoldyckk Exactly It do not tell readers to do that step

@xoldd
Copy link
Contributor

xoldd commented Feb 26, 2023

@xoldyckk Exactly It do not tell readers to do that step

It shouldn't. That step should be mentioned in talawa-admin, not here.

@adi-uchiha
Copy link
Author

@xoldyckk i was thinking about how should I do this. It would be good if I can know how you think it should be done.
Generally new comers will go and read installation.md in talawa-api repo. But in the middle of those steps we want reader to clone the admin repo and do a register. How should I mention this ?

@xoldd
Copy link
Contributor

xoldd commented Feb 28, 2023

@adi-uchiha There was PR for automating creation of at least one user to start working with talawa-admin. You can work on it if you want.

Check this #941

@palisadoes
Copy link
Contributor

There is also this one:

Which should really be in this repo as that is where all the work needs to be done

@adi-uchiha
Copy link
Author

adi-uchiha commented Feb 28, 2023

@palisadoes we should close all the related issues and open a clearly described issue in api repo. Are we planning for installation automation ?

@palisadoes
Copy link
Contributor

The automated installation seems to have stalled.

The configuration of a super admin as a last resort issue is being worked on

@adi-uchiha
Copy link
Author

@palisadoes Closing as not required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature request
Projects
None yet
Development

No branches or pull requests

3 participants