Commit graph

3769 commits

Author SHA1 Message Date
CyrusNajmabadi 7bdd590586
Add deprecation warnings. (#3004) 2019-07-30 15:51:44 -07:00
Luke Hoban 852a8f9dc9
Highlight the Get Started guide in the README (#3003)
Tactical improvement to make the getting started experience easier to find from the project homepage.
2019-07-30 11:32:36 -07:00
CyrusNajmabadi 96d7bedce4
Update CL (#2998) 2019-07-29 12:51:11 -07:00
CyrusNajmabadi 93f0bd708d
Add helper function for merging ResourceOptions (#2988) 2019-07-29 12:01:10 -07:00
James Nugent d1d2affa73
Merge pull request #2997 from pulumi/jen20/glog-branch
Depend on pulumi-master instead of master for pulumi/glog
2019-07-29 12:54:03 -05:00
James Nugent 12b5318730 Update CHANGELOG.md 2019-07-29 12:27:26 -05:00
James Nugent 77741a1738 Depend on pulumi-master instead of master for pulumi/glog 2019-07-29 12:22:22 -05:00
Justin Van Patten bb43f63d51
Backport Changelog entries from the docs repo (#2992)
https://www.pulumi.com/docs/reference/changelog/ contains changelog entries for older versions, but hasn't been kept up-to-date. We'll be removing those from that page, after having moved the older entries to the CHANGELOG.md in this repo, which this commit does.
2019-07-26 19:33:07 -07:00
CyrusNajmabadi 27113eb6a9
Rewrite all rows when screen height changes (#2990) 2019-07-26 11:36:20 -07:00
Luke Hoban 74854de490 Prepare for 0.17.26 2019-07-26 08:54:53 -07:00
Luke Hoban 7854227fcf Correctly calculate number of changes (#2985)
We were reporting the number of kinds of changes instead of the actual number of changes.

Fixes #2706
2019-07-25 22:40:08 -07:00
Alex Clemmer c4b3745961 Signal policy publish operation completion to the service
Fixes pulumi/pulumi-policy#32
2019-07-25 15:21:07 -07:00
Chris Smith 18bfca421b
Minor README.md changes (#2983)
* Minor README.md changes

* Address PR feedback

* Address PR feedback
2019-07-25 14:44:41 -07:00
James Nugent 54fde111a7
Merge pull request #2984 from pulumi/jen20/replace-glog
Depend on `pulumi` fork of `glog`.
2019-07-25 16:43:55 -05:00
PLACE 3fb8a59da9 PULUMI_CONFIG_PASSPHRASE now supports an enpty passphrase (#2904)
This change allows you to run pulumi in non-interactive environments without a state passphrase.

e.g. the following will now work.

```
export PULUMI_CONFIG_PASSPHRASE=""
pulumi up --yes
```

Related to #2758.
2019-07-25 14:23:43 -07:00
James Nugent 7f6a6501ef Depend on pulumi fork of glog.
This removes the need for a replace directive in every downstream `go.mod`.
2019-07-25 16:10:53 -05:00
James Nugent 23c5a2ffb2
Merge pull request #2981 from pulumi/jen20/replace-gotty
Depend on the `ijc` fork of Gotty
2019-07-25 16:04:15 -05:00
James Nugent 8fed68f2b0 Depend on ijc fork of Gotty
This removes the need for a replace directive in every downstream `go.mod`,
however it does not protect against the case of a `go.mod` being added upstream
with a different import path in future. This seems unlikely given the cadence of
work upstream, however.
2019-07-25 15:37:23 -05:00
CyrusNajmabadi 237f8d2222
Add python aliases support. (#2974) 2019-07-25 11:21:06 -07:00
Pat Gavlin c6916051f0
Use a bag for misc. resource options in deploytest (#2977)
Most of these options are typically left unset. In order to make it
easier to update the lifecycle test when adding new options, collect
them in a bag s.t. most callsites can go without being updated.
2019-07-25 11:18:40 -07:00
Chris Smith 208dfc29b4
Update references to pulumi.io (#2979)
* Remove pulumi.io reference in tests

* Remove pulumi.io references in Dockerfiles

* Remove pulumi.io references in CONTRIBUTING.md

* Update README.md's

* Use correct logo
2019-07-25 09:58:12 -07:00
Chris Smith b0055787e6
Fix issue when logging out of local backend (#2951)
* Fix issue when logging out of local backend

* Put actual cloud URL into credentials.json

* Fix test on Windows; disable newly-enabled tests on Appveyor

* Keep track of the URL used to initialize local backend
2019-07-25 07:58:19 -07:00
Chris Smith c14a58987c Add --yes params to a couple commands (#2976) 2019-07-24 16:56:51 -07:00
Pat Gavlin fa05e5cb05
Migrate old providers without outputs. (#2973)
If we encounter a provider with old inputs but no old outputs when reading
a checkpoint file, use the old inputs as the old outputs. This handles the
scenario where the CLI is being upgraded from a version that did not
reflect provider inputs to provider outputs, and a provider is being
upgraded from a version that did not implement `DiffConfig` to a version
that does.

Fixes https://github.com/pulumi/pulumi-kubernetes/issues/645.
2019-07-23 13:39:21 -07:00
Alex Clemmer ed5b8437d1 Batch policy violation reporting for pulumi preview
Currently, `pulumi preview` fails immediately when any resource
definition in a Pulumi app is found to be in violation of a resource
policy. But, users would like `preview` to report as many policy
violations as it can before terminating with an error, so that they can
fix many of them before running `preview` again.

This commit will thus change `pulumi preview` to do this sort of
"batching" for policy violations. The engine will attempt to run the
entire preview step, validating every resource definition with the
relevant known resource policies, before finally reporting an error if
any violations are detected.

Fixes pulumi/pulumi-policy#31
2019-07-22 20:42:17 -07:00
Alex Clemmer b9c349419d Don't hide policy violation errors in CLI rendering
The current CLI update view attributes all policy violation errors to
the root Stack resource. This commit will attribute them to the resource
that violated the policy.

The reason for this mis-attribution is a simple bookkeeping error:

* Resource policies intercept and prevent RegisterResource requests for
  when the resource in question violates some policy.
* The CLI "tree" view of resources "hides" rows for resources that have
  not been registered. Thus, if a policy violation occurs for a
  resource, it becomes "orphaned" and is attributed to the stack,
  because there is no row for the resource that violates the policy.

The solution, thus, is to simply set the "hidden" flag to false when we
encounter a policy violation.

Fixes pulumi/pulumi-policy#25
2019-07-22 20:42:17 -07:00
Paul Stack 67194cddfd
Creation of generator package (#2970)
Fixes: #2151

This will allow us to be able to share the code that generates our
language providers. Currently there is a copy of the python code
generation in pulumi-kubernetes and also in pulumi-terraform

We want to be able to share these
2019-07-22 17:09:35 -07:00
Pat Gavlin e305484c1a
Fix the CHANGELOG for v0.17.23 (#2972)
And link to the tracking issue for working around bugs exposed by
provider diffing.
2019-07-22 16:14:12 -07:00
Chris Smith f6379fae05
Fix 'pulumi new' to support creating stacks in an org (#2950)
* Fix 'pulumi new' to support creating stacks in an org

* Fix tests
2019-07-22 10:12:26 -07:00
Cameron Stokes cded857802 Fix bug link in changelog. (#2946)
Link to correct bug for custom timeouts entry.
2019-07-21 12:28:37 -05:00
Luke Hoban fa4da84669
Add get_object functions to Python SDK (#2959)
Fixes #2320
2019-07-20 07:04:18 -07:00
CyrusNajmabadi fa904a45e5
Fix changelog (#2964) 2019-07-19 16:46:00 -07:00
CyrusNajmabadi 61b0c74c21
Update changelog. (#2963) 2019-07-19 16:20:04 -07:00
Luke Hoban 563dff3d92
changelog: fix header for 0.17.24 release (#2960)
* changelog: fix header for 0.17.24 release

* More cleanup in CHANGELOG
2019-07-19 13:31:40 -07:00
CyrusNajmabadi d47473e462
Remove unnecessary exports (#2956) 2019-07-19 12:49:48 -07:00
Alex Clemmer 716a69ced2 Keep unknowns when marshalling resources in call to Analyze
Fixes pulumi/pulumi-aws#661.
2019-07-19 12:23:36 -07:00
Pat Gavlin b0fc599e02 Restore the old pickler in a try/finally (#2954)
Just what it says on the tin.
2019-07-19 12:08:15 -07:00
CyrusNajmabadi 837155994b
Update changelog. (#2953) 2019-07-19 11:26:08 -07:00
Alex Clemmer 784c39e22c Implement Omit like TypeScript upstream does 2019-07-19 11:14:31 -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
CyrusNajmabadi 70b3883942
Add an option to allow callers to specify they would like make invoke calls asynchronously. (#2947) 2019-07-18 17:19:41 -07:00
Maria Bermudez 6782f89238
Merge pull request #2941 from pulumi/maria-update-link
Update links to docs index and manual installation pages
2019-07-17 10:11:53 -07:00
Pat Gavlin de4eda47d9
Pin the Docker base image to Debian stretch. (#2945)
The Azure CLI is not yet available for buster.
2019-07-16 14:32:01 -07:00
CyrusNajmabadi e558296afa
Add a helper function to easily convert async functions to sync functions (#2943) 2019-07-16 12:12:21 -07:00
Luke Hoban fc38d7d4d9
Handle mixed versions of Resources in parent hierarchy (#2942)
For new properties added to `Resource`, we need to make sure to handle cases where these are undefined as they may not be available on versions of `Resource` that come from older SDK versions, which could me side-by-side in a single Pulumi program execution.

Fixes #2938
2019-07-16 11:15:26 -07:00
Pat Gavlin 049d7cec4e Prepare the CHANGELOG for release. 2019-07-16 11:05:29 -07:00
bermudezmt 5539fff2f3 Update links to docs index and manual installation pages 2019-07-16 10:05:37 -07:00
Cameron Stokes acfaa7ef51 ~readme: update python status to stable (#2919) 2019-07-16 06:54:53 -07:00
Alex Clemmer 0850c88a97 Address comments 2019-07-16 00:58:33 -07:00
Alex Clemmer 4c069d5cf6 Address lint warnings 2019-07-16 00:58:33 -07:00