Return a non-zero exit code if collection run fails on CLI

First off, thanks for building Bruno. I think this could be really useful and I'm hoping to recommend it to more teams to increase adoption for our organization.
While looking at what it would take to integrate Bruno with our CI pipeline, I noticed the CLI collection runner returns a zero exit code even when requests, tests, or assertions fail.
I think returning a non-zero exit code of 1 for test failures should be enough to allow our CI pipelines to fail the build stage for our API tests.
I wouldn't mind making the change myself, but I need to determine if company policies would allow me to do so.
Thanks!

Hi @dpods
Glad that you like Bruno!
I have updated the cli runner to return a non zero exit code upon any test or assertion failures
https://github.com/usebruno/bruno/commit/51e0ea2c2d17e5fffdc62c1d576ff047541b619b
I have tested the latest fixes by running a jeninks pipeline script.
Here is the pipeline script for your reference
pipeline {
  agent any

  stages {
    stage('Checkout') {
      steps {
        git url: 'https://github.com/usebruno/github-rest-api-collection.git', branch: 'main'
      }
    }

    stage('Install Bruno CLI') {
      steps {
        sh 'npm i @usebruno/cli -y'
      }
    }

    stage('Run tests') {
      steps {
        sh 'node_modules/.bin/bru run --env Github'
      }
    }
  }
}

Thank you for the quick fix @helloanoop


dcgm-exporter dont show metrics from other namespaces and pods k8s

Ask your question
Hello,
There is prometheus-server in namespace monitoring, I've installed dcgm-exporter 3.4.2 in namespace gpu-exporter on gpu-node. I was needed to add annotations prometheus.io/scrape, prometheus.io/port: "9400", prometheus.io/path: "metrics" to dcgm pod and service. Also prometheus-crd was installed in ns stack-kube.
In the end, I get metrics in prometheus, for example, DCGM_FI_DEV_GPU_UTIL or DCGM_FI_DEV_FB_USED, but only one pod\service (self dcgm-exporter), I need to get metrics of other pods on this node (I have nvidia-smi exporter pod/service in same namespace and some different pods in any namespaces). How can I get it?
I tried to install kube-prometheus-stack in namespace stack-kube with serviceMonitorSelectorNilUsesHelmValues: false, I didnt have to create annotations for dcgm-exporter pod/service, but again get metrics of only dcgm-exporter pod/service
DCGM_FI_DEV_FB_USED{DCGM_FI_DRIVER_VERSION="550.54.15", Hostname="k8s-gpu1", app_kubernetes_io_component="dcgm-exporter", app_kubernetes_io_instance="dcgm-gpu-exporter", app_kubernetes_io_managed_by="Helm", app_kubernetes_io_name="dcgm-exporter", app_kubernetes_io_version="3.4.2", device="nvidia0", gpu="0", helm_sh_chart="dcgm-exporter-3.4.2", instance="<IP_ADDRESS>:9400", job="kubernetes-service-endpoints", modelName="NVIDIA RTX A5000", namespace="gpu-exporter", node="k8s-gpu1", service="dcgm-gpu-exporter-dcgm-exporter"}
DCGM_FI_DEV_FB_USED{DCGM_FI_DRIVER_VERSION="550.54.15", Hostname="k8s-gpu1", app_kubernetes_io_component="dcgm-exporter", app_kubernetes_io_instance="dcgm-gpu-exporter", app_kubernetes_io_name="dcgm-exporter", controller_revision_hash="85db9c866c", device="nvidia0", gpu="0", instance="<IP_ADDRESS>:9400", job="kubernetes-pods", modelName="NVIDIA RTX A5000", namespace="gpu-exporter", node="k8s-gpu1", pod="dcgm-gpu-exporter-dcgm-exporter-g54m2", pod_template_generation="7"}

values.yaml dcgm-exporter
# Labels to be added to dcgm-exporter pods
podLabels: {}

# Annotations to be added to dcgm-exporter pods
podAnnotations: #{}
# Using this annotation which is required for prometheus scraping
  prometheus.io/scrape: "true"
  prometheus.io/port: "9400"

# The SecurityContext for the dcgm-exporter pods
podSecurityContext: {}
  # fsGroup: 2000

# The SecurityContext for the dcgm-exporter containers
securityContext:
  privileged: true
  # readOnlyRootFilesystem: true

# Defines the dcgm-exporter service
service:
  # When enabled, the helm chart will create service
  enable: true
  type: ClusterIP
  port: 9400
  address: ":9400"
  # Annotations to add to the service
  annotations: #{}
    prometheus.io/scrape: "true"
    prometheus.io/port: "9400"
    prometheus.io/path: "metrics"

serviceMonitor:
  enabled: true
  interval: 15s
  honorLabels: false
  additionalLabels: {}

@hive74, try using honorLabels: true. The DCGM-Exporter and Prometheus scraper assign the same labels (namespace, pod, and container) to each metric. The honorLabels: true configuration helps to resolve the conflict.

@nvvfedorov thanks for reply.
I've tried, but there is no effect.
prometheus-server with annotations: nothing has changed (prometheus shows only pod/service of itself)
kube-prometheus-stack without annotations: nothing has changed (prometheus shows only pod/service of itself)
DCGM_FI_DEV_FB_USED{DCGM_FI_DRIVER_VERSION="550.54.15", Hostname="k8s-gpu1", app_kubernetes_io_component="dcgm-exporter", app_kubernetes_io_instance="dcgm-gpu-exporter", app_kubernetes_io_managed_by="Helm", app_kubernetes_io_name="dcgm-exporter", app_kubernetes_io_version="3.4.2", device="nvidia0", gpu="0", helm_sh_chart="dcgm-exporter-3.4.2", instance="<IP_ADDRESS>:9400", job="kubernetes-service-endpoints", modelName="NVIDIA RTX A5000", namespace="gpu-exporter", node="k8s-gpu1", service="dcgm-gpu-exporter-dcgm-exporter"}
DCGM_FI_DEV_FB_USED{DCGM_FI_DRIVER_VERSION="550.54.15", Hostname="k8s-gpu1", app_kubernetes_io_component="dcgm-exporter", app_kubernetes_io_instance="dcgm-gpu-exporter", app_kubernetes_io_name="dcgm-exporter", controller_revision_hash="ddc84c56b", device="nvidia0", gpu="0", instance="<IP_ADDRESS>:9400", job="kubernetes-pods", modelName="NVIDIA RTX A5000", namespace="gpu-exporter", node="k8s-gpu1", pod="dcgm-gpu-exporter-dcgm-exporter-n2r46", pod_template_generation="17"}

tried some kube-prometheus-stack configs:
    additionalScrapeConfigs: #[]
      - job_name: gpu-metrics
        scrape_interval: 1s
        metrics_path: /metrics
        scheme: http
        kubernetes_sd_configs:
        - role: endpoints
          namespaces:
            names:
            - gpu-operator
        relabel_configs:
        - source_labels: [__meta_kubernetes_endpoints_name]
          action: drop
          regex: .*-node-feature-discovery-master
        - source_labels: [__meta_kubernetes_pod_node_name]
          action: replace
          target_label: kubernetes_node

also I tried in dcgm-exporter
extraEnv: []
  - name: "DCGM_EXPORTER_KUBERNETES"
    value: "true"
  - name: "DCGM_EXPORTER_KUBERNETES_GPU_ID_TYPE"
    value: "device-name"

how do dcgm-exporter works? is there command via nvidia-smi, for example, to get gpu utilization per pod for all namespaces? or dcgm-exporter dont use nvidia-smi?
And is trouble on dcgm-side or prometheus-side? (that dcgm-exporter shows metrics only selfpod\service). Can I get metrics manually for another namespace pods at least?

@hive74, I think the issue lies in the Prometheus configuration. To confirm whether my assumption is correct, please run the following command within the DCGM-exporter pod: curl -v http://localhost:9400/metrics. If you see metrics with "namespace", "pod", and "container" other than DCGM-exporter itself, that means the DCGM-exporter works as expected, and you need to check your Prometheus configuration.

@nvvfedorov
its good that we can check metrics without prometheus, but
kubectl get endpoints -n gpu-exporter
NAME                                        ENDPOINTS            AGE
endpoints/dcgm-gpu-exporter-dcgm-exporter   <IP_ADDRESS>:9400   5d17h
endpoints/nvidia-gpu-exporter               <IP_ADDRESS>:9835   7d17h

trying
curl <IP_ADDRESS>:9400/metrics
and get
# HELP DCGM_FI_DEV_GPU_UTIL GPU utilization (in %).
# TYPE DCGM_FI_DEV_GPU_UTIL gauge
DCGM_FI_DEV_GPU_UTIL{gpu="0",UUID="GPU-7ad09335-aadb-19c3-e3a8",device="nvidia0",modelName="NVIDIA RTX A5000",Hostname="k8s-gpu1",DCGM_FI_DRIVER_VERSION="550.54.15"} 0
# HELP DCGM_FI_DEV_FB_USED Framebuffer memory used (in MiB).
# TYPE DCGM_FI_DEV_FB_USED gauge
DCGM_FI_DEV_FB_USED{gpu="0",UUID="GPU-7ad09335-aadb-19c3-e3a8",device="nvidia0",modelName="NVIDIA RTX A5000",Hostname="k8s-gpu1",DCGM_FI_DRIVER_VERSION="550.54.15"} 21383

and there is no namespace, pod and container in any metrics

@hive74 , Do you have nvidia-device-plugin installed on your kubernetes cluster? This component is a source of information about namespaced, pod and containers assigned to GPUs.

@nvvfedorov
Yes, nvidia-device-plugin is in any namespace
kubectl get pods -A | grep "nvidia"
gpu-exporter         nvidia-gpu-exporter-c7kz7                     1/1     Running                  0                   10d
jupyterhub           release-name-nvidia-device-plugin-55ssh       1/1     Running                  6 (66d ago)         408d

Can I check information about namespaces, pod and containers via nvidia-device-plugin? To confirm that plugin works correctly.

Additionally, I checked helm chart via helm install --dry-run and found that dcgm-exporter create Role and RoleBinding
Its ok? I thought that need more access like ClusterRole and ClusterRoleBinding
---
# Source: dcgm-exporter/templates/role.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: dcgm-exporter-read-cm
  namespace: gpu-exporter
  labels:
    helm.sh/chart: dcgm-exporter-3.4.2
    app.kubernetes.io/name: dcgm-exporter
    app.kubernetes.io/instance: dcgm-gpu-exporter
    app.kubernetes.io/version: "3.4.2"
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/component: "dcgm-exporter"
rules:
- apiGroups: [""]
  resources: ["configmaps"]
  resourceNames: ["exporter-metrics-config-map"]
  verbs: ["get"]
---
# Source: dcgm-exporter/templates/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: dcgm-gpu-exporter-dcgm-exporter
  namespace: gpu-exporter
  labels:
    helm.sh/chart: dcgm-exporter-3.4.2
    app.kubernetes.io/name: dcgm-exporter
    app.kubernetes.io/instance: dcgm-gpu-exporter
    app.kubernetes.io/version: "3.4.2"
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/component: "dcgm-exporter"
subjects:
- kind: ServiceAccount
  name: dcgm-gpu-exporter-dcgm-exporter
  namespace: gpu-exporter
roleRef:
  kind: Role
  name: dcgm-exporter-read-cm
  apiGroup: rbac.authorization.k8s.io

@hive74 ,  If you have access to the K8S node, where you run the workload, can you try to build https://github.com/k8stopologyawareschedwg/podresourcesapi-tools/tree/main and run the client on the K8S node?
Unfortunately, kubectl doesn't provide commands to work with "k8s.io/kubelet/pkg/apis/podresources/v1alpha1" API :(

@nvvfedorov
dcgm-exporter dont work via v1alpha1, did you mean it?
because when I try to deploy dcgm-exporter via helm and get error:
helm upgrade --cleanup-on-fail --install dcgm-gpu-exporter charts/dcgm-exporter-3.4.2.tgz -n gpu-exporter --version=0.1.0 --values values.yaml

Release "dcgm-gpu-exporter" does not exist. Installing it now.
Error: unable to build kubernetes objects from release manifest: resource mapping not found for name: "dcgm-gpu-exporter-dcgm-exporter" namespace: "gpu-exporter" from "": no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"
ensure CRDs are installed first

To fix it, I've installed prometheus-operator-crd which just has v1alpha1.monitoring.coreos.com
kubectl get apiservices
NAME                                   SERVICE   AVAILABLE   AGE
v1alpha1.monitoring.coreos.com         Local     True        12d

is it key-reason? What can I do that avoid to install prometheus-operator-crd which has v1alpha1? Or is there any crd for dcgm-exporter?

@hive74 , To view namespaces, pods, and containers that utilize a GPU, you must have the nvidia-device-plugin installed. To verify its installation, follow these steps:

Check the logs of nvidia-device-plugin.
You may run the https://github.com/k8stopologyawareschedwg/podresourcesapi-tools/tree/main utility on your K8S node to see if nvidia-device-plugin is working properly.

I think, I found the problem:

my kubelet is in /opt/kubelet
device-plugin is in /var/lib/kubelet (including nvidia-gpu.sock), its default plugin-directory
dcgm-exporter is in /opt/kubelet

I tried to change dcgm-kubeletPath to "/var/lib/kubelet/pod-resources" and get
time="2024-08-02T12:45:40Z" level=error msg="Failed to collect metrics; err: failed to transform metrics for transform 'podMapper'; err: failure connecting to '/var/lib/kubelet/pod-resources/kubelet.sock'; err: context deadline exceeded"

Can I configure dcgm-exporter for different plugin and kubelet folders? Is there may be any solution?

I have the same issue here. It seems that the device plugin uses /var/lib/kubelet/pod-resources for pod resource identification; however, the pod resources exist in /opt/kubelet, so ultimately there are no pod resources available.
I finally tried mounting /opt/kubelet/pod-resources to /var/lib/kubelet/pod-resources and restarted the device plugin and DCGM exporter, and then the actual namespaces and pods showed up.
sudo mkdir -p /var/lib/kubelet/pod-resources
sudo mount --bind /opt/pod-resources /var/lib/kubelet/pod-resources

To ensure the mount persists after server restarts, I also added it to /etc/fstab:
/data/kubelet/pod-resources /opt/kubelet/pod-resources none bind 0 0
The device plugin does not support a custom device-plugin-dir, so I think this is our only option for now.
Hope this helps.


Build Init plugin should allow configuring JUnit 5 for Java project types

Expected Behavior
The parameters --test-framework should allow the value junit4 and junit5. Not providing the --test-framework parameter should default to JUnit 5. The generated code should include something like the following:
test {
    useJUnitPlatform()
}

dependencies {
    def junitJupiterVersion = '5.4.1'
    testImplementation "org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion"
    testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitJupiterVersion"
}

Current Behavior
A user can only generate a Java-based project with JUnit 4 as the default. JUnit 5 will likely become the standard version for most projects in the near future.
Context
Support JUnit 5 in the build init plugin.
Steps to Reproduce (for bugs)
The command gradle init --type java-library only generates JUnit 4 code.

This is done via #9118 plus some follow up in #9191


Fix test example

test-listen waits for server instance to be passed in as an argument.

Good catch! Though, could you write the test example without import since all examples are using require.

@timneutkens ✨

Thanks! ❤


Fix issues reported by deepsource

Fixes #7
Fixes #8
Fixes #9
Fixes #10

Hello @egeakman! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file misc/functions/network.py:

Line 59:80: E501 line too long (83 > 79 characters)
Line 66:80: E501 line too long (83 > 79 characters)


Ability to set MTU in cluster yaml/config

What kind of request is this (question/bug/enhancement/feature request):
feature
Details:
The ability to set the MTU for the network providor would be very helpful for a number of our customers that have interfaces set to MTUs other than 1500. An example customer requires an MTU of 9000 on a bonded interface.
While under most circumstances you can set the MTU in the canal config map and just delete the pods and let them be rescheduled, this config map gets recreated when kubernetes is updated.
The ability to set the interface MTU in the cluster yaml/config is what is desired here.

Can be tested using:
network:
  plugin: canal
  mtu: 4500

tested in Rancher:v2.3-head baa64d48a
Steps:

provision RKE cluster with different CNI (Canal, Calico, Weave) with mtu: 4500 under the network section in the config yaml file

Results:

For the cluster with Canal, go to project System to check the Config Map canal-config to see the value for mtu

For the cluster with Calico, go to project System to check the Config Map calico-config to see the value for veth_mtu

For the cluster with Weave, exec into the workload weave-net under the project System  to check environment variables

/home/weave # env | grep  MTU
WEAVE_MTU=4500

@superseb  Should there be a forward port to Rancher:master-head ?

@superseb with this setting, we need to add documentation that the cluster admin needs to configure the host MTU less 50 for vxlan encap.
Example: If MTU of eth0 is 9000, then we need to pass 8950 in cluster.yml


Error "Cannot read property 'children' of undefined" when building module.

Building a module with the attached markdown results in the error: Cannot read property 'children' of undefined
---
name: Appendix B - NPCs and Monsters
slug: appendix-b-npcs-monsters
order: 7
module-pagebreaks: h1, h2, h3
pdf-pagebreaks: h1
footer:
hide-footer-text: false
---

# Apendix B: NPCs & Monsters

```Monster {.two-column}
id: 2c011c22-0f0c-4cc8-95de-9f53a9b89df5
name: Evil McEvilface
slug: evil-mcevilface
size: Medium
type: humanoid
alignment: neutral evil
ac: 15
hp: 30 (10d6)
speed: 30 ft.
str: 17
dex: 13
con: 12
int: 10
wis: 6
cha: 8
role: enemy
saves: Str + 2
skills: Stealth +6
vulnerabilities: radiant
resistances: bludgeoning, piercing
damageImmunities: poison
conditionImmunities: poisoned, petrified
senses: darkvision 60 ft., passive Perception 9
languages: Common, Celestial
challenge: 1/4
environments: forest, grassland, hill, underdark
image: Monster.jpg
token: MonsterToken.png
traits:
  - name: Smells Bad
    description: The Evil McEvilface smells pretty ripe. This doesn't do anything to the party, but makes unarmed combat and grappling far less pleasant.
actions:
  - name: Novelty-Sized Plunger
    description: "Melee Weapon Attack: +5 to hit, reach 5 ft., one target. Hit: 7 (1d6 + 4) suction damage."
  - name: Open-carry Trebuchet
    description: "Ranged Weapon Attack: +5 to hit, range 80/320 ft., one target. Hit: 7 (1d6 + 4) bludgeon damage."
 Your next ability check must be rolled with disadvantage.
legendaryActions:
  - description: The Evil McEvilface can take 1 legendary actions, using the Explosion option below.
  - name: Explosion
    description: "The Evil McEvilface suddenly explodes doing 1d20 damage to all creatures within 10 ft. This kills the Evil McEvilface."
```

Should be fixed


Domain activation is Failed - The status of this certificate request is "Failed"

App Id: d5jmvdc4kaave
Region: us-east-1
Step: Domain activation
Status: Failed

Note: Do not include information that is sensitive in nature such as your domain name, company etc.

Issue/question
I got a domain activation error while creating a custom domain.
Error message
The status of this certificate request is "Failed". One or more domain names have failed validation due to a Certificate Authority Authentication error. Learn more: https://docs.aws.amazon.com/acm/latest/userguide/troubleshooting-caa.html

Refer to our documentation to troubleshoot domain setup.
https://docs.aws.amazon.com/amplify/latest/userguide/custom-domain-troubleshoot-guide.html
https://docs.aws.amazon.com/amplify/latest/userguide/custom-domain-troubleshoot-guide.html#i-get-a-cnamealreadyexistsexception-error
Let us know if you're still facing issues.


[BEAM-2440] BeamSql: reduce visibility

Since the packages are cross-import each other, many of them can't be set to package private access level.

R: @XuMingmin
R: @lukecwik

Retest this please.

Changes Unknown when pulling 90cee3200d5b9029a8d3ba9baaed8d37070611d8 on xumingming:BEAM-2440-reduce-visibility into ** on apache:DSL_SQL**.

Changes Unknown when pulling 90cee3200d5b9029a8d3ba9baaed8d37070611d8 on xumingming:BEAM-2440-reduce-visibility into ** on apache:DSL_SQL**.

Can you swap me for Luke as reviewer on this please? Luke is trying to focus on Fn API going forward as much as possible.

sure.
R: @takidau
-R: @lukecwik

Rebase done.

Merging, thank you!

Merged, feel free to close. Thanks!

Changes Unknown when pulling fc5906e1e56c323ce520f93e08a024f65b2e4021 on xumingming:BEAM-2440-reduce-visibility into ** on apache:DSL_SQL**.

Changes Unknown when pulling fc5906e1e56c323ce520f93e08a024f65b2e4021 on xumingming:BEAM-2440-reduce-visibility into ** on apache:DSL_SQL**.


Querying with enum

What is the problem in the code? Is anyone help
I have try the fallowing versions:
condition = "condition.OperatorId == " + Operator.RightEqual;
Func<Condition, bool> dynamicWhere = interpreter.ParseAsDelegate<Func<Condition, bool>>(condition, "condition");
condition = "condition.OperatorId == " + Operator.RightEqual.ToString();
condition = "condition.OperatorId = " + Convert.ToInt32(Operator.RightEqual) ;
condition = "condition.OperatorId = " + Operator.RightEqual.ToString();
condition = "condition.OperatorId = " + Operator.RightEqual.ToString();

I think that you must first add the Operator enum inside the interpreter like:
interpreter.Reference(typeof(Operator))

And then write a condition like:
condition = "condition.OperatorId == Operator.RightEqual";

Thank you :)
@davideicardi


Add variable logic and integration tests

What does this PR do?
Adds policy + variable integration tests
Refactors policy + variable into their own classes
What ticket does this PR close?
Resolves #138, #90
Checklists
Change log

[ ] The CHANGELOG has been updated, or
[x] This PR does not include user-facing changes and doesn't require a CHANGELOG update

Test coverage

[x] This PR includes new unit and integration tests to go with the code changes, or
[ ] The changes in this PR do not require tests

Documentation

[ ] Docs (e.g. READMEs) were updated in this PR, and/or there is a follow-on issue to update docs, or
[x] This PR does not require updating any documentation

You did a great job a lot of tests were added .
One of the tests under integration_list (test_list_string_offset_raises_error) is not working well. Need to open bug for it and comment this test.
Left some comments.(went over integration tests)

Thanks! I opened a ticket for this and adding it as a comment above the newly commented out test

You did a great job a lot of tests were added .
One of the tests under integration_list (test_list_string_offset_raises_error) is not working well. Need to open bug for it and comment this test.
Left some comments.(went over integration tests)

Thanks! I opened a ticket for this and adding it as a comment above the newly commented out test

@eladkug I updated the chart as well with the new test names

@eladkug I updated the chart as well with the new test names


WindowScroller demo page is busted

https://bvaughn.github.io/react-virtualized/#/components/WindowScroller
Uncaught TypeError: Cannot read property 'scrollTop' of null

Fixed in #915


DefaultError type fallback type has too strong guarantees

Describe the bug
The type of error is by default Error. When using persistQueryClient it will serialize to JSON. Error is not serializable. JSON.stringify(new Error('some message')) will return "{}".
This leads persisted errors to be of type {}, but useQuery defaults to Error. Therefore the type fallback is incorrect.
Your minimal, reproducible example
https://www.typescriptlang.org/play/?#code/JYWwDg9gTgLgBAbzgVwM4FMCKz1QJ5wC+cAZlBCHAORToCGAxjALQCOO+VAUFwxAHap4adADEIEOAF44ACgCU0gHyIucdXD6D47XARkjse2QjUbzu-AGl0eAFxwA2lRISqAXQA0Z8+st5RfgcFZVVfcLgYAAtyAHc4fnR4gFEocihZKhh0ISp5AG4fX0Iiwnkec2ASWX8AOlx02pAc1DoAc3R5UwjNAVQIABt0WoGINpqOPHq06CaW9s7C8xKi2hhkKH44f0KVriA
Steps to reproduce

use useQuery
look at the type of error

Expected behavior
The type of error defaults to Error, expected unknown.
How often does this bug happen?
Sometimes
Screenshots or Videos
No response
Platform

OS: Android, iOS
Framework: React Native

Tanstack Query adapter
react-query
TanStack Query version
5.51.16
TypeScript version
5.0.4
Additional context
I actually notice the types are as expect in my reproducable code, but looking at the code of the latest version of this package the fallback is still Error.

I've submitted a PR with a potential solution: https://github.com/TanStack/query/pull/7873

sorry, we're not gonna revert back to unknown. The Error type assumption is "optimistic", yes, because it holds true for 99% of cases. It also falls apart if you trow 25 in your queryFn, because 25 is also not an Error.
We've documented how you can opt out of that typings here:
https://tanstack.com/query/v5/docs/framework/react/typescript#registering-a-global-error
Basically, you want:
import '@tanstack/react-query'

declare module '@tanstack/react-query' {
  interface Register {
    defaultError: unknown
  }
}

Regarding persistence: We don't persist queries that are in "error" state for that exact reasons: errors aren't persistable. So to get to an Error being persisted with the plugin, you have to opt-in by implementing the shouldDehydrateQuery  option. This is also documented here: https://tanstack.com/query/v5/docs/framework/react/reference/hydration#limitations

@TkDodo, allright, clear alternate solution. Thanks for the rapid response, no need to be sorry.


RESUME REVIEW

Hello sir,
can u review my resume as i have sent 9 days ago.

As you said in class of 9th march, there is no such review email from you regarding my resume review.

Hello khaja sir,
Since feb 16th am waiting for your review, but no replay.. thank you for your help

I will do it I might have missed sorry for that. Can you resend mail
Get Outlook for Androidhttps://aka.ms/ghei36

From: sumankumarpagadala<EMAIL_ADDRESS>Sent: Monday, March 11, 2019 7:38:04 PM
To: QT-DevOps/DevOpsIssues
Cc: Subscribed
Subject: Re: [QT-DevOps/DevOpsIssues] RESUME REVIEW (#373)
Hello khaja sir,
Since feb 16th am waiting for your review, but no replay.. thank you for your help
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/QT-DevOps/DevOpsIssues/issues/373#issuecomment-471552769, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACU0ratMIoWQDpDJBiyfHXuNz2Z0eZmzks5vVmNEgaJpZM4bQXF5.

Sent today.

i have saved my resume in drive shared you the link 2 days ago...

I will do it over weekend.
Get Outlook for Androidhttps://aka.ms/ghei36

From: sumankumarpagadala<EMAIL_ADDRESS>Sent: Thursday, March 14, 2019 7:15:54 AM
To: QT-DevOps/DevOpsIssues
Cc: shaikkhajaibrahim; Comment
Subject: Re: [QT-DevOps/DevOpsIssues] RESUME REVIEW (#373)
i have saved my resume in drive shared you the link 2 days ago...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/QT-DevOps/DevOpsIssues/issues/373#issuecomment-472671882, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACU0rVdzvyOO-39Xyw7AyL86lQ-YUWRbks5vWanSgaJpZM4bQXF5.

i havent got any response.

This is not the place to raise such concerns so closed. By the way reviewing your resume is happening.
Get Outlook for Androidhttps://aka.ms/ghei36

From: sumankumarpagadala<EMAIL_ADDRESS>Sent: Sunday, March 17, 2019 9:26:17 PM
To: QT-DevOps/DevOpsIssues
Cc: shaikkhajaibrahim; State change
Subject: Re: [QT-DevOps/DevOpsIssues] RESUME REVIEW (#373)
i havent got any response.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHubhttps://github.com/QT-DevOps/DevOpsIssues/issues/373#issuecomment-473678896, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACU0rWno6X2Fp9ZJNwQMVtH826kBxXPBks5vXmWhgaJpZM4bQXF5.


Fix: Reconstruct format behavior

Thank you for looking more into it.
If I look at the diff correctly there are only 2 main changes:
format is being prefixed with / but then you remove the / from the url construction everywhere? (that should not make a difference)
So the line of code which possibly causes changes is: https://github.com/mikepenz/xray-action/pull/621/files#diff-950fe250815d1522969facb340d3f0cf1797c252efb5e919243dc96e4c149671R86 ? 🤔
Am I reading it right?

Hey @mikepenz Yeah the / has been removed from all URIs because this causes the problem. For example in https://github.com/mikepenz/xray-action/pull/621/files#diff-9e7d77b4b83ee129d3f18cc973987343b0a730f184d42da8fe4c6cc19dc50013L118 you use ${this.xrayBaseUrl.pathname}/api/v2/import/execution/${format}/multipart. If your ${format} is xray (therefore empty), then the API URI will be ${this.xrayBaseUrl.pathname}/api/v2/import/execution//multipart which causes into a double // but only one / is needed.
I now preformatted format with a / ONLY if format is NOT xray (as xray needs to be empty). See https://github.com/mikepenz/xray-action/pull/621/files#diff-9e7d77b4b83ee129d3f18cc973987343b0a730f184d42da8fe4c6cc19dc50013R64-R68

Thank you very much for the PR