Skip to content

Commit

Permalink
fix(lambda): refactor and fix handle and ondemand caching for lambda (#…
Browse files Browse the repository at this point in the history
…5437)

* fix(lambda): initialize evictions map with a mutable map

* fix(lambda): add evictions to the lambda cache interval

* fix(lambda): add evictions to the lambda cache interval

* fix(lambda): add evictions to the lambda cache interval

* fix(lambda): refactor and fix handle and ondemand caching for lambda

* fix(lambda): implement applicationNameable for app authz

* fix(lambda): implement applicationNameable for app authz

* fix(lambda): fix failed test by moving appName to abstract class

* fix(lambda): fix failed test by moving appName to abstract class

* fix(lambda): fix failed test by moving appName to abstract class

* fix(lambda): return empty list if appName is null/empty

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
zachsmith1 and mergify[bot] committed Jul 28, 2021
1 parent 338a3f9 commit a616975
Show file tree
Hide file tree
Showing 5 changed files with 403 additions and 112 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,25 @@
package com.netflix.spinnaker.clouddriver.lambda.deploy.description;

import com.netflix.spinnaker.clouddriver.aws.deploy.description.AbstractAmazonCredentialsDescription;
import com.netflix.spinnaker.clouddriver.security.resources.ApplicationNameable;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = false)
public abstract class AbstractLambdaFunctionDescription
extends AbstractAmazonCredentialsDescription {
public abstract class AbstractLambdaFunctionDescription extends AbstractAmazonCredentialsDescription
implements ApplicationNameable {
String region;
String appName;

@Override
public Collection<String> getApplications() {
if (appName == null || appName.isEmpty()) {
return Collections.emptyList();
}
return List.of(getAppName());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public class CreateLambdaFunctionDescription extends AbstractLambdaFunctionDescr
String handler;
String role;
String runtime;
String appName;
List<String> layers;

Integer memorySize;
Expand Down
Loading

0 comments on commit a616975

Please sign in to comment.