Gate container image validation behind feature flag

Add containerImageValidation experimental feature flag that gates the
new container image validation behind an opt-in toggle. When the flag
is off (default), the legacy converter logic is used. When enabled,
the improved validation with expression handling runs.

The legacy code is duplicated to keep code paths fully isolated and
make the eventual cleanup diff minimal — just delete the legacy
functions and the flag guards.

Co-authored-by: Copilot <[email protected]>
This commit is contained in:
eric sciple
2026-02-13 21:02:30 +00:00
co-authored by Copilot
parent 671f92dbc6
commit c85997ad0d
4 changed files with 152 additions and 3 deletions
+12 -1
View File
@@ -28,6 +28,13 @@ export interface ExperimentalFeatures {
* @default false
*/
blockScalarChompingWarning?: boolean;
/**
* Enable improved container image validation that handles
* expressions gracefully and validates empty/docker:// images.
* @default false
*/
containerImageValidation?: boolean;
}
/**
@@ -39,7 +46,11 @@ export type ExperimentalFeatureKey = Exclude<keyof ExperimentalFeatures, "all">;
* All known experimental feature keys.
* This list must be kept in sync with the ExperimentalFeatures interface.
*/
const allFeatureKeys: ExperimentalFeatureKey[] = ["missingInputsQuickfix", "blockScalarChompingWarning"];
const allFeatureKeys: ExperimentalFeatureKey[] = [
"missingInputsQuickfix",
"blockScalarChompingWarning",
"containerImageValidation"
];
export class FeatureFlags {
private readonly features: ExperimentalFeatures;