I implemented a GRPC Service but it was not found even though implemented correctly - python - grpc-python

Basically, I implemented a service with a method. The server.py is pointing to that method. But still, I get an error.
ImageService.py code
Server.py code

Related

Lost context in #Blocking gRPC Service with Quarkus behind a GlobalInterceptor

I found that Quarkus Server binds io.quarkus.grpc.runtime.supports.blocking.BlockingServerInterceptor for each gRPC service with the #Blocking annotation before it starts.
If some global interceptors (with #GlobalInterceptor) set the Context value will not work. The Context will still be empty in the actual rpc method handler.
Is it a normal phenomenon because Context should be placed after BlockingServerInterceptor's vert.x executeBlocking? There are some associated issues: https://github.com/quarkusio/quarkus/issues/14665, https://github.com/quarkusio/quarkus/issues/13959.
Finaly I replace the #GlobalInterceptor with #RegisterInterceptor(MyInterceptor.class) , everything is to be ok that seems to prove my point.
I don't particularly understand the technical details of it, and these are what I got from trying and Debug. I've been using Spring and Micronaut before.

Spring Cloud Contract Debugging

Im new to Spring Cloud contract. I have written the groovy contract but the wiremock tests are failing. All I see in the console is
org.junit.ComparisonFailure: expected:<[2]00> but was:<[4]00>
Can anyone please guide me how to enable more debugging ad also is there a way to print the request and response sent by wiremock?
I have set the logging.level.com.github.tomakehurst.wiremock=DEBUG in my spring boot app but no luck
If you use one of the latest version of sc-contract, WireMock should print exactly what wasn't matched. You can also read the documentation over here https://cloud.spring.io/spring-cloud-static/Finchley.RELEASE/single/spring-cloud.html#_how_can_i_debug_the_request_response_being_sent_by_the_generated_tests_client where we answer your questions in more depth. Let me copy that part for you
86.8 How can I debug the request/response being sent by the generated tests client? The generated tests all boil down to RestAssured in some
form or fashion which relies on Apache HttpClient. HttpClient has a
facility called wire logging which logs the entire request and
response to HttpClient. Spring Boot has a logging common application
property for doing this sort of thing, just add this to your
application properties
logging.level.org.apache.http.wire=DEBUG
86.8.1 How can I debug the mapping/request/response being sent by WireMock? Starting from version 1.2.0 we turn on WireMock logging to
info and the WireMock notifier to being verbose. Now you will exactly
know what request was received by WireMock server and which matching
response definition was picked.
To turn off this feature just bump WireMock logging to ERROR
logging.level.com.github.tomakehurst.wiremock=ERROR
86.8.2 How can I see what got registered in the HTTP server stub? You can use the mappingsOutputFolder property on #AutoConfigureStubRunner
or StubRunnerRule to dump all mappings per artifact id. Also the port
at which the given stub server was started will be attached.
86.8.3 Can I reference text from file? Yes! With version 1.2.0 we’ve added such a possibility. It’s enough to call file(…​) method in the
DSL and provide a path relative to where the contract lays. If you’re
using YAML just use the bodyFromFile property.

meteor methods, 404 method not found

I'm trying to implement meteor methods, I have a very basic method implemented in client/lab/methods.ts. I'm calling it from client/lab/imports/pages/lab.ts. It runs as expected -I have a test console.log that executes-, but when I try to invoke a callback I get a 404 method not found error.
Here are the github gist for the access and define parts
https://gist.github.com/cemersoz/223297d7decb8c578a5f925163df9e26
I saw this response to a similar question from 2 years ago
https://stackoverflow.com/a/22307649/5675765
but I don't understand how I could implement that solution.
Defining meteor.methods in server just resulted in a module not found error
What do you think I may be doing wrong? Thanks!
So...
I apparently need two functions, one in client and one in server side. (and to not forget to import the server side in main.js) Alternatively, I could have declared one method in a directory where both server and client could access it.
For me referencing the client side function worked. It executes both on the client side and the server side when I call it with myMethod.call

Web service call failing with 5xx type errors

We've inherited a .asmx web service without source code (my favourite).
We've run tests (calling it from a console app with fiddler attached) both internally and externally and it runs clean every time - as it does for the vast majority of our clients.
However, one user is reporting 5xx type errors. We've tried all the usuals (event viewer and IIS logs) but they're all clean. We can't get it to fail at all.
What further options do we have?
Can the clients replicate the error at will?
The error is most likely data related. Have you tested it with the same data that your client is to produce the error.
The error may also be at the client's end during serialization/deserialization of the call in their auto-generated asmx wrapper.
Has there been a change to the WSDL?
Things like ELMAH are great for logging all unhanded exceptions.
add logging to web config, log everything.
decompile the webservice and find the reason.

Is there a reason Commands are Slower than normal Requests?

I am currently refactoring some code to transform some actions in commands in my Symfony 2.7 application.
At first, I was making a GET request to some endpoint, the corresponding controller was making a call to a service and responded with a 200 http response.
Now, I want to execute this service from a command interface so I use the Console Component of Symfony.
The problem is: The command way is very, very slow. Is there a reason for that?
Commands, by default, are run in dev environment, meaning more logging, capturing data for the profiler...
Try appending --env=prod.

Resources