Commit graph

1574 commits

Author SHA1 Message Date
Luke Hoban 1d7792cd83 Allow additional configuration on aws.serverless.Function
We need to provide higher level abstractions with the
ability to set additional properties on a Lambda Function
even when using the closure serialization support of
aws.serverless.Function.

Note that this is an API breaking change, and may require
updates in any other libraries dependent on this API.
2017-07-09 21:03:31 -07:00
Luke Hoban f45e80e28d Support for DeadLetterConfig on aws.lambda.Function resources 2017-07-09 11:34:30 -07:00
Luke Hoban 837d13d393 Merge branch 'typenotfound' 2017-07-08 14:57:30 -07:00
Luke Hoban a2d6e67deb Fix a comment typo 2017-07-08 14:57:11 -07:00
Luke Hoban f2a76c1a5a Address code review feedback on #282 2017-07-07 16:41:33 -07:00
Luke Hoban 87a18e6ad2 Resolve to dynamic instead of error type on TypeNotfound
This unblocks some cases with generics without having to
implement full generics support in the type LumiRT type system
(which we directionally will be removing anyway).
2017-07-07 16:24:52 -07:00
Luke Hoban 1c8ad139f1 Merge pull request #282 from pulumi/asyncawait
Support try/catch in Lumi and async/await in Node.js
2017-07-07 14:44:59 -07:00
Luke Hoban 48ffd280a6 Use STS instead of IAM to identify AWS account
The IAM GetUser operation fails when invoked with an assumed IAM
role.  Instead, use STS `GetCallerIdentity`.
2017-07-07 14:02:37 -07:00
Luke Hoban 829b977bcf Support try/catch in Lumi and async/await in Node.js
We would like to allow developers to use async/await
on the inside (Node.js) of Lumi programs.

We now support (don't error on) usage of async/await
inside runtime callbacks in Lumi programs.  If await is
used during deployment, it will trigger an error.

Also adds support for try/catch in LumiJS, as these are
used more heavily in async/await code.

Since we target Node.js environments without native support
for async/await, we also emit runtime helpers to support TS
transpilation of async/await for Node.js pre-7.6.
2017-07-07 12:47:27 -07:00
joeduffy ea0461dadb Export plugin prefix constants 2017-07-06 09:46:00 -04:00
joeduffy d05cbfa4ec Print short []s and {}s for empty arrays/maps 2017-07-06 00:13:37 -04:00
joeduffy aeefc27a08 Add some ReadLocations tracing; and skip nulls 2017-07-06 00:02:33 -04:00
joeduffy 9babb4b993 Refactor EnsurePath to be clear about dir vs. file 2017-07-04 20:52:25 -04:00
joeduffy 303fd6322b Refactor code generator goo
This change rearranges some of the code generator logic in LumIDL
in such a way that we can use it from other code generators (like
the ongoing bridge work).
2017-07-01 14:00:06 -07:00
joeduffy 06ad983541 Add a ReadLocations engine-side RPC function
This adds a ReadLocations RPC function to the engine interface, alongside
the singular ReadLocation.  The plural function takes a single token that
represents a module or class and we will then return all of the module
or class (static) properties that are currently known.
2017-07-01 13:26:49 -07:00
joeduffy 5d9f7918e9 Add a PropertyMap/Value.MapReplace function
This adds a handy MapReplace function on pkg/resource's PropertyMap and
PropertyValue types.  This is just like the existing Mappable function,
except that it permits easy replacement of elements as the map transformation
occurs.  We need this to perform float64=>int transformations.
2017-07-01 12:08:55 -07:00
joeduffy 27b819dec6 Add the ability to skip nulls when un/marshaling properties 2017-07-01 11:51:52 -07:00
joeduffy ad42a2837a Quit soon if the compiler has errors 2017-06-29 14:48:03 -07:00
Luke Hoban dc6594f06b Temporary workaround for #276
Disable invocation of `lumi plan` during examples
integration testing, pending resolution of #276 to
support planning in the face of output properties.
2017-06-29 10:49:05 -07:00
Luke Hoban 2ec62d0b9a Merge pull request #273 from pulumi/logs
Support for AWS Cloudwatch Logs
2017-06-28 17:49:41 -07:00
Luke Hoban 2fefde651a Fix gometalineter failures 2017-06-28 16:01:31 -07:00
Luke Hoban 680182a177 Ensure validation regexps match entire string 2017-06-28 15:47:15 -07:00
Luke Hoban 9ba8567d59 Support for AWS Cloudwatch Logs
Adds support for LogGroup and LogSubscriptionFilter
resources.
2017-06-28 15:42:42 -07:00
Luke Hoban 033c262918 Support for AWS SNS resources (#272)
Support for AWS SNS Topic and Subscription resources.
2017-06-27 16:50:54 -07:00
joeduffy 15a75c9ee4 Catch duplicate URNs during planning
We fail very late in the process of plan application, should a duplicate
URN arise.  This change fails as early in the process as possible and
ensures that it does so with good line number information.
2017-06-27 13:04:06 -07:00
joeduffy 24fd8e8f4a Add cancellation to interpreter
This properly unwinds the interpreter should something happen that
results in cancellation.  This occurs, for example, when the planning
engine encounters an error and decides that it doesn't need to proceed
further with evaluation before it simply goes ahead and exits.
2017-06-27 11:31:17 -07:00
joeduffy 23045c5792 Simply panic for failfast
The old contract library tried to be glog-friendly in its failfast behavior.
It turns out glog seldom does the right thing when goroutines are involved
(which, as of last sprint, they now are).  We already had issues with stacks
not getting printed when --logtostderr was turned on, and the code tried
to work around this; but this still didn't work for the goroutines case.

All of this seems like way too much cleverness.  Let's just use Go panics.
2017-06-27 11:12:06 -07:00
joeduffy 3c73b32391 Fix ineffective break lint warning
It appears Gometalinter updated to a more recent version of staticcheck,
which is more aggressive in some of its checking.  This turned up a break
warning (which was a false positive but I find the code easier to follow
this new way anyhow).
2017-06-27 11:09:46 -07:00
joeduffy 19a359e65d Specialize check failure messages 2017-06-27 10:56:33 -07:00
joeduffy 41719683e6 Run check with "" property
This change starts running Check with a "" property for cases where
global validation must take place (such as ensuring that required
configuration variables were set).  It may be safely ignored if per-
property validation is preferred by a given resource.
2017-06-27 10:46:20 -07:00
joeduffy 0ea55328f6 Specialize the null message for config reads 2017-06-27 10:45:29 -07:00
joeduffy b96538e5f5 Tolerate nil snapshots 2017-06-27 10:08:42 -07:00
joeduffy daaadd8c07 Update test baselines after source changes 2017-06-26 14:55:38 -07:00
joeduffy 2daea4c3d8 Clarify aspects of using the DCO 2017-06-26 14:46:34 -07:00
Luke Hoban d16fa87923 Address code review feedback
Use existing conversion utilities for type conversions.
2017-06-26 12:05:18 -07:00
Luke Hoban 53743da4b9 Merge pull request #269 from pulumi/nightly
Add Go code coverage reports to nightly tests
2017-06-26 09:09:29 -07:00
Luke Hoban 7164de2338 Additional gometalinter fix 2017-06-25 13:59:26 -07:00
Luke Hoban 971b12c441 Add missing error check in aws.s3.Object tests
Fix gometalinter error.
2017-06-25 13:39:14 -07:00
Luke Hoban aaa00f5a29 Fix for lambda variable capture
Fixes a bug in free variables analysis when local variable
declarations are inside MultiStatements.
2017-06-25 13:25:17 -07:00
Luke Hoban ee2c165a17 Add content properties for aws.s3.Object
Adds the `Content*` properties on S3 Objects to the
Object resource.  Allow update of Objects with new
sources and/or content properties.

Also adds AWS provider test support for validating
resource output properties.

Contributes to #218.
2017-06-25 13:24:29 -07:00
joeduffy 5362536396 Remove some obsolete names 2017-06-24 11:55:16 -07:00
Luke Hoban 1d266e38aa Add Go code coverage reports to nightly tests
Adds a make task to generate code coverage for all Go sources.

That make task re-runs the tests, and can be fairly expensive,
so it is enabled only in the nightly tests for now.

Part of #206.
2017-06-23 16:07:05 -07:00
Luke Hoban a11396f58f Merge pull request #266 from pulumi/testfix
Make concurrent AWS test runs safer
2017-06-23 16:06:09 -07:00
Luke Hoban e663b90ce7 Make concurrent AWS test runs safer
Instead of cleaning up all resources that might have been
created by the test suite, we now only cleanup resources
created by this specific run of the tests.  That makes
concurrent test execution safer, and the tests more self-
contained.  However, it does increase the chances of
accidentially leaving behind resources when tests fail.

Fixes #265.
2017-06-23 15:50:58 -07:00
joeduffy 3c1041af49 Update license headers 2017-06-23 14:53:41 -07:00
joeduffy 06aa828487 Update CONTRIBUTING.md and LICENSE
These changes reflect the decision to use the DCO instead of CLA.
2017-06-23 13:49:53 -07:00
Joe Duffy b4e8af9f32 Enable VM-based builds in Travis (#264)
This change enables VM-based builds in Travis, versus the default of
container-based builds.  This will give us more memory (7.5GB rather
than 4GB max), and more compute (~2, bursted rather than 2).  This
may help to fix some of the build/test speed time issues we are seeing.
2017-06-22 17:56:45 -07:00
Luke Hoban 4f3c616a45 Fix lint errors
Fix lint errors triggered by the previous commit.
2017-06-22 17:29:34 -07:00
Luke Hoban 201a3d1a51 Additional nightly test fixes
Address several issues with running the Beanstalk
example in newer AWS regions with different requirements.

Ensures S3 bucket names adhere to required naming patterns
outside of us-east-1.

Also add InstanceProfile and ServiceRole configuration to the
beanstalk example as required in newer regions.
2017-06-22 16:59:16 -07:00
joeduffy d05e7ace91 Ensure we close the plugin host/context
This adds a few missing closes for the plugin host/context.  This
should fix pulumi/lumi#261.  Eventually when we have more robust
nightly test options, and want to spend the time, we should think
about doing more rigorous stress testing that kills processes at
inopportune times and guarantees we don't leak.  I've filed
pulumi/lumi#263 to do that.
2017-06-22 15:18:29 -07:00