Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match gRPC version with upstream #272

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ brew install sbt
brew install go
brew install git
brew install unzip
brew install protobuf # protoc
```

### Preparing a pull request
Expand Down
17 changes: 9 additions & 8 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,37 +52,37 @@ compile-pulumi-protobufs:

# Compiles core besom SDK
compile-core:
scala-cli --power compile core
scala-cli --power compile core --suppress-experimental-feature-warning

# Compiles besom cats-effect extension
compile-cats: publish-local-core
scala-cli --power compile besom-cats {{scala-cli-main-options-cats}}
scala-cli --power compile besom-cats {{scala-cli-main-options-cats}} --suppress-experimental-feature-warning

# Compiles besom zio extension
compile-zio: publish-local-core
scala-cli --power compile besom-zio {{scala-cli-main-options-zio}}
scala-cli --power compile besom-zio {{scala-cli-main-options-zio}} --suppress-experimental-feature-warning

# Compiles all SDK modules
compile-sdk: publish-local-core compile-cats compile-zio compile-compiler-plugin

# Compiles besom compiler plugin
compile-compiler-plugin:
scala-cli --power compile compiler-plugin
scala-cli --power compile compiler-plugin --suppress-experimental-feature-warning

# Runs tests for core besom SDK
test-core:
@if [ {{ coverage }} = "true" ]; then mkdir -p {{coverage-output-dir-core}}; fi
scala-cli --power test core {{ scala-cli-test-options-core }}
scala-cli --power test core {{ scala-cli-test-options-core }} --suppress-experimental-feature-warning

# Runs tests for besom cats-effect extension
test-cats: publish-local-core
@if [ {{ coverage }} = "true" ]; then mkdir -p {{coverage-output-dir-cats}}; fi
scala-cli --power test besom-cats {{ scala-cli-test-options-cats }}
scala-cli --power test besom-cats {{ scala-cli-test-options-cats }} --suppress-experimental-feature-warning

# Runs tests for besom zio extension
test-zio: publish-local-core
@if [ {{ coverage }} = "true" ]; then mkdir -p {{coverage-output-dir-zio}}; fi
scala-cli --power test besom-zio {{ scala-cli-test-options-zio }}
scala-cli --power test besom-zio {{ scala-cli-test-options-zio }} --suppress-experimental-feature-warning

# Runs all tests
test-sdk: compile-sdk test-core test-cats test-zio
Expand Down Expand Up @@ -141,6 +141,7 @@ clean-zio:
# Cleans all SDK builds, sets up all modules for IDE again
clean-sdk: clean-core clean-cats clean-zio clean-compiler-plugin

# Cleans codegen build
clean-codegen:
scala-cli clean codegen

Expand Down Expand Up @@ -168,7 +169,7 @@ tidy-language-plugin:
# Builds .jar file with language plugin bootstrap library
build-language-plugin-bootstrap:
mkdir -p {{language-plugin-output-dir}} && \
scala-cli --power package language-plugin/bootstrap --assembly -o {{language-plugin-output-dir}}/bootstrap.jar -f
scala-cli --power package language-plugin/bootstrap --suppress-experimental-feature-warning --assembly -o {{language-plugin-output-dir}}/bootstrap.jar -f

# Builds pulumi-language-scala binary
build-language-host $GOOS="" $GOARCH="":
Expand Down
29 changes: 14 additions & 15 deletions core/project.scala
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
//> using scala "3.3.0"
//> using scala "3.3.1"

//> using lib "org.scalameta::munit::1.0.0-M1"
//> using dep "org.scalameta::munit::1.0.0-M10"

//> using lib "com.lihaoyi::sourcecode:0.3.0"
//> using dep "com.lihaoyi::sourcecode:0.3.1"
//> using dep "com.google.protobuf:protobuf-java-util:3.24.4"
//> using dep "io.grpc:grpc-netty:1.57.2"
//> using dep "io.netty:netty-transport-native-kqueue:4.1.100.Final"
//> using dep "io.netty:netty-transport-native-epoll:4.1.100.Final"
//> using dep "com.thesamet.scalapb::scalapb-runtime:0.11.14"
//> using dep "com.thesamet.scalapb::scalapb-runtime-grpc:0.11.14"
//> using dep "com.google.guava:guava:32.1.2-jre"
//> using dep "io.spray::spray-json:1.3.6"

//> using lib "com.thesamet.scalapb::scalapb-runtime:0.11.13"
//> using lib "com.google.protobuf:protobuf-java-util:3.24.4"
//> using lib "io.grpc:grpc-netty:1.54.2"
//> using lib "io.netty:netty-transport-native-kqueue:4.1.87.Final"
//> using lib "io.netty:netty-transport-native-epoll:4.1.87.Final"
//> using lib "com.thesamet.scalapb::scalapb-runtime-grpc:0.11.13"
//> using lib "com.google.guava:guava:32.1.2-jre"
//> using lib "io.spray::spray-json:1.3.6"

//> using lib "com.outr::scribe:3.11.3"
//> using lib "com.outr::scribe-file:3.11.3"
//> using lib "com.lihaoyi::pprint:0.6.6" // TODO BALEET
//> using dep "com.outr::scribe:3.11.3"
//> using dep "com.outr::scribe-file:3.11.3"
//> using dep "com.lihaoyi::pprint:0.6.6" // TODO BALEET

//> using options "-java-output-version:11", "-Ysafe-init"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ object EngineGrpc {
* that can't store their own global state.
*/
trait Engine extends _root_.scalapb.grpc.AbstractService {
override def serviceCompanion = Engine
override def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[Engine] = Engine
/** Log logs a global message in the engine, including errors and warnings.
*/
def log(request: pulumirpc.engine.LogRequest): scala.concurrent.Future[com.google.protobuf.empty.Empty]
Expand Down Expand Up @@ -95,7 +95,7 @@ object EngineGrpc {
* that can't store their own global state.
*/
trait EngineBlockingClient {
def serviceCompanion = Engine
def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[Engine] = Engine
/** Log logs a global message in the engine, including errors and warnings.
*/
def log(request: pulumirpc.engine.LogRequest): com.google.protobuf.empty.Empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ package pulumirpc.engine
/** LogSeverity is the severity level of a log message. Errors are fatal; all others are informational.
*/
sealed abstract class LogSeverity(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
type EnumType = LogSeverity
type EnumType = pulumirpc.engine.LogSeverity
type RecognizedType = pulumirpc.engine.LogSeverity.Recognized
def isDebug: _root_.scala.Boolean = false
def isInfo: _root_.scala.Boolean = false
def isWarning: _root_.scala.Boolean = false
Expand Down Expand Up @@ -59,7 +60,7 @@ object LogSeverity extends _root_.scalapb.GeneratedEnumCompanion[LogSeverity] {

@SerialVersionUID(0L)
final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends LogSeverity(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
lazy val values = scala.collection.immutable.Seq(DEBUG, INFO, WARNING, ERROR)
lazy val values: scala.collection.immutable.Seq[ValueType] = scala.collection.immutable.Seq(DEBUG, INFO, WARNING, ERROR)
def fromValue(__value: _root_.scala.Int): LogSeverity = __value match {
case 0 => DEBUG
case 1 => INFO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ object DiffResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.provider
hasDetailedDiff = false
)
sealed abstract class DiffChanges(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
type EnumType = DiffChanges
type EnumType = pulumirpc.provider.DiffResponse.DiffChanges
type RecognizedType = pulumirpc.provider.DiffResponse.DiffChanges.Recognized
def isDiffUnknown: _root_.scala.Boolean = false
def isDiffNone: _root_.scala.Boolean = false
def isDiffSome: _root_.scala.Boolean = false
Expand Down Expand Up @@ -342,7 +343,7 @@ object DiffResponse extends scalapb.GeneratedMessageCompanion[pulumirpc.provider

@SerialVersionUID(0L)
final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends DiffChanges(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
lazy val values = scala.collection.immutable.Seq(DIFF_UNKNOWN, DIFF_NONE, DIFF_SOME)
lazy val values: scala.collection.immutable.Seq[ValueType] = scala.collection.immutable.Seq(DIFF_UNKNOWN, DIFF_NONE, DIFF_SOME)
def fromValue(__value: _root_.scala.Int): DiffChanges = __value match {
case 0 => DIFF_UNKNOWN
case 1 => DIFF_NONE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ object PropertyDiff extends scalapb.GeneratedMessageCompanion[pulumirpc.provider
inputDiff = false
)
sealed abstract class Kind(val value: _root_.scala.Int) extends _root_.scalapb.GeneratedEnum {
type EnumType = Kind
type EnumType = pulumirpc.provider.PropertyDiff.Kind
type RecognizedType = pulumirpc.provider.PropertyDiff.Kind.Recognized
def isAdd: _root_.scala.Boolean = false
def isAddReplace: _root_.scala.Boolean = false
def isDelete: _root_.scala.Boolean = false
Expand Down Expand Up @@ -211,7 +212,7 @@ object PropertyDiff extends scalapb.GeneratedMessageCompanion[pulumirpc.provider

@SerialVersionUID(0L)
final case class Unrecognized(unrecognizedValue: _root_.scala.Int) extends Kind(unrecognizedValue) with _root_.scalapb.UnrecognizedEnum
lazy val values = scala.collection.immutable.Seq(ADD, ADD_REPLACE, DELETE, DELETE_REPLACE, UPDATE, UPDATE_REPLACE)
lazy val values: scala.collection.immutable.Seq[ValueType] = scala.collection.immutable.Seq(ADD, ADD_REPLACE, DELETE, DELETE_REPLACE, UPDATE, UPDATE_REPLACE)
def fromValue(__value: _root_.scala.Int): Kind = __value match {
case 0 => ADD
case 1 => ADD_REPLACE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ object ResourceProviderGrpc {
* within a single package. It is driven by the overall planning engine in response to resource diffs.
*/
trait ResourceProvider extends _root_.scalapb.grpc.AbstractService {
override def serviceCompanion = ResourceProvider
override def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[ResourceProvider] = ResourceProvider
/** GetSchema fetches the schema for this resource provider.
*/
def getSchema(request: pulumirpc.provider.GetSchemaRequest): scala.concurrent.Future[pulumirpc.provider.GetSchemaResponse]
Expand Down Expand Up @@ -425,7 +425,7 @@ object ResourceProviderGrpc {
* within a single package. It is driven by the overall planning engine in response to resource diffs.
*/
trait ResourceProviderBlockingClient {
def serviceCompanion = ResourceProvider
def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[ResourceProvider] = ResourceProvider
/** GetSchema fetches the schema for this resource provider.
*/
def getSchema(request: pulumirpc.provider.GetSchemaRequest): pulumirpc.provider.GetSchemaResponse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ object ResourceMonitorGrpc {
/** ResourceMonitor is the interface a source uses to talk back to the planning monitor orchestrating the execution.
*/
trait ResourceMonitor extends _root_.scalapb.grpc.AbstractService {
override def serviceCompanion = ResourceMonitor
override def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[ResourceMonitor] = ResourceMonitor
def supportsFeature(request: pulumirpc.resource.SupportsFeatureRequest): scala.concurrent.Future[pulumirpc.resource.SupportsFeatureResponse]
def invoke(request: pulumirpc.resource.ResourceInvokeRequest): scala.concurrent.Future[pulumirpc.provider.InvokeResponse]
def streamInvoke(request: pulumirpc.resource.ResourceInvokeRequest, responseObserver: _root_.io.grpc.stub.StreamObserver[pulumirpc.provider.InvokeResponse]): _root_.scala.Unit
Expand Down Expand Up @@ -155,7 +155,7 @@ object ResourceMonitorGrpc {
/** ResourceMonitor is the interface a source uses to talk back to the planning monitor orchestrating the execution.
*/
trait ResourceMonitorBlockingClient {
def serviceCompanion = ResourceMonitor
def serviceCompanion: _root_.scalapb.grpc.ServiceCompanion[ResourceMonitor] = ResourceMonitor
def supportsFeature(request: pulumirpc.resource.SupportsFeatureRequest): pulumirpc.resource.SupportsFeatureResponse
def invoke(request: pulumirpc.resource.ResourceInvokeRequest): pulumirpc.provider.InvokeResponse
def streamInvoke(request: pulumirpc.resource.ResourceInvokeRequest): scala.collection.Iterator[pulumirpc.provider.InvokeResponse]
Expand Down
6 changes: 3 additions & 3 deletions language-plugin/pulumi-language-scala/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ go 1.20
require (
github.com/golang/protobuf v1.5.3
github.com/pkg/errors v0.9.1
github.com/pulumi/pulumi/sdk/v3 v3.89.0
google.golang.org/grpc v1.58.3
github.com/pulumi/pulumi/sdk/v3 v3.91.0
google.golang.org/grpc v1.57.2
google.golang.org/protobuf v1.31.0
)

Expand Down Expand Up @@ -55,7 +55,7 @@ require (
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pkg/term v1.1.0 // indirect
github.com/pulumi/esc v0.5.2 // indirect
github.com/pulumi/esc v0.5.6 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/rogpeppe/go-internal v1.11.0 // indirect
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect
Expand Down
20 changes: 6 additions & 14 deletions language-plugin/pulumi-language-scala/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,10 @@ github.com/pkg/term v1.1.0 h1:xIAAdCMh3QIAy+5FrE8Ad8XoDhEU4ufwbaSozViP9kk=
github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pulumi/esc v0.5.2 h1:Wnr0oXy8MAyRMtVrMHPI2frjyuylVnU47ReFPNjE3C0=
github.com/pulumi/esc v0.5.2/go.mod h1:lp6lkE9JrifhmjlXVH9//Rj45OETlVPHZKvoNRyU54Q=
github.com/pulumi/pulumi/sdk/v3 v3.88.1 h1:2Rq8ouatH+httH0R/Bh2cd8ztQGf2gu4SCC7aJ/5ScU=
github.com/pulumi/pulumi/sdk/v3 v3.88.1/go.mod h1:XBIlxfHv/jnRj6v8rXP79Z3E11jQz/Ky+bDhwVAHOPk=
github.com/pulumi/pulumi/sdk/v3 v3.89.0 h1:WlkOQ4Q/Xyxu4lckGWssNI4Wdrobo5Zb7JQVoFVkzMo=
github.com/pulumi/pulumi/sdk/v3 v3.89.0/go.mod h1:XBIlxfHv/jnRj6v8rXP79Z3E11jQz/Ky+bDhwVAHOPk=
github.com/pulumi/esc v0.5.6 h1:4WV3X7OEVcChIwbSG+JxhZDdmq/q7lFPaSjHRYlPwmI=
github.com/pulumi/esc v0.5.6/go.mod h1:wpwNfVS5fV7Kd51j4dJ6FWYlKfxdqyppgp0gtkzqH04=
github.com/pulumi/pulumi/sdk/v3 v3.91.0 h1:zhoua60JWhxvGBAhEakVper+oBMd9dhXODSEx2XR9X0=
github.com/pulumi/pulumi/sdk/v3 v3.91.0/go.mod h1:zYaQQibB2pYKy/uG4c4YkX7lQIBpZ0KsuMaq/3HsIBQ=
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
Expand Down Expand Up @@ -299,16 +297,10 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130 h1:2FZP5XuJY9zQyGM5N0rtovnoXjiMUEIUMvw0m9wlpLc=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230706204954-ccb25ca9f130/go.mod h1:8mL13HKkDa+IuJ8yruA3ci0q+0vsUz4m//+ottjwS5o=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U=
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b h1:ZlWIi1wSK56/8hn4QcBp/j9M7Gt3U/3hZw3mC7vDICo=
google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc=
google.golang.org/grpc v1.57.0 h1:kfzNeI/klCGD2YPMUlaGNT3pxvYfga7smW3Vth8Zsiw=
google.golang.org/grpc v1.57.0/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo=
google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ=
google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
google.golang.org/grpc v1.57.2 h1:uw37EN34aMFFXB2QPW7Tq6tdTbind1GpRxw5aOX3a5k=
google.golang.org/grpc v1.57.2/go.mod h1:Sd+9RMTACXwmub0zcNY2c4arhtrbBYD1AUHI/dt16Mo=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
Expand Down
Loading