Skip to content

Commit

Permalink
Move unstable/logging to internal/logging (#2687)
Browse files Browse the repository at this point in the history
Since PF is now part of the same module as the rest of the bridge, there
is no need for the `unstable` folder, since we can just use `internal`.
  • Loading branch information
iwahbe authored Dec 5, 2024
1 parent c501360 commit 1c9c3e0
Show file tree
Hide file tree
Showing 17 changed files with 12 additions and 12 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion pkg/internal/tests/cross-tests/impl/inferPulumiValue.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import (
"github.com/stretchr/testify/require"
"github.com/zclconf/go-cty/cty"

"github.com/pulumi/pulumi-terraform-bridge/v3/internal/logging"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/convert"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/info"
shim "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim"
"github.com/pulumi/pulumi-terraform-bridge/v3/unstable/logging"
)

// InferPulumiValue generates a Pulumi value that is semantically equivalent to v.
Expand Down
2 changes: 1 addition & 1 deletion pkg/pf/tfbridge/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (

"github.com/pulumi/pulumi/sdk/v3/go/common/resource"

"github.com/pulumi/pulumi-terraform-bridge/v3/internal/logging"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge"
"github.com/pulumi/pulumi-terraform-bridge/v3/unstable/logging"
)

// Configures logging. Note that urn is optional but useful to identify logs with resources.
Expand Down
2 changes: 1 addition & 1 deletion pkg/pf/tfbridge/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
"github.com/pulumi/pulumi/sdk/v3/go/common/workspace"
pulumirpc "github.com/pulumi/pulumi/sdk/v3/proto/go"

"github.com/pulumi/pulumi-terraform-bridge/v3/internal/logging"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/convert"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/pf"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/pf/internal/configencoding"
Expand All @@ -41,7 +42,6 @@ import (
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/pf/internal/schemashim"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge"
shim "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim"
"github.com/pulumi/pulumi-terraform-bridge/v3/unstable/logging"
)

type providerOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/tfbridge/deconflict_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"github.com/pulumi/pulumi/sdk/v3/go/common/resource"
"github.com/stretchr/testify/require"

"github.com/pulumi/pulumi-terraform-bridge/v3/internal/logging"
shim "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/schema"
"github.com/pulumi/pulumi-terraform-bridge/v3/unstable/logging"
)

func TestDeconflict(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/tfbridge/detailed_diff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import (
"github.com/stretchr/testify/require"
"gotest.tools/v3/assert"

"github.com/pulumi/pulumi-terraform-bridge/v3/internal/logging"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/info"
shim "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim"
shimschema "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/schema"
shimv2 "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2"
"github.com/pulumi/pulumi-terraform-bridge/v3/unstable/logging"
)

func TestDiffPair(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/tfbridge/info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"github.com/pulumi/pulumi/sdk/v3/go/common/resource"
"github.com/stretchr/testify/assert"

"github.com/pulumi/pulumi-terraform-bridge/v3/internal/logging"
shim "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim"
shimschema "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/schema"
"github.com/pulumi/pulumi-terraform-bridge/v3/unstable/logging"
)

func TestGetModuleMajorVersion(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/tfbridge/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/pulumi/pulumi/sdk/v3/go/common/diag"
"github.com/pulumi/pulumi/sdk/v3/go/common/util/contract"

"github.com/pulumi/pulumi-terraform-bridge/v3/unstable/logging"
"github.com/pulumi/pulumi-terraform-bridge/v3/internal/logging"
)

// LogRedirector creates a new redirection writer that takes as input plugin stderr output, and routes it to the
Expand Down
2 changes: 1 addition & 1 deletion pkg/tfbridge/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

"github.com/pulumi/pulumi/sdk/v3/go/common/util/contract"

"github.com/pulumi/pulumi-terraform-bridge/v3/unstable/logging"
"github.com/pulumi/pulumi-terraform-bridge/v3/internal/logging"
)

// Send logs or status logs to the user.
Expand Down
2 changes: 1 addition & 1 deletion pkg/tfbridge/log_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (
pulumirpc "github.com/pulumi/pulumi/sdk/v3/proto/go"
"github.com/stretchr/testify/assert"

"github.com/pulumi/pulumi-terraform-bridge/v3/internal/logging"
"github.com/pulumi/pulumi-terraform-bridge/v3/internal/testprovider"
shimv2 "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2"
"github.com/pulumi/pulumi-terraform-bridge/v3/unstable/logging"
)

// Ensure that logging redirects to the right place.
Expand Down
2 changes: 1 addition & 1 deletion pkg/tfbridge/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ import (
"google.golang.org/grpc/status"
"google.golang.org/protobuf/types/known/emptypb"

"github.com/pulumi/pulumi-terraform-bridge/v3/internal/logging"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/info"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/typechecker"
shim "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/walk"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/x/muxer"
"github.com/pulumi/pulumi-terraform-bridge/v3/unstable/logging"
"github.com/pulumi/pulumi-terraform-bridge/v3/unstable/metadata"
"github.com/pulumi/pulumi-terraform-bridge/v3/unstable/propertyvalue"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/tfbridge/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ import (
"github.com/stretchr/testify/require"
"google.golang.org/protobuf/types/known/structpb"

"github.com/pulumi/pulumi-terraform-bridge/v3/internal/logging"
"github.com/pulumi/pulumi-terraform-bridge/v3/internal/testprovider"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge/info"
shim "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim"
shimv1 "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v1"
shimv2 "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2"
"github.com/pulumi/pulumi-terraform-bridge/v3/unstable/logging"
)

func TestConvertStringToPropertyValue(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/tfshim/sdk-v2/provider2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/pulumi/pulumi-terraform-bridge/v3/internal/logging"
shim "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim"
"github.com/pulumi/pulumi-terraform-bridge/v3/unstable/logging"
)

func TestProvider2UpgradeResourceState(t *testing.T) {
Expand Down

0 comments on commit 1c9c3e0

Please sign in to comment.