Skip to content

Commit

Permalink
Merge branch 'main' into alsoba13/profilecli-rename-merge-to-profile
Browse files Browse the repository at this point in the history
  • Loading branch information
alsoba13 authored Oct 16, 2024
2 parents 0f1d49a + bf3de86 commit f0b5049
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ $(BIN)/mockery: Makefile go.mod

$(BIN)/updater: Makefile
@mkdir -p $(@D)
GOBIN=$(abspath $(@D)) GOPRIVATE=github.com/grafana/deployment_tools $(GO) install github.com/grafana/deployment_tools/drone/plugins/cmd/updater@d64d509
GOBIN=$(abspath $(@D)) GOPRIVATE=github.com/grafana/deployment_tools $(GO) install github.com/grafana/deployment_tools/docker/updater/cmd/updater@bd5794b4e488

# Note: When updating the goreleaser version also update .github/workflow/release.yml and .git/workflow/weekly-release.yaml
$(BIN)/goreleaser: Makefile go.mod
Expand Down
1 change: 1 addition & 0 deletions cmd/profilecli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ func main() {
blocksQueryCmd := blocksCmd.Command("query", "Query on local/remote blocks.")
blocksQuerySeriesCmd := blocksQueryCmd.Command("series", "Request series labels on local/remote blocks.")
blocksQuerySeriesParams := addBlocksQuerySeriesParams(blocksQuerySeriesCmd)

blocksQueryProfileCmd := blocksQueryCmd.Command("profile", "Request merged profile on local/remote block.").Alias("merge")
blocksQueryProfileParams := addBlocksQueryProfileParams(blocksQueryProfileCmd)

Expand Down
2 changes: 2 additions & 0 deletions cmd/profilecli/query-blocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ func addBlocksQueryParams(queryCmd commander) *blocksQueryParams {
return params
}


func addBlocksQueryProfileParams(queryCmd commander) *blocksQueryProfileParams {
params := new(blocksQueryProfileParams)
params.blocksQueryParams = addBlocksQueryParams(queryCmd)
Expand All @@ -65,6 +66,7 @@ func addBlocksQuerySeriesParams(queryCmd commander) *blocksQuerySeriesParams {
return params
}


func blocksQueryProfile(ctx context.Context, params *blocksQueryProfileParams) error {
level.Info(logger).Log("msg", "blocks query profile", "blockIds", fmt.Sprintf("%v", params.BlockIds), "path",
cfg.blocks.path, "bucketName", params.BucketName, "tenantId", params.TenantID, "query", params.Query, "type", params.ProfileType)
Expand Down

0 comments on commit f0b5049

Please sign in to comment.