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

logcli loki promtail 2.6.1 #105412

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions Formula/logcli.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Logcli < Formula
desc "Run LogQL queries against a Loki server"
homepage "https://grafana.com/loki"
url "https://github.com/grafana/loki/archive/refs/tags/v2.5.0.tar.gz"
sha256 "f9ca9e52f4d9125cc31f9a593aba6a46ed6464c9cd99b2be4e35192a0ab4a76e"
url "https://github.com/grafana/loki/archive/v2.6.1.tar.gz"
sha256 "4b41175e552dd198bb9cae213df3c0d9ca8cacd0b673f79d26419cea7cfb2df7"
license "AGPL-3.0-only"
head "https://github.com/grafana/loki.git", branch: "main"

Expand All @@ -19,8 +19,7 @@ class Logcli < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "42067a26764bbb5b3eeb1d03e5979a3f390107fbaeed9cd40df6f03e1c4f5132"
end

# Bump to 1.18 on the next release, if possible.
depends_on "go@1.17" => :build
depends_on "go" => :build
depends_on "loki" => :test

resource "testdata" do
Expand All @@ -29,7 +28,7 @@ class Logcli < Formula
end

def install
system "go", "build", *std_go_args, "./cmd/logcli"
system "go", "build", *std_go_args(ldflags: "-s -w"), "./cmd/logcli"
end

test do
Expand All @@ -44,7 +43,6 @@ def install
fork { exec Formula["loki"].bin/"loki", "-config.file=loki-local-config.yaml" }
sleep 3

output = shell_output("#{bin}/logcli --addr=http://localhost:#{port} labels")
assert_match "__name__", output
Copy link
Member

Choose a reason for hiding this comment

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

__name__ was removed from this endpoint, see grafana/loki#6229

assert_empty shell_output("#{bin}/logcli --addr=http://localhost:#{port} labels")
end
end
9 changes: 4 additions & 5 deletions Formula/loki.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Loki < Formula
desc "Horizontally-scalable, highly-available log aggregation system"
homepage "https://grafana.com/loki"
url "https://github.com/grafana/loki/archive/refs/tags/v2.5.0.tar.gz"
sha256 "f9ca9e52f4d9125cc31f9a593aba6a46ed6464c9cd99b2be4e35192a0ab4a76e"
url "https://github.com/grafana/loki/archive/v2.6.1.tar.gz"
sha256 "4b41175e552dd198bb9cae213df3c0d9ca8cacd0b673f79d26419cea7cfb2df7"
license "AGPL-3.0-only"
head "https://github.com/grafana/loki.git", branch: "main"

Expand All @@ -15,12 +15,11 @@ class Loki < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "ea5d4efa0852c44b33278bb6eee967dacf8b7c48a32908452a815da1c91cf8e0"
end

# Bump to 1.18 on the next release, if possible.
depends_on "go@1.17" => :build
depends_on "go" => :build

def install
cd "cmd/loki" do
system "go", "build", *std_go_args
system "go", "build", *std_go_args(ldflags: "-s -w")
inreplace "loki-local-config.yaml", "/tmp", var
etc.install "loki-local-config.yaml"
end
Expand Down
9 changes: 4 additions & 5 deletions Formula/promtail.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Promtail < Formula
desc "Log agent for Loki"
homepage "https://grafana.com/loki"
url "https://github.com/grafana/loki/archive/refs/tags/v2.5.0.tar.gz"
sha256 "f9ca9e52f4d9125cc31f9a593aba6a46ed6464c9cd99b2be4e35192a0ab4a76e"
url "https://github.com/grafana/loki/archive/v2.6.1.tar.gz"
sha256 "4b41175e552dd198bb9cae213df3c0d9ca8cacd0b673f79d26419cea7cfb2df7"
license "AGPL-3.0-only"
head "https://github.com/grafana/loki.git", branch: "main"

Expand All @@ -19,16 +19,15 @@ class Promtail < Formula
sha256 cellar: :any_skip_relocation, x86_64_linux: "78231035a114c603adbe37b031766fe239d3c83dbc34abdefa329d44530a2243"
end

# Bump to 1.18 on the next release, if possible.
depends_on "go@1.17" => :build
depends_on "go" => :build

on_linux do
depends_on "systemd"
end

def install
cd "clients/cmd/promtail" do
system "go", "build", *std_go_args
system "go", "build", *std_go_args(ldflags: "-s -w")
etc.install "promtail-local-config.yaml"
end
end
Expand Down