Posts

yq refresher

  Reading YAML in Bash with Examples For YAML files, you'll want to use yq (the YAML equivalent of jq ).  Sample YAML File Save this as config.yaml : dev: url: http://dev.com test: url: http://test.com Using yq   Extract dev URL $ yq '.dev.url' config.yaml Output: http://dev.com Extract test URL $ yq '.test.url' config.yaml Output: http://test.com Extract both URLs $ yq '.[] | .url' config.yaml Output: http://dev.com http://test.com Store in variables $ DEV_URL=$(yq '.dev.url' config.yaml) $ TEST_URL=$(yq '.test.url' config.yaml) $ echo "Dev: $DEV_URL" $ echo "Test: $TEST_URL" Output: Dev: http://dev.com Test: http://test.com Extract both conditionally (if they exist) $ yq 'keys[] as $env | {env: $env, url: .[$env].url}' config.yaml Output: env: dev url: http://dev.com --- env: test url: http://test.com Load all environments into variables #!/bin/bash # Using yq DEV_URL=$(yq ...

jq refresher

jq Tutorial with Examples & Output Let me walk through this with real JSON data and actual outputs. Sample Data { "users": [ {"id": 1, "name": "Alice", "age": 28, "dept": "engineering", "salary": 95000}, {"id": 2, "name": "Bob", "age": 35, "dept": "sales", "salary": 75000}, {"id": 3, "name": "Charlie", "age": 24, "dept": "engineering", "salary": 65000}, {"id": 4, "name": "Diana", "age": 42, "dept": "management", "salary": 120000}, {"id": 5, "name": "Eve", "age": 31, "dept": "sales", "salary": 80000} ] } Basic Navigation Get the users array: $ jq '.users' data.json Output: [ {"id": 1, ...

azure pipeline - writting and referencing it from different stage

In Azure devops, we can often write and then reference an output variable from a different stage or job.  We can references it via dependencies.job_name.outputs["step_name.variable_name"] - stage : Build     displayName : ' Build Stage '         jobs :             # JOB 2: Output Variables (sharing between jobs)       - job : Job2_OutputVariables         displayName : ' Job 2: Set Output Variables for Later Jobs '                 variables :           jobMessage : ' Hello from Job 2 '                 steps :           # Create a variable that can be used in dependent jobs           - script : |               echo "##vso[task.setvariable variable=sharedOutput;isOutput=true]Hello from Job2 Outpu...

mcp server :- from fastmcp.server.auth.providers.jwt import JWTVerifier cannot be resolve

When trying to use JWTVerified, I getting this error :- from fastmcp.server.auth.providers.jwt import JWTVerifier  cannot be resolve Then have to ensure I added the following packages  pip uninstall mcp pip install fastmcp And then I was able to references it  from mcp . server . fastmcp import FastMCP from fastmcp import FastMCP from fastmcp . server . auth . providers . jwt import JWTVerifier The only problem with this is there's 2 framework FastMCP - one derive from fastmcp pypi and the other mcp pypi. Mixing both of these is not a good dea and really confusing. 

container app - deploying and setting up mcp server and calling it remotely from your vscode agent

Image
To create a container app, we need to setup our mcp server code, then deploy to the server in Azure. Finally we will test it using our vscode.   The following are the code we using for todo task.  from mcp . server . fastmcp import FastMCP from mcp . server . transport_security import TransportSecuritySettings from task_store import store mcp = FastMCP ( " TasksMCP " , stateless_http = True ,               transport_security = TransportSecuritySettings ( enable_dns_rebinding_protection = False )               ) @ mcp . tool () async def list_tasks () -> list [ dict ]:     """ List all tasks with their ID, title, description, and completion status. """     return store . get_all () @ mcp . tool () async def get_task ( task_id : int ) -> dict | None :     """ Get a single task by its numeric ID.     Args:         tas...

argocd - "Source position should be specified and must be greater than 0 for applications with multiple sources"

Image
Ran into this error  "Source position should be specified and must be greater than 0 for applications with multiple sources" and trying to make my app sync policy from manual to auto argocd app set cert-manager-dev --sync-policy automated So in our setup we have multiple (2 sources) and it gets confused which one to used for our app sync process.   

argocd deploying applications commonly used commands

Image
We meed to install argocd :- kubectl create namespace argocd kubectl apply -n argocd --server-side --force-conflicts -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml Make sure we have argocd app server up and running kubectl port-forward svc/argocd-server -n argocd 8080 :443 To create a temporarily initial password to login argocd admin initial-password -n argocd To login to argocd run the following commands:-  argocd login localhost:8080 Lets create an app  argocd app create guestbook --repo https://github.com/argoproj/argocd-example-apps.git --path guestbook --dest-server https://kubernetes.default.svc --dest-namespace default Then sync the code changes :-  argocd app sync guestbook To list the app argocd app list  Get the app in details argocd app get guestbook To disable sync  argocd app set  guestbook --sync-policy manual To terminate sync   argocd app terminate-op cert-manager...

remote build for python 3.14 is not supported for flex consumption plan

Image
To resolve this, we need to setup function app stack settings version to python 3.13 as shown below :- And then deploy your function app. Please remember to ensure you don't have any current deployment that's using 3.14.   

ERROR failed to read supergraph schema reason=stream did not contain valid UTF-8

Bump into the error while trying to run apollo router.   Anonymous usage data is gathered to inform Apollo product development. See https://go.apollo.dev/o/privacy for details. 2026-07-16T09:46:43.188554Z ERROR failed to read supergraph schema reason=stream did not contain valid UTF-8 2026-07-16T09:46:43.234786Z INFO state machine transitioned event="NoMoreSchema" state=Errored previous_state="Startup" 2026-07-16T09:46:43.235259Z INFO stopped 2026-07-16T09:46:43.235740Z ERROR no valid schema was supplied no valid schema was supplied To resolve this error   rover supergraph compose --config ./supergraph.yaml | Out-File -Encoding utf8 supergraph.graphql and then re--run router  c:\tools\router --config router.yaml --supergraph supergraph.graphql  

grapql rover and router workflow

  To compose your supergraph, first we need to create individual schema for example product, review and user graphql schema. And we also need a supergraph.yaml first subgraphs :   product :     routing_url : http://localhost:4001/graphql     schema :       file : ./product.graphql   # ← points AT the schema you already wrote   user :     routing_url : http://localhost:4002/graphql     schema :       file : ./user.graphql   review :     routing_url : http://localhost:4003/graphql     schema :       file : ./review.graphql Let's create our supergraph rover supergraph compose --config ./supergraph.yaml > supergraph.graphql If you're using powershell rover supergraph compose --config ./supergraph.yaml | Out-File -Encoding utf8 supergraph.graphql We will now have a combined supergraph schema that includes product, review and user graphql. To perform ch...