docs icon indicating copy to clipboard operation
docs copied to clipboard

Support download list for community repositories

Open grobie opened this issue 4 years ago • 10 comments

In order to display windows_exporter releases and the available artifacts on the downloads page, this change adds the option to fetch release information for all organizations on Github. As the windows_exporter artifact naming doesn't follow the established format unfortunately, a few additional special format options were added.

Signed-off-by: Tobias Schmidt [email protected]


Solves #1799. FYI @carlpett @roidelapluie

grobie avatar Nov 19 '20 16:11 grobie

As the windows_exporter artifact naming doesn't follow the established format unfortunately

Should we ask them to?

brian-brazil avatar Nov 19 '20 16:11 brian-brazil

Should we ask them to?

I think this would be helpful, but would also result in a breaking change for anyone who has automated the download process. I'm worried about having to support more variations though, as the artifact naming format is already pretty ambiguous with a varying number of - and . delimiters used in standard vs. pre-release versions.

The current differences in the windows_exporter release artifacts are:

  • artifact names dropped the .<os> part from the <name>-<version>.<os>-<arch>.<ext> format
  • sha256sums.txt filenames include an <arch>\ prefix (probably the result of storing artifacts in separate folders)

grobie avatar Nov 19 '20 17:11 grobie

I think long term consistency for users would be more beneficial, and I don't think it'd be unreasonable to ask 3rd party projects we list here to follow our artifact naming conventions.

brian-brazil avatar Nov 19 '20 17:11 brian-brazil

Makes sense to me! I guess one could argue that the .msi / .exe artifacts are so unique that consolidation isn't necessarily important, but the <arch> prefix in the sha256sums.txt is quite odd.

@carlpett @martinlindhe Any comments / input from your side?

grobie avatar Nov 19 '20 17:11 grobie

Yeah, I don't see a need to force tarballs but everything before the extension could be consistent. The arch in the shasums looks like a bug to me.

brian-brazil avatar Nov 19 '20 17:11 brian-brazil

As you guessed @grobie, the sha256sums is because of generating them from subdirs. I no longer recall what exactly that was a workaround for, something about promu on Windows I think. Generally, it's been a somewhat demanding project to maintain, and CI has been one of the things that hasn't gotten a lot of love. I'll try to fix the shasums thing asap.

On the naming topic:

  • I'd be fine with changing the artifact names to cause less pain elsewhere, eg here, as long as we don't need to package tarballs. Since there's no built-in support for neither tar nor gz, that'd be a significant user friction.
  • We'll need to sync with the packaging for Chocolatey (~homebrew for Windows) that it won't break them, because that is a fairly common way people get the exporter. @andrewmostello, you'd need to change this, correct?
  • We could add the os bit in there, for obvious reasons it hasn't been hugely useful for the project itself.

carlpett avatar Nov 19 '20 19:11 carlpett

Minor point: If your build chain could be modified to support all compression/package formats that would increase consistency even more, but again, this is minor.

Thanks for being willing to rename :)

RichiH avatar Nov 20 '20 09:11 RichiH

  • We could add the os bit in there, for obvious reasons it hasn't been hugely useful for the project itself.

no freedos version of the exporter? :smile:

roidelapluie avatar Nov 20 '20 10:11 roidelapluie

I'd be fine with changing the artifact names to cause less pain elsewhere, eg here, as long as we don't need to package tarballs. Since there's no built-in support for neither tar nor gz, that'd be a significant user friction.

I don't see any need for building tar.gz packages for Windows. The feedback that this isn't available on Windows has been raised before, all releases using promu >= v0.7.0 (e.g. Prometheus v2.23.0 will be the first) will produce .zip packages for Windows. I haven't found any other major software releasing tar.gz archives for windows either. Using the most common and appropriate package formats for different platforms makes sense to me.

grobie avatar Nov 20 '20 11:11 grobie

  • We'll need to sync with the packaging for Chocolatey (~homebrew for Windows) that it won't break them, because that is a fairly common way people get the exporter. @andrewmostello, you'd need to change this, correct?

That's right, but it should be a quick adjustment. I'd just need to change the release URL here: https://github.com/andrewmostello/prometheus-windows-exporter.install/blob/master/tools/chocolateyinstall.ps1#L5

On a related note, the Chocolatey install is based on the msi installer. If that were ever dropped it'd require a much larger change to the install script.

andrewmostello avatar Nov 20 '20 16:11 andrewmostello