Commit Graph

59 Commits

Author SHA1 Message Date
Fraser Waters 3bdf17e9bc
Ignore .mono directory ()
csdevkit seems to really want to make this directory and I will
accidentally `git add` eventually if not ignored.
2024-03-25 19:08:16 +00:00
Fraser Waters 165c634435
Update ignore rules following testdata move () 2024-03-18 09:27:43 +00:00
Thomas Gummerer e50a7e26cc
add .cov files to .gitignore ()
These are being produced e.g. when running `make` in sdk/nodejs.
Probably in other places as well, but that's where I noticed them. We
never want them in version control, so let's add them to the
`.gitignore`.
2024-03-14 11:51:45 +00:00
Fraser Waters a18399285f
NodeJS transforms ()
<!--- 
Thanks so much for your contribution! If this is your first time
contributing, please ensure that you have read the
[CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md)
documentation.
-->

# Description

<!--- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. -->

This adds a new experimental feature to the NodeJS SDK to register
remote transform functions. These are currently all prefixed 'X' to show
they're experimental.

These transform functions will run even for resources created inside
MLCs.

## Checklist

- [x] I have run `make tidy` to update any new dependencies
- [x] I have run `make lint` to verify my code passes the lint check
  - [x] I have formatted my code using `gofumpt`

<!--- Please provide details if the checkbox below is to be left
unchecked. -->
- [x] I have added tests that prove my fix is effective or that my
feature works
<!--- 
User-facing changes require a CHANGELOG entry.
-->
- [x] I have run `make changelog` and committed the
`changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the
Pulumi Cloud,
then the service should honor older versions of the CLI where this
change would not exist.
You must then bump the API version in
/pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi
Cloud API version
<!-- @Pulumi employees: If yes, you must submit corresponding changes in
the service repo. -->
2024-03-07 08:52:34 +00:00
Zaid Ajaj e5a8a7e934 nodejs pcl components, initial commit 2023-03-14 16:17:14 +01:00
Fraser Waters 6d5b255184 Hardcode repo for yaml converter 2023-03-13 18:30:01 +00:00
Robbie McKinstry 5eeee5241f
Create go.work only if it doesn't exist. 2023-01-31 11:37:28 -05:00
Zaid Ajaj 0766b866a6 Merge branch 'master' into minimal-config 2022-10-12 15:38:21 +02:00
Kyle Pitzen 95e2505de5 feat(engine): Adds structured alias support to the engine
feat(engine): Adds alias lineage calculation to the engine
2022-10-11 17:56:32 -04:00
Zaid Ajaj 6c6b5cec7e Initial work on project-level config (MVP) 2022-09-20 20:13:45 +02:00
Aaron Friel 272b987791 ci: ensure trunk is always green 2022-09-13 13:38:14 -07:00
Zaid Ajaj 2baf8da485
Do not track go-releaser build directories: fixes release workflow () 2022-06-08 14:23:26 +01:00
Ian Wahbe b281b482dc
Pass through resource replacement in the schema ()
* Pass through resource replacement in the schema

* Add property

* Ignore files in .pytest_cache

* Remove .pytest_cache files

* Add a test + Fix
2022-05-17 13:59:47 -07:00
Ian Wahbe 9bad651337
Cleanup make ensure ()
* Don't format generated files

* Allow ensure to be stateful

* Cleanup comments and echo flags
2022-05-16 16:47:04 -07:00
Aaron Friel 4bebb8dc70 ci: include additional language providers in packages 2022-05-04 10:00:53 +02:00
Ian Wahbe 183fa89163
Add an EnumType to the PCL model ()
* Add an EnumType to the PCL model

Languages implementation:
- [X] C#
- [X] Python
- [X] TypeScript
- [X] Go

* Fix assert

* Take namespace settings into account

* Implement enums for Go

* Update tests and add documentation.

* Add a test + handle output&unsafe

* Get outputs compiling for Go

* Line up types for Go

* Add nodejs

* Add Python

* Change expression form

* Fix nil check (`==` -> `!=`)

* Standardize nodejs & python checks

This should fix the Node OOM error.

* Rename enum-py to typed-enum-pp

* Don't reference schema types in `hcl2/model`

* Fix nits
2022-04-18 11:03:42 +02:00
Ian Wahbe a1e18dae4d
export codegen tests for internal use ()
* Export Codegen test modules

* Document pkg stability guarantee

* Expose programgen

* Recommendation: Improve wording

* Move `internal` to `testing`

* Re-rout references to codegen/internal

* Fix some other "internal" references
2022-02-07 12:10:04 +01:00
Ian Wahbe 00a747b138
Ignore build artifacts for clean git state () 2022-02-04 19:53:54 +01:00
Justin Van Patten 096b667ee1
Replace the use of pipenv with Python's venv ()
We've had a few issues in the recent past related to pipenv oddities in
CI which lead us to temporarily globally install the Python SDK in CI.

This change removes the use of pipenv in favor of Python's built-in
venv and avoids globally installing the Python SDK.
2021-12-07 07:59:07 -08:00
Pat Gavlin d3e49ecb65
[cli, testing, github] Gather code coverage data in CI. ()
These changes add support for gathering code coverage data during tests.

For tests that do not involve the Pulumi CLI, this is straightforward: all of
the ecosystems we target already support gathering coverage data, and we follow
the rules accordingly. Support for each language is broken out into its own
commit.

For tests that do involve the Pulumi CLI, the picture is a bit more complicated.
Go does not make it trivial to perform a coverage-instrumented build (go build
does not have a -cover flag, for example). In lieu of official support, we abuse
go test -c and TestMain to produce a build of the CLI that supports collecting
and reporting coverage data.
2021-11-30 17:24:01 -08:00
Fraser Waters 6890b9acc9
Check in default vscode settings ()
Currently this is just setting go.buildTags to "all" so the language
specific tests are included in build and test commands by default.

Missing this leads to the confusing (at least to new people) behavior
of clicking run test on a test method and vscode then saying there is no
test to run.
2021-11-01 15:15:21 +00:00
Ian Wahbe 9f6589ed8c
iwahbe/7802/compile program generator test output ()
* Move program tests into folders

* update package schema

* Enabled tests pass

* Fix lints and begin to update test cases

* Re-enable tests

* Update aws version to v4

* Refactor language specific parts

* Hook up dotnet and nodejs

* Update tests from master

* SSOT for schema/version

* Name blocking errors. Leave tests in valid state

* Give each language its own folder

* Remove SkipCompile for azure-sa (bug was fixed)

* Fix nits + changes asserts to require

* Remove unused import

* One last assert => require
2021-09-29 11:33:57 -07:00
Anton Tayanovskyy 49298fb433
Codegen testing upgrades ()
* Multi-pass, in-place checks for SDK codegen tests; toward working Python checks

* Remove temp debug output

* Upgrade Node

* Update dotnet; need to follow up on version.txt quirks

* WIP

* Sounds like we can use non-github package names to ensure things are local

* Fix simple-enum-schema

* Fix dash-named-schema

* Fix nested-module

* Start building a test-running pass

* Infer skipping tests from skipping compiles

* Move tree schma tests to a proper place

* Address lint issues on Go code

* Build against local Go SDK

* Update pkg/codegen/internal/test/sdk_driver.go

Co-authored-by: Ian Wahbe <ian@wahbe.com>

* Make go tests work by copying them into the tree from go-extras

* Fix lint

* Fix bad merge

* Manifest-based file discovery

* Remove version-related TODO from dotnet codegen

* Add doc comment

* Do not overwrite go.mod if found from mixins

* Accept python codegen change

* Accept node codegen

* Ignore lint issue

* Accept docs changes

Co-authored-by: Ian Wahbe <ian@wahbe.com>
2021-09-22 13:55:20 -04:00
Ian Wahbe 67303e1b99
Run type checker against all languages ()
We run the best static check we can on generated code, ensuring that it is valid. 

* Run type checker against all languages (not docs)

* Fix package location, add some deps for schemas

* More tests passing

* These tests finally work

* Make linter happy

* Fix tests for merge from master

* Opt out of input-collision(nodejs) test

* Get more visibility into testing nodejs

* Fix type assumption

* Specify ts-node version

* Retrofit typescript dependencies for node14

* Give each go instance it's own module

* Attempt to diagnose remote go mod init failure

* Provide root for go mod init

* Make linter happy
2021-09-15 09:49:36 -07:00
Paul Stack f68b583831
Using goreleaser as the publishing mechanism for Windows binaries () 2021-05-10 11:11:08 +01:00
Evan Boyle 3dde9d02bf
add obj dirs to gitignore () 2021-04-09 13:54:05 -07:00
Komal 19c055315d
[automation/dotnet] - Implement min version checking () 2021-03-24 10:43:44 -07:00
Paul Stack 3f2d58ef7b
Fixing up go.mod and go.sum to ensure they don't continually change () 2021-03-11 20:41:45 +00:00
Komal 2c293f3c08
Ignore Pipfile.lock () 2021-03-01 16:43:12 -08:00
Pat Gavlin 3d2e31289a
Add support for serialized resource references. ()
Resources are serialized as their URN, ID, and package version. Each
Pulumi package is expected to register itself with the SDK. The package
will be invoked to construct appropriate instances of rehydrated
resources. Packages are distinguished by their name and their version.

This is the foundation of cross-process resources.

Related to .

Co-authored-by: Mikhail Shilkov <github@mikhail.io>
Co-authored-by: Luke Hoban <luke@pulumi.com>
Co-authored-by: Levi Blackstone <levi@pulumi.com>
2020-10-27 10:12:12 -07:00
Lee Briggs 7093565e2c
jaxxstorm/build fixes ()
* fix pulumi bot token and env var

* use commit hash non-marketplace actions

* fix goreleaser binaries

foo

* fix goreleaser archive format

* update workflows to use repo-dispatch

* fixing tag naming

* add support for beta tags

* add prerelease workflow

* remove windows builds

* only use travis for tags

* remove prerelease steps

* fix container build indentation

* check the policy tempdir exists
2020-10-08 12:43:38 -07:00
evanboyle d65c65122f update builds to handle new go mod layout 2020-03-18 16:41:23 -07:00
Luke Hoban 9da774e180
Fix Python mocks ()
The original version of this code caused inconsistencies in the event
loop associated with a given thread. These changes elimintate the event
loop shenanigans the mocks were trying to play by updating _sync_await
to create an event loop if none exists in the current thread.

It's possible that this will cause problems if the tests run on a
different thread than the original program, as the tests are likely to
end up waiting on outputs created by the program, which is not supported
in Python.

Also adds test coverage of the mocking/testing support in Python.
2020-03-12 21:09:47 -07:00
Mikhail Shilkov a95a4d1195
Unit testing in .NET ()
Mock-based testing in .NET
2020-03-11 23:10:01 +01:00
Mikhail Shilkov f1cdce9488
Move .NET serialization attributes to Pulumi namespace ()
Move .NET serialization attributes to Pulumi namespace, deprecate the ones in Pulumi.Serialization
2020-02-11 11:40:14 +01:00
Mikhail Shilkov c9d3a504b1
Remove .ionide () 2020-01-21 09:27:44 +01:00
CyrusNajmabadi 394c91d7f6
Add **preview** .NET Core support for pulumi. () 2019-10-25 16:59:50 -07:00
Chris Smith 0ede30fdb6
Build/Push pulumi/actions container with new SDK releases ()
* Build/Push pulumi/actions container with new SDK releases

* Address PR feedback
2019-04-18 15:32:19 -07:00
CyrusNajmabadi 02f46811db
Add a SxS test for `@pulumi/pulumi` to help catch when we make breaking changes to core types. () 2019-03-29 12:27:42 -07:00
Matt Ellis 0ec93f0386 Add yarn.lock to gitignore 2018-11-12 15:34:11 -08:00
Matt Ellis ce5eaa8343 Support TypeScript in a more first-class way
This change lets us set runtime specific options in Pulumi.yaml, which
will flow as arguments to the language hosts. We then teach the nodejs
host that when the `typescript` is set to `true` that it should load
ts-node before calling into user code. This allows using typescript
natively without an explicit compile step outside of Pulumi.

This works even when a tsconfig.json file is not present in the
application and should provide a nicer inner loop for folks writing
typescript (I'm pretty sure everyone has run into the "but I fixed
that bug!  Why isn't it getting picked up?  Oh, I forgot to run tsc"
problem.

Fixes 
2018-08-06 14:00:58 -07:00
CyrusNajmabadi b90235c611
Add license fields to package.json. () 2018-07-24 16:10:13 -07:00
Alex Clemmer 0575595668 Add Pipfile.lock to make Python builds reproducible 2018-07-15 11:05:44 -10:00
James Nugent d6248bb1d5 meta: Ignore IntellJ IDEA project files 2018-06-22 11:24:29 -07:00
Sean Gillespie 89b052fc6d
Use Pipenv to manage Python environments ()
* Use Pipenv to manage Python environments

* Rename PIPENV_ARGS to PIPENV_PYTHON_VERSION to avoid confusion. Also remove two unused variables
2018-06-21 18:01:23 -07:00
Matt Ellis 2669f65b39 Don't dirty work tree when running tests
Because we run our golang integration tests "in tree" (due to
the need to be under $GOPATH and have a vendor folder around), the
"command-output" folder was getting left behind, dirtying the worktree
after building.

This change does two things:

1. On a succecssful run, remove the folder.
2. Ignore the folder via .gitignore (this way if a test fails and you
do `git add .` you don't end up commiting this folder).
2018-06-14 15:58:37 -07:00
Sean Gillespie 5cbc979e17
Fix a couple of issues when projecting Protobuf and UNKNOWN in Python ()
* Fix a few issues with the Python language host

1. Fix an issue where the UNKNOWN sentinel was leaking into user
programs
2. Fix an issue where Protobuf types were leaking into user programs

In fixing this issues I also added a framework for writing tests against
the Python SDK.

* License headers, and adopt a more idiomatic testing pattern

* Additional idiomatic Python

* That's what I get for trying to be fancy (Travis CI python version is very old and does not respect this form)

* CR feedback: use more comprehensions, typo fix

* Break a circular dependency between resource, runtime.resource, and runtime.rpc

* Don't check in .vscode

* CR: sort inputs, rename global variable, add a test for CustomResource serialization

* Remove accidental code duplication
2018-06-06 16:09:07 -07: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
Chris Smith 84cd810112
Move program uploads to the CLI ()
In an effort to improve performance and overall reliability, this PR moves the responsibility of uploading the Pulumi program from the Pulumi Service to the CLI. (Part of fixing https://github.com/pulumi/pulumi-service/issues/313.)

Previously the CLI would send (the dozens of MiB) program archive to the Service, which would then upload the data to S3. Now the CLI sends the data to S3 directly, avoiding the unnecessary copying of data around.

The Service-side API changes are in https://github.com/pulumi/pulumi-service/pull/323. I tested previews, updates, and destroys running the service and PPC on localhost.

The PR refactors how we handle the three kinds of program updates, and just unifies them into a single method. This makes the diff look crazy, but the code should be much simpler. I'm not sure what to do about supporting all the engine options for the Cloud-variants of Pulumi commands; I suspect that's something that should be handled at a later time.
2017-11-15 13:27:28 -08:00
joeduffy 4699b874db Revert "The Go vendoring saga continues"
This reverts commit f939651c64.

This particular saga appears to never end...
2017-08-01 17:51:38 -07:00