Skip to content

Commit 7609fd8

Browse files
authored
feat: return deprecation warnings to users in yellow in colour. (#586)
## Description: After this change - users can be notified about potential deprecated instructions/types/fields. It is abstracted away so that engineers can easily add relevant information for users to see. They also have ability to share other warning with users if need be. ## Is this change user facing? YES/NO <!-- If yes, please add the "user facing" label to the PR --> <!-- If yes, don't forget to include docs changes where relevant --> ## References (if applicable): <!-- Add relevant Github Issues, Discord threads, or other helpful information. -->
1 parent 16641e9 commit 7609fd8

File tree

17 files changed

+1517
-1068
lines changed

17 files changed

+1517
-1068
lines changed

api/golang/core/kurtosis_core_rpc_api_bindings/api_container_service.pb.go

Lines changed: 985 additions & 938 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/golang/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc.pb.go

Lines changed: 38 additions & 62 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/golang/core/lib/binding_constructors/binding_constructors.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,16 @@ func NewStarlarkRunResponseLineFromInstruction(instruction *kurtosis_core_rpc_ap
117117
}
118118
}
119119

120+
func NewStarlarkRunResponseLineFromWarning(warningMessage string) *kurtosis_core_rpc_api_bindings.StarlarkRunResponseLine {
121+
return &kurtosis_core_rpc_api_bindings.StarlarkRunResponseLine{
122+
RunResponseLine: &kurtosis_core_rpc_api_bindings.StarlarkRunResponseLine_Warning{
123+
Warning: &kurtosis_core_rpc_api_bindings.StarlarkWarning{
124+
WarningMessage: warningMessage,
125+
},
126+
},
127+
}
128+
}
129+
120130
func NewStarlarkRunResponseLineFromInstructionResult(serializedInstructionResult string) *kurtosis_core_rpc_api_bindings.StarlarkRunResponseLine {
121131
return &kurtosis_core_rpc_api_bindings.StarlarkRunResponseLine{
122132
RunResponseLine: &kurtosis_core_rpc_api_bindings.StarlarkRunResponseLine_InstructionResult{

api/golang/engine/kurtosis_engine_rpc_api_bindings/engine_service.pb.go

Lines changed: 15 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/golang/engine/kurtosis_engine_rpc_api_bindings/engine_service_grpc.pb.go

Lines changed: 18 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/golang/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ require (
66
github.com/Masterminds/semver/v3 v3.1.1
77
github.com/go-yaml/yaml v2.1.0+incompatible
88
github.com/kurtosis-tech/kurtosis-portal/api/golang v0.0.0-20230328194643-b4dea3081e25
9+
github.com/kurtosis-tech/kurtosis/grpc-file-transfer/golang v0.0.0-20230427135111-ee2492059d06
910
github.com/kurtosis-tech/stacktrace v0.0.0-20211028211901-1c67a77b5409
1011
github.com/mholt/archiver v3.1.1+incompatible
1112
github.com/sirupsen/logrus v1.8.1
@@ -21,7 +22,6 @@ require (
2122
github.com/golang/protobuf v1.5.0 // indirect
2223
github.com/golang/snappy v0.0.4 // indirect
2324
github.com/google/go-cmp v0.5.7 // indirect
24-
github.com/kurtosis-tech/kurtosis/grpc-file-transfer/golang v0.0.0-20230427135111-ee2492059d06 // indirect
2525
github.com/nwaples/rardecode v1.1.3 // indirect
2626
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
2727
github.com/pmezard/go-difflib v1.0.0 // indirect

api/protobuf/core/api_container_service.proto

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,14 @@ message StarlarkRunResponseLine {
216216
StarlarkRunProgress progress_info = 3;
217217
StarlarkInstructionResult instruction_result = 4;
218218
StarlarkRunFinishedEvent run_finished_event = 5;
219+
StarlarkWarning warning = 6;
219220
}
220221
}
221222

223+
message StarlarkWarning {
224+
string warning_message = 1;
225+
}
226+
222227
message StarlarkInstruction {
223228
StarlarkInstructionPosition position = 1;
224229

0 commit comments

Comments
 (0)