Skip to content

Commit 5b8e5d9

Browse files
committed
fix: revert inputs to secrets option, always replace for injected blocks
1 parent 4f5449a commit 5b8e5d9

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

core/config/yaml/loadLocalYamlBlocks.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ export async function unrollLocalYamlBlocks(
3737
ide,
3838
),
3939
renderSecrets: true,
40-
replaceInputsWithSecrets: true,
4140
injectBlocks: packageIdentifiers,
4241
},
4342
);

extensions/cli/src/configLoader.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,6 @@ export async function unrollPackageIdentifiersAsConfigYaml(
382382
platformClient: new CLIPlatformClient(organizationId, apiClient),
383383
renderSecrets: true,
384384
injectBlocks: packageIdentifiers,
385-
replaceInputsWithSecrets: true,
386385
},
387386
);
388387
if (!unrollResult?.config) {

packages/config-yaml/src/load/unroll.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ export interface DoNotRenderSecretsUnrollAssistantOptions
215215
export interface RenderSecretsUnrollAssistantOptions
216216
extends BaseUnrollAssistantOptions {
217217
renderSecrets: true;
218-
replaceInputsWithSecrets?: boolean;
219218
orgScopeId: string | null;
220219
currentUserSlug: string;
221220
platformClient: PlatformClient;
@@ -307,10 +306,6 @@ export async function unrollAssistantFromContent(
307306
};
308307
}
309308

310-
if (options.replaceInputsWithSecrets) {
311-
templatedYaml = replaceInputsWithSecrets(templatedYaml);
312-
}
313-
314309
// Render secret values/locations for client
315310
const secrets = await extractRenderedSecretsMap(
316311
templatedYaml,
@@ -544,8 +539,11 @@ export async function unrollBlocks(
544539
const injectedBlockPromises = injectBlocks.map(async (injectBlock) => {
545540
try {
546541
const blockConfigYaml = await registry.getContent(injectBlock);
542+
// Replace inputs with secrets for injected blocks since they can't render inputs
543+
const blockConfigYamlWithSecrets =
544+
replaceInputsWithSecrets(blockConfigYaml);
547545
const parsedBlock = parseMarkdownRuleOrConfigYaml(
548-
blockConfigYaml,
546+
blockConfigYamlWithSecrets,
549547
injectBlock,
550548
);
551549
const blockType = getBlockType(parsedBlock);

0 commit comments

Comments
 (0)