This impacts:
- the credentials reading which needs to be indexed per instance
- the models since a new instance column needs to referenced and indexed
Related T989
Differential D363
swh.lister.gitlab: Make the lister instance parametric ardumont on Jul 6 2018, 4:17 PM. Authored by
Details
Diff Detail
Event TimelineComment Actions I'm not convinced about overloading the lister_name attribute to the GitLabLister class to store the name of the instance. I think the lister name should be a generic value, that works across all instances, and therefore it'd be more appropriate to have an explicit instance argument at lister class initialization. For instance, overloading the lister_name attribute will change the path of the configuration file per instance (which you fix with D370). It also changes the default database.
Comment Actions
I'm not certain i understood you completely. What do you mean by generic value, do you have an example in mind? I'm not sure i understand what is the benefit of separating those (lister-name, instance). Note:
Comment Actions Fix according my understanding of the latest exchange
Comment Actions I think the lister_name for the GitLab lister should be gitlab, which allows us to use the default values for the config, the database name, etc. In my mind it should even be a class attribute rather than an instance attribute (that's not the case currently, but I think we should move towards that). Maybe @fiendish can clarify his thoughts on the matter?
The need to override the default config and the database name to support several instances make me think that the lister name should really be a class attribute :)
Comment Actions Summary:
Comment Actions
Ok. LISTER_NAME is now a class attribute of the base lister class:
What's an instance attribute is the 'instance' property of the gitlab lister (As such, it's now a constructor parameter for it).
Sold. Note that slightly touches the D364 parameter now (due to the new 'instance' constructor parameter of the gitlab lister instance).
|