I'm very much out of the loop these days, but I think the simpler [database] makes sense for the reasons listed.

One of the reasons for separate databases would be to collect specific information on pipelines or reporters etc (part of the original intention). However this can be done as queries, views, or some other db archiving.

In other words, I can't think of a strong reason to support multiple connections given the direction zuul is heading.

Cheers,
Josh

On Thu, Dec 10, 2020 at 10:24 AM Mohammed Naser <mnaser@vexxhost.com> wrote:
On Thu, Dec 3, 2020 at 12:26 PM Tristan Cacqueray <tdecacqu@redhat.com> wrote:
>
>
> On Thu, Dec 03, 2020 at 09:08 James E. Blair wrote:
> > As you may recall, the v4/v5 plan is, briefly:
> >
> > * Make SQL connections required and default in every pipeline
> > * release v4.0.0
> > * Make explicit SQL use in pipelines an error
> > * release v4.1.0
> > * Do more HA stuff
> > * release v5.0.0
> >
> > See [1] for the plan in more detail.
> >
> > While reviewing the patch for the first step[2], I wondered if we want
> > to think about changing the config file syntax for SQL connections.
> >
> > Currently the plan is to keep the existing style:
> >
> >   [connection mydatabase]
> >   driver=sql
> >   dburi=...
> >
> > I'm wondering if we should change that to something more like:
> >
> >   [database]
> >   dburi=...
> >
> > Essentially the question at hand is: is there a case for supporting more
> > than one SQL connection?
> >
> > This will be true no matter which method we choose:
> >
> > * Per-pipeline sql connections are out.  At the very least, a given
> >   tenant needs exactly one SQL connection in order for the web and other
> >   newer features to work.
> > * Seamless upgrades will be supported through the v4.0/4.1 release
> >   process (there will be at least a release where both syntaxes are
> >   supported).
> >
> > A brief case for "[database]":
> >
> > * It is simpler to have a single database section in the config file.
> > * Zuul already supports complete tenant isolation in its API and db
> >   schema, so there should be no need to separate data between different
> >   tenants via different connections.  Truly paranoid users can run a
> >   separate Zuul for different tenants.
> > * SQL databases scale really well, with a little bit of attention to our
> >   indexes and queries, we shouldn't need multiple connections for
> >   scalability purposes.
> >
> > A brief case for "[connection mydatabase]":
> >
> > * It's not difficult for us to assign a different SQL connection to a
> >   tenant.  If we find a need to shard data for scalability reasons, this
> >   would be the best place to do it.
> >
> > Does anyone else have thoughts about this?  Other reasons to prefer one
> > over the other?
> >
>
> It seems like supporting a database per tenant makes things a bit more
> complicated. Unless there is a strong use-case for it, then I would vote
> for the simpler `[database]` configuration.

Same here.

> -Tristan
> _______________________________________________
> Zuul-discuss mailing list
> Zuul-discuss@lists.zuul-ci.org
> http://lists.zuul-ci.org/cgi-bin/mailman/listinfo/zuul-discuss



--
Mohammed Naser
VEXXHOST, Inc.

_______________________________________________
Zuul-discuss mailing list
Zuul-discuss@lists.zuul-ci.org
http://lists.zuul-ci.org/cgi-bin/mailman/listinfo/zuul-discuss