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

Specify source in config #172

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

baturin
Copy link
Contributor

@baturin baturin commented Jun 28, 2020

Add ability to use fair Commons database in development environment by config file option (BTW I have not managed to use "remote" source last time I tried).

Copy link
Member

@mahmoud mahmoud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, should help with local testing. Note that the Toolforge utility API used for testing is down sometimes, I usually log in and give it a restart and it runs for a few more months. Also, sometimes the schema changes out from under it, in which case we fix the code and redeploy :)


config = load_env_config()

config_source = config.get('source')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

source is a little vague here, can we call it commons_source?

An aside: remote and local are pretty bad names, too, I'll take the full blame. The proper meaning, maybe worth a comment: remote = toolforge util service (ideal name: tools_api), local = toolforge commons db replica (ideal name: db_replica).

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.

2 participants