Commit graph

3487 commits

Author SHA1 Message Date
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
CyrusNajmabadi
9c95a7e041
add more test logging. (#2405) 2019-01-29 13:14:06 -08:00
Pat Gavlin
35c60d61eb
Follow up on #2369 (#2397)
- Add support for per-property dependencies to the Go SDK
- Add tests for first-class secret rejection in the checkpoint and RPC
  layers and language SDKs
2019-01-28 17:38:16 -08:00
Pat Gavlin
1ecdc83a33 Implement more precise delete-before-replace semantics. (#2369)
This implements the new algorithm for deciding which resources must be
deleted due to a delete-before-replace operation.

We need to compute the set of resources that may be replaced by a
change to the resource under consideration. We do this by taking the
complete set of transitive dependents on the resource under
consideration and removing any resources that would not be replaced by
changes to their dependencies. We determine whether or not a resource
may be replaced by substituting unknowns for input properties that may
change due to deletion of the resources their value depends on and
calling the resource provider's Diff method.

This is perhaps clearer when described by example. Consider the
following dependency graph:

  A
__|__
B   C
|  _|_
D  E F

In this graph, all of B, C, D, E, and F transitively depend on A. It may
be the case, however, that changes to the specific properties of any of
those resources R that would occur if a resource on the path to A were
deleted and recreated may not cause R to be replaced. For example, the
edge from B to A may be a simple dependsOn edge such that a change to
B does not actually influence any of B's input properties. In that case,
neither B nor D would need to be deleted before A could be deleted.

In order to make the above algorithm a reality, the resource monitor
interface has been updated to include a map that associates an input
property key with the list of resources that input property depends on.
Older clients of the resource monitor will leave this map empty, in
which case all input properties will be treated as depending on all
dependencies of the resource. This is probably overly conservative, but
it is less conservative than what we currently implement, and is
certainly correct.
2019-01-28 09:46:30 -08:00
CyrusNajmabadi
edd742a0c4
Allow derived classes to call registerOutputs with no args. (#2393) 2019-01-26 17:59:11 -08:00
CyrusNajmabadi
8fee7fb460
Include more data when running commands during tests. (#2392) 2019-01-25 16:34:37 -08:00
Matt Ellis
e950ab1e51 Update CHANGELOG.md for 0.16.12 2019-01-25 15:26:01 -08:00
Matt Ellis
597a2861b0
Merge pull request #2386 from pulumi/ellismg/fix-2039
Include project name in stack's identity.
2019-01-25 13:43:48 -08:00
Matt Ellis
f94e2e7bcc Update CHANGELOG.md 2019-01-25 12:52:33 -08:00
Matt Ellis
236c58f4e6 Small code cleanups 2019-01-25 09:48:27 -08:00