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

[FEAT] DB config system #884

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

[FEAT] DB config system #884

wants to merge 2 commits into from

Conversation

hv7214
Copy link

@hv7214 hv7214 commented Feb 7, 2020

Description

  • Made a db.config.json file which stores default values for db credentials.
  • User can add user.db.config.json to override any of the credential.
  • Added doc for same (ADD_TO_WIKi.md).
  • Added user.config.json in .gitignore.

Related Issue

#719

Motivation and Context

Setting credentials with .env file is really a bad option, as it creates problem at the time of deployement(k8). And hardcoding credentials bring staging problem.

How Has This Been Tested?

After change, db is successfully set up and can do usual operations(login etc.)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Note
This PR contains a ADD_TO_WIKI.md whose contents should be appended to db section of wiki accordingly.

@hv7214 hv7214 changed the title Issue719 [FEAT] DB config system Feb 7, 2020
@hv7214 hv7214 requested review from JaDogg and kmehant February 7, 2020 19:43
components/core/DBCon.py Outdated Show resolved Hide resolved
Note: This should be appended to wiki
@hv7214 hv7214 requested a review from JaDogg February 10, 2020 07:00
@hv7214
Copy link
Author

hv7214 commented Feb 14, 2020

@JaDogg can you review this PR ? i have made proposed changes.

@kmehant
Copy link
Collaborator

kmehant commented May 16, 2020

Having this setup has pros and cons. I guess you can find the pros here #719. Yet the cons are little but this change makes the container base testing or production setup pretty much tedious. for example, I need to rebuild huge images and spin up a container for as small as any of the changes in the credentials, that would create lag and latency.

That's one of the main reasons for using environmental variables for the container-based setup I can simply change the environmental variables and just restarting the containers will do the job. And this is same for the normal setup you do :)

Let's not change this present model for now :)
@JaDogg

@hv7214
Copy link
Author

hv7214 commented May 16, 2020

@kmehant i see

@JaDogg
Copy link
Collaborator

JaDogg commented May 16, 2020

Yeah like Mehant said let's keep current model for now.

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

Successfully merging this pull request may close these issues.

3 participants