ssotops / gitspace

DX optimization tool for interacting with git; most notably bringing the convenience of a monolith to the flexibility of microservices.
GNU General Public License v3.0
4 stars 0 forks source link

Establish order of precedence and exclusions for attributes (eg. `type`) #62

Open alechp opened 1 week ago

alechp commented 1 week ago

Given this context:

[global]
path = "gs"
labels = ["feature", "bug"]
scm = "github.com"
owner = "ssotops"

[auth]
type = "ssh"
key_path = "$SSH_KEY_PATH"

[groups.plugins-and-templates]
match = "includes"
values = ["plugin", "template"]
type = "helper"

[groups.git]
match = "startsWith"
values = ["git"]
type = "gitops"
labels = ["backend", "core"]

[groups.space]
match = "endsWith"
values = ["space"]
type = "solution"
labels = ["frontend", "experimental"]

[groups.sso]
match = "includes"
values = ["sso"]
type = "ssot"
labels = ["auth", "security"]

[groups.scmany]
match = "isExactly"
values = ["scmany"]
type = "helper"
labels = ["utility"]

We have an issue where type (and any other attribute we want to add, see #61) may not be correct.

eg. gitspace-plugin-hello-universe would be marked as a helper by:

[groups.plugins-and-templates]
match = "includes"
values = ["plugin", "template"]
type = "helper"

Meanwhile, gitspace-plugin-hello-universe would be marked a gitops type by:

[groups.git]
match = "startsWith"
values = ["git"]
type = "gitops"
labels = ["backend", "core"]

Action Items

Figure out what we need to resolve. We could add a k/v pair that allows specifying the order of precedence & attribute exclusions for each repository, but that would add z-index level complexity for any conflicts and still might not resolve the issue (eg. gitops could receive higher order of precedent, but that doesn't ensure it's actually a gitops type).

Getting labels & types correct is important, which makes the (convenient) search directives bit of a pain.