Commit Graph

10 Commits

Author SHA1 Message Date
Fraser Waters c2f55f8fd7
Clean up unused import warnings ()
There were a load of warnings such as the below, when building the
protobufs:
```
warning: Import google/protobuf/empty.proto is unused.
```

This removes the unused imports.
2024-03-04 13:01:25 +00:00
Fraser Waters f3e6e9a9dd
Plumb Remote, Component, and LogicalName into the import plugin system ()
<!--- 
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. -->

Fixes https://github.com/pulumi/pulumi/issues/14532.

14532 was just for Remote and Component, but since raising that we've
added LogicalName as well so this PR also adds support for that.

## 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-01-24 17:15:30 +00:00
Fraser Waters 9ca0fb2b8f
Fix recursive fixups in JavaScript protobuf generation ()
The proto/generate.sh script was trying to do some sed based fixups to
the generated javascript files but wasn't correctly fixing up nested
files.
2023-11-10 13:31:14 +00:00
Fraser Waters 1ae75580d4
Support diagnostics in state conversion ()
<!--- 
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. -->

Part of fixing
https://github.com/pulumi/pulumi-converter-terraform/issues/42. Allow
the converter to warn the user which resources have missing mapping
data, and thus are likely to not import.

## 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. -->
2023-10-17 08:08:39 +00:00
Fraser Waters d2cf01284b
Send args from convert to converter plugin ()
<!--- 
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 matches up with how we send args to converter plugins from
`import`. Looks like this will be useful in at least two places already.
Firstly the bicep converter needs to know which file to convert.
Secondly the terraform convert needs a --convert-examples (or the like)
flag to turn on it's bulk converter mode for the terraform bridge to
use.

Also fixes that we we're limiting `import` to three args, but a
converter may take more.

## 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
  - [ ] 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. -->
2023-09-18 11:01:13 +00:00
Fraser Waters 981be6c458
Add args to state conversions ()
<!--- 
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. -->

When importing from other ecosystems we need someway in `import` for the
user to tell the converter plugin _what_ to import.

Simply forwarding on the args pass to `import` looks to be the simplest
option to enable this.

## 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
  - [ ] 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. -->
2023-09-01 18:07:49 +00:00
Fraser Waters 818caae680 Pass loader to convert plugins 2023-08-09 22:02:57 +01:00
Fraser Waters dbc67b9bc9 Allow converter plugins to return diagnostics 2023-06-05 17:38:59 +01:00
Fraser Waters 02489dbbb7 Add mapping service to converter 2023-03-24 17:09:17 +00:00
Fraser Waters 5013d427e6 Add converter plugin 2023-03-09 22:16:21 +00:00