-
Notifications
You must be signed in to change notification settings - Fork 82
[Request] Remove database connection dependency for model annotations #323
Copy link
Copy link
Open
Description
Context: I want to run model annotations in CI (e.g. GitHub Actions). This currently requires spinning up a MySQL container service, creating our databases and loading the schemas for every annotation job run. This adds extra runner minutes and complexity.
I was honestly surprised to learn a connection was required as I'd assumed annotations were built purely from schema files.
The connection happens in ModelWrapper (see below). I'm sure there's a good reason why database introspection is used here vs inferring from schema files, but I'd like to voice that a connection-less option would be valuable.
annotaterb/lib/annotate_rb/model_annotator/model_wrapper.rb
Lines 37 to 43 in b9554dd
| def connection | |
| if @klass.respond_to?(:lease_connection) | |
| @klass.lease_connection | |
| else | |
| @klass.connection | |
| end | |
| end |
Thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels