Commit graph

203 commits

Author SHA1 Message Date
stack72 00acc7999a Update scripts/v2 and tests/v2 to use pkg/v2.0.0 & sdk/v2.0.0 release 2020-04-16 17:58:16 +01:00
Paul Stack f475b8b1bc
Removing an unused coverage target in the makefile (#4402)
Fixes: #4221
2020-04-15 17:48:16 +01:00
stack72 74df34be75 Re-enabling dockerfile latest, docs and homebrew publishing
These had previously been disabled due to the beta releases. Also
fixes an import path for finding an executable
2020-04-14 09:40:11 +01:00
CyrusNajmabadi 66bd3f4aa8
Breaking changes due to Feature 2.0 work
* Make `async:true` the default for `invoke` calls (#3750)

* Switch away from native grpc impl. (#3728)

* Remove usage of the 'deasync' library from @pulumi/pulumi. (#3752)

* Only retry as long as we get unavailable back.  Anything else continues. (#3769)

* Handle all errors for now. (#3781)


* Do not assume --yes was present when using pulumi in non-interactive mode (#3793)

* Upgrade all paths for sdk and pkg to v2

* Backport C# invoke classes and other recent gen changes (#4288)

Adjust C# generation

* Replace IDeployment with a sealed class (#4318)

Replace IDeployment with a sealed class

* .NET: default to args subtype rather than Args.Empty (#4320)

* Adding system namespace for Dotnet code gen

This is required for using Obsolute attributes for deprecations

```
Iam/InstanceProfile.cs(142,10): error CS0246: The type or namespace name 'ObsoleteAttribute' could not be found (are you missing a using directive or an assembly reference?) [/Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/dotnet/Pulumi.Aws.csproj]
Iam/InstanceProfile.cs(142,10): error CS0246: The type or namespace name 'Obsolete' could not be found (are you missing a using directive or an assembly reference?) [/Users/stack72/code/go/src/github.com/pulumi/pulumi-aws/sdk/dotnet/Pulumi.Aws.csproj]
```

* Fix the nullability of config type properties in C# codegen (#4379)
2020-04-14 09:30:25 +01:00
Evan Boyle ab659aa0c1
Reimplement getRequiredPlugins for go sdk (#4297) 2020-04-06 12:30:40 -07:00
Lee Briggs b23903603b
Suppress output correctly in git-diff 2020-04-01 13:35:16 -07:00
stack72 a3c79ffcfc Fixing up the running of docker tests due to new go mod structure 2020-04-01 19:12:55 +01:00
stack72 7c1105a8b5 Don't tag as dirty build when only go.mod or sum changes 2020-04-01 12:18:06 +01:00
stack72 a1af9289c3 Move BuildUtil class to sdk
This was still in pkg and wasn't accessible from the scripts location.
This code should be in the go/common location of sdk so that it can be
accessed from within our build scripts

Without this change, we were not able to get access to the Version number
for Python and none of our Python builds have been publishing binaries
2020-03-31 12:07:24 +01:00
Evan Boyle ad7e4817e1
update get-version to understand submodule tags (#4229) 2020-03-29 16:53:23 -07:00
Evan Boyle 6a945294e3
only run release builds on tags that start with "vX" (#4219) 2020-03-28 14:49:18 -07:00
Evan Boyle e4daaf36cb
fix coverage scripts to work with submodules (#4220) 2020-03-28 14:48:44 -07:00
stack72 f43a9522cb Ensure that windows binaries have the correct exe extension as part of publishing 2020-03-27 20:16:07 +00:00
stack72 ed23cfe0d6 Fixing up the publishing mechanism for windows 2020-03-27 18:59:13 +00:00
Evan Boyle 995e5c2e3d
silence pushd/popd in make_release (#4194) 2020-03-26 11:35:18 -07:00
evanboyle 1443f9808c fix release scripts to be aware of new module structure 2020-03-25 17:58:05 -07:00
Pat Gavlin 61caba976b
Disable container entrypoint tests. (#4137)
These are consistently failing in CI, which is blocking automated
releases. https://github.com/pulumi/pulumi/issues/4136 tracks
re-enabling these tests.
2020-03-20 14:30:52 -07:00
evanboyle 1fec5692a5 duplicate version to ensure linking is properly handled 2020-03-19 12:49:34 -07:00
evanboyle ec686bbaf6 Merge branch 'master' of https://github.com/pulumi/pulumi into evan/gomod 2020-03-18 17:57:58 -07:00
evanboyle 48250176a1 Revert "move sdk/python/cmd/pulumi-language-python -> pkg/cmd/pulumi-language-python"
This reverts commit e2ee46fb23.
2020-03-18 17:11:56 -07:00
evanboyle 5f3af2d71d dont update go.mod when running get-py-version 2020-03-18 16:32:21 -07:00
Justin Van Patten 24e804bbe8
Support for running Python policy packs (#4057)
These changes enable running policy packs written in Python.
2020-03-18 16:15:57 -07:00
evanboyle 30df499838 move pkg/version -> sdk/go/common/version 2020-03-18 15:25:25 -07:00
evanboyle 50c72e194c remove reference to ./cmd/... in build scripts 2020-03-18 13:37:35 -07:00
evanboyle 7ea547a14d move sdk/go/pulumi-language-go -> pkg/cmd/pulumi-language-go 2020-03-18 12:49:56 -07:00
evanboyle b7ea8198de move sdk/dotnet/cmd/pulumi-language-dotnet -> pkg/cmd/pulumi-language-dotnet 2020-03-18 12:45:33 -07:00
evanboyle a73044247e move sdk/nodejs/cmd/pulumi-language-nodejs -> pkg/cmd/pulumi-language-nodejs 2020-03-18 12:25:07 -07:00
evanboyle e2ee46fb23 move sdk/python/cmd/pulumi-language-python -> pkg/cmd/pulumi-language-python 2020-03-18 10:19:22 -07:00
CyrusNajmabadi d48e35b50e
Build feature-xxx branches as well as features/xxx branches (#3848) 2020-01-30 12:28:31 -08:00
Chris Smith c064db2235
Enable pulumi/actions container tests (#3707)
* Enable pulumi/actions container tests

* Add -v

* Rename dist/docker to dist/pulumi to match container name
2020-01-02 13:44:03 -08:00
Pat Gavlin 30749a48cd
Fix the container test. (#3694)
Build the test on the host, then mount it and run it in the container.
This allows us to make use of the usual integration testing framework to
handle running `npm/yarn`, `pip`, etc.
2019-12-22 11:40:07 -08:00
Chris Smith d66f081e27
Fix syntax error in script (#3691) 2019-12-20 11:23:32 -08:00
Chris Smith 7818c219e8
Add .NET Core SDK to pulumi/pulumi container (#3616)
* Add tests for the pulumi/actions container

* Add .NET Core SDK to pulumi/pulumi container

* Address PR feedback

* Update CHANGELOG.md
2019-12-17 11:05:19 -08:00
Justin Van Patten 7278a7429c
Don't remove tests from @pulumi/pulumi npm package (#3532)
The test files are currently included in the npm package, and we have packages that depend on the test files currently, so when installing the linkable `@pulumi/pulumi` package locally, don't delete the tests.
2019-11-19 21:29:53 +00:00
Mikhail Shilkov 889a022684 Add .NET to Windows build (#3466) 2019-11-07 07:04:31 -08:00
Pat Gavlin dcd3068fea
Include the .NET language host in releases. (#3453) 2019-11-05 19:25:03 -08:00
CyrusNajmabadi df06b8fc9b
Add publishing to nuget support (#3416) 2019-10-29 20:14:49 -07:00
Pat Gavlin 23b7a3f337
Add scripting for updating the Homebrew formula. (#3291)
This script will run during OS X legs, and will open a PR to update the
Homebrew formula for Pulumi on each new release.
2019-10-02 16:04:58 -07:00
Matt Ellis 1e2f4107c4 Reset patch to 0 when generating a version for a minor update
This fixes an issue we didn't forsee. If we do a patch release by
tagging a commit as `v1.1.1`, the next version we generate will be
`v1.2.1-alpha.....` which is not what we want. When bumping the minor
version, we should reset the patch version to zero, regardless of what
it is.
2019-09-13 15:50:38 -07:00
Matt Ellis 6b4fa1575a Don't fail if packages have already been published
This is https://github.com/pulumi/scripts/pull/84 but for
pulumi/pulumi (which doesn't use the shared script because we have to
do special things for pulumi/pulumi)
2019-09-12 11:50:31 -07:00
Matt Ellis 0a2384d175 Update version assignment logic
Previously, we would compute a version for a build by taking the last
relaesed bversion and then increment the patch number. We did this
because during pre 1.0 milestones, we would use the minor version to
say that there had been a "breaking change" and use the patch version
to mean there had been fixes or new features.

For packages that are 1.0 or later, we are now going to bump the minor
version per release and will use the patch version just for cases
where we do one off hot fixes.

This change updates our version generation logic to be in line with
this new plan.
2019-09-11 14:31:47 -07:00
Pat Gavlin 9df29893ba
Build new docs when publishing tagged releases. (#3181)
These changes wire up a new script that clones
https://github.com/pulumi/docs, regenerates the appropriate parts of the
docs site, and opens a pull request with the changes. This script
executes on any build in which we publish packages that _also_ has a tag
present.
2019-09-05 12:20:48 -07:00
Alex Clemmer d033576348 Include pulumi-analyzer-policy in Windows releases 2019-08-30 20:46:39 -07:00
Matt Ellis e20d72ff6e Only skip publishing docker images for -alpha builds.
Previously, we only published docker images for non-prerelease
builds. However, on our move to 1.0.0, we will be publishing a few
`-beta` (and perhaps one or more `-rc`) builds. These are high quality
builds we want folks to use. So, we will publish them to DockerHub and
update the `latest` tag, similar to what we do for NPM and PyPI.

I will manually publish 1.0.0-beta.2, but landing these changes means
that future releases will be published automatically

Fixes #3092
2019-08-16 11:02:42 -07:00
Pat Gavlin 57b6e84645
Prepare for the v1.0.0-beta.1 release. (#3079)
- Update scripts/get-version and friends to understand the new -alpha
  and -beta tags
- Update the CHANGELOG
2019-08-13 11:41:32 -07:00
Luke Hoban 3768e5c690
Python Dynamic Providers (#2900)
Dynamic providers in Python.

This PR uses [dill](https://pypi.org/project/dill/) for code serialization, along with a customization to help ensure deterministic serialization results.

One notable limitation - which I believe is a general requirement of Python - is that any serialization of Python functions must serialize byte code, and byte code is not safely versioned across Python versions.  So any resource created with Python `3.x.y` can only be updated by exactly the same version of Python.  This is very constraining, but it's not clear there is any other option within the realm of what "dynamic providers" are as a feature.  It is plausible that we could ensure that updates which only update the serialized provider can avoid calling the dynamic provider operations, so that version updates could still be accomplished.  We can explore this separately.

```py
from pulumi import ComponentResource, export, Input, Output
from pulumi.dynamic import Resource, ResourceProvider, CreateResult, UpdateResult
from typing import Optional
from github import Github, GithubObject

auth = "<auth token>"
g = Github(auth)

class GithubLabelArgs(object):
    owner: Input[str]
    repo: Input[str]
    name: Input[str]
    color: Input[str]
    description: Optional[Input[str]]
    def __init__(self, owner, repo, name, color, description=None):
        self.owner = owner
        self.repo = repo
        self.name = name
        self.color = color
        self.description = description

class GithubLabelProvider(ResourceProvider):
    def create(self, props):
        l = g.get_user(props["owner"]).get_repo(props["repo"]).create_label(
            name=props["name"],
            color=props["color"],
            description=props.get("description", GithubObject.NotSet))
        return CreateResult(l.name, {**props, **l.raw_data}) 
    def update(self, id, _olds, props):
        l = g.get_user(props["owner"]).get_repo(props["repo"]).get_label(id)
        l.edit(name=props["name"],
               color=props["color"],
               description=props.get("description", GithubObject.NotSet))
        return UpdateResult({**props, **l.raw_data})
    def delete(self, id, props):
        l = g.get_user(props["owner"]).get_repo(props["repo"]).get_label(id)
        l.delete()

class GithubLabel(Resource):
    name: Output[str]
    color: Output[str]
    url: Output[str]
    description: Output[str]
    def __init__(self, name, args: GithubLabelArgs, opts = None):
        full_args = {'url':None, 'description':None, 'name':None, 'color':None, **vars(args)}
        super().__init__(GithubLabelProvider(), name, full_args, opts)

label = GithubLabel("foo", GithubLabelArgs("lukehoban", "todo", "mylabel", "d94f0b"))

export("label_color", label.color)
export("label_url", label.url)
```


Fixes https://github.com/pulumi/pulumi/issues/2902.
2019-07-19 10:18:25 -07:00
Alex Clemmer 3bc86055c2 Add pulumi-analyzer-package scripts in publishing pipeline 2019-07-16 00:58:33 -07:00
Chris Smith 0ede30fdb6
Build/Push pulumi/actions container with new SDK releases (#2646)
* Build/Push pulumi/actions container with new SDK releases

* Address PR feedback
2019-04-18 15:32:19 -07:00
Matt Ellis fbae997456 Don't clobber dev tag from PR builds 2019-01-31 14:55:01 -08:00
Matt Ellis 389a3721ec Publish Docker image as part of release process
This change does two things:

- It ensures that as part of publishing the SDK, we also publish an
  updated pulumi/pulumi docker image (tagged with both `latest` and
  `vX.Y.Z`

- Makes this image published by this repository less perscriptive in a
  workflow. The instead of having wrapper scripts that try to invoke
  Pulumi based on conventions. It is now just a base image that has
  the pulumi CLI installed, as well as the SDKs for the major cloud
  providers. We'll use this base layer in our github actions image,
  which will layer on a github actions centric workflow

Fixes #1991
2019-01-24 11:43:05 -08:00
Matt Ellis c8b7e1fc71 Only publish some artifacts from a single Linux leg
We publish some artifacts from this repository, which are specific to
an OS. In the past, we only had a single Linux leg and so we did not
need any additional conditional logic.

However, we now have multiple Linux legs (across different node
versions) running in parallel, so if we try to publish the same
artifacts at the same time, we can run into issues because two `aws s3
cp` jobs try to write to the same file at the same time.

Follow similar logic to our skips we do around publishing NPM and PyPI
packages here, as well.
2019-01-15 10:42:28 -08:00
Matt Ellis 01d58ad7e4 Fix +dirty tag on Windows for tagged versions
The logic to append the `+dirty` tag to a generated version on Windows
was incorrect in the case where we were producing a version for a
tagged build. In that case we would append `+dirty` when the work tree
was clean and not append it when it was dirty.
2018-12-05 11:11:43 -08:00
Matt Ellis e56cefa285 Publish SDK binaries with same filename format as NPM packages
With this change, you can now use the `dev` tag of `@pulumi/pulumi` to
get the latest version of the SDK and install it from get.pulumi.com

This is helpful for some of our internal testing.
2018-11-21 14:38:24 -08:00
Matt Ellis 2b3c7f61c5 Rework get-version scripts
Under our old versioning system, when we started a new point release,
we'd tag the HEAD commit of master with a tag like `v0.16.6-dev` and
our scripts would use this to generate a new version number. This
required a great deal of gymnastics when producing a release and
caused us to litter these -dev tags everywhere.

To improve this, we change version number generation to the following
strategy:

1. If the commit we are building has a tag applied to it, use that tag
as the version (appending the dirty bit metadata to the version, if
needed).

2. If the commit we are bulding does not have a tag applied to it,
take the version from the next reachable tag, increment the patch
version and then append the `-dev` pre-release tag. As part of this,
we also make a slight tweek to our semver generation such that instead
of `-dev<TIMESTAMP>` we use `-dev.<TIMESTAMP>` which is more in line
with what semver recommends.
2018-11-16 20:11:04 -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
Chris Smith f324a460e9
Remove references to Pulumi private clouds (#2095)
* Remove TODO for issue since fixed in PPCs.

* Update issue reference to source

* Update comment wording

* Remove --ppc arg of stack init

* Remove PPC references in int. testing fx

* Remove vestigial PPC API types
2018-10-24 13:50:35 -07:00
joeduffy f9ef9312fe Skip immaterial PR events 2018-10-02 13:24:22 -07:00
joeduffy 6fe0222a45 Strip out "refs/heads/" parts of branches 2018-10-01 16:20:40 -07:00
joeduffy 1d0189c945 Use the target branch/stack for PRs 2018-10-01 15:47:17 -07:00
joeduffy 2499539afb Add the ability to have a stacks map file
For CI situations, we'll support a simple stacks map file, e.g.

    {
        "refs/heads/master": "production",
        "refs/heads/testing": "test'
    }

and, when PULUMI_CI is set, we'll use it to select the stack.

This is purely for experimental purposes; we're not sure this is
exactly what we want right now, but it's better than the manual
munging we've been doing with various bash scripts, etc. right now.
2018-10-01 13:45:26 -07:00
joeduffy 33ab82e9ac Set up some CI variables for GitHub App support 2018-10-01 11:38:03 -07:00
joeduffy d3ed7de33b Use a thin script wrapper for the entrypoint
This adds a package installation step just before calling the
`pulumi` CLI, making it easier to just volume mount a project
without needing to have `npm install`ed its contents yet.
2018-09-30 08:09:57 -07:00
Matt Ellis d9e3c2c91d Restore build-sdk.sh script
It was not intended to be deleted as part of #1992, we just wanted to
delete `dist/install.sh`
2018-09-26 21:49:19 -07:00
Matt Ellis f91e1ba5c5 Remove install script from SDK tarball
Pulumi used to have a much more complicated install process, whereas
today, this is no longer the case. You simply unpack pulumi to a
folder of your choice, add it to the `$PATH` and then go.

The `install.sh` was writtten back when Pulumi had to be installed
into its own directory. It assumed that it "owned" this directory and
when the script hit an error would clean up its half processed state
before trying to exit. While this was fine out of the box (since we
default to installing to `/usr/local/pulumi`) if you overrode the
install location to just say `/usr/local` *and* we hit an error in the
script, the script would try to remove everything from `/usr/local` as
part of cleaning itself up.

Since we no longer need any of this extra install logic, we'll just
remove `install.sh` completely. The SDK tarball will now contain a
single top level directory (named `pulumi`) with all of our binaries
under it. Manual installs will now just mean unpacking the tarball
somewhere and putting that `pulumi` folder on your path, or as a
simplification, copying all the binaries from the `pulumi` folder into
an existing folder that is already on your path.

This also removes the need to ever ask the user to `sudo` during an
install. Users now have complete control over where they put our
binaries, which is exactly what you want from a manual install
process.
2018-09-26 14:05:56 -07:00
Matt Ellis c7f9f9d12c More macOS script fixes 2018-09-11 17:14:58 -07:00
Matt Ellis a57bdfbd52 Fix up scripts when running on macOS
macOS doesn't use GNU tools and so some options are missing.
2018-09-11 17:00:40 -07:00
leogtzr 3f89b015ca cleanup 2018-09-11 14:59:25 -07:00
Matt Ellis 1746cc60a2 Fix Windows publishing 2018-06-17 23:16:58 -07:00
Matt Ellis 2cfbe81adb Remove dependency on pulumi/home
Stop cloning pulumi/home. This doesn't work in Travis because public
repositories can not have private SSH keys, which we'd need to clone
this repository. All the scripts we consume from there are now in
pulumi/scripts and so we'll just consume them from there.
2018-06-17 22:09:15 -07:00
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