Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Advanced matching, regex? #99

Open
jinnatar opened this issue Feb 17, 2025 · 1 comment
Open

Advanced matching, regex? #99

jinnatar opened this issue Feb 17, 2025 · 1 comment

Comments

@jinnatar
Copy link

jinnatar commented Feb 17, 2025

What I'm doing:

ubi -i ~/.local/bin -p victoriametrics/victoriametrics --matching vmutils --exe vmalert-prod --rename-exe vmalert

What I hoped I'd get:

Match the release artefact vmutils-linux-amd64-v1.111.0.tar.gz

What I get instead:

Matches the release artefact vmutils-linux-amd64-v1.111.0-enterprise.tar.gz

The issue here is that their release artefact list is absolutely huge and there is no proverbial "OSS-edition" string to grep on those artefacts, so the only way I see to match those is to negatively match on "enterprise". However, even if there was a label for the OSS version there's no guarantees it would be next to the "vmutil" string I need just to match the correct package. If it was vmutils-oss-linux-amd64-$version.tar.gz I could match it with vmutils-oss, but if it was vmutils-linux-amd64-$version-oss.tar.gz I would not be able to, since I'd need either a negative matcher or regex matching.

Possible solutions I see

  1. There could be a "negative match" flag that would allow me to proverbially grep -v enterprise and match non-enterprise artefacts. --matching vmutils --notmatching enterprise
  2. The --matching flag could allow repeating and treat a repeat as an AND match. But I imagine it would be only a matter of time before someone would want it to be OR instead. This would not work in this example with their current naming scheme as there is no string for oss, just a lack of an enterprise.
  3. Or, perhaps just changing --match to support regex or adding a new --match-regex option for ultimate flexibility. --matching='vmutils-.*[0-9]\.tar.gz' .. not pretty and quite brittle, but it would work for now.

I'm leaning personally towards the third option as regex is a well understood semi-standard solution to the problem and just might close a whole class of issues and not just this one instance. I see this has been previously considered in #75. Technically a negative matcher would be a safer fix for my specific scenario since the OS & arch detection work just fine here, whereas if regex matching would imply not doing OS & arch detection, my regexing would be even more complicated. Ergo my personal preference would be to not bypass OS & arch, unless say explicitly asking for it via --disable-{arch,os}-matching.

Debug trace

[ubi::builder][DEBUG] Parsed --project victoriametrics/victoriametrics = victoriametrics / victoriametrics
[ubi::builder][DEBUG] exe name = vmalert-prod
[ubi::builder][DEBUG] install path = /home/user/.local/bin/vmalert
[reqwest::connect][DEBUG] starting new connection: https://api.github.com/
[ubi::picker][DEBUG] filtering out assets that do not have a valid extension
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-darwin-amd64-v1.111.0-cluster_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-darwin-amd64-v1.111.0-enterprise-cluster_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-darwin-amd64-v1.111.0-enterprise_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-darwin-amd64-v1.111.0_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-darwin-arm64-v1.111.0-cluster_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-darwin-arm64-v1.111.0-enterprise-cluster_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-darwin-arm64-v1.111.0-enterprise_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-darwin-arm64-v1.111.0_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-freebsd-amd64-v1.111.0-cluster_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-freebsd-amd64-v1.111.0-enterprise-cluster_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-freebsd-amd64-v1.111.0-enterprise_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-freebsd-amd64-v1.111.0_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-linux-386-v1.111.0-enterprise_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-linux-386-v1.111.0_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-linux-amd64-v1.111.0-cluster_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-linux-amd64-v1.111.0-enterprise-cluster_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-linux-amd64-v1.111.0-enterprise_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-linux-amd64-v1.111.0_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-linux-arm-v1.111.0-enterprise_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-linux-arm-v1.111.0_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-linux-arm64-v1.111.0-cluster_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-linux-arm64-v1.111.0-enterprise-cluster_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-linux-arm64-v1.111.0-enterprise_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-linux-arm64-v1.111.0_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-openbsd-amd64-v1.111.0-cluster_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-openbsd-amd64-v1.111.0-enterprise-cluster_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-openbsd-amd64-v1.111.0-enterprise_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-openbsd-amd64-v1.111.0_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .zip
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-windows-amd64-v1.111.0-cluster_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .zip
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-windows-amd64-v1.111.0-enterprise-cluster_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .zip
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-windows-amd64-v1.111.0-enterprise_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .zip
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: victoria-metrics-windows-amd64-v1.111.0_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: vmutils-darwin-amd64-v1.111.0-enterprise_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: vmutils-darwin-amd64-v1.111.0_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: vmutils-darwin-arm64-v1.111.0-enterprise_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: vmutils-darwin-arm64-v1.111.0_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: vmutils-freebsd-amd64-v1.111.0-enterprise_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: vmutils-freebsd-amd64-v1.111.0_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: vmutils-linux-386-v1.111.0-enterprise_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: vmutils-linux-386-v1.111.0_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: vmutils-linux-amd64-v1.111.0-enterprise_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: vmutils-linux-amd64-v1.111.0_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: vmutils-linux-arm-v1.111.0-enterprise_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: vmutils-linux-arm-v1.111.0_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: vmutils-linux-arm64-v1.111.0-enterprise_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: vmutils-linux-arm64-v1.111.0_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: vmutils-openbsd-amd64-v1.111.0-enterprise_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .tar.gz
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: vmutils-openbsd-amd64-v1.111.0_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .zip
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: vmutils-windows-amd64-v1.111.0-enterprise_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] found valid extension, .zip
[ubi::picker][DEBUG] including this asset because this extension is valid for this platform
[ubi::picker][DEBUG] skipping asset with invalid extension: vmutils-windows-amd64-v1.111.0_checksums.txt has unknown extension txt
[ubi::picker][DEBUG] current OS = linux
[ubi::picker][DEBUG] matching assets against OS using (?i:(?:\b|)linux(?:\b||32|64))
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-darwin-amd64-v1.111.0-cluster.tar.gz
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-darwin-amd64-v1.111.0-enterprise-cluster.tar.gz
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-darwin-amd64-v1.111.0-enterprise.tar.gz
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-darwin-amd64-v1.111.0.tar.gz
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-darwin-arm64-v1.111.0-cluster.tar.gz
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-darwin-arm64-v1.111.0-enterprise-cluster.tar.gz
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-darwin-arm64-v1.111.0-enterprise.tar.gz
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-darwin-arm64-v1.111.0.tar.gz
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-freebsd-amd64-v1.111.0-cluster.tar.gz
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-freebsd-amd64-v1.111.0-enterprise-cluster.tar.gz
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-freebsd-amd64-v1.111.0-enterprise.tar.gz
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-freebsd-amd64-v1.111.0.tar.gz
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-linux-386-v1.111.0-enterprise.tar.gz
[ubi::picker][DEBUG] matches our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-linux-386-v1.111.0.tar.gz
[ubi::picker][DEBUG] matches our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-linux-amd64-v1.111.0-cluster.tar.gz
[ubi::picker][DEBUG] matches our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-linux-amd64-v1.111.0-enterprise-cluster.tar.gz
[ubi::picker][DEBUG] matches our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-linux-amd64-v1.111.0-enterprise.tar.gz
[ubi::picker][DEBUG] matches our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-linux-amd64-v1.111.0.tar.gz
[ubi::picker][DEBUG] matches our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-linux-arm-v1.111.0-enterprise.tar.gz
[ubi::picker][DEBUG] matches our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-linux-arm-v1.111.0.tar.gz
[ubi::picker][DEBUG] matches our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-linux-arm64-v1.111.0-cluster.tar.gz
[ubi::picker][DEBUG] matches our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-linux-arm64-v1.111.0-enterprise-cluster.tar.gz
[ubi::picker][DEBUG] matches our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-linux-arm64-v1.111.0-enterprise.tar.gz
[ubi::picker][DEBUG] matches our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-linux-arm64-v1.111.0.tar.gz
[ubi::picker][DEBUG] matches our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-openbsd-amd64-v1.111.0-cluster.tar.gz
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-openbsd-amd64-v1.111.0-enterprise-cluster.tar.gz
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-openbsd-amd64-v1.111.0-enterprise.tar.gz
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-openbsd-amd64-v1.111.0.tar.gz
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-windows-amd64-v1.111.0-cluster.zip
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-windows-amd64-v1.111.0-enterprise-cluster.zip
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-windows-amd64-v1.111.0-enterprise.zip
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = victoria-metrics-windows-amd64-v1.111.0.zip
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = vmutils-darwin-amd64-v1.111.0-enterprise.tar.gz
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = vmutils-darwin-amd64-v1.111.0.tar.gz
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = vmutils-darwin-arm64-v1.111.0-enterprise.tar.gz
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = vmutils-darwin-arm64-v1.111.0.tar.gz
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = vmutils-freebsd-amd64-v1.111.0-enterprise.tar.gz
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = vmutils-freebsd-amd64-v1.111.0.tar.gz
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = vmutils-linux-386-v1.111.0-enterprise.tar.gz
[ubi::picker][DEBUG] matches our OS
[ubi::picker][DEBUG] matching OS against asset name = vmutils-linux-386-v1.111.0.tar.gz
[ubi::picker][DEBUG] matches our OS
[ubi::picker][DEBUG] matching OS against asset name = vmutils-linux-amd64-v1.111.0-enterprise.tar.gz
[ubi::picker][DEBUG] matches our OS
[ubi::picker][DEBUG] matching OS against asset name = vmutils-linux-amd64-v1.111.0.tar.gz
[ubi::picker][DEBUG] matches our OS
[ubi::picker][DEBUG] matching OS against asset name = vmutils-linux-arm-v1.111.0-enterprise.tar.gz
[ubi::picker][DEBUG] matches our OS
[ubi::picker][DEBUG] matching OS against asset name = vmutils-linux-arm-v1.111.0.tar.gz
[ubi::picker][DEBUG] matches our OS
[ubi::picker][DEBUG] matching OS against asset name = vmutils-linux-arm64-v1.111.0-enterprise.tar.gz
[ubi::picker][DEBUG] matches our OS
[ubi::picker][DEBUG] matching OS against asset name = vmutils-linux-arm64-v1.111.0.tar.gz
[ubi::picker][DEBUG] matches our OS
[ubi::picker][DEBUG] matching OS against asset name = vmutils-openbsd-amd64-v1.111.0-enterprise.tar.gz
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = vmutils-openbsd-amd64-v1.111.0.tar.gz
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = vmutils-windows-amd64-v1.111.0-enterprise.zip
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] matching OS against asset name = vmutils-windows-amd64-v1.111.0.zip
[ubi::picker][DEBUG] does not match our OS
[ubi::picker][DEBUG] current CPU architecture = x86_64
[ubi::picker][DEBUG] matching assets against CPU architecture using (?ix)
(?:
\b
|
_
)
(?:
386 | i586 | i686
|
x86[-]32
|
x86[
-]64
|
x64
|
amd64
|
linux64
|
# This is gross but the OS matcher will reject this on non-Windows
# platforms.
win64
)
(?:
\b
|
_
)
[ubi::picker][DEBUG] matching CPU architecture against asset name = victoria-metrics-linux-386-v1.111.0-enterprise.tar.gz
[ubi::picker][DEBUG] matches our CPU architecture
[ubi::picker][DEBUG] matching CPU architecture against asset name = victoria-metrics-linux-386-v1.111.0.tar.gz
[ubi::picker][DEBUG] matches our CPU architecture
[ubi::picker][DEBUG] matching CPU architecture against asset name = victoria-metrics-linux-amd64-v1.111.0-cluster.tar.gz
[ubi::picker][DEBUG] matches our CPU architecture
[ubi::picker][DEBUG] matching CPU architecture against asset name = victoria-metrics-linux-amd64-v1.111.0-enterprise-cluster.tar.gz
[ubi::picker][DEBUG] matches our CPU architecture
[ubi::picker][DEBUG] matching CPU architecture against asset name = victoria-metrics-linux-amd64-v1.111.0-enterprise.tar.gz
[ubi::picker][DEBUG] matches our CPU architecture
[ubi::picker][DEBUG] matching CPU architecture against asset name = victoria-metrics-linux-amd64-v1.111.0.tar.gz
[ubi::picker][DEBUG] matches our CPU architecture
[ubi::picker][DEBUG] matching CPU architecture against asset name = victoria-metrics-linux-arm-v1.111.0-enterprise.tar.gz
[ubi::picker][DEBUG] does not match our CPU architecture
[ubi::picker][DEBUG] matching CPU architecture against asset name = victoria-metrics-linux-arm-v1.111.0.tar.gz
[ubi::picker][DEBUG] does not match our CPU architecture
[ubi::picker][DEBUG] matching CPU architecture against asset name = victoria-metrics-linux-arm64-v1.111.0-cluster.tar.gz
[ubi::picker][DEBUG] does not match our CPU architecture
[ubi::picker][DEBUG] matching CPU architecture against asset name = victoria-metrics-linux-arm64-v1.111.0-enterprise-cluster.tar.gz
[ubi::picker][DEBUG] does not match our CPU architecture
[ubi::picker][DEBUG] matching CPU architecture against asset name = victoria-metrics-linux-arm64-v1.111.0-enterprise.tar.gz
[ubi::picker][DEBUG] does not match our CPU architecture
[ubi::picker][DEBUG] matching CPU architecture against asset name = victoria-metrics-linux-arm64-v1.111.0.tar.gz
[ubi::picker][DEBUG] does not match our CPU architecture
[ubi::picker][DEBUG] matching CPU architecture against asset name = vmutils-linux-386-v1.111.0-enterprise.tar.gz
[ubi::picker][DEBUG] matches our CPU architecture
[ubi::picker][DEBUG] matching CPU architecture against asset name = vmutils-linux-386-v1.111.0.tar.gz
[ubi::picker][DEBUG] matches our CPU architecture
[ubi::picker][DEBUG] matching CPU architecture against asset name = vmutils-linux-amd64-v1.111.0-enterprise.tar.gz
[ubi::picker][DEBUG] matches our CPU architecture
[ubi::picker][DEBUG] matching CPU architecture against asset name = vmutils-linux-amd64-v1.111.0.tar.gz
[ubi::picker][DEBUG] matches our CPU architecture
[ubi::picker][DEBUG] matching CPU architecture against asset name = vmutils-linux-arm-v1.111.0-enterprise.tar.gz
[ubi::picker][DEBUG] does not match our CPU architecture
[ubi::picker][DEBUG] matching CPU architecture against asset name = vmutils-linux-arm-v1.111.0.tar.gz
[ubi::picker][DEBUG] does not match our CPU architecture
[ubi::picker][DEBUG] matching CPU architecture against asset name = vmutils-linux-arm64-v1.111.0-enterprise.tar.gz
[ubi::picker][DEBUG] does not match our CPU architecture
[ubi::picker][DEBUG] matching CPU architecture against asset name = vmutils-linux-arm64-v1.111.0.tar.gz
[ubi::picker][DEBUG] does not match our CPU architecture
[ubi::picker][DEBUG] found multiple candidate assets, filtering for 64-bit binaries in ["victoria-metrics-linux-386-v1.111.0-enterprise.tar.gz", "victoria-metrics-linux-386-v1.111.0.tar.gz", "victoria-metrics-linux-amd64-v1.111.0-cluster.tar.gz", "victoria-metrics-linux-amd64-v1.111.0-enterprise-cluster.tar.gz", "victoria-metrics-linux-amd64-v1.111.0-enterprise.tar.gz", "victoria-metrics-linux-amd64-v1.111.0.tar.gz", "vmutils-linux-386-v1.111.0-enterprise.tar.gz", "vmutils-linux-386-v1.111.0.tar.gz", "vmutils-linux-amd64-v1.111.0-enterprise.tar.gz", "vmutils-linux-amd64-v1.111.0.tar.gz"]
[ubi::picker][DEBUG] found 64-bit assets: victoria-metrics-linux-amd64-v1.111.0-cluster.tar.gz,victoria-metrics-linux-amd64-v1.111.0-enterprise-cluster.tar.gz,victoria-metrics-linux-amd64-v1.111.0-enterprise.tar.gz,victoria-metrics-linux-amd64-v1.111.0.tar.gz,vmutils-linux-amd64-v1.111.0-enterprise.tar.gz,vmutils-linux-amd64-v1.111.0.tar.gz
[ubi::picker][DEBUG] looking for an asset matching the string "vmutils" passed in --matching
[ubi::picker][DEBUG] found an asset matching the string
[ubi::picker][DEBUG] picked asset from matches named vmutils-linux-amd64-v1.111.0-enterprise.tar.gz
[ubi::ubi][DEBUG] picked asset named vmutils-linux-amd64-v1.111.0-enterprise.tar.gz
[ubi::ubi][DEBUG] downloading asset from https://api.github.com/repos/VictoriaMetrics/VictoriaMetrics/releases/assets/227904353
[reqwest::async_impl::client][DEBUG] redirecting 'https://api.github.com/repos/VictoriaMetrics/VictoriaMetrics/releases/assets/227904353' to 'https://objects.githubusercontent.com/github-production-release-asset-2e65be/150954997/9d0bcb87-c468-4c20-8dd1-2fc31782b493?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20250217%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250217T151932Z&X-Amz-Expires=300&X-Amz-Signature=103124a30aa2d64134cccd242503f1aa9c0cd8bc392d219a9e8c71aed6e53de5&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3Dvmutils-linux-amd64-v1.111.0-enterprise.tar.gz&response-content-type=application%2Foctet-stream'
[reqwest::connect][DEBUG] starting new connection: https://objects.githubusercontent.com/
[ubi::ubi][DEBUG] archive path is /tmp/.tmpzHvcL7/vmutils-linux-amd64-v1.111.0-enterprise.tar.gz
[ubi::installer][DEBUG] extracting executable from tarball at /tmp/.tmpzHvcL7/vmutils-linux-amd64-v1.111.0-enterprise.tar.gz
[ubi::installer][DEBUG] found tarball entry with path vmagent-prod
[ubi::installer][DEBUG] found tarball entry with path vmalert-prod
[ubi::installer][DEBUG] found tar file entry with exact match: vmalert-prod
[ubi::installer][DEBUG] extracting tarball entry named vmalert-prod to /home/user/.local/bin/vmalert
[ubi::installer][DEBUG] creating directory at /home/user/.local/bin
[ubi::installer][INFO] Installed executable into /home/user/.local/bin/vmalert

@autarch
Copy link
Member

autarch commented Feb 22, 2025

I think adding a new flag like --matching-regex is the way to go. Then the question is whether I can deprecate --matching in favor of this flag (I think I can).

For your case, you can match the non-enterprise release with a regex like \d+\.(tar\.gz|zip)$, which isn't ideal, but it does work, and it avoids the need for a negative match flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants