Commit graph

84 commits

Author SHA1 Message Date
Matt Ellis d0485f11f6 Include Python and Go langhosts in Windows SDK
This change includes the Python and Golang language hosts in the Windows
SDK. As part of this change, I had to adjust how we launched the second
stage of the language host, since we can't depend on the shebang, so now
we invoke `python` passing the executor and then the arguments.

Fixes #1509
2018-06-15 11:12:33 -07:00
Matt Ellis 9ccd07714a Publish SDK builds to get.pulumi.com
Previously, we published builds to rel.pulumi.com and only put actual
released builds (eg. rc's and final builds) on get.pulumi.com. We
should just publish all of the SDK builds to get.pulumi.com.

This also makes a slight tweak to the filename of the package we
upload (we took the switch over to get.pulumi.com to make this change
and now that we are uploading automatically, we need to encode this
change instead of doing it by hand).
2018-06-12 12:23:05 -06:00
Pat Gavlin b47f9ef8ef
Point some scripts to the new scripts repo. (#1499)
All scripts that are generally useful across all builds have been moved
into `pulumi/scripts`. These changes clone that repository and retarget
the various scripts to their new location.
2018-06-12 10:03:43 -07:00
Matt Ellis f0da3f7c10 Publish to pypi.org 2018-06-12 09:10:54 -06:00
Matt Ellis a63f89862a Fix PyPI publish URL 2018-06-11 14:06:31 -07:00
Matt Ellis 479fbae320 Publish to test.pypi.org 2018-06-11 14:23:01 -06:00
joeduffy 5a71ab9d12 Add Makefile machinery for Go provider 2018-06-09 16:16:35 -07:00
Matt Ellis e397d76733 Fix publishing issue due to missing *.node files
We no longer need to include these node plugins, so just remove
copying them from our publishing script.
2018-06-04 15:44:33 -07:00
Matt Ellis dcb5ae1e1f Stop including native serialization modules
We retained these modules to support using v0.11.X and earlier
versions of @pulumi/pulumi, which required a native module to do
closure serialization. 0.12.X does not need this, so lets stop
including it.
2018-06-04 14:27:01 -07:00
Matt Ellis 7b27f00602 Fix python package versions
Our logic for converting npm style versions to PEP-440 style versions
was not correct in some cases. This change fixes this.

As part of this change we no longer produce a NPM version that would
be just X.Y.Z-dev, instead for development versions we always include
both the timestamp of the commit and the commit hash.

Instead of trying to use a bunch of sed logic to do our conversions,
we now have a small go program that uses a newly added library in
pkg/util. A side effect of this is that we can more easily write tests
to ensure the conversion works as expected.

Fixes #1243
2018-05-07 12:38:08 -07:00
Matt Ellis 409477b951 Invoke node directly from the language host
Instead of using a shell script to jump from the language host into
node, just invoke node directly. This makes our start-up path a little
simpler to understand and indirectly fixes pulumi/home#156, where we
would fail on Windows if the `-exec` script was in a folder that had
spaces in it (due to a subtle interaction between how go launches cmd
files and how cmd.exe parses arguments).
2018-05-02 11:16:58 -07:00
Matt Ellis 213c9c3c08 Use newer versions of the build-sdk.sh scripts 2018-04-30 20:44:01 -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
Sean Gillespie 55711e4ca3
Revert "Lift snapshot management out of the engine and serialize writes to snapshot (#1069)" (#1216)
This reverts commit 2c479c172d.
2018-04-16 23:04:56 -07:00
Sean Gillespie 246aaba00e
Only publish packages on the linux v8.11 node leg (#1205) 2018-04-14 22:25:35 -07:00
Matt Ellis 682c1c0b45 Fix windows publishing 2018-04-13 14:56:52 -07:00
Matt Ellis ca2fbca13f Continue to add native modules to NODE_PATH
While we no longer use the native runtime module, older versions of
@pulumi/pulumi still require it. Let's continue to have the launcher
put the native module location on the `$PATH`. And we'll include them
in the SDK for a while longer.

Fixes #1177
2018-04-13 14:26:32 -07:00
Matt Ellis 12860cb81f Fix typo in Windows script
`git` is spelled `git` not `get`
2018-04-12 11:42:42 -07:00
Matt Ellis 608af9349d Publish SDK per build
After the move to stop including packages in the SDK, we no longer
published an SDK per build. This corrects this. Since the only things
in the SDK today are the language plugins and the CLI itself, we can
publish an SDK per build from pulumi/pulumi.

This change re-uses the existing infrastructure we have in
pulumi/sdk.

Fixes #1076
2018-04-12 10:11:56 -07:00
Sean Gillespie 2c479c172d
Lift snapshot management out of the engine and serialize writes to snapshot (#1069)
* Lift snapshot management out of the engine

This PR is a prerequisite for parallelism by addressing a major problem
that the engine has to deal with when performing parallel resource
construction: parallel mutation of the global snapshot. This PR adds
a `SnapshotManager` type that is responsible for maintaining and
persisting the current resource snapshot. It serializes all reads and
writes to the global snapshot and persists the snapshot to persistent
storage upon every write.

As a side-effect of this, the core engine no longer needs to know about
snapshot management at all; all snapshot operations can be handled as
callbacks on deployment events. This will greatly simplify the
parallelization of the core engine.

Worth noting is that the core engine will still need to be able to read
the current snapshot, since it is interested in the dependency graphs
contained within. The full implications of that are out of scope of this
PR.

Remove dead code, Steps no longer need a reference to the plan iterator that created them

Fixing various issues that arise when bringing up pulumi-aws

Line length broke the build

Code review: remove dead field, fix yaml name error

Rebase against master, provide implementation of StackPersister for cloud backend

Code review feedback: comments on MutationStatus, style in snapshot.go

Code review feedback: move SnapshotManager to pkg/backend, change engine to use an interface SnapshotManager

Code review feedback: use a channel for synchronization

Add a comment and a new test

* Maintain two checkpoints, an immutable base and a mutable delta, and
periodically merge the two to produce snapshots

* Add a lot of tests - covers all of the non-error paths of BeginMutation and End

* Fix a test resource provider

* Add a few tests, fix a few issues

* Rebase against master, fixed merge
2018-04-12 09:55:34 -07:00
Sean Gillespie 682f908e77
Implement scope chain free variable lookup in pure TypeScript (#1139)
* Implement closure scope chain analysis in pure TypeScript

This change makes use of four V8 intrinsics to avoid having to use a
native module to inspect the scope chains of live Function objects. This
unfortunately leads to the limitation of not allowing captures of 'this'
in arrow functions, but that is something we are willing to live with
for now.

* Remove native module build and restore from the Makefile

* CR feedback: Be a little more efficient when scanning the scope chain

* Nuke everything related to custom Node versions and the native Node module

* CR feedback: rename native.ts -> v8.ts, document some interfaces in v8.ts
2018-04-10 10:04:11 -07:00
Matt Ellis 68d6df47b9 Fix logic condition in publish script 2018-04-05 14:43:03 -07:00
Matt Ellis bed208ea18 Fix NPM tagging
`npm publish`'s default was to tag the package we published with
`latest` tag. The NPM ecosystem has expected semantics around this
tag (it uses it by default if you don't pass a version).

From the NPM Docs:

> Typically, projects only use the latest tag for stable release
> versions, and use other tags for unstable versions such as
> prereleases.

We were not doing this, but now we will.  We'll have a new tag `dev`
which is the latest build out of CI, and we'll tag builds without a
pre-release tag with "latest".
2018-04-05 14:41:19 -07:00
Joe Duffy 19e6c9c2bc
Fix Python versions (again) (#1106)
This change actually makes our Python version numbers conformant
to PEP440.  Previously we were including the Git commit hash in the
alpha "version number" part, which is incorrect.  This simply led to
warnings upon publication and installation, but that warning very
clearly states that support for invalid versions will stop at some
point.  This change puts any "informative" parts, like the Git hash,
inside of a local version tag, where such things are permitted.

Also move away from the inline sed silliness so that we can more
easily share this logic across all of our repos.
2018-04-02 10:31:05 -07:00
Matt Ellis a3369d3cbc Fix make_release.sh when run from outside scripts directory 2018-03-19 14:24:52 -07:00
Matt Ellis 38ec631753
Merge pull request #1056 from pulumi/change-version-number
Adopt new version strategy
2018-03-19 13:25:12 -07:00
joeduffy 094c877e32 Add Python language host to the SDK 2018-03-17 10:41:37 -07:00
Matt Ellis e46a665ce4 Add get-version.cmd and use it
Port the .sh script to powershell and use it on Windows.
2018-03-16 16:36:27 -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
joeduffy f071329238 Update PyPI publish source 2018-03-09 15:27:16 -08:00
Joe Duffy 98aaf12cdf
Reenable Pylint (#1024)
This change uses virtualenv to insulate us from platform differences
in our building of the Python SDK, and to create an isolated Python 2
environment.  This includes meaning we don't need to worry about the
specific location and behavior of Pylint.  I *think* this will work
no matter whether it's Mac, Ubuntu, ArchLinux, Windows, and so on.

We do install to the --user directory in the install target using
`pip install -e`, however, which enables the machine-wide symlinking
that we need to support various workflows.

This fixes pulumi/pulumi#1007.
2018-03-09 15:11:37 -08:00
joeduffy 4f822b19fd Publish to production PyPI 2018-03-07 11:57:38 -08:00
Matt Ellis d78755765e Set ROOT in publish_packages.sh 2018-03-06 19:36:41 -08: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 e0554b08d8 Only publish packages on Linux 2018-03-01 18:14:19 -08:00
joeduffy c2b1705bf9 Pass Pulumi API token to PyPI in the querystring 2018-03-01 17:43:56 -08:00
joeduffy 567724ed30 Pass username/password to twine publish
This prevents blocking waiting on stdin, which obviously will hang CI.
2018-03-01 09:33:42 -08:00
CyrusNajmabadi e7c0e4cdaa
Make many fixes to closure serialization (#944)
Make many fixes to closure serialization

Primary things that i've done as part of this change:

    Added support for cyclic objects.
    Properly serialize objects that are shared across different function. previously you would get multiple copies, now you properly reference the same copy.
    Remove the usages of 'hashes' for functions. Because we track identity of objects, we no longer need them.
    Serialize properties of functions (if they have any).
    Handle Objects/Functions with different __proto__s than normal. i.e. classes/constructors. but also anything the user may have done themselves to the object.
    Handle generator functions.
    Handle functions with 'computed' names.
    Handle functions with 'symbol' names.
    Handle serializing Promises as Promises.
    Removed the dual Closure/AsyncClosure tree. One existed solely so we could have a tree without promises (for use in testing maybe?). Because this all exists in a part of our codebase that is entirely async, it's fine to have promises in the tree, and to await them when serializing the Closure to a string.
    Handle serializing class-constructors and methods. Including properly handling 'super' calls.
2018-03-01 00:32:01 -08:00
Joe Duffy 9412f4ac7a
Publish Pulumi Python SDK package (#988)
We now publish the Pulumi Python SDK package to our private PyPI
server at the same time we also publish the NPM package.  For now,
we use the test Pulumi.com service, and will switch to staging as
soon as it becomes available.
2018-02-28 18:38:08 -08:00
joeduffy 88dcdd8d2b Substitute ${VERSION} on Windows builds too
This change refactors the way we do ${VERSION} substitution in both
the Node.js SDK's version.js and package.json, so that it can work on
Windows.  This is required now that we are actually parsing semvers.
2018-02-20 14:37:28 -08:00
joeduffy c86a799d15 Fix some more scripts 2018-02-18 08:11:14 -08:00
joeduffy 548c22d014 Reimplement GetRequiredPlugins in Go
This brings back the Node.js language plugin's GetRequiredPlugins
function, reimplemented in Go now that the language host has been
rewritten from JavaScript.  Fairly rote translation, along with
some random fixes required to get tests passing again.
2018-02-18 08:08:15 -08:00
Sean Gillespie 01bb34e674
Fix the make_release.ps1 script
New-Item produces a new object on success, which ultimately gets
output by the make_release.ps1 cmdlet and consumed by the release.ps1
script. This messes up the release script that is expecting exactly
one object to come out of the pipeline from make_release.ps1.
2018-02-17 11:52:44 -08:00
Sean Gillespie d3fb639823 Ship nativeruntime.node as part of the SDK
Fixes #356. Instead of downloading a node binary with our closure
serialization code linked-in, this PR instead publishes the
`nativeruntime.node` produced by the NodeJS SDK build as part of the SDK.

This has a number of advantages. First, it is vastly more easy to
develop closure.cc in this configuration. Second, we have the ability
to ship different `nativeruntime.node`s side-by-side, paving the way
for enabling future versions of Node. Third, we don't have to stay
in the business of shipping custom builds of Node, although we do still
need to ship a version of Node with minor modifications in order for
Windows to still work.
2018-02-16 18:12:33 -08:00
Matt Ellis 2d0ca1992e Cleanup provider launch scripts and fix some windows build oddities
The windows build was still on the old plan from way back when where
we had binaries littered in the build tree and you had to add parts of
your build-tree to the `%PATH%` for the integration tests to work.

This cleans that up and moves all of our scripts that invoke
javascript to be on the same plan. They invoke our specially named
node with a relative path to the JS code we want to run.
2018-02-15 17:02:35 -08:00
Sean Gillespie 1c2c10a19d Revert "Revert Windows changes to unblock npm ingestion"
This reverts commit d98dcaa79c.
2018-02-13 15:07:07 -08:00
Sean Gillespie d98dcaa79c Revert Windows changes to unblock npm ingestion 2018-02-13 14:04:23 -08:00
Sean Gillespie 05cb5368a4
Download and use a custom Node binary instead of linking against
private V8 APIs from within our native Node module.
2018-02-13 14:04:01 -08:00
Joe Duffy 0cb112b984
Publish the Go-based langhost in the SDK tgz's (#924) 2018-02-12 16:54:12 -08:00
Joe Duffy 6e5084218c
Use the scoped @pulumi name for linking layout (#920) 2018-02-12 16:16:16 -08:00