Feat: add flags to disable slow health and latest version checks (#493) (#644)

* added more info to features.md

* added details to FEATURES.md

* .

* reset to last commit

* Update FEATURES.md

* feat: add flags to disable slow health and latest version checks

- Introduce --no-health and --no-latest CLI flags
- Support HD_NO_HEALTH and HD_NO_LATEST environment variables
- Skip slow k8s health checks and latest version fetching when flags are set
- Optimize frontend data fetching based on these flags

* chore: fix lint errors in InstalledPackageCard.tsx

* chore: remove accidental lockfile changes
This commit is contained in:
S Kumar Dhananjaya
2026-01-17 17:34:55 +05:30
committed by GitHub
parent 323a60fe31
commit 65a250e2a4
7 changed files with 26 additions and 2 deletions

View File

@@ -43,6 +43,8 @@ export interface ApplicationStatus {
ClusterMode: boolean;
CurVer: string;
LatestVer: string;
NoHealth: boolean;
NoLatest: boolean;
}
export interface KubectlContexts {

View File

@@ -16,6 +16,7 @@ import { isNewerVersion } from "../../utils";
import type { LatestChartVersion } from "../../API/interfaces";
import useNavigateWithSearchParams from "../../hooks/useNavigateWithSearchParams";
import { useInView } from "react-intersection-observer";
import { useGetApplicationStatus } from "../../API/other";
type InstalledPackageCardProps = {
release: Release;
@@ -31,14 +32,17 @@ export default function InstalledPackageCard({
threshold: 0.3,
triggerOnce: true,
});
const { data: status } = useGetApplicationStatus();
const { data: latestVersionResult } = useGetLatestVersion(release.chartName, {
queryKey: ["chartName", release.chartName],
enabled: !status?.NoLatest,
});
const { data: statusData = [], isLoading } = useQuery<ReleaseHealthStatus[]>({
queryKey: ["resourceStatus", release],
queryFn: () => apiService.getResourceStatus({ release }),
enabled: inView,
enabled: inView && !status?.NoHealth,
});
const latestVersionData: LatestChartVersion | undefined =

View File

@@ -104,6 +104,8 @@ export type Status = {
Analytics: boolean;
CacheHitRatio: number;
ClusterMode: boolean;
NoHealth: boolean;
NoLatest: boolean;
};
export type ChartVersion = {