4851 Commits

Author SHA1 Message Date
Kurt Miller
ffa67cf2dd Expand http cors tests for maxAge. Last maxAge defined for a path
wins in a merge.
2018-03-26 22:19:51 -04:00
Kurt Miller
8140f44af0 Address review feedback, add tests. 2018-03-26 20:49:56 -04:00
Kurt Miller
1fb35e135b Merge remote-tracking branch 'AutoCustoms/master' 2018-03-26 19:31:19 -04:00
Takahiro Horike
0c86d99941
Merge pull request #4793 from chrisbarbour/add-iam-managed-policies
Add iam managed policies
2018-03-23 08:40:25 +09:00
CHRIS BARBOUR
0c8a569968 fixing location of ManagedPolicyArns to be under Properties 2018-03-21 21:51:35 +00:00
Takahiro Horike
cabd158577
Merge pull request #4656 from slang25/dotnetcore2.0
Upgrade aws-csharp to .NET Core 2.0
2018-03-22 04:18:17 +09:00
Frank Schmid
9ac93ff8e5
Merge pull request #4677 from franciscocpg/fix-concurrency-upload
Fix concurrency upload
2018-03-19 16:17:03 +01:00
Francisco Guimarães
005b6bdcdd Adding NUM_CONCURRENT_UPLOADS constant 2018-03-19 10:27:11 -03:00
chrisbarbour
2d9f4a27d3 updating to use lodash 2018-03-13 08:22:20 +00:00
Takahiro Horike
776379e807
Merge pull request #4758 from kameshsampath/java/openwhisk-maven-java
Resolving #4491 , adding support for java maven templates for OpenWhisk
2018-03-13 04:49:54 +09:00
Frank Schmid
5a4d00c9ad
Merge pull request #4800 from bsdkurt/master
Continue recursion for #4687
2018-03-06 11:35:17 +01:00
Erik Erikson
8f32a59c7f add test that fails prior to the fix in #4800 and succeeds after 2018-03-05 13:33:18 -08:00
Kamesh Sampath
81328fccb3 renaming the java runtime name in serverless.yaml
Signed-off-by: Kamesh Sampath <kamesh.sampath@hotmail.com>
2018-03-05 09:58:50 +05:30
Kurt Miller
3f5a041678 Continue recursion for #4687 2018-03-04 08:25:19 -05:00
bobjamin
d9f7454339 adding semicolons for linter 2018-03-02 10:49:46 +00:00
bobjamin
e492e744a9 added iam managed policies to aws provider closes #3751 2018-03-02 10:33:35 +00:00
Takahiro Horike
ab163b1fe6
Merge pull request #3999 from rmax-contrib/aws-notification-arns
Add notificationArns AWS parameter to enable Cloudformation notifications
2018-03-02 07:37:17 +09:00
Takahiro Horike
7499af45f0
Merge pull request #4768 from bsdkurt/master
Allow UsagePlan's to be created without ApiKeys defined. Issue #4459
2018-03-01 22:30:48 +09:00
Simon Males
011a75abb8 Removing duplicate dependencies blocks 2018-02-28 18:21:10 +01:00
Simon Males
3a40d671a0 Merge remote-tracking branch 'franciscocpg/add-source-map-support' into typescript-source-maps 2018-02-28 17:59:52 +01:00
Francisco Guimarães
4ac05a63bf Merge branch 'master' into fix-concurrency-upload 2018-02-28 09:51:35 -03:00
Francisco Guimarães
93c50b8006 Adding source map support for all files 2018-02-28 09:29:30 -03:00
Kamesh Sampath
11de3e63ee Fixing lint issues on the test class
Signed-off-by: Kamesh Sampath <kamesh.sampath@hotmail.com>
2018-02-28 17:01:05 +05:30
Takahiro Horike
26184f30f8
Merge pull request #4773 from murtyjones/patch-1
Pass authorizer custom context to target lambda
2018-02-27 22:41:41 +09:00
Yunspace
9c94e0838f consistent README and zip installation for both aws-csharp and aws-fsharp 2018-02-28 00:26:20 +11:00
Takahiro Horike
fbaa6cca51
Merge pull request #4763 from icj217/master
Added name property to cloudwatchEvent CF template
2018-02-27 21:44:28 +09:00
Yunspace
67cbabc4c9 removed redudant code from docs. 2018-02-27 22:23:59 +11:00
Yunspace
c0f136388c Merge branch 'master' into dotnetcore2.0
# Conflicts:
#	.gitignore
#	tests/templates/test_all_templates
2018-02-27 21:21:54 +11:00
Frank Schmid
eb975ddcba
Merge pull request #4775 from serverless/fix-4705
Fixed a bug which you cannot deploy with lambda integration in v1.26.0
2018-02-27 10:35:11 +01:00
Craig Burdulis
52af64368e Fixed test script event name property 2018-02-26 20:31:15 -05:00
Craig Burdulis
53cc8fb607 Added test case and documentation for name property 2018-02-26 20:26:51 -05:00
horike37
93c37e4d39 set default statusCodes to response if it is empty 2018-02-27 01:44:21 +09:00
Takahiro Horike
067bb12b08
Merge pull request #4688 from yunspace/fsharp2
Upgrade aws-fsharp example to .Net Core 2.0
2018-02-26 22:06:46 +09:00
Marty Jones
818f58ac80
Pass authorizer custom context to target lambda
Per https://github.com/serverless/serverless/issues/4374
2018-02-25 21:38:14 -06:00
Kurt Miller
2b19a196d6 Lint corrections for usagePlan.test.js 2018-02-24 14:52:32 -05:00
Kurt Miller
39d07e9aef Expand UsagePlan testing to cover default and custom cases. 2018-02-24 14:33:55 -05:00
Erik Erikson
0ee0a1e239 Only disable and restore dependent service resolution methods once. Otherwise, subsequent removals may cache the previous replacements. If they restore last then they will restore with the replacements, breaking standard usage.
Add tests for this guarantee.
2018-02-24 09:34:50 -08:00
Kurt Miller
97d3a031c8 Allow UsagePlan's to be created without ApiKeys defined. Addresses
issue #4459.
2018-02-24 12:18:03 -05:00
Frank Schmid
8e6582dfa9
Merge pull request #4754 from erikerikson/4713-follow-up-fixes
Follow up fixes for #4713
2018-02-24 11:52:12 +01:00
Erik Erikson
91a10940eb Add further comments noting code entanglement 2018-02-23 10:09:18 -08:00
Yunspace
0d652f287c upgraded fsharp example to dotnet 2.0, updated docs, unit and integration tests. Removed duplicate code from docs section 2018-02-23 20:50:00 +11:00
Erik Erikson
bf5a8c9fd4 Fix 4744 and associated
The framework's Service class modifies a user's service, mutating a given `service: { name: 'string' }` to `service: 'string'` but doesn't account for this in the variables system.  This is the basis for #4744.

While working this area, I discovered that the Service class also does this to the provider, accepting `provider: 'aws'` and replacing it with `provider: { name: 'aws' }`, causing the natural `${self:provider}` to fail.

Catching either 'self:service.name' or 'self:provider' and replacing them with the mutated reference solves this user confusion.
2018-02-22 17:17:55 -08:00
Erik Erikson
dc3a4aa6af Fix print, clean pre-population, fix cyclic bug
Fix `print`
The print command is highly linked to the `Variables` and `Service` codebases, keep those in sync and leave reminders about the link.  Made these explicit and separately implemented to avoid complexity.
Additionally, the print command re-populates an object with the *very similar* content as the previously pre-populated service (just not augmented as just mentioned).  This can lead to cross contamination between the two.  As such, all caches must be cleared per unique invocation of service/object/property population.
Add tests for some expected but previously unverified behaviors.

Clean pre-population
The previous implementation worked okay but was unnecessary and would have been a maintenance problem.  Instead, just knock out the population of variables depending on those config dependent services and use the standard means of resolution.

Fix cyclic bug (resulting from running print against a self-referencing serverless.yml)
The caching of values could lead to a cyclic object remaining in the caches for variable population.  This causes crashes and pain.  Solved by the cache cleaning logic.
2018-02-22 16:30:04 -08:00
icj217
a4de7288f3
Added name property to CloudFormation template
Now when a user specifies a name property under the cloudwatchEvent, it will be carried over to the CF template.
2018-02-22 13:21:50 -05:00
Takahiro Horike
897961d475
Merge pull request #4757 from alexindeed/master
Added IAM roles support
2018-02-22 14:37:43 +09:00
Alex
90f89ec2fd fixed attribute 2018-02-21 18:02:04 -08:00
Kamesh Sampath
e6692aa1fd Resolving #4491 , adding support for java maven templates for OpenWhisk
Signed-off-by: Kamesh Sampath <kamesh.sampath@hotmail.com>
2018-02-22 00:42:52 +05:30
Alex
0940fd4595 updated templates 2018-02-21 10:39:50 -08:00
Devin Fee
d1d1b05cea Fixed python module parsing (#4755)
* Fixed python module parsing

Ref: https://github.com/serverless/serverless/issues/4663#issuecomment-366931491

* Update index.js

* Update index.js
2018-02-21 18:59:42 +01:00
Erik Erikson
8c7db120ae Add cases for all dependent services, and a variety of deep variable (DV) cases
Solve for these cases.  The bug was that DVs can render to DVs when a value is being obtained from them (i.e. they are being de-referenced in getValueFromDeep).  This is particularly problematic in the case that the original DV being rendered has a deep reference into the rendered DV.  In that case the DV returned by rendering must be replaced by yet another DV.

While accomplishing the above, various bits of cleanup were implemented and I added some commentary around getDeeperValue for future engineers.

This case is particularly relevant if you have:

`serverless.yml`:
```
service: serverless-hello-world

provider:
  name: aws
  runtime: nodejs6.10
  stage: dev
  environment:
    SECRET: ${self:custom.secrets.SECRET}

functions:
  helloWorld:
    handler: handler.helloWorld
    events:
      - http:
          path: hello-world
          method: get
          cors: true

custom:
  stage: ${opt:stage, self:provider.stage}
  secrets: ${file(secrets.${self:custom.stage}.yml)}
```
AND
`secrets.dev.yml`:
```
SECRETS: secrets
```

Populating this service should result in the following sequence of rendering phases:

#########################
# PHASE 1
#
# ${self:custom.secrets.SECRET}
#   <- ${deep:0.SECRET}
#   deep[0] = ${file(secrets.${self:custom.stage}.yml)}
#
# ${opt:stage, self:provider.stage}
#   <- 'dev'
#
# ${file(secrets.${self:custom.stage}.yml)}
#   <- ${file(secrets.${deep:1}.yml)}
#   deep[1] = ${opt:stage, self:provider.stage}
#
# RESULT
#
# service: serverless-hello-world
#
# provider:
#   name: aws
#   runtime: nodejs6.10
#   stage: dev
#   environment:
#     SECRET: ${deep:0.SECRET}
#
# functions:
#   helloWorld:
#     handler: handler.helloWorld
#     events:
#       - http:
#           path: hello-world
#           method: get
#           cors: true
#
# custom:
#   stage: dev
#   secrets: ${file(secrets.${deep:1}.yml)}
#########################

#########################
# PHASE 2
#
# ${deep:0.SECRET}
#   <- this.populateValue('${file(secrets.${self:custom.stage}.yml)}') => '${file(secrets.${deep:1}.yml)}' => '${deep:2}' => '${deep:2.SECRET}'
#   deep[2] = ${file(secrets.${deep:1}.yml)}
#
# ${file(secrets.${deep:1}.yml)}
#   <- this.populateValue('${file(secrets.${deep:1}.yml)}') => '${file(secrets.dev.yml)}' => '${deep:3}'
#   deep[3] = ${file(secrets.dev.yml)}
#
# RESULT
#
# service: serverless-hello-world
#
# provider:
#   name: aws
#   runtime: nodejs6.10
#   stage: dev
#   environment:
#     SECRET: ${deep:2.SECRET}
#
# functions:
#   helloWorld:
#     handler: handler.helloWorld
#     events:
#       - http:
#           path: hello-world
#           method: get
#           cors: true
#
# custom:
#   stage: dev
#   secrets: ${deep:3}
#########################

#########################
# PHASE 3
#
# ${deep:2.SECRET}
#   <- this.populateValue('${file(secrets.${deep:1}.yml)}') => '${file(secrets.dev.yml)}' => '${deep:3}' => '${deep:3.SECRET}'
#   deep[3] is already set to ${file(secrets.dev.yml)}
#
# ${deep:3}
#   <- this.populateValue('${file(secrets.dev.yml)}') => { SECRET: 'secret' }
#
# RESULT
#
# service: serverless-hello-world
#
# provider:
#   name: aws
#   runtime: nodejs6.10
#   stage: dev
#   environment:
#     SECRET: ${deep:3.SECRET}
#
# functions:
#   helloWorld:
#     handler: handler.helloWorld
#     events:
#       - http:
#           path: hello-world
#           method: get
#           cors: true
#
# custom:
#   stage: dev
#   secrets:
#     SECRET: secret
#########################

#########################
# PHASE 4
#
# ${deep:3}
#   <- this.populateValue('${file(secrets.dev.yml)}') => this.getDeeperValue(['SECRET'], { SECRET: 'secret' }) => 'secret'
#
# RESULT
#
# service: serverless-hello-world
#
# provider:
#   name: aws
#   runtime: nodejs6.10
#   stage: dev
#   environment:
#     SECRET: secret
#
# functions:
#   helloWorld:
#     handler: handler.helloWorld
#     events:
#       - http:
#           path: hello-world
#           method: get
#           cors: true
#
# custom:
#   stage: dev
#   secrets:
#     SECRET: secret
#########################
2018-02-20 20:57:24 -08:00