Skip to content

Instantly share code, notes, and snippets.

View stevekuznetsov's full-sized avatar

Steve Kuznetsov stevekuznetsov

  • Microsoft
  • United States
  • 18:45 (UTC -07:00)
View GitHub Profile
package apiserver
import (
"context"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
certificatesv1 "k8s.io/api/certificates/v1"
corev1 "k8s.io/api/core/v1"
@stevekuznetsov
stevekuznetsov / contention.go
Last active April 29, 2022 00:27
CRDB Contention Reproducer
package main
import (
"context"
"flag"
"fmt"
"net/url"
"strings"
"sync"
"time"
@stevekuznetsov
stevekuznetsov / changefeeds.go
Last active March 10, 2022 22:37
Investigating CockroachDB Changefeed Behavior
package main
import (
"context"
"encoding/json"
"fmt"
"math/rand"
"sort"
"strings"
"sync"
@stevekuznetsov
stevekuznetsov / filter.py
Created June 15, 2018 14:45
branch filtering
#!/usr/bin/env python
import yaml
import sys
prow_config_file = sys.argv[1]
prow_config = {}
with open(prow_config_file) as prow_config_data:
prow_config = yaml.load(prow_config_data)
@stevekuznetsov
stevekuznetsov / rebase.py
Last active March 11, 2017 21:20
Rebase Script for OSE
#!/usr/bin/env python
from __future__ import print_function
import sys
_DROP_PREFIX = '[DROP]'
_SQUASH_PREFIX = '[SQUASH]'
_CARRY_PREFIX = '[CARRY]'
_SPEC_SUBJECT = _CARRY_PREFIX + '[BUILD] Specfile updates'
_TITO_PREFIX = 'Automatic commit of package'
@stevekuznetsov
stevekuznetsov / failure.log
Created June 21, 2016 14:50
failed TestAuthorizationResolution
This file has been truncated, but you can view the full file.
Jun 21 09:36:53 Running TestAuthorizationResolution...
Jun 21 09:40:53 failed TestAuthorizationResolution
Jun 21 09:40:53 I0621 09:36:53.144661 25720 plugins.go:46] Registered cloud provider "aws"
Jun 21 09:40:53 I0621 09:36:53.144831 25720 plugins.go:46] Registered cloud provider "gce"
Jun 21 09:40:53 I0621 09:36:53.144987 25720 plugins.go:46] Registered cloud provider "mesos"
Jun 21 09:40:53 I0621 09:36:53.145033 25720 plugins.go:46] Registered cloud provider "openstack"
Jun 21 09:40:53 I0621 09:36:53.145043 25720 plugins.go:46] Registered cloud provider "ovirt"
Jun 21 09:40:53 I0621 09:36:53.145057 25720 plugins.go:46] Registered cloud provider "rackspace"
Jun 21 09:40:53 I0621 09:36:53.145473 25720 plugins.go:74] Registered admission plugin "NamespaceLifecycle"
Jun 21 09:40:53 I0621 09:36:53.145489 25720 plugins.go:74] Registered admission plugin "ServiceAccount"
@stevekuznetsov
stevekuznetsov / errors.log
Created June 7, 2016 15:31
vagrant errors
$ ./spawn-conformance-boxes.sh
/home/skuznets/.vagrant.d/gems/gems/vagrant-aws-0.7.0/lib/vagrant-aws/action/run_instance.rb:98: warning: duplicated key at line 100 ignored: :associate_public_ip
/home/skuznets/.vagrant.d/gems/gems/vagrant-aws-0.7.0/lib/vagrant-aws/action/run_instance.rb:98: warning: duplicated key at line 100 ignored: :associate_public_ip
/home/skuznets/.vagrant.d/gems/gems/vagrant-aws-0.7.0/lib/vagrant-aws/action/run_instance.rb:98: warning: duplicated key at line 100 ignored: :associate_public_ip
/home/skuznets/.vagrant.d/gems/gems/vagrant-aws-0.7.0/lib/vagrant-aws/action/run_instance.rb:98: warning: duplicated key at line 100 ignored: :associate_public_ip
/home/skuznets/.vagrant.d/gems/gems/vagrant-aws-0.7.0/lib/vagrant-aws/action/run_instance.rb:98: warning: duplicated key at line 100 ignored: :associate_public_ip
/home/skuznets/.vagrant.d/gems/gems/vagrant-aws-0.7.0/lib/vagrant-aws/action/run_instance.rb:98: warning: duplicated key at line 100 ignored: :associate_public_ip
/home/skuznets
@stevekuznetsov
stevekuznetsov / vagrant-script.sh
Last active June 3, 2016 19:54
docker scripts
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
tmp_root="/home/skuznets/vagrant-boxes"
rm -rf "${tmp_root}"
mkdir -p "${tmp_root}"
@stevekuznetsov
stevekuznetsov / conformance.sh
Last active June 2, 2016 19:37
conformance test using vagrant
vagrant plugin install vagrant-openshift
vagrant plugin install vagrant-aws
git clone [email protected]:openshift/origin.git
cd origin
vagrant origin-init --stage inst --os rhel7 --instance-type m4.large origin_${JOB_NAME}_${BUILD_NUMBER}
vagrant up --provider aws
vagrant sync-origin -s
vagrant test-origin --extended "conformance" -d --skip-check --skip-image-cleanup --image-registry ci.dev.openshift.redhat.com:5000
@stevekuznetsov
stevekuznetsov / init.sh
Last active May 9, 2016 15:12
readonly source failures
#!/bin/bash
function init() {
source readonly.sh
echo "inside init: ${MY_VAR[*]}" # success
}
init
echo "after init: ${MY_VAR[*]}" # failure