Commit graph

1447 commits

Author SHA1 Message Date
joeduffy 2f4d7a9789 Run integration tests
This change runs the examples integration tests for every test
run.  They used to be split out because the AWS tests take so long,
but now those are in their own separate package.  Running the
integration tests here more frequently will prevent breaking the
most basic Lumi CLI commands and capabilities.
2017-08-06 08:26:20 -07:00
joeduffy d7273b1e9e Perform updates during integration tests
This adds the ability to apply "edits" during integration tests, so
that we can test update and replacement paths.

This fixes pulumi/pulumi-fabric#310.
2017-08-05 17:49:48 -07:00
joeduffy ed58a2cbd1 Run empty plan/deploy in integration tests
This change tests that a plan and deploy immediately following another
deploy, when no edits have taken place, correctly results in no action.

I also cleaned up a few things in the code, like using fmt.Printf rather
than fmt.Fprintf(os.Stdout, ...), to clean up error paths, giving the
package a slightly shorter name, and adding missing copyright headers.

This is part of pulumi/pulumi-fabric#310.
2017-08-05 11:37:14 -07:00
joeduffy ff0eb81944 Export urnName constants
This avoids us needing to hard-code the urnName property in
various tools, in case we ever need to change it again down the road.
2017-08-05 08:32:50 -07:00
joeduffy 007c2f216d Rename name property to urnName
At the moment, we permit resources to carry a name, which the
engine uses as part of URN creation.  Unfortunately, the property
"name" has a very high chance of conflicting with meaningful
user-authored properties.  And furthermore this sort of name,
although key to creating URNs which are core to how the overall
system performs deployments and manages resources, are seldom
used programmatically in Lumi programs.  As a result, it's a real
nuisance that we stole the good name.

This change renames that property from "name" to "urnName".  This
not only has a lower likelihood of conflicting, but it also looks
reasonable sitting alongside the "urn" property.  In fact, in some
future universe, after some of the upcoming runtime changes, we
may not even need the name property on the objects whatsoever.

I had originally toyed with the idea of eliminating the Resource
versus NamedResource distinction.  This is certainly simpler and
remains a possibility.  I didn't do that right now, however, because
the flexibility of letting resource providers name resources however
they see fit still seems possibly useful.  For example, we keep
talking about whether functions can be auto-named based on hashes.
Until we've run those conversations to ground, I'd hate to do some
work that just needs to be undone in order to enable a scenario that
has a non-trivial likelihood of us wanting to explore.
2017-08-05 08:20:57 -07:00
joeduffy c0e4bdb03b This shouldn't be here!
😬
2017-08-03 18:09:14 -07:00
joeduffy a160741931 Tolerate computed and output properties
We are now freely flowing computed and output properties across the
RPC boundary with providers.  As such, we need to tolerate them in
a few more places.  Namely, mapping to and from regular non-resource
property values, and also when copying RPC resource state back onto
live runtime objects.
2017-08-03 11:01:38 -07:00
joeduffy 7e09bd055a Fix variable shadowing 2017-08-02 15:40:07 -07:00
joeduffy 1df1792d84 Ensure all exit paths call OnDone
If certain early errors occurred, like failing to find a default module
or main entrypoint, we never properly invoked OnDone (or, sometimes,
OnStart, for that matter).  This meant that callers like the eval source
in the deployment engine could end up missing signals; in this particular
case, it led to a failure to signal a rendezvous synchronization object,
which itself led to a hang.

The fix is simple: make sure to call the On* methods in the right places.
I've added tests to probe the interesting paths, including failures.

This fixes pulumi/pulumi-fabric#281.
2017-08-02 15:28:48 -07:00
joeduffy a9939c8e6a Remove workaround for pulumi/pulumi-fabric#276 2017-08-02 13:31:38 -07:00
joeduffy 35aa6b7559 Rename pulumi/lumi to pulumi/pulumi-fabric
We are renaming Lumi to Pulumi Fabric.  This change simply renames the
pulumi/lumi repo to pulumi/pulumi-fabric, without the CLI tools and other
changes that will follow soon afterwards.
2017-08-02 09:25:22 -07:00
joeduffy c77e975464 Redirect to the main Pulumi repo's CONTRIBUTING.md 2017-08-02 07:49:47 -07:00
Joe Duffy 5da78c036b Convert to Dep 2017-08-01 18:37:06 -07:00
joeduffy 4699b874db Revert "The Go vendoring saga continues"
This reverts commit f939651c64.

This particular saga appears to never end...
2017-08-01 17:51:38 -07:00
joeduffy ceec05f627 Fix up a few stale Dep/Godeps references 2017-08-01 15:48:08 -07:00
joeduffy f939651c64 The Go vendoring saga continues
We are now on our fourth vendoring tool: Govendor.  This appears to
be about 10X faster than Dep, fails less frequently, and has a rich,
well documented set of commands (that make far more intuitive sense
to me, particularly when compared to Dep).  I could never really get
Godep to work with vendor/ correctly, whereas Govendor did the trick
right away.  Lastly, Terraform uses it, so we'll probably have fewer
headaches in that department also.
2017-08-01 06:23:14 -07:00
joeduffy 5fb014e53c Explicitly track default properties
This changes the RPC interfaces between Lumi and provider ever so
slightly, so that we can track default properties explicitly.  This
is required to perform accurate diffing between inputs provided by
the developer, inputs provided by the system, and outputs.  This is
particularly important for default values that may be indeterminite,
such as those we use in the bridge to auto-generate unique IDs.
Otherwise, we fail to reapply defaults correctly, and trick the
provider into thinking that properties changed when they did not.

This is a small step towards pulumi/lumi#306, in which we will defer
even more responsibility for diffing semantics to the providers.
2017-07-31 18:26:15 -07:00
joeduffy 300af62747 Fix erroneous assert when unmarshaling computed properties 2017-07-31 11:44:34 -07:00
Luke Hoban 6016146750 Fix up RPC generation to align with recent RPC changes
Fixes #304.
2017-07-25 16:07:10 -07:00
Luke Hoban e4e9710f30 Make install_release.sh script executable 2017-07-24 22:54:42 -07:00
Luke Hoban 916dd6b235 Report failing error code on Lumi compilation errors
Report an error when Lumi runtime compilation fails.

Also adds a reusable install_release.sh script to use
for installing Lumi package releases, plus expansion
of symlinks in package Makefiles.
2017-07-24 22:43:37 -07:00
joeduffy 2952c3624d Copy NPM package files
This change copies the NPM package files to the installation directory
so that the result is a valid NPM package.  This is a temporary workaround
until (😨) the day that we actually publish/consume real NPM packages...
2017-07-23 12:13:44 -06:00
joeduffy d6b6cbf4ff Build/test the minimal Lumi program as a nightly integration test 2017-07-23 12:12:43 -06:00
joeduffy cfb98291bc Link NPM packages on install 2017-07-23 11:17:18 -06:00
joeduffy 29aa488628 Publish binaries under the tag, branch, and commit 2017-07-21 15:33:03 -07:00
Joe Duffy 7adf3ef0f4 Eliminate custom AWS provider in favor of bridge 2017-07-21 14:54:01 -07:00
joeduffy 232ed7e248 Goodbye, custom AWS provider code
😥

Preparing to RI the tfbridge branch into master.
2017-07-21 14:41:01 -07:00
joeduffy 10dc68090d Add an install script
This can be used to install pre-built Lumi release packages.
2017-07-21 14:11:39 -07:00
joeduffy e35bfc35b2 Remove AWS examples
These are moving to their respective repos.
2017-07-21 14:00:30 -07:00
joeduffy 00442b73b4 Alter the way unknown properties are serialized
This change serializes unknown properties anywhere in the entire
property structure, including deeply embedded inside object maps, etc.

This is now done in such a way that we can recover both the computed
nature of the serialized property, along with its expected eventual
type, on the other side of the RPC boundary.

This will let us have perfect fidelity with the new bridge's view on
computed properties, rather than special casing them on "one side".
2017-07-21 14:00:30 -07:00
joeduffy b8be7fa5e6 Add a handy Copy function to PropertyMap 2017-07-21 14:00:30 -07:00
Luke Hoban 844b2bf1ea Support for string.split
Adds the string.split intrinsic function and places
it on the String protoype object.
2017-07-21 14:00:30 -07:00
Luke Hoban 18c3caf093 Fix continue in loops
Make sure that continue runs post expression
before looping.
2017-07-21 14:00:30 -07:00
Luke Hoban 9243bd5f3f Fix tests after previous commit 2017-07-21 14:00:30 -07:00
joeduffy 40747a94bf Merge inputs with outputs
For Update and Delete operations, we provided just the input state
for a resource.  This is insufficient, because the provider may need
to depend on output state from the Create or prior Update operations.
This change merges the output atop the input during the step application.
2017-07-21 14:00:30 -07:00
joeduffy 4e02105355 Pass old state to the provider's API 2017-07-21 14:00:30 -07:00
joeduffy ae92e68902 Return state as part of Create and Update¬
As part of the bridge bringup, I've discoverd that the property state
returned from Creates does *not* always equal the state that is then
read from calls to Get.  (I suspect this is a bug and that they should
be equivalent, but I doubt it's fruitfal to try and track down all
occurrences of this; I bet it's widespread).  To cope with this, we will
return state from Create and Update, instead of issuing a call to Get.
This was a design we considered to start with and frankly didn't have
a super strong reason to do it the current way, other than that it seemed
elegant to place all of the Get logic in one place.

Note that providers may choose to return nil, in which case we will read
state from the provider in the usual Get style.
2017-07-21 14:00:29 -07:00
joeduffy 87b7091b35 Remove serverless examples
These have moved to [pulumi/aws-serverless/examples](
https://github.com/pulumi/aws-serverless/examples/).
2017-07-21 14:00:29 -07:00
joeduffy dffdb29799 Install the AWS CLI as a prerequisite 2017-07-21 10:18:55 -07:00
joeduffy f314ab5a36 Let LUMIROOT be overridden during publishes 2017-07-21 09:57:40 -07:00
joeduffy fc1cd2c01e Make a publish script; fix sed for multi-OS compat
This change creates a scripts/ folder, moves our existing shell
script, gocover.sh, underneath it, and factors the publish logic
out of the Makefile and into the publish.sh file.

The syntax for sed differs between Mac OS X and GNU versions of
the tool, which is rather annoying.  This fixes it by leveraging
the fact that `sed -i.bak ...` works, although we now need to
clean up the *.bak file left behind.  (No big deal and way better
than maintaining OS-dependent logic.)
2017-07-21 09:37:14 -07:00
joeduffy f2537ecab8 Force publishes
To workaround the fact that our repos end in a dirty state after
the CI job finishes, I'm adding PUBFORCE=true to the CI script.
pulumi/lumi#300 tracks figuring out the root cause and removing it.
2017-07-21 08:09:23 -07:00
joeduffy 4b505acbcc Also package up LumiJS compiler in binary releases 2017-07-20 15:17:10 -07:00
joeduffy 2670e42c93 Publish built binaries upon successful push CI to master
This adds a new make target, publish, that will create a release
package and upload it to an S3 bucket.  This package simply contains
the built CLI plus the core library packages, lumi, lumirt, and lumijs.

This target is invoked automatically at the end of a successful
Travis run against a push to master.
2017-07-20 14:52:40 -07:00
joeduffy 3b4afc0346 Eliminate a superfluous warning 2017-07-20 13:21:30 -07:00
joeduffy ea3b530434 Delete lib/mantle
You served your purpose, but are no longer useful.  R.I.P.
2017-07-20 10:16:15 -07:00
joeduffy ba1b27a657 Make a few tweaks for better demos
* Alias "run" for "deploy".

* Alias "stop" for "destroy".

* Respect --summary for outputs.
2017-07-18 09:45:04 -07:00
joeduffy ceb32b9e2b Add a sig field to Asset/Archive
This change mirrors the dynamic marshaling structure on the static
definition of the Asset and Archive types.  This ensures that they
marshal correctly even when deeply embedded inside other structures.
2017-07-18 09:30:31 -07:00
joeduffy e518f1ad86 Adopt new pointerless Asset APIs in tests 2017-07-17 17:58:22 -07:00
joeduffy 5bf43743ab Add a rudimentary toString runtime helper
This just works around some limitations that will exist until
we do the runtime work next sprint, and achieve pulumi/lumi#169.
2017-07-17 13:43:59 -07:00