Commit graph

1275 commits

Author SHA1 Message Date
joeduffy
70e75063c2 Remove superfluous output from install.sh 2017-05-01 17:43:50 -07:00
joeduffy
7f634b4cf2 Remove pulumi/coconut#141 workaround 2017-05-01 17:13:30 -07:00
joeduffy
4e5140251b Implement support for computed property initializers
I've tripped over pulumi/coconut#141 a few times now, particularly with
the sort of dynamic payloads required when creating lambdas and API gateways.
This change implements support for computed property initializers.
2017-05-01 17:11:57 -07:00
joeduffy
bcd44fc06f Update cross-cloud library to support the latest changes 2017-05-01 10:21:52 -07:00
joeduffy
08626715fd Revert change to managed policy ARN casing 2017-05-01 10:17:18 -07:00
joeduffy
5c156a43cf Permit missing symbols in more places 2017-05-01 10:11:20 -07:00
joeduffy
815aa26282 Improve a contract.fail error message 2017-05-01 09:46:59 -07:00
joeduffy
553462bbfd Lower level for transformSourceFile logging
This changes the CocoJS log-level for logging about transforming a file
so that it shows up in --verbose logging.
2017-05-01 09:45:09 -07:00
joeduffy
c1696dc684 Regenerate Kubefission with latest CIDLC 2017-05-01 09:41:02 -07:00
joeduffy
6902d7e1b2 Update AWS Lambdas to take archives, not assets 2017-05-01 09:38:23 -07:00
joeduffy
335ea01275 Implement archives
Our initial implementation of assets was intentionally naive, because
they were limited to single-file assets.  However, it turns out that for
real scenarios (like lambdas), we want to support multi-file assets.

In this change, we introduce the concept of an Archive.  An archive is
what the term classically means: a collection of files, addressed as one.
For now, we support three kinds: tarfile archives (*.tar), gzip-compressed
tarfile archives (*.tgz, *.tar), and normal zipfile archives (*.zip).

There is a fair bit of library support for manipulating Archives as a
logical collection of Assets.  I've gone to great length to avoid making
copies, however, sometimes it is unavoidable (for example, when sizes
are required in order to emit offsets).  This is also complicated by the
fact that the AWS libraries often want seekable streams, if not actual
raw contiguous []byte slices.
2017-04-30 12:37:24 -07:00
joeduffy
06b6ce3e44 Add a GH CI/CD sample
This is the code we want to get working with pulumi/coconut#134.
My goal this week is to make that happen!
2017-04-30 09:05:02 -07:00
joeduffy
69df382da9 Update the CIDLC README with build, running, etc. instructions 2017-04-30 08:36:57 -07:00
joeduffy
35a86d9089 Move AWS instanceMaps module back to ec2 2017-04-29 16:01:13 -07:00
joeduffy
0e16aa5d93 Make resource names the first constructor parameter
This reverts back to the old style of having the resource name as its
first parameter in the generated package.  Stylistically, this reads a
little nicer, and also ensures we don't need to rewrite all our existing
samples/test cases, etc.
2017-04-29 15:58:34 -07:00
joeduffy
fa24d436e3 Unpointerize some types
In a few places, an IDL type will be a pointer, but the resulting
RPC code would, ideally, be the naked type.  Namely, in both resource
and asset cases, they are required to be pointers in the IDL (because
they are by-pointer by nature), but the marshaled representations need
not be pointers.  This change depointerizes such types in the RPC
unless, of course, they are optional in which case pointers still make
sense.  This avoids some annoying dereferencing and is the kind of thing
we want to do sooner before seeing widespread use.
2017-04-29 15:38:56 -07:00
joeduffy
fe93f5e76f Strongly type resource IDs in the IDL/RPC/Providers
This change simply uses the `resource.ID` type in all the places
where it belongs, rather than using `string`-typed resource IDs.
2017-04-29 13:27:39 -07:00
joeduffy
d8627697df Unglide AWS provider
This triggers complicates with local development, due to the way
that Glide vendors dependencies.  After we move to distinct repos
for the various provider packages, we can go back to doing this.
2017-04-29 13:26:39 -07:00
joeduffy
2e49e87e38 Add an IDL generation script for Kube Fission 2017-04-29 13:23:26 -07:00
joeduffy
1a0066b938 Commit generated code for Kube Fission package 2017-04-28 16:37:10 -07:00
joeduffy
8bb31a8dd9 Migrate Kube Fission provider to new IDL model 2017-04-28 16:36:43 -07:00
joeduffy
d1dccb1b0a Further simplify the AWS provider
Now that the IDL types encode named resources as a first class concept,
there is no need to do the dynamic overriding dance in the AWS provider.
I should have included this in my final "banking" of the IDL changes.
2017-04-28 16:18:19 -07:00
joeduffy
3d391f3a44 Add the AWS package's CIDLC generated code
This change includes all of the CIDLC generated code for the AWS
package.  Just as we vendor and version the generated gRPC code,
we will do so for these files also.  This allows building of the
full packages without needing to run any special tools, in addition
to letting us keep track of generated code deltas over time.
2017-04-28 15:40:40 -07:00
joeduffy
3a4866f7c1 Add manually managed AWS package files
This checkin contains all the non-generated package files.  This includes
the package metadata, utility functions like utils/instanceMaps, and the
module layouts (these being a candidate for auto-generation down the road).

In addition, the install script has been updated fo reflect the new layout.
2017-04-28 15:38:45 -07:00
joeduffy
ec03441a15 Eliminate old TypeScript resource definitions
The old TypeScript resource definitions may now go away in favor of
the new IDL and associated generated code.  After this change, I will
check in the generated code, so that the repo is self-contained.
2017-04-28 15:36:22 -07:00
joeduffy
aca61a2074 Add missing Lambda Permisssion IDL type 2017-04-28 15:29:13 -07:00
joeduffy
59573fc05f Finish projecting AWS IDL types
This converts the remaining AWS resource types over to the new IDL
model; this includes the apigateway, cloudwatch, sns, and sqs packages.
2017-04-28 15:22:44 -07:00
joeduffy
b381d23393 Ensure all errors correlate back to the IDL source 2017-04-28 15:21:22 -07:00
joeduffy
6952fd55f0 Track named resources
This change adds some conditional output that depends on whether a
named resource was contained in a file or not.  This eliminates some
compiler errors in the generated code when using manually-named
resources.
2017-04-28 15:03:24 -07:00
joeduffy
7e057cd1b5 Permit maps in IDL 2017-04-28 15:03:09 -07:00
joeduffy
e2e73cf035 Use good package names in place of "rpc"
This is just a minor stylistic change.  Instead of letting the AWS
package imports take the good names, prefer to use the generated IDL
names (since they contain the strongly typed data structures).
2017-04-28 13:04:10 -07:00
joeduffy
93255b7e8f Convert the AWS S3 provider to the new IDL model 2017-04-28 12:58:51 -07:00
joeduffy
77fc639286 Don't mangle RPC package names 2017-04-28 12:42:31 -07:00
joeduffy
1489a73b18 Convert the AWS Lambda module to CIDLC 2017-04-28 12:27:19 -07:00
joeduffy
5ae168d23c Emit interface{} as just interface{} 2017-04-28 12:09:17 -07:00
joeduffy
40ac0a1d2b Support assets in the IDL 2017-04-28 12:07:49 -07:00
joeduffy
f5c6af505a Properly fetch pointer elements 2017-04-28 11:46:35 -07:00
joeduffy
42ce8744ce Update the code-gen warning text 2017-04-28 11:35:33 -07:00
joeduffy
2d109f736c Convert AWS IAM types and provider to new IDL model 2017-04-28 11:16:49 -07:00
joeduffy
19577d67f0 Don't emit imports for zero-resource cases 2017-04-28 11:05:34 -07:00
joeduffy
75a897c23f Map interface{} RPC projections correctly
A property whose type is `interface{}` in the IDL ought to be projected
as a "JSON-like" map, just like it is on the Coconut package side of things,
which means a `map[string]interface{}`.
2017-04-28 10:58:27 -07:00
joeduffy
72b4035f3a Add a script to regenerate the AWS package from IDL 2017-04-28 10:37:37 -07:00
joeduffy
954d594e94 Rename --recurse to --recursive
My muscle memory kicked in (grep, et al), and then I realized the
name wasn't quite right.  This rights a wrong.
2017-04-28 10:37:05 -07:00
joeduffy
af3949509a Implement CIDLC support for package imports
This change correctly implements package/module resolution in CIDLC.
For now, this only works for intra-package imports, which is sufficient
for now.  Eventually we will need to support this (see pulumi/coconut#138).
2017-04-28 10:31:18 -07:00
joeduffy
46227870e4 Implement a few CIDLC improvements
* Allow `interface{}` to mean "weakly typed property bag."

* Allow slices in IDL types.

* Permit the package base as an argument.
2017-04-27 15:40:51 -07:00
joeduffy
df01db5df7 Finish converting the AWS EC2 resource IDLs 2017-04-27 11:53:32 -07:00
joeduffy
dd032e0784 Make IsResource tolerant of types.Named types 2017-04-27 11:52:59 -07:00
joeduffy
70f6d88a5b Implement the basic ARN/Region IDL types 2017-04-27 11:29:51 -07:00
joeduffy
47ef3f673b Rename PreviewUpdate (again)
Unfortunately, this wasn't a great name.  The old one stunk, but the
new one was misleading at best.  The thing is, this isn't about performing
an update -- it's about NOT doing an update, depending on its return value.
Further, it's not just previewing the changes, it is actively making a
decision on what to do in response to them.  InspectUpdate seems to convey
this and I've unified the InspectUpdate and Update routines to take a
ChangeRequest, instead of UpdateRequest, to help imply the desired behavior.
2017-04-27 11:18:49 -07:00
joeduffy
617ac91c92 Convert the AWS EC2 Instance provider to the new IDL model 2017-04-27 11:07:16 -07:00