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

Fix type and check errors #4513

Merged
merged 1 commit into from
Jan 3, 2025
Merged
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
3 changes: 2 additions & 1 deletion lib/sanbase/alerts/struct_map_transformation.ex
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ defmodule Sanbase.Alert.StructMapTransformation do
[{:erlang, :binary_to_existing_atom, [str, _], _} | _] = __STACKTRACE__

errors = Process.get(@unsupported_fields_error, [])
field = if is_binary(str), do: str, else: inspect(str)

Process.put(@unsupported_fields_error, [
~s/The trigger contains unsupported or mistyped field "#{str}"/ | errors
~s/The trigger contains unsupported or mistyped field "#{field}"/ | errors
])

acc
Expand Down
2 changes: 1 addition & 1 deletion lib/sanbase/clickhouse/metric/metric_adapter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ defmodule Sanbase.Clickhouse.MetricAdapter do
@impl Sanbase.Metric.Behaviour
def available_slugs(metric) do
cond do
"age_distribution" ->
metric == "age_distribution" ->
# avoid infinite loop if it goes into HistogramMetric
get_available_slugs(metric)

Expand Down
Loading