Commit graph

100 commits

Author SHA1 Message Date
CyrusNajmabadi df06b8fc9b
Add publishing to nuget support (#3416) 2019-10-29 20:14:49 -07:00
CyrusNajmabadi 394c91d7f6
Add **preview** .NET Core support for pulumi. (#3399) 2019-10-25 16:59:50 -07:00
Mikhail Shilkov 96295ce322 Add -v option to go test of templates to avoid stalling in TravisCI 2019-10-03 08:28:58 +02:00
Mikhail Shilkov f90ec766d0 Speed up the test runs (#3254)
* Faster test runs

* Remove template tests from all but cron runs
2019-09-23 10:10:11 -07:00
Matt Ellis b20726b5a4 Run "integration" tests a package at a time 2019-08-13 15:58:32 -07:00
CyrusNajmabadi 1f51ec00fc
Revert 'Simplify API for passing providers to a ComponentResource (#2602)' (#2606) 2019-03-28 18:31:03 -07:00
CyrusNajmabadi 49a8e73aa7
Ensure that the values in 'dependsOn' are actually Resources. (#2605) 2019-03-28 17:27:51 -07:00
CyrusNajmabadi 3526f5c4ba
Run nodejs sdk before python sdk. (#2604) 2019-03-28 15:43:54 -07:00
CyrusNajmabadi 7193622183
Simplify API for passing providers to a ComponentResource (#2602) 2019-03-28 15:04:07 -07:00
CyrusNajmabadi 0beab1bc37
test_all for the sdk should run test_fast tests. (#2485) 2019-02-26 14:12:43 -08:00
CyrusNajmabadi 37912b1e57
Make it simpler to run go tests consistently (#2479) 2019-02-26 13:39:33 -08:00
CyrusNajmabadi 9225c0d72d
test-all should not rerun test-fast (#2478) 2019-02-25 13:01:52 -08:00
Matt Ellis 6c7092ff65 Pass -count=1 to disable result caching on go 1.10 and above 2018-11-08 14:11:52 -08:00
Matt Ellis 992b048dbf Adopt golangci-lint and address issues
We run the same suite of changes that we did on gometalinter. This
ended up catching a few new issues, some of which were addressed and
some of which were baselined.
2018-11-08 14:11:47 -08:00
Matt Ellis e19b1fa029 Run gometalinter once instead of three times
We end up doing a lot of duplicate work by invoking Gometalinter three
times when we do `make lint`. On my machine this decreases the wall
clock time of `make lint` from ~90 sec to ~15 sec, which is a pretty
drastic speedup.
2018-11-05 11:14:25 -08:00
Thomas Schersach 62463ab3bc Added dist target for make, will help with Homebrew (#1731)
* Added dist target for make, will help with Homebrew

* Try to install go dependencies before building

* Make sure dep ensure is called before trying to build SDKs

* Removed dep ensure from dist initial step
2018-08-08 13:00:42 -07:00
joeduffy 95ffe712af Remove build step from build-proto
After making my prior change, I discovered that there's a build target
for this (the missing step). Since cached builds are very quick, it
seems fine to just do this as part of generate.sh, so I'm removing.
2018-08-04 10:29:53 -07:00
Alex Clemmer 4c184335ca Make generate.sh reproducible 2018-07-15 11:05:44 -10:00
joeduffy 5a71ab9d12 Add Makefile machinery for Go provider 2018-06-09 16:16:35 -07:00
joeduffy 4ef4eba01a Remove SDK dependencies
This change eliminates our dependencies on the SDK repo.  Now that
SDKs are comprised solely of pulumi/pulumi artifacts, a separate repo
isn't required.  This allows us to simplify some of the distribution.

The install.sh script is modified slightly, to permit overriding the
default install location using $PULUMI_INSTALL_PATH.
2018-04-30 16:39:17 -07:00
Matt Ellis 5c4a31f692 Adopt new version strategy
Our previous strategy of just using `git describe --tags --dirty` to
compute a version caused issues. The major one was that since version
sort lexigrapically, git's strategy of having a commit count without
leading zeros lead to cases where 0.11.0-dev-9 was "newer than"
0.11.0-dev-10 which is not what you want at all.

With this change, we compute a version by first seeing if the commit
is tagged, and if so, we use that tag. Otherwise, we take the closest
tag and to it append the unix timestamp of the commit and then append
a git hash.

Because we use the commit timestamp, things will sort correctly again.

Part of pulumi/home#174
2018-03-15 18:06:04 -07:00
Matt Ellis 936abeb118 Publish tgz's in the middle of the build, packages at the end
While it's safe to publish the tgz that we use internally for other
repositories that are on "the link plan" after the build completes, we
shouldn't publish packages to NPM and PyPi at that point. There are
two reasons for doing this:

1. Publishing packages before they are tested, which means we could
end up publishing packages that don't work.

2. NPM prevents publishing the same package more than once, so if we
had to re-run the job (due to tests failing for transient issues), the
publish step will start failing, preventing us from running the tests
at all.
2018-03-06 19:20:47 -08:00
joeduffy 74563afdc8 Get the empty Python program working
This change gets enough of the Python SDK up and running that the
empty Python program will work.  Mostly just scaffolding, but the
basic structure is now in place.  The primary remaining work is to
wire up resource creation to the gRPC interfaces.

In summary:

* The basic structure is as follows:

    - Everything goes into sdk/python/.

    - sdk/python/cmd/pulumi-langhost-python is a Go language host
      that simply knows how to spawn Python processes to run out
      entrypoint in response to requests by the engine.

    - sdk/python/cmd/pulumi-langhost-python-exec is a little Python
      shim that is invoked by the language host to run Python programs,
      and is responsible for setting up the minimal goo before we can
      do so (RPC connections and the like).

    - sdk/python/lib/ contains a Python Pip package suitable for PyPi.

    - In there, we have two packages: the root pulumi package that
      contains all of the basic Pulumi programming model abstractions,
      and pulumi.runtime, which contains the implementation of
      resource registration, RPC interfacing with the engine, and so on.

* Add logic in our test framework to conditionalize on the language
  type and react accordingly.  This will allow us to skip Yarn for
  Python projects and eventually run Pip if there's a requirements.txt.

* Created the basic project structure, including all of the usual
  Make targets for installing into the proper places.

* Building also runs Pylint and we are clean.

There are a few other minor things in here:

* Add an "empty" test for both Node.js and Python.  These pass.

* Fix an existing bug in plugin shutdown logic.  At some point, we
  started waiting for stderr/stdout to flush before shutting down
  the plugin; but if certain failures happen "early" during the
  plugin launch process, these channels will never get initialized
  and so waiting for them deadlocks.

* Recently we seem to have added logic to delete test temp
  directories  if a failure happened during initialization of said
  temp directories.  This is unfortunate, because you often need to
  look at the temp directory to see what failed.  We already clean
  them up elsewhere after the full test completes successfully, so
  I don't think we need to be doing this, and I've removed it.

Still many loose ends (config, resources, etc), but it's a start!
2018-02-23 19:33:02 -08:00
Matt Ellis 9bf6c976bc Install fixed versions of our tools
For some tools we used, like `dep` and `gometalinter` we were just
calling `go install` which caused us to pick up whatever was in `HEAD`
at that time. Now, we move to a model where we install fixed versions,
which will change per milestone.

While doing this, I changed the way our .travis.yml file runs
everything to move as much as possible out into scripts and do so in a
way that allows us to share as much common logic across our
repositories.
2018-02-20 11:50:08 -08:00
Joe Duffy 34984ba1cb
Delete the old IDL compiler (#801)
It is moving to a new location: https://github.com/pulumi/pidlc
2018-01-13 15:11:52 -08:00
Pat Gavlin d5f4e0c84b Bump the test timeout in CI.
Parameterize the timeout for the fast tests with a default of 2 minutes
that is bumped to 10 minutes in CI due to slow I/O during macOS builds.
2017-12-15 12:12:06 -08:00
Pat Gavlin ad18d8ee9b Bump the test timeout up to 5 minutes.
The newly-added archive tests are taking over 2 minutes to run in CI.
2017-12-12 11:36:26 -08:00
Joe Duffy 3e84347197
Reenable integration tests
Because of the way we passed packages to test commands, we were skipping
the tests/cloud/ and tests/ints/ tests altogether.  This reenables them.
2017-12-05 13:39:13 -08:00
Matt Ellis b4e3aa52a7 Publish after building in CI (before testing) 2017-12-03 19:21:37 -08:00
Joe Duffy 16ade183d8
Add a manifest to checkpoint files (#630)
This change adds a new manifest section to the checkpoint files.
The existing time moves into it, and we add to it the version of
the Pulumi CLI that created it, along with the names, types, and
versions of all plugins used to generate the file.  There is a
magic cookie that we also use during verification.

This is to help keep us sane when debugging problems "in the wild,"
and I'm sure we will add more to it over time (checksum, etc).

For example, after an up, you can now see this in `pulumi stack`:

```
Current stack is demo:
    Last updated at 2017-12-01 13:48:49.815740523 -0800 PST
    Pulumi version v0.8.3-79-g1ab99ad
    Plugin pulumi-provider-aws [resource] version v0.8.3-22-g4363e77
    Plugin pulumi-langhost-nodejs [language] version v0.8.3-79-g77bb6b6
    Checkpoint file is /Users/joeduffy/dev/code/src/github.com/pulumi/pulumi-aws/.pulumi/stacks/webserver/demo.json
```

This addresses pulumi/pulumi#628.
2017-12-01 13:50:32 -08:00
Matt Ellis e9d13dd40f Fix coverage build 2017-11-20 11:49:44 -08:00
Matt Ellis 46c35281ab Adopt new makefile system
See https://github.com/pulumi/home/pull/56 for more details.
2017-11-16 23:56:29 -08:00
Matt Ellis 0815ef5ec9 Drop explicit vet target
Gometalinter runs `vet` as one of the many linters, so we need not run
it again.
2017-10-31 16:49:15 -07:00
Matt Ellis ba368fde0d Simplify go test invocation 2017-10-31 16:42:16 -07:00
Matt Ellis 9b1671721e Rename lint_quiet to lint
We have some lint debt (around exported functions being
underdocumented) so we have a custom target that ignores some lint
warnings. However, that target (which is the only lint target that
needs to be clean to check in) is called `lint_quiet` instead of
`lint` which is our normal linting target.

Rename the target so your fingers can learn that `make lint` is always
the right way to run linting before checkin.
2017-10-31 16:39:23 -07:00
Chris Smith defe0038ca
Add integration tests for pulumi CLI (#493)
This PR adds integration tests for exercising `pulumi init` and the `pulumi stack *` commands. The only functional change is merging in https://github.com/pulumi/pulumi/pull/492 , which I found while writing the tests and (of course 😁 ) wrote a regression for.

To do this I introduce a new test driver called `PulumiProgram`. This is different from the one found in the `testing/integration`package in that it doesn't try to prescribe a workflow. It really just deals in executing commands, and confirming strings are in the output.

While it doesn't hurt to have more tests for `pulumi`, my motivation here was so that I could reuse these to ensure I keep the same behavior for my pending PR that implements Cloud-enabled variants of some of these commands.
2017-10-30 15:17:13 -07:00
Matt Ellis 51250c42db Lower timeout
The tests usually complete in about 15 seconds, so let's lower the
timeout to fail a little faster in cases where we have hangs in
`pulumi` itself.
2017-10-27 15:54:16 -07:00
pat@pulumi.com 6b66437fae Track resources that are pending deletion in checkpoints.
During the course of a `pulumi update`, it is possible for a resource to
become slated for deletion. In the case that this deletion is part of a
replacement, another resource with the same URN as the to-be-deleted
resource will have been created earlier. If the `update` fails after the
replacement resource is created but before the original resource has been
deleted, the snapshot must capture that the original resource still exists
and should be deleted in a future update without losing track of the order
in which the deletion must occur relative to other deletes. Currently, we
are unable to track this information because the our checkpoints require
that no two resources have the same URN.

To fix this, these changes introduce to the update engine the notion of a
resource that is pending deletion and change checkpoint serialization to
use an array of resources rather than a map. The meaning of the former is
straightforward: a resource that is pending deletion should be deleted
during the next update.

This is a fairly major breaking change to our checkpoint files, as the
map of resources is no more. Happily, though, it makes our checkpoint
files a bit more "obvious" to any tooling that might want to grovel
or rewrite them.

Fixes #432, #387.
2017-10-18 17:09:00 -07:00
Matt Ellis 908d081e88 Construct version based on git information
We use `git describe --tags` to construct a version number based on
the current version tag.

The properties VERSION (when using make) and Version (when using
MSBuild) can be explicitly set to use a fixed value instead.

Fixes #13
2017-10-16 18:35:41 -07:00
Matt Ellis be1e698f0b Restore TESTPARALLELISM to 10
Now that we no longer recursively call yarn via yarn run and scripts,
we can use a `--mutex network` directive in a .yarnrc file at the root
of the repository to prevent multiple copies of yarn running
concurrently.
2017-10-16 10:47:37 -07:00
Matt Ellis fc14329cfc Stop using yarn scripts for building
We have Makefiles, so we might as well use them, instead of spliting
build logic across two systems.
2017-10-16 10:47:37 -07:00
Matthew Riley a4fba1c5ee Limit test parallelism to avoid Yarn cache corruption
See e.g. https://travis-ci.com/pulumi/pulumi/builds/56843128
2017-10-13 15:18:16 -07:00
Matt Ellis 0a835bd14a Use explicit targets in Makefile for Travis
Defer build and publish logic into the makefiles instead of trying to
use Travis to do so. This let's us sidestep Travis's not great error
handling (see pulumi/home#21 for more details)
2017-09-28 13:12:13 -07:00
Joe Duffy f6e694c72b Rename pulumi-fabric to pulumi
This includes a few changes:

* The repo name -- and hence the Go modules -- changes from pulumi-fabric to pulumi.

* The Node.js SDK package changes from @pulumi/pulumi-fabric to just pulumi.

* The CLI is renamed from lumi to pulumi.
2017-09-21 19:18:21 -07:00
Pat Gavlin c8f315227f Early-out integration tests if PATH is incorrect.
This provides a friendlier experience if the nodejs language service is
not on the path. Also, print a helpful message at the end of
`make configure` if PATH has not yet been setup.
2017-09-18 13:06:59 -07:00
joeduffy 4c781da93b Add instructions for make configure
And also move the Node.js SDK-specific parts into the sdk/nodejs/ directory.
2017-09-11 15:17:11 -07:00
joeduffy 1c52e2d607 Run the node_modules version of node-gyp 2017-09-04 11:35:21 -07:00
joeduffy 3ff10edcc4 Add a make configure target
This change adds a `make configure` target, which handles preparing
the environment for building the project.  This includes existing
steps, like dep ensure and yarn installing the Node.js SDK NPM
dependencies, and also includes downloading the right Node.js/V8
includes, putting them in the right place, and then generating the
appropriate node-gyp project files that reference those includes.
2017-09-04 11:35:21 -07:00
joeduffy f189c40f35 Wire up Lumi to the new runtime strategy
🔥 🔥 🔥  🔥 🔥 🔥

Getting closer on #311.
2017-09-04 11:35:21 -07:00
joeduffy 9ffbb8d755 Eliminate lumi, lumijs, and lumirt packages
This change gets rid of the old-style @pulumi/lumi, @pulumi/lumijs,
and @pulumi/lumirt packages.  Instead, we have the new Node.js SDK.
2017-09-04 11:35:20 -07:00