Skip to content

Instantly share code, notes, and snippets.

@chrisplim
chrisplim / vttablet_logs.txt
Created July 24, 2025 04:08
Logs generated from vttablet 22.0.2
W0723 21:06:24.409395 10832 log.go:39] Failed to read in config : Config File "vtconfig" Not Found in "[/Users/chris.lim/dev/vitess]". This is optional, and can be ignored if you are not using config files. For a detailed explanation, see https://github.com/vitessio/vitess/blob/main/doc/viper/viper.md#config-files.
I0723 21:06:24.409465 10832 servenv_unix.go:57] Version: 22.0.2-SNAPSHOT (Git revision bd93732ecd2da4ad1a63909466a9ebe08b3b4f28 branch 'release-22.0') built on Wed Jul 23 21:04:41 PDT 2025 by chris.lim@Christophers-MacBook-Pro-2.local using go1.24.4 darwin/arm64
I0723 21:06:24.411654 10832 streamlog.go:203] Streaming logs from TabletServer at /debug/querylog.
I0723 21:06:24.411704 10832 streamlog.go:203] Streaming logs from TxLog at /debug/txlog.
Error: invalid config: Connections using insecure transport are prohibited while --require_secure_transport=ON. (errno 3159) (sqlstate HY000)
Usage:
vttablet [flags]
Examples:
@chrisplim
chrisplim / repro_ssl_config_bug.sh
Last active July 29, 2025 11:13
Script to reproduce a bug with checking external mysql connections in vitess 22.0.2
#! /bin/bash
DOCKER_CONTAINER_NAME="test-external-mysql"
MYSQL_IMAGE="mysql:8.0.35"
# Generate SSL certificates first
# Create directory for certificates
mkdir -p certs
cd certs
@chrisplim
chrisplim / test_autocommit_behavior.py
Last active May 13, 2025 07:06
sqlalchemy autocommit
from contextlib import contextmanager
from typing import Iterator
from sqlalchemy import BigInteger, Engine, create_engine
from sqlalchemy.engine.url import URL
from sqlalchemy.orm import DeclarativeBase, Mapped, Session, mapped_column
Column = mapped_column
@chrisplim
chrisplim / workflow
Last active March 7, 2025 05:19
check mismatch in PR
name: CI
run-name: CI - ${{ github.head_ref || github.ref }}
on:
push:
branches:
- master
pull_request:
concurrency:
time="2022-09-05T00:51:00Z" level=info msg="Started syncing Analysis at (2022-09-05 00:51:00.337436032 +0000 UTC m=+236440.858005604)" analysisrun=dryrun-rollout-b9f5d4588-2-pre namespace=default
time="2022-09-05T00:51:00Z" level=info msg="Created Pre Promotion AnalysisRun" analysisrun=dryrun-rollout-b9f5d4588-2-pre namespace=default rollout=dryrun-rollout
time="2022-09-05T00:51:00Z" level=info msg="Running initial measurement" analysisrun=dryrun-rollout-b9f5d4588-2-pre metric=test namespace=default
time="2022-09-05T00:51:00Z" level=info msg="Taking 1 Measurement(s)..." analysisrun=dryrun-rollout-b9f5d4588-2-pre namespace=default
time="2022-09-05T00:51:00Z" level=info msg="job default/28a63bb7-5451-4a40-88ef-dcd8ea7b1de6.test.1 created" analysisrun=dryrun-rollout-b9f5d4588-2-pre metric=test namespace=default
time="2022-09-05T00:51:00Z" level=info msg="Patch status successfully" analysisrun=dryrun-rollout-b9f5d4588-2-pre namespace=default
time="2022-09-05T00:51:00Z" level=info msg="Reconciliation completed" an
@chrisplim
chrisplim / dryrun-manifests.yaml
Last active July 19, 2022 19:25
small demo to reproduce dryrun bug in argo rollouts
# dryrun-manifests.yaml
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: dryrun-rollout
spec:
replicas: 1
selector:
matchLabels:
app: dryrun
@chrisplim
chrisplim / the_fall_episode_1
Created April 6, 2022 02:56
the_fall_episode_1
import sys
import math
class Game:
def __init__(self, width, height):
self.room_type_grid = [[0]*width for _ in range(height)]
self.prev_x = None
self.prev_y = None
def get_next_position(self, x, y):