Commit graph

3396 commits

Author SHA1 Message Date
CyrusNajmabadi aa3c6d0ba6
Converting an Output to a string or JSON now produces a warning . (#2496) 2019-02-27 16:00:54 -08:00
CyrusNajmabadi 0d2d1eb61a
Rolling back toString/toJSON change (#2495)
* Revert "Make toString and toJSON internal (#2489)"

This reverts commit 7579b84f73.

* Revert "Update error message to point at docs. (#2488)"

This reverts commit 9156c26a2e.

* Revert "Throw on Output.toString and toJSON (#2486)"

This reverts commit c33b4505c0.
2019-02-27 14:53:56 -08:00
CyrusNajmabadi 1cd90c5c9d
Merge pull request #2493 from pulumi/cyrus/hot-fix-for-0.16.16
Rollback waiting on children of a component when waiting on the component
2019-02-27 12:59:37 -08:00
CyrusNajmabadi 0c5988c5f0
Merge branch 'master' into cyrus/hot-fix-for-0.16.16 2019-02-27 12:43:36 -08:00
CyrusNajmabadi 93defd4b90
Rollback waiting on children of a component when waiting on the component. (#2492) 2019-02-27 12:41:44 -08:00
Cyrus Najmabadi 34f83de210 Rollback waiting on children of a component when waiting on the component.
(cherry picked from commit d1ecc5a250)
2019-02-27 12:31:57 -08:00
CyrusNajmabadi 7579b84f73
Make toString and toJSON internal (#2489) 2019-02-27 02:15:36 -08:00
CyrusNajmabadi 9156c26a2e
Update error message to point at docs. (#2488) 2019-02-27 01:45:26 -08:00
CyrusNajmabadi c33b4505c0
Throw on Output.toString and toJSON (#2486) 2019-02-26 19:24:21 -08: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
Matt Ellis bdaf9f8361 Provide a hint about stack name format when creating stacks
This makes creating a stack in an organization a little more
discoverable.

Contributes To: #2421
2019-02-26 10:09:06 -08:00
CyrusNajmabadi 9225c0d72d
test-all should not rerun test-fast (#2478) 2019-02-25 13:01:52 -08:00
Luke Hoban dfdcba2ea7
Update CHANGELOG.md 2019-02-24 22:21:55 -08:00
CyrusNajmabadi cbdbaffac9
Update changelog (#2473) 2019-02-24 12:37:43 -08:00
CyrusNajmabadi c53f697a6f
Fix deadlock when waiting for transitive dependencies (#2471) 2019-02-24 12:14:16 -08:00
CyrusNajmabadi 967c6407a0
Revert "Simplify how we export the .all operator (#2467)" (#2469)
This reverts commit 93c9464125.
2019-02-23 19:54:28 -08:00
CyrusNajmabadi 93c9464125
Simplify how we export the .all operator (#2467) 2019-02-22 12:02:52 -08:00
CyrusNajmabadi ee5b13cb10
Update changelog (#2466) 2019-02-22 01:00:00 -08:00
CyrusNajmabadi 27b04c4c62
Have child resources update their parent urn to include themselves in its dependencies. (#2299) 2019-02-21 20:18:29 -08:00
Sean Gillespie ce26bd871f
Decrease log level for HTTP requests and responses (#2460)
* Decrease log level for HTTP requests and responses

Logging each HTTP request and response can get quite chatty, especially
when publishing a lot of events. This increases the verbosity level of
these logs so that they don't get emitted at level 9, which is the
general level that providers use when issuing verbose logs.

* Appease linter
2019-02-20 09:20:01 -08:00
Justin Van Patten b064a03054
Return error from stack tag commands in local mode (#2457)
Instead of operating as no-ops, return an error to make it more clear
that these commands are not currently implemented when using --local
mode.
2019-02-19 16:07:57 -08:00
Luke Hoban b6a9814e67
Better log messages for replaces/changes (#2452)
We previously logged the number of replaces and changes returned from a call to Diff, but not the actual properties that were forcing replace.  Several times we've had to debug issues with unexpected replaces being proposed, and this information is very useful to have access to.

Changes the verbose logging to include the property names for both replaces and changes instead of just the count.
2019-02-15 12:02:03 -08:00
Sean Gillespie e0b516d0cc
Fix an issue with empty ID for CustomResource (#2449)
* Fix an issue with empty ID for CustomResource

The Python runtime was checking the ID field it receives from the engine
against None, assuming that the engine would not set the ID field if one
was not present. However, it does set the ID field; it is set to the
empty string when an ID is not known.

This commit fixes an issue that can cause certain IDs to be erroneously
considered to be known during previews, which can cause problems during
the Check phase of resources that directly reference IDs of other
resources.

* Add CHANGELOG
2019-02-15 09:55:19 -08:00
David J. Felix 7c42f71c3c fix: overhaul the Dockerfile (#2442)
- Pick python as a base image. Debian build tools depend on 3.5, so don't fight that battle, just use an existing solution
- Fixes #2435
- Move the pulumi install to the bottom. Rule of thumb is you always install deps first then your software so you're not thrashing the dockerfile build because you only build images when your code changes, not when deps change.
- Do all of the dep work in one step and clean up. This makes the image have way fewer layers and makes the image a bit smaller
- Get consistent with repo addition. I'm not sure if this is the best way, but it's better.
- Add some failure handling to curl commands
- Avoid crazy ass curl-pipe-bash install scripts when possible in favor of crazy ass curl-pipe-apt-key 😨 
- Add some github actions stuff in case people want to use this for actions. I'm here because the github action is wack, and I'm trying to align your dockerfiles across both repos.
2019-02-14 14:58:02 -08:00
Sean Gillespie 406c8ea16d
Add a test for exporting Futures (#2447)
It should be possible to export Futures as stack outputs - this test
ensures that this is the case.
2019-02-13 14:05:29 -08:00
Sean Gillespie c720d1329f
Enable delete parallelism for Python (#2443)
* Enable delete parallelism for Python

* Add CHANGELOG.md entry

* Expand changelog message - upgrade to Python 3

* Rework stack rm test

The service now allows removing a stack if it just contains the top
level `pulumi:pulumi:Stack` resource, so we need to actually create
another resource before `stack rm` fails telling you to pass
`--force`.

Fixes #2444
2019-02-12 14:49:43 -08:00
Luke Hoban 06d3c7811f
Fix date text 2019-02-11 15:28:17 -08:00
Matt Ellis 4229f85fda
Merge pull request #2441 from DavidJFelix/patch-1
fix: typo in yarn installation
2019-02-08 19:13:58 -08:00
David J. Felix 617083f855
fix: actually update apt after adding a list for yarn 2019-02-08 22:03:10 -05:00
David J. Felix 666a4a6fd8
fix: typo in yarn installation
- per documentation, looks like you missed a character https://yarnpkg.com/lang/en/docs/install/#debian-stable
2019-02-08 21:59:38 -05:00
CyrusNajmabadi 57a228c2ab
Fix issue with comments throwing off function/class serialization (#2438) 2019-02-08 14:58:24 -08:00
Qingping Hou 46fd8b3b5c fix crash in resource constructor validation check (#2349)
If parent is not a valid resource, throw a RunError instead.
ResourceError needs to be created with a valid resource.
2019-02-08 08:05:33 -08:00
Matt Ellis 687a780b20 Show a better error when --force needs to be passed to stack rm
When `pulumi stack rm` is run against a stack with resources, the
service will respond with an error if `--force` is not
passed. Previously we would just dump the contents of this error and
it looked something like:

`error: [400] Bad Request: Stack still has resources.`

We now handle this case more gracefully, showing our usual "this stack
still has resources" error like we would for the local backend.

Fixes #2431
2019-02-07 15:25:02 -08:00
Matt Ellis 6f386567f6 Don't install the just built package into user's site-packages
We do all our work in a virtualenv and across repositories we now
consume dependencies via pypi (also installed in a virtualenv) so best
case install into the user site packages wastes time and maybe prints
some warnings and worse case it clobbers something they've installed
for real.
2019-02-01 15:49:36 -08:00
Luke Hoban c974bff8e0 Display current logged in user
See pulumi/docs#826.
2019-02-01 11:27:49 -08:00
CyrusNajmabadi 5211954f3a
Break out Resource and Output into their own files (#2420) 2019-01-31 18:08:17 -08:00
Matt Ellis 9eba0d3b37 Run fewer jobs for PRs and pushes
Today, we run 4 jobs for every push or PR build. Three Linux builds
which only differ by node version and an macOS build that also has a
different node version from the rest.

In practice this ends up generating a great deal of jobs during
development, given some of our workflows and these jobs often don't
find interesting issues.

We're going to start by relaxing things in the following ways:

- For a given PR, we'll just run a single Linux leg (as well as the
  Windows leg we get from AppVeyor).

- For push jobs (which happen either when a PR is merged into master,
  or a branch named `features/*` is pushed, we'll run a Linux leg and
  and macOS leg (the macOS leg is run per push, so we build and
  publish of the CLI for macOS builds)

- For our nightly cron job, we'll continue to run all three Linux
  legs, to get coverage across different versions of nodejs.

If we end up seeing an uptick in regressions found by these jobs after
each commit, we can re-evaluate or pre checkin strategy.
2019-01-31 17:59:17 -08:00
Matt Ellis d9b6d54e2e Use prefered new pulumi.Config() form
In #2330 there was a case where if you didn't pass a value to the
`pulumi.Config()` constructor, things would fail in a weird manner.

This shouldn't be the case, and I'm unable to reproduce the issue. So
I'm updating the test to use the form that didn't work at one point so
we can lock in the win.

Fixes #2330
2019-01-31 16:11:57 -08:00
Sean Gillespie 355f6fabe1
Typo: ProviderReference -> ProviderResource (#2418) 2019-01-31 16:03:01 -08:00
Matt Ellis fbae997456 Don't clobber dev tag from PR builds 2019-01-31 14:55:01 -08:00
Pat Gavlin 6e90ab0341
Add support for explicit delete-before-replace (#2415)
These changes add a new flag to the various `ResourceOptions` types that
indicates that a resource should be deleted before it is replaced, even
if the provider does not require this behavior. The usual
delete-before-replace cascade semantics apply.

Fixes #1620.
2019-01-31 14:27:53 -08:00
Pat Gavlin 128afe3323
Use "discard" when deleting read resources (#2280)
In general, a "delete" in Pulumi is destroying an actual physical
resource. In the case of a read resource, however, the delete is
merely removing the resource from the stack; the physical resource
is not affected. These changes attempt to clarify this situation by
using the term "discard" rather than "delete".

Fixes #2015.
2019-01-31 13:48:44 -08:00
Matt Ellis a627cf817a Ensure InvokeRequest is defined
InvokeRequest is defined in provider_pb.js not resource_pb.js. Require
that module instead.
2019-01-31 12:00:32 -08:00
Sean Gillespie 87b8b4dcda
Clean up documentation for Python SDK (#2398)
* Clean up documentation for Python SDK

The Python SDK currently does a couple of bad things that make it
difficult to generate documentation:

1. It "wildcard-imports" submodules without each module specifying an
__all__ member
2. Documentation strings don't have a consistent format
3. Documentation strings are in Markdown and not reStructuredText

To remedy this, this commit addresses 1 by explicitly specifying which
members are being exported from submodules, so that we can see in one
place exactly what the public surface area of the pulumi package is. For
2 and 3, this commit fixes a large number of documentation strings to
contain metadata tags that Sphinx is capable of reading. This allows us
to generate high-quality documentation directly from the source without
having to manually parse docstrings.

* Please pylint
2019-01-31 10:36:03 -08:00
Matt Ellis 07130913df Prepare for v0.16.13 2019-01-30 21:17:34 -08:00
Matt Ellis b0288dd8aa
Merge pull request #2409 from pulumi/ellismg/enhance-stack-reference-error
Improve StackReference error message
2019-01-30 21:09:39 -08:00
Matt Ellis 42ea5d7d14 Pass project in StackReference test 2019-01-30 16:54:12 -08:00
Matt Ellis 50c2ebbdd5 Improve StackReference error message
Because of the change to include a stack's project as part of its
identity in the service, the names passed to StackReference now
require the project name as well.

Improve the error message when they do not include them.
2019-01-30 15:57:44 -08:00
Sean Gillespie 1d5526d292
Work around commonjs protoc bug (#2403)
* Work around commonjs protoc bug

When compiling with the commonjs target, the protoc compiler still emits
references to Closure Compiler-isms that whack global state onto the
global object. This is particularly bad for us since we expect to be
able to make backwards-compatible changes to our Protobuf definitions
without breaking things, and this bug makes it impossible to do so.

To remedy the bug, this commit hacks the output of protoc (again) with
sed in order to avoid ever touching the global object. Everything still
works fine because the commonjs target (correctly) exports the protobuf
message types via the module system - it's just not writing to global
anymore.

* Fix status.proto

* Don't hack status.proto
2019-01-29 17:07:47 -08:00