Skip to content

Commit 966e852

Browse files
authored
Merge branch 'main' into select-groupby-dropdown
2 parents ff6c53c + 4bcbd7e commit 966e852

File tree

11 files changed

+135
-17
lines changed

11 files changed

+135
-17
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ARG TARGETARCH=amd64
88
ARG TARGETVARIANT=v1
99

1010
# renovate: datasource=github-releases depName=grpc-ecosystem/grpc-health-probe
11-
ARG GRPC_HEALTH_PROBE_VERSION=v0.4.38
11+
ARG GRPC_HEALTH_PROBE_VERSION=v0.4.39
1212
# Downloading grpc_health_probe from github releases with retry as we have seen it fail a lot on ci.
1313
RUN for i in `seq 1 50`; do \
1414
wget -qO/bin/grpc_health_probe "https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-${TARGETOS}-${TARGETARCH}" && \

Dockerfile.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ FROM docker.io/golang:1.24.4-alpine@sha256:68932fa6d4d4059845c8f40ad7e654e626f3e
2222
ARG DLV_VERSION=v1.25.0
2323

2424
# renovate: datasource=go depName=github.com/grpc-ecosystem/grpc-health-probe
25-
ARG GRPC_HEALTH_PROBE_VERSION=v0.4.38
25+
ARG GRPC_HEALTH_PROBE_VERSION=v0.4.39
2626

2727
WORKDIR /app
2828

Dockerfile.go.dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ FROM docker.io/golang:1.24.4-alpine@sha256:68932fa6d4d4059845c8f40ad7e654e626f3e
66
ARG DLV_VERSION=v1.25.0
77

88
# renovate: datasource=go depName=github.com/grpc-ecosystem/grpc-health-probe
9-
ARG GRPC_HEALTH_PROBE_VERSION=v0.4.38
9+
ARG GRPC_HEALTH_PROBE_VERSION=v0.4.39
1010

1111
WORKDIR /app
1212

ui/packages/app/web/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [0.16.884](https://github.com/parca-dev/parca/compare/@parca/web@0.16.883...@parca/web@0.16.884) (2025-06-24)
7+
8+
**Note:** Version bump only for package @parca/web
9+
610
## [0.16.883](https://github.com/parca-dev/parca/compare/@parca/web@0.16.882...@parca/web@0.16.883) (2025-06-23)
711

812
**Note:** Version bump only for package @parca/web

ui/packages/app/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@parca/web",
33
"private": true,
4-
"version": "0.16.883",
4+
"version": "0.16.884",
55
"description": "Parca Web Interface",
66
"type": "module",
77
"scripts": {

ui/packages/shared/profile/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [0.19.7](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.6...@parca/profile@0.19.7) (2025-06-24)
7+
8+
**Note:** Version bump only for package @parca/profile
9+
610
## [0.19.6](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.5...@parca/profile@0.19.6) (2025-06-23)
711

812
**Note:** Version bump only for package @parca/profile

ui/packages/shared/profile/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@parca/profile",
3-
"version": "0.19.6",
3+
"version": "0.19.7",
44
"description": "Profile viewing libraries",
55
"dependencies": {
66
"@floating-ui/react": "^0.27.12",
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
// Copyright 2022 The Parca Authors
2+
// Licensed under the Apache License, Version 2.0 (the "License");
3+
// you may not use this file except in compliance with the License.
4+
// You may obtain a copy of the License at
5+
//
6+
// http://www.apache.org/licenses/LICENSE-2.0
7+
//
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
14+
import {describe, expect, it} from 'vitest';
15+
16+
import {filterEmptyParams} from './index';
17+
18+
describe('filterEmptyParams', () => {
19+
it('should return an array with 2 elements when given object with 2 valid and multiple invalid values', () => {
20+
const input = {
21+
validString: 'hello',
22+
validArray: ['item1', 'item2'],
23+
emptyString: '',
24+
undefinedValue: undefined,
25+
emptyArray: [],
26+
anotherEmptyString: '',
27+
};
28+
29+
const result = filterEmptyParams(input);
30+
const resultEntries = Object.entries(result);
31+
32+
expect(resultEntries).toHaveLength(2);
33+
expect(result).toEqual({
34+
validString: 'hello',
35+
validArray: ['item1', 'item2'],
36+
});
37+
});
38+
39+
it('should filter out empty strings', () => {
40+
const input = {
41+
valid: 'test',
42+
empty: '',
43+
};
44+
45+
const result = filterEmptyParams(input);
46+
expect(result).toEqual({valid: 'test'});
47+
});
48+
49+
it('should filter out undefined values', () => {
50+
const input = {
51+
valid: 'test',
52+
notDefined: undefined,
53+
};
54+
55+
const result = filterEmptyParams(input);
56+
expect(result).toEqual({valid: 'test'});
57+
});
58+
59+
it('should filter out empty arrays', () => {
60+
const input = {
61+
valid: 'test',
62+
emptyArray: [],
63+
nonEmptyArray: ['item'],
64+
};
65+
66+
const result = filterEmptyParams(input);
67+
expect(result).toEqual({
68+
valid: 'test',
69+
nonEmptyArray: ['item'],
70+
});
71+
});
72+
73+
it('should keep all valid values including numbers, booleans, and objects', () => {
74+
const input = {
75+
string: 'test',
76+
number: 0,
77+
boolean: false,
78+
object: {key: 'value'},
79+
array: ['item'],
80+
};
81+
82+
const result = filterEmptyParams(input);
83+
expect(result).toEqual(input);
84+
});
85+
86+
it('should return empty object when all values are invalid', () => {
87+
const input = {
88+
empty1: '',
89+
empty2: '',
90+
undefined1: undefined,
91+
emptyArray: [],
92+
};
93+
94+
const result = filterEmptyParams(input);
95+
expect(result).toEqual({});
96+
});
97+
});

ui/packages/shared/profile/src/ProfileExplorer/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const sanitizeDateRange = (
7171
};
7272
/* eslint-enable @typescript-eslint/naming-convention */
7373

74-
const filterEmptyParams = (o: Record<string, any>): Record<string, any> => {
74+
export const filterEmptyParams = (o: Record<string, any>): Record<string, any> => {
7575
return Object.fromEntries(
7676
Object.entries(o)
7777
.filter(

ui/packages/shared/profile/src/ProfileView/hooks/useResetStateOnNewSearch.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@
1414
import {useURLState} from '@parca/components';
1515

1616
export const useResetStateOnNewSearch = (): (() => void) => {
17-
const [, setCurPath] = useURLState('cur_path');
17+
const [val, setCurPath] = useURLState('cur_path');
1818

1919
return () => {
2020
setTimeout(() => {
21+
if (val === undefined) {
22+
return;
23+
}
2124
setCurPath(undefined);
2225
});
2326
};

0 commit comments

Comments
 (0)