diff --git a/Dockerfile.dev b/Dockerfile.dev index c5948a056ad..a49d1622198 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -16,7 +16,7 @@ COPY ui . COPY --from=ui-deps /app/node_modules ./node_modules RUN yarn workspace @parca/web build -FROM docker.io/golang:1.20.1-alpine@sha256:48f336ef8366b9d6246293e3047259d0f614ee167db1869bdbc343d6e09aed8a AS builder +FROM docker.io/golang:1.20.1-alpine@sha256:87d0a3309b34e2ca732efd69fb899d3c420d3382370fd6e7e6d2cb5c930f27f9 AS builder # renovate: datasource=go depName=github.com/go-delve/delve ARG DLV_VERSION=v1.20.1 @@ -45,7 +45,7 @@ COPY ./gen /app/gen RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -gcflags="all=-N -l" -o parca ./cmd/parca -FROM docker.io/golang:1.20.1-alpine@sha256:48f336ef8366b9d6246293e3047259d0f614ee167db1869bdbc343d6e09aed8a +FROM docker.io/golang:1.20.1-alpine@sha256:87d0a3309b34e2ca732efd69fb899d3c420d3382370fd6e7e6d2cb5c930f27f9 COPY --from=builder /go/bin/dlv / COPY --from=builder /go/bin/grpc-health-probe / diff --git a/Dockerfile.go.dev b/Dockerfile.go.dev index 11a92cbc1e3..7a51850c5c2 100644 --- a/Dockerfile.go.dev +++ b/Dockerfile.go.dev @@ -1,6 +1,6 @@ # vim: ft=dockerfile # Designed to only used by Tilt to iterate faster on the API. -FROM docker.io/golang:1.20.1-alpine@sha256:48f336ef8366b9d6246293e3047259d0f614ee167db1869bdbc343d6e09aed8a AS builder +FROM docker.io/golang:1.20.1-alpine@sha256:87d0a3309b34e2ca732efd69fb899d3c420d3382370fd6e7e6d2cb5c930f27f9 AS builder # renovate: datasource=go depName=github.com/go-delve/delve ARG DLV_VERSION=v1.20.1 @@ -36,7 +36,7 @@ COPY ./gen /app/gen # goreleaser build --single-target RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -gcflags="all=-N -l" -o parca ./cmd/parca -FROM docker.io/golang:1.20.1-alpine@sha256:48f336ef8366b9d6246293e3047259d0f614ee167db1869bdbc343d6e09aed8a +FROM docker.io/golang:1.20.1-alpine@sha256:87d0a3309b34e2ca732efd69fb899d3c420d3382370fd6e7e6d2cb5c930f27f9 COPY --from=builder /go/bin/dlv / COPY --from=builder /go/bin/grpc-health-probe / diff --git a/ui/packages/shared/profile/src/ProfileExplorer/index.tsx b/ui/packages/shared/profile/src/ProfileExplorer/index.tsx index 4c2ab65e2c3..c903f3972e9 100644 --- a/ui/packages/shared/profile/src/ProfileExplorer/index.tsx +++ b/ui/packages/shared/profile/src/ProfileExplorer/index.tsx @@ -111,6 +111,12 @@ const ProfileExplorerApp = ({ dashboard_items, } = queryParams; + // eslint-disable-next-line @typescript-eslint/naming-convention + const expression_a = getExpressionAsAString(queryParams.expression_a); + + // eslint-disable-next-line @typescript-eslint/naming-convention + const expression_b = getExpressionAsAString(queryParams.expression_b); + /* eslint-enable @typescript-eslint/naming-convention */ const [profileA, setProfileA] = useState(null); const [profileB, setProfileB] = useState(null); @@ -176,12 +182,6 @@ const ProfileExplorerApp = ({ from_a = sanitizedRange.from_a; to_a = sanitizedRange.to_a; - // eslint-disable-next-line @typescript-eslint/naming-convention - const expression_a = getExpressionAsAString(queryParams.expression_a); - - // eslint-disable-next-line @typescript-eslint/naming-convention - const expression_b = getExpressionAsAString(queryParams.expression_b); - if ((queryParams?.expression_a ?? '') !== '') queryParams.expression_a = expression_a; if ((queryParams?.expression_b ?? '') !== '') queryParams.expression_b = expression_b; diff --git a/ui/packages/shared/profile/src/ProfileSelector/index.tsx b/ui/packages/shared/profile/src/ProfileSelector/index.tsx index dfd4a9ccf74..af23d7e68ba 100644 --- a/ui/packages/shared/profile/src/ProfileSelector/index.tsx +++ b/ui/packages/shared/profile/src/ProfileSelector/index.tsx @@ -252,12 +252,19 @@ const ProfileSelector = ({ to={querySelection.to} profile={profileSelection} setTimeRange={(range: DateTimeRange) => { + const from = range.getFromMs(); + const to = range.getToMs(); + let mergedProfileParams = {}; + if (query.profileType().delta) { + mergedProfileParams = {mergeFrom: from, mergeTo: to}; + } setTimeRangeSelection(range); selectQuery({ expression: queryExpressionString, - from: range.getFromMs(), - to: range.getToMs(), + from, + to, timeSelection: range.getRangeKey(), + ...mergedProfileParams, }); }} addLabelMatcher={addLabelMatcher}