fix: revert inputs to secrets option, always replace for injected blocks
This commit is contained in:
parent
4f5449adc1
commit
5b8e5d962d
3 changed files with 4 additions and 8 deletions
|
|
@ -37,7 +37,6 @@ export async function unrollLocalYamlBlocks(
|
|||
ide,
|
||||
),
|
||||
renderSecrets: true,
|
||||
replaceInputsWithSecrets: true,
|
||||
injectBlocks: packageIdentifiers,
|
||||
},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -382,7 +382,6 @@ export async function unrollPackageIdentifiersAsConfigYaml(
|
|||
platformClient: new CLIPlatformClient(organizationId, apiClient),
|
||||
renderSecrets: true,
|
||||
injectBlocks: packageIdentifiers,
|
||||
replaceInputsWithSecrets: true,
|
||||
},
|
||||
);
|
||||
if (!unrollResult?.config) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue