Skip to content

does dryRun work? #26

@altaurog

Description

@altaurog

This looks like a useful action, thanks for the extra effort to make deploying lambdas easy.

I haven’t tried it yet; at work we have our own deployment script written in python which was intended to replace SAM, addressing our specific needs.

In any case, I am puzzled by the code here:

// Determine if function exists
let functionExists;
if (!dryRun) {
core.info(`Checking if ${functionName} exists`);
functionExists = await checkFunctionExists(client, functionName);
}
if (dryRun) {
core.info('DRY RUN MODE: No AWS resources will be created or modified');
if (!functionExists) {
core.setFailed('DRY RUN MODE can only be used for updating function code of existing functions');
return;
}
}

Does it work as expected? It seems to me that if dryRun is truthy then functionExists is guaranteed to be undefined on line 61 and the function will exit with a warning. Perhaps the conditional on line 55 should be removed, so checkFunctionExists will run in all cases?

Maybe I’m missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions