Skip to content

Commit

Permalink
Remove pulumi-command dep (#186)
Browse files Browse the repository at this point in the history
* Updated linting and dependencies

The linting process has been updated to include all Go modules. Additionally, the 'pulumi-command/sdk' dependency was removed from both provider and tests modules. The 'golang.org/x/crypto' dependency was moved from indirect to direct in the provider module.

* Remove pulumi-command dep

* Regen sdks

* I guess we have this in now?
  • Loading branch information
UnstoppableMango authored Sep 7, 2024
1 parent 47e585a commit 39aa127
Show file tree
Hide file tree
Showing 13 changed files with 9 additions and 37 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ provider:: bin/$(PROVIDER)
provisioner:: bin/provisioner

tidy: $(GO_MODULES:%=.make/tidy/%)
lint:: .make/lint/buf .make/lint_go
lint:: .make/lint/buf $(GO_MODULES:%=.make/lint/%)

remake::
rm -rf .make bin dist out hack/.work
Expand Down
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,3 @@ A Pulumi provider for provisioning bare-metal hosts.
1. Run `make gen_examples` to generate the example programs in `examples/` off of the source `examples/yaml` example program.
1. Run `make up` to run the example program in `examples/yaml`.
1. Run `make down` to tear down the example program.

## References

Other resources/examples for implementing providers:

* [Pulumi Command provider](https://github.com/pulumi/pulumi-command/blob/master/provider/pkg/provider/provider.go)
* [Pulumi Go Provider repository](https://github.com/pulumi/pulumi-go-provider)
1 change: 0 additions & 1 deletion provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ replace github.com/unmango/pulumi-baremetal/gen => ../gen
require (
github.com/onsi/ginkgo/v2 v2.20.2
github.com/onsi/gomega v1.34.2
github.com/pulumi/pulumi-command/sdk v1.0.1
github.com/pulumi/pulumi-go-provider v0.21.0
github.com/pulumi/pulumi/sdk/v3 v3.130.0
github.com/spf13/cobra v1.8.1
Expand Down
2 changes: 0 additions & 2 deletions provider/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,6 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435
github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE=
github.com/pulumi/esc v0.9.1 h1:HH5eEv8sgyxSpY5a8yePyqFXzA8cvBvapfH8457+mIs=
github.com/pulumi/esc v0.9.1/go.mod h1:oEJ6bOsjYlQUpjf70GiX+CXn3VBmpwFDxUTlmtUN84c=
github.com/pulumi/pulumi-command/sdk v1.0.1 h1:ZuBSFT57nxg/fs8yBymUhKLkjJ6qmyN3gNvlY/idiN0=
github.com/pulumi/pulumi-command/sdk v1.0.1/go.mod h1:C7sfdFbUIoXKoIASfXUbP/U9xnwPfxvz8dBpFodohlA=
github.com/pulumi/pulumi-go-provider v0.21.0 h1:sDHBtWkWRrWn6klfdvDIorlUGMBt6BwhgKXqcPoJh2c=
github.com/pulumi/pulumi-go-provider v0.21.0/go.mod h1:2qQ4M1LXzv+SpY6v8JiTbPVGdeCeqfBMgsqb7WyH77o=
github.com/pulumi/pulumi/pkg/v3 v3.127.0 h1:C3qa1SPegwqN5OOO9yX/4Nq0rPyVZfnWQjkVx+kvsJs=
Expand Down
6 changes: 2 additions & 4 deletions provider/pkg/provider/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ package provider
import (
"context"

"github.com/pulumi/pulumi-command/sdk/go/command/remote"
"github.com/pulumi/pulumi-go-provider/infer"
)

type Bootstrap struct{}

type BootstrapArgs struct {
Connection *remote.Connection `pulumi:"connection,optional" provider:"[email protected]:remote:Connection"`
Directory *string `pulumi:"directory,optional"`
Version *string `pulumi:"version"`
Directory *string `pulumi:"directory,optional"`
Version *string `pulumi:"version"`
}

// Annotate implements infer.Annotated.
Expand Down
13 changes: 4 additions & 9 deletions provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ func Provider() p.Provider {
"csharp": map[string]any{
"rootNamespace": "UnMango",
"packageReferences": map[string]any{
"Pulumi": "[3.65.0.0,4)",
"Pulumi.Command": "1.0.*",
"Pulumi": "[3.65.0.0,4)",
},
"respectSchemaVersion": true,
},
Expand All @@ -32,17 +31,13 @@ func Provider() p.Provider {
"respectSchemaVersion": true,
},
"nodejs": map[string]any{
"packageName": "@unmango/baremetal",
"dependencies": map[string]any{
"@pulumi/command": "^1.0.0",
},
"packageName": "@unmango/baremetal",
"dependencies": map[string]any{},
"respectSchemaVersion": true,
},
"python": map[string]any{
"packageName": "unmango_baremetal",
"requires": map[string]any{
"pulumi-command": ">=1.0.0,<2.0.0",
},
"requires": map[string]any{},
"pyproject": map[string]bool{
"enabled": true,
},
Expand Down
1 change: 1 addition & 0 deletions schema-baremetal.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion sdk/dotnet/UnMango.Baremetal.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@

<ItemGroup>
<PackageReference Include="Pulumi" Version="[3.65.0.0,4)" />
<PackageReference Include="Pulumi.Command" Version="1.0.*" ExcludeAssets="contentFiles" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion sdk/nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"build": "tsc"
},
"dependencies": {
"@pulumi/command": "^1.0.0",
"@pulumi/pulumi": "^3.42.0"
},
"devDependencies": {
Expand Down
7 changes: 0 additions & 7 deletions sdk/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,3 @@ A Pulumi provider for provisioning bare-metal hosts.
1. Run `make gen_examples` to generate the example programs in `examples/` off of the source `examples/yaml` example program.
1. Run `make up` to run the example program in `examples/yaml`.
1. Run `make down` to tear down the example program.

## References

Other resources/examples for implementing providers:

* [Pulumi Command provider](https://github.com/pulumi/pulumi-command/blob/master/provider/pkg/provider/provider.go)
* [Pulumi Go Provider repository](https://github.com/pulumi/pulumi-go-provider)
2 changes: 1 addition & 1 deletion sdk/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "unmango_baremetal"
dependencies = ["parver>=0.2.1", "pulumi>=3.0.0,<4.0.0", "pulumi-command>=1.0.0,<2.0.0", "semver>=2.8.1"]
dependencies = ["parver>=0.2.1", "pulumi>=3.0.0,<4.0.0", "semver>=2.8.1"]
readme = "README.md"
requires-python = ">=3.8"
version = "1.0.0a0+dev"
Expand Down
1 change: 0 additions & 1 deletion tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ require (
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect
github.com/pulumi/esc v0.9.1 // indirect
github.com/pulumi/pulumi-command/sdk v1.0.1 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rogpeppe/go-internal v1.12.0 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
Expand Down
2 changes: 0 additions & 2 deletions tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,6 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435
github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE=
github.com/pulumi/esc v0.9.1 h1:HH5eEv8sgyxSpY5a8yePyqFXzA8cvBvapfH8457+mIs=
github.com/pulumi/esc v0.9.1/go.mod h1:oEJ6bOsjYlQUpjf70GiX+CXn3VBmpwFDxUTlmtUN84c=
github.com/pulumi/pulumi-command/sdk v1.0.1 h1:ZuBSFT57nxg/fs8yBymUhKLkjJ6qmyN3gNvlY/idiN0=
github.com/pulumi/pulumi-command/sdk v1.0.1/go.mod h1:C7sfdFbUIoXKoIASfXUbP/U9xnwPfxvz8dBpFodohlA=
github.com/pulumi/pulumi-go-provider v0.21.0 h1:sDHBtWkWRrWn6klfdvDIorlUGMBt6BwhgKXqcPoJh2c=
github.com/pulumi/pulumi-go-provider v0.21.0/go.mod h1:2qQ4M1LXzv+SpY6v8JiTbPVGdeCeqfBMgsqb7WyH77o=
github.com/pulumi/pulumi/pkg/v3 v3.131.0 h1:En0nFR9JQ26kxi71qbgATpsJ34leC0VgSFW1TwS4OjE=
Expand Down

0 comments on commit 39aa127

Please sign in to comment.