Posts

android - java.net.UnknownServiceException: CLEARTEXT communication to 10.0.2.2 not permitted by network security policy

 Bump into this error when trying to initate a service request to  java.net.UnknownServiceException: CLEARTEXT communication to 10.0.2.2 not permitted by network security policy 2026-05-05 20:57:52.706  8867-8867  System.err              com.appcoreopc.getmyhome             W  at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:188) 2026-05-05 20:57:52.706  8867-8867  System.err              com.appcoreopc.getmyhome             W  at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.kt:226) 2026-05-05 20:57:52.706  8867-8867  System.err              com.appcoreopc.getmyhome             W  at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:106) ...

kotlin - Trailing lambda syntax

This is really an eye opening moment for me to see this in Kotlin - where we can pass the last parameter in a function body. It is call trailing lambda syntax. In the example, I am passing the value "10" like this to the function sayHello.  fun main () {     println ( " Hello, world!!! " )     sayHello () { #1 way to call it         10     }     sayHello { 10} #2 another way to call it } fun sayHello ( name : String = " jeremy " , value : () -> Int ) {     println ( " $name: ${ value ()}" ) } It is a much cleaner way to call it.

python strawberry-asgi was not found in the package registry

Bump into this error while trying to run uv pip install .  Because strawberry-asgi was not found in the package registry and graphql-microservice==0.1.0 depends on strawberry-asgi, we can conclude that graphql-microservice==0.1.0 cannot be used. And because only graphql-microservice==0.1.0 is available and you require graphql-microservice, we can conclud that your requirements are unsatisfiable. And the solution I need to add " strawberry-graphql[asgi] " to my pyproject.toml  [ build - system ] requires = [ " setuptools>=61.0 " ] build - backend = " setuptools.build_meta " [ project ] name = " graphql-microservice " version = " 0.1.0 " dependencies = [     " strawberry-graphql[asgi] " , <---- Added this     " uvicorn " ,     " python-dotenv " ,     " google-cloud-aiplatform " , ]

google agents-cli for ADK - it is worth learning this

Image
This is quite a handy tool that we can use to work with ADK. It is newer than the adk tool and its repo can be found here https://google.github.io/agents-cli/guide/quickstart-tutorial/ Let's get started.  To create an agentic scaffold quickly (this will create basic agentic code, your private virtual environment, docker file, pyproject.toml, without CICD) agents-cli create my-agent --prototype --yes To create use agentic ADK, uses agentic_runtime (you can choose cloud run or GKE) and with github as the CICD agents-cli create my_agent2 -d agent_runtime  --cicd-runner github_actions --agent adk If you would like to get a base template, you can run the following command  agents-cli create my_agent2 -d agent_runtime  --cicd-runner github_actions --agent adk To add a new deployment target 🔥and other examples:- agents-cli scaffold enhance --deployment-target cloud_run # Add Cloud Run deployment agents-cli scaffold enhance --deployment-target cloud_run # Add a RAG datastor...

google adk create app from template command

This gotta be one of the most useful command in Google ADK template  uvx agent-starter-pack create my-retail-agent -a adk@retail-ai-location-strategy Other options include uvx agent-start-pack enhance uvx agent-start-pack extract uvx agent-start-pack list uvx agent-start-pack register-gemini-enterprise uvx agent-start-pack setup-cicd uvx agent-start-pack upgrade

creating a rust http testing client

This is an example of a rust http test client that i used to run test periodically.  use clap ::{ Parser , ValueEnum }; use indicatif ::{ ProgressBar , ProgressStyle }; use reqwest ::{ Client , Method }; use std :: collections :: HashMap ; use tokio :: time ::{ sleep , Duration }; // Added tokio sleep use serde_json :: Value ; #[ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , ValueEnum , Debug )] enum HttpMethod {     Get ,     Post ,     Put , } #[ derive ( Parser , Debug )] #[ command ( author , version , about = " A simple HTTP load tester " )] struct Config {     /// HTTP Method to use     #[ arg ( short , long , value_enum , default_value_t = HttpMethod :: Get )]     method : HttpMethod ,     /// Target URL endpoint     #[ arg ( short , long )]     url : String ,     /// Number of tests to run     #[ arg ( short , long , ...

envoy - listener, route, cluster and endpoint

Image
          It become important to understand envoy mechanics and this is an awesome illustration of it and how these listeners and cluster and endpoints are linked together. 1. Listener (Where traffic enters) A Listener is a named network location (an IP address and a port) that Envoy opens up to accept incoming connections from clients. What it does: It's the "front door." It listens for incoming traffic, handles TLS decryption (if configured), and passes the request down the chain. In Istio: When you create an Istio Gateway resource and specify port 80 or 443 , Istio tells Envoy to open a Listener on that port. Real-world analogy: The receptionist desk at a building entrance. 2. Route (How traffic is matched) Once a request enters through a Listener, Envoy needs to decide what to do with it. This is where the Route comes in. What it does: It inspects the request details—like the URI path ( /html vs /status/200 ), HTTP methods ( GET , POST ), or he...

istio troubleshooting issues in ingress controller vs virtual service (destination rule + service and pod level)

Image
When trying to hit your Kubernetes with istio enabled clustered, you might need to do some troubleshooting to ensure traffic flowing in correctly. Here are some of the steps that I used To check if traffic or request is coming in. This can be alot but you can narrow it down. For example, in my setup, I have httpbin configure and if there's a request coming into the pod, it will be logged here :-  Turn on logging on the istio pod level too  istioctl proxy-config log POD --level=debug And then turn on logging in the ingress as well.  k logs -l app.kubernetes.io/name=istio-ingressgateway  -n istio-system -f Let's look at the logs for ingress gateway in details :-  You can see that in the red circle, I am getting 503 error and this means  1. Traffic or the request is coming in 2. You're getting a 503 error is because your virtual service not configure correctly 3. 503 error can also means that your service has been deleted (not configure correctly) or your pod ...