Skip to content

Tag validation should be case insensitive #295

@Hdom

Description

@Hdom

Hello, I've noticed that GitHub's runner software tag validation is case insensitive but the login in findPoolByTags seems to be case sensitive.

https://github.com/cloudbase/garm/blob/main/database/sql/pools.go#L187

Our current workaround includes lowercasing input tags and lowercasing stored tags in the comparison:

for i, tag := range tags {
    tags[i] = strings.ToLower(tag)
}
where := fmt.Sprintf("lower(tags.name) in ? and %s = ? and enabled = true", fieldName)

Do you think we could get this included?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions