-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
4.17
-
None
-
Quality / Stability / Reliability
-
False
-
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Description of problem:
Two usek8sWatchResource calls in two leaf components in a page are influencing each other's results. The two calls are searching for secrets, namespaced in the same namespace, one search for a specific secret with the name field specified and isList to false, the other one gets them all and set the isList to true. Each component lives in a tab. If I load the tab containing the list=true component first, the behavior is as expected, each useK8sWatchResource will return the correct data. If I load the tab containing the list=false component first and then switch to the tab with the list=true component, then the useK8sWatchResource will return data as if the parameter list=true was set to list=false.
The useK8sWatchResource will return a result loaded but with its error populated, here's the details:
Array(4) [ "SecretList", "v1", {…}, (20) […] ] 0: "SecretList" 1: "v1" 2: Object { resourceVersion: "57100" } 3: Array(20) [ {…}, {…}, {…}, … ] length: 4 <prototype>: Array [] true TypeError: e.get(...).get is not a function n k8s.ts:78 n k8s.ts:76 withMutations Immutable n k8s.ts:66 a k8s.ts:223 Redux 4 h k8s.ts:125 h k8s.ts:125 i main-chunk-5b1bf22aff3068ab80a4.min.js:1 promise callback*s main-chunk-5b1bf22aff3068ab80a4.min.js:1 d main-chunk-5b1bf22aff3068ab80a4.min.js:1 d main-chunk-5b1bf22aff3068ab80a4.min.js:1 h k8s.ts:96 y k8s.ts:146 d main-chunk-5b1bf22aff3068ab80a4.min.js:1 d main-chunk-5b1bf22aff3068ab80a4.min.js:1 y k8s.ts:142 C k8s.ts:229 r Redux d useK8sWatchResource.ts:42 ju React unstable_runWithPriority scheduler.production.min.js:18 React 4 unstable_runWithPriority scheduler.production.min.js:18 React 13 <anonymous> app.jsx:303 Webpack 6 Resources.container.tsx:41:10
How to reproduce:
Checkout this branch: https://github.com/arkmq-org/activemq-artemis-self-provisioning-plugin/commit/7762928558cfc0d8659170c308f7363e4b8763eb start the bridge: cd bridge-auth-https ./setup.sh yarn start-tls #in one terminal yarn start-console-tls #in another terminal Then deploy the operator - checkout https://github.com/arkmq-org/activemq-artemis-operator - ./activemq-artemis-operator/deploy/cluster_wide_install_opr.sh Install the cert-manager operator Create a broker: - Go on this url: https://localhost:9442/k8s/ns/default/add-broker?returnUrl=%2Fk8s%2Fall-namespaces%2Fbrokers - on acceptors click on "add an acceptor" - "apply preset" - click on the card to apply a cert manager and ingress exposure preset - click on "create a new chain of trust" - give a random name to it - confirm - create Go to the broker page: - https://localhost:9442/k8s/ns/default/brokers/ex-aao Navigate to the resources: - https://localhost:9442/k8s/ns/default/brokers/ex-aao/resources Secrets are missing, now refresh the page, secrets are there.