From 5b8e5d962dccb870125c22eca4d93367dbfe6a28 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 15 Oct 2025 02:47:51 -0700 Subject: [PATCH] fix: revert inputs to secrets option, always replace for injected blocks --- core/config/yaml/loadLocalYamlBlocks.ts | 1 - extensions/cli/src/configLoader.ts | 1 - packages/config-yaml/src/load/unroll.ts | 10 ++++------ 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/core/config/yaml/loadLocalYamlBlocks.ts b/core/config/yaml/loadLocalYamlBlocks.ts index 36996451f..aa769eb0c 100644 --- a/core/config/yaml/loadLocalYamlBlocks.ts +++ b/core/config/yaml/loadLocalYamlBlocks.ts @@ -37,7 +37,6 @@ export async function unrollLocalYamlBlocks( ide, ), renderSecrets: true, - replaceInputsWithSecrets: true, injectBlocks: packageIdentifiers, }, ); diff --git a/extensions/cli/src/configLoader.ts b/extensions/cli/src/configLoader.ts index 719094fde..34d785ca1 100644 --- a/extensions/cli/src/configLoader.ts +++ b/extensions/cli/src/configLoader.ts @@ -382,7 +382,6 @@ export async function unrollPackageIdentifiersAsConfigYaml( platformClient: new CLIPlatformClient(organizationId, apiClient), renderSecrets: true, injectBlocks: packageIdentifiers, - replaceInputsWithSecrets: true, }, ); if (!unrollResult?.config) { diff --git a/packages/config-yaml/src/load/unroll.ts b/packages/config-yaml/src/load/unroll.ts index 693cff1dd..8813ff153 100644 --- a/packages/config-yaml/src/load/unroll.ts +++ b/packages/config-yaml/src/load/unroll.ts @@ -215,7 +215,6 @@ export interface DoNotRenderSecretsUnrollAssistantOptions export interface RenderSecretsUnrollAssistantOptions extends BaseUnrollAssistantOptions { renderSecrets: true; - replaceInputsWithSecrets?: boolean; orgScopeId: string | null; currentUserSlug: string; platformClient: PlatformClient; @@ -307,10 +306,6 @@ export async function unrollAssistantFromContent( }; } - if (options.replaceInputsWithSecrets) { - templatedYaml = replaceInputsWithSecrets(templatedYaml); - } - // Render secret values/locations for client const secrets = await extractRenderedSecretsMap( templatedYaml, @@ -544,8 +539,11 @@ export async function unrollBlocks( const injectedBlockPromises = injectBlocks.map(async (injectBlock) => { try { const blockConfigYaml = await registry.getContent(injectBlock); + // Replace inputs with secrets for injected blocks since they can't render inputs + const blockConfigYamlWithSecrets = + replaceInputsWithSecrets(blockConfigYaml); const parsedBlock = parseMarkdownRuleOrConfigYaml( - blockConfigYaml, + blockConfigYamlWithSecrets, injectBlock, ); const blockType = getBlockType(parsedBlock);