Skip to content

Conversation

@dgw
Copy link
Member

@dgw dgw commented Jun 6, 2021

Description

Specifying a core.db_url setting overrides the other core.db_* settings and just uses the provided URL directly.

Resolves #2057, more or less, though the envvar name isn't exactly what was mentioned in that feature request.

Checklist

  • I have read CONTRIBUTING.md
  • I can and do license this contribution under the EFLv2
  • No issues are reported by make qa (runs make quality and make test)
  • I have tested the functionality of the things this change touches
    • With my local sqlite: URL, retrieved from bot.db via sopel-ipython. Presumably if that works, it'll work with MySQL/PostgreSQL/whatever else.

Notes

It should now be trivial to simply copy the value of the DATABASE_URL environment variable on Heroku into the SOPEL_CORE_DB_URL variable expected by Sopel, instead of splitting it into components.

Adding support for the envvar name DATABASE_URL, if it happens, can be done separately.

@dgw dgw added this to the 8.0.0 milestone Jun 6, 2021
@dgw dgw requested review from Exirel and RustyBower June 6, 2021 08:04
dgw added 2 commits June 9, 2021 02:27
An attribute that only exists sometimes is just asking for trouble,
indeed. Exirel is right.
@dgw dgw requested a review from Exirel June 30, 2021 07:57
@dgw
Copy link
Member Author

dgw commented Jul 6, 2021

@RustyBower Any chance of getting a sanity check on this from you in the next week or two?

@RustyBower
Copy link
Contributor

Actually looking at it right now :)

Copy link
Contributor

@RustyBower RustyBower left a comment

Choose a reason for hiding this comment

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

LGTM

@dgw dgw merged commit 802b1c5 into master Jul 6, 2021
@dgw dgw deleted the specify-db-url branch July 6, 2021 22:56
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.

Ability to specify full DB connection URL

4 participants