Compare commits

...

4 Commits

Author SHA1 Message Date
github-actions[bot] 905283f134 chore: release v0.2.10 2026-02-13 01:48:33 +00:00
Chris Farhood 9c62405a0c fix: resolve 'Body is disturbed or locked' fetch error
The error was caused by attempting to read the response body twice:
- First with response.json()
- Then with response.text() in the error handler

This caused the 'Body is disturbed or locked' error that was being
displayed as 'The string did not match the expected pattern'.

Fix: Removed the duplicate response.text() call in error handler.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-12 20:47:37 -05:00
github-actions[bot] 175310c4a6 chore: release v0.2.9 2026-02-13 01:19:45 +00:00
Chris Farhood 329d030c1a fix: add defensive error handling for API version detection
Ensure error messages are always strings before rendering to prevent
React error #310 (invalid React child - object).

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-02-12 20:18:54 -05:00
7 changed files with 26 additions and 15 deletions
+4 -4
View File
@@ -1,13 +1,13 @@
# Artifact Hub package metadata file # Artifact Hub package metadata file
# https://github.com/artifacthub/hub/blob/master/docs/metadata/artifacthub-pkg.yml # https://github.com/artifacthub/hub/blob/master/docs/metadata/artifacthub-pkg.yml
version: 0.2.8 version: 0.2.10
name: headlamp-sealed-secrets name: headlamp-sealed-secrets
displayName: Sealed Secrets Plugin for Headlamp displayName: Sealed Secrets Plugin for Headlamp
createdAt: "2026-02-12T00:00:00Z" createdAt: "2026-02-12T00:00:00Z"
description: A comprehensive Headlamp plugin for managing Bitnami Sealed Secrets with client-side encryption and RBAC-aware UI description: A comprehensive Headlamp plugin for managing Bitnami Sealed Secrets with client-side encryption and RBAC-aware UI
license: Apache-2.0 license: Apache-2.0
homeURL: https://github.com/privilegedescalation/headlamp-sealed-secrets-plugin homeURL: https://github.com/privilegedescalation/headlamp-sealed-secrets-plugin
appVersion: 0.2.8 appVersion: 0.2.10
containersImages: containersImages:
- name: sealed-secrets-controller - name: sealed-secrets-controller
image: docker.io/bitnami/sealed-secrets-controller:v0.24.0 image: docker.io/bitnami/sealed-secrets-controller:v0.24.0
@@ -19,8 +19,8 @@ keywords:
- encryption - encryption
- security - security
annotations: annotations:
headlamp/plugin/archive-url: "https://github.com/privilegedescalation/headlamp-sealed-secrets-plugin/releases/download/v0.2.8/headlamp-sealed-secrets-0.2.8.tar.gz" headlamp/plugin/archive-url: "https://github.com/privilegedescalation/headlamp-sealed-secrets-plugin/releases/download/v0.2.10/headlamp-sealed-secrets-0.2.10.tar.gz"
headlamp/plugin/archive-checksum: sha256:83ba4a09a1b7cfc6ce422f0f62232959d1d4b087cf9f34f4d27241e6c9c838e3 headlamp/plugin/archive-checksum: sha256:f78b772929d9e26dcbb34a52c233f79219ee010619ab34469e3c9bf12ee81435
headlamp/plugin/version-compat: ">=0.13.0" headlamp/plugin/version-compat: ">=0.13.0"
headlamp/plugin/distro-compat: "desktop,in-cluster,web,docker-desktop" headlamp/plugin/distro-compat: "desktop,in-cluster,web,docker-desktop"
links: links:
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "headlamp-sealed-secrets", "name": "headlamp-sealed-secrets",
"version": "0.2.8", "version": "0.2.10",
"description": "Headlamp plugin for Bitnami Sealed Secrets - manage encrypted Kubernetes secrets", "description": "Headlamp plugin for Bitnami Sealed Secrets - manage encrypted Kubernetes secrets",
"files": [ "files": [
"dist", "dist",
@@ -32,14 +32,24 @@ export function VersionWarning({ autoDetect = true, showDetails = false }: Versi
setLoading(true); setLoading(true);
setError(null); setError(null);
const result = await SealedSecret.detectApiVersion(); try {
const result = await SealedSecret.detectApiVersion();
if (result.ok) { if (result.ok) {
setDetectedVersion(result.value); setDetectedVersion(result.value);
setError(null); setError(null);
} else if (result.ok === false) { } else if (result.ok === false) {
setDetectedVersion(null);
// Ensure error is always a string
const errorMessage = typeof result.error === 'string'
? result.error
: String(result.error);
setError(errorMessage);
}
} catch (e) {
// Catch any unexpected errors
setDetectedVersion(null); setDetectedVersion(null);
setError(result.error); setError(e instanceof Error ? e.message : String(e));
} }
setLoading(false); setLoading(false);
@@ -67,8 +77,8 @@ export function VersionWarning({ autoDetect = true, showDetails = false }: Versi
}> }>
<strong>API Version Detection Failed</strong> <strong>API Version Detection Failed</strong>
<br /> <br />
{error} {String(error)}
{error.includes('not found') && ( {String(error).includes('not found') && (
<> <>
<br /> <br />
<br /> <br />
@@ -129,7 +129,8 @@ export class SealedSecret extends KubeObject<SealedSecretInterface> {
if (response.status === 404) { if (response.status === 404) {
throw new Error('SealedSecrets CRD not found. Please install Sealed Secrets on the cluster.'); throw new Error('SealedSecrets CRD not found. Please install Sealed Secrets on the cluster.');
} }
throw new Error(`Failed to fetch CRD: ${response.status} ${response.statusText}`); const errorText = await response.text().catch(() => response.statusText);
throw new Error(`Failed to fetch CRD (${response.status} ${response.statusText}): ${errorText}`);
} }
const crd = await response.json(); const crd = await response.json();