Skip to content

Navigation Menu

Sign in
Sign up

Always get the latest version of targets - #28

Draft
RichiH wants to merge 2 commits into
main from
richih/lastest_version
Draft

Always get the latest version of targets #28
RichiH wants to merge 2 commits into
main from
richih/lastest_version

Conversation

@RichiH

@RichiH RichiH commented May 13, 2021

Copy link
Copy Markdown
Member

No description provided.

RichiH requested a review from juliusv May 13, 2021 14:11
RichiH requested a review from tomwilkie as a code owner May 13, 2021 14:11
Comment thread remote_write/targets/grafana_agent.go Outdated
const grafanaAgentDownloadURL = "https://github.com/grafana/agent/releases/download/v0.13.1/agent-{{.OS}}-{{.Arch}}.zip"
func getGrafanaDownloadURL() string {
version := latest.GetLatestVersion("grafana/agent")
return "https://github.com/grafana/agent/releases/download/" + version + "/agent-{{.OS}}-{{.Arch}}.zip"

@tomwilkie tomwilkie May 13, 2021

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we could make version a field in the URL template and have downloadBinary extract the github project, lookup the latest version and sub it in?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't make it work with templates, but regexp does the job.

RichiH force-pushed the richih/lastest_version branch from 9e4261a to 8e83a43 Compare May 13, 2021 14:17
Signed-off-by: Richard Hartmann <richih@richih.org>
RichiH force-pushed the richih/lastest_version branch from 8e83a43 to 07a813a Compare May 13, 2021 14:20
If you hammer GH API without a login too often, you will get rate
limited over time. As local binaries remain on disk, this should not
be too much of a concern.
Signed-off-by: Richard Hartmann <richih@richih.org>
RichiH force-pushed the richih/lastest_version branch from 91abb5d to f9371b8 Compare May 13, 2021 19:10
RichiH marked this pull request as draft May 14, 2021 12:56

RichiH commented May 14, 2021

Copy link
Copy Markdown
Member Author

GH API limits are too restrictive, I will need to solve this before we can merge.

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

Reviewers

@tomwilkie tomwilkie tomwilkie left review comments
@juliusv juliusv Awaiting requested review from juliusv

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /