Skip to content

Commit e16b04d

Browse files
cursoragentarmenzg
andcommitted
fix(aws-lambda): Add validation for awsExternalId and fix stale function state
- Add .min(1) validation to awsExternalId field to match legacy component behavior - Fix enabled functions submission to filter from current stepData.functions instead of stale state Co-authored-by: Armen Zambrano G. <armenzg@users.noreply.github.com>
1 parent 044b74c commit e16b04d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

static/app/components/pipeline/pipelineIntegrationAwsLambda.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ const cloudFormationSchema = z.object({
122122
.min(1, t('AWS Account Number is required'))
123123
.regex(/^\d{12}$/, t('Must be a 12-digit AWS account number')),
124124
region: z.string().min(1, t('Region is required')),
125-
awsExternalId: z.string(),
125+
awsExternalId: z.string().min(1, t('External ID is required')),
126126
});
127127

128128
function CloudFormationStep({
@@ -413,9 +413,9 @@ function InstrumentationStep({
413413
size="sm"
414414
disabled={isAdvancing || enabledCount === 0}
415415
onClick={() => {
416-
const enabledFunctions = Object.entries(enabled)
417-
.filter(([_, v]) => v)
418-
.map(([name]) => name);
416+
const enabledFunctions = functions
417+
.filter(fn => enabled[fn.name])
418+
.map(fn => fn.name);
419419
advance({enabledFunctions});
420420
}}
421421
>

0 commit comments

Comments
 (0)