Skip to content

Commit

Permalink
fix: sort unstable HTTP result on test profile
Browse files Browse the repository at this point in the history
Signed-off-by: Ruihang Xia <[email protected]>
  • Loading branch information
waynexia committed May 10, 2024
1 parent 5a0629e commit 08945f1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: sqlness-logs
path: /tmp/sqlness-*
path: /tmp/sqlness*
retention-days: 3

sqlness-kafka-wal:
Expand Down Expand Up @@ -286,7 +286,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: sqlness-logs-with-kafka-wal
path: /tmp/sqlness-*
path: /tmp/sqlness*
retention-days: 3

fmt:
Expand Down
7 changes: 7 additions & 0 deletions src/servers/src/http/prometheus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,13 @@ pub async fn label_values_query(
.collect();

let mut label_values: Vec<_> = label_values.into_iter().collect();

// sort result for consistent output in tests
#[cfg(test)]
{
label_values.sort_unstable();
}

label_values.sort();
let mut resp = PrometheusJsonResponse::success(PrometheusResponse::LabelValues(label_values));
resp.resp_metrics = merge_map;
Expand Down

0 comments on commit 08945f1

Please sign in to comment.