thockin

thockin

Member Since 8 years ago

Google, United States

Experience Points
1.4k
follower
Lessons Completed
0
follow
Lessons Completed
4
stars
Best Reply Awards
56
repos

988 contributions in the last year

Pinned
⚡ A Makefile/Dockerfile example for Go projects.
⚡ Container Cluster Manager
⚡ Scripted automation for live CLI demos
⚡ My dotfiles
⚡ Kubernetes files for various *.k8s.io sites
Activity
May
9
2 weeks ago
pull request

thockin merge to kubernetes/kubernetes

thockin
thockin

RFC: verify-golangci-lint.sh: support stricter checking in new code

What type of PR is this?

/kind feature

What this PR does / why we need it:

It is useful to check new code with a stricter configuration because we want it to be of higher quality. Code reviews also become easier when reviewers don't need to point out inefficient code manually.

What exactly should be enabled is up for debate. The current config uses the golangci-lint defaults plus everything that is enabled explicitly by the normal .golangci.yaml, just to be on the safe side. Error checking in _test.go files gets disabled because that seems to be fairly common.

Special notes for your reviewer:

As a first step we could add a non-blocking pull job which runs with the stricter configuration for the new code, using -r PULL_BASE_REF.

We could also try to get issues posted as comments on the PR. This is possible when running it as GitHub action. Not sure about running as Prow job.

Does this PR introduce a user-facing change?

NONE
thockin
thockin

Overall I am OK with this as a direction.

The main advantags of having .golangci.yaml in the root dir is that "naked" invocations of golangci-lint will find it (and with workspaces it will DTRT - golangci-lint run should find all sub-modules). So I have a slight pref to leave them in the root.

I did not review the e2echeck stuff yet

Activity icon
issue

thockin issue comment thockin/micro-demos

thockin
thockin

Support emojis on desc

Hi Tim, I liked these scripts and I was using them as base for a demo of my own. I ended up adding the "-e" flag to the echo on desc() so I can print emojis.

I don't know if you want (very simple) PRs for this or not. But I thought it is better to contribute back, it is completely fine if you don't want to take PRs for this :)

The other thing I ended up doing for my demos is adding a "desc_type", that just adds the comment typing them slowly instead of instantly as "desc" does. You can see my branch here, just in case.

Below is the commit msg of the commit in this PR.


With this commit, you can print an emoji using its unicode, like:

# tada emoji
desc "\U1F389"
thockin
thockin

thanks!

Github has no way to auto-assign, and I miss things that are not assigned, sometimes.

push

thockin push thockin/micro-demos

thockin
thockin

Support emojis on desc

With this commit, you can print an emoji using its unicode, like:

# tada emoji
desc "\U1F389"

commit sha: 93b30e6df6eb8bb53684a7b073bebd2e2813f621

push time in 1 week ago
pull request

thockin pull request thockin/micro-demos

thockin
thockin

Support emojis on desc

Hi Tim, I liked these scripts and I was using them as base for a demo of my own. I ended up adding the "-e" flag to the echo on desc() so I can print emojis.

I don't know if you want (very simple) PRs for this or not. But I thought it is better to contribute back, it is completely fine if you don't want to take PRs for this :)

The other thing I ended up doing for my demos is adding a "desc_type", that just adds the comment typing them slowly instead of instantly as "desc" does. You can see my branch here, just in case.

Below is the commit msg of the commit in this PR.


With this commit, you can print an emoji using its unicode, like:

# tada emoji
desc "\U1F389"
May
8
2 weeks ago
Activity icon
issue

thockin issue thockin/go-build-template

thockin
thockin

Add lint support

We have a project based on this go-build-template and @bcheung added linter (golangci-lint) support in it: https://github.com/GoogleCloudPlatform/netd/commit/046dac12ad20c304d0bcef6f82bb8f0969228b8a. However this makes updating from the template a bit annoying. I wonder if it should be considered to include a linter in the template, either by absorbing this one or implementing a new one.

Activity icon
issue

thockin issue comment thockin/go-build-template

thockin
thockin

Add lint support

We have a project based on this go-build-template and @bcheung added linter (golangci-lint) support in it: https://github.com/GoogleCloudPlatform/netd/commit/046dac12ad20c304d0bcef6f82bb8f0969228b8a. However this makes updating from the template a bit annoying. I wonder if it should be considered to include a linter in the template, either by absorbing this one or implementing a new one.

thockin
thockin

Good idea. I just added golangci-lint but no config file, so you can drop your own config in.

I dislike the format part - I thing gofmt is the sane default (that's how most editors are configured). If ther are things I can do to make it easier to integrate, please suggest.

May
7
2 weeks ago
Activity icon
issue

thockin issue go-logr/zapr

thockin
thockin

Logr to Zap Level Confusion

Hi,

I'm trying to understand how I can use Logr to set the log levels for logging verbosity. I'm pretty new to this library and Zap in general, so I'll probably ask some pretty fundamental questions here.

My requirement is that I want to be able to show/hide logs depending on verbosity. For example, I want to set a setting in the logger to only show V(2) or above (in this case it is Warning and above for Zap).

The problem is that with using the Logr interface, the V() function only applies non-negative values. According to this StackOverflow post, all the levels from Logr are inverted in Zap. This means to use the Warning level in Zap, I must pass in V(-2). However, this is not possible given that the function implementation applies all negative values as 0: https://github.com/go-logr/logr/blob/master/logr.go#L282-L292

Is it correct my understanding of the mapping is this:

Logr Zap
1 -1 (Debug)
0 0 (Info)
-1 1 (Warning)
-2 2 (Error)

and so on...

How can I set negative verbosity levels if I am restricted to only using the Logr interface?

Thanks

Activity icon
issue

thockin issue comment go-logr/zapr

thockin
thockin

Logr to Zap Level Confusion

Hi,

I'm trying to understand how I can use Logr to set the log levels for logging verbosity. I'm pretty new to this library and Zap in general, so I'll probably ask some pretty fundamental questions here.

My requirement is that I want to be able to show/hide logs depending on verbosity. For example, I want to set a setting in the logger to only show V(2) or above (in this case it is Warning and above for Zap).

The problem is that with using the Logr interface, the V() function only applies non-negative values. According to this StackOverflow post, all the levels from Logr are inverted in Zap. This means to use the Warning level in Zap, I must pass in V(-2). However, this is not possible given that the function implementation applies all negative values as 0: https://github.com/go-logr/logr/blob/master/logr.go#L282-L292

Is it correct my understanding of the mapping is this:

Logr Zap
1 -1 (Debug)
0 0 (Info)
-1 1 (Warning)
-2 2 (Error)

and so on...

How can I set negative verbosity levels if I am restricted to only using the Logr interface?

Thanks

thockin
thockin

You can use arbitrary (up to 127) V levels, just not zap's "warning".

https://github.com/go-logr/zapr/blob/master/example/main.go#L42-L45

Activity icon
issue

thockin issue comment go-logr/stdr

thockin
thockin

Adds option to use non-global verbosity per logger.

Other loggers included with logr already support this (e.g. testr). A pointer is used for Verbosity in order to provide differentiation of the zero value of Verbosity from log level 0.

Usage example:

level := 10
l := stdr.NewWithOptions(log.Default(), stdr.Options {
  Verbosity: &level,
})
thockin
thockin

We alreayd have the global verbosity - what is the use-case for this? Can you show me what you are trying to solve or express?

Activity icon
issue

thockin issue comment go-logr/logr

thockin
thockin

View logs with verbosity level set

I have set the verbosity level as follows, as I essentially would like these to be like Debug level logs- l.Log.V(10).Info("req reconciled", "req", req.NamespacedName)

How do I ensure these logs get printed, when I do want to view the logs at this verbosity level ? Currently I only see the logs printed at l.Log.Info , which is default verbosity level as 0.

Activity icon
issue

thockin issue go-logr/logr

thockin
thockin

View logs with verbosity level set

I have set the verbosity level as follows, as I essentially would like these to be like Debug level logs- l.Log.V(10).Info("req reconciled", "req", req.NamespacedName)

How do I ensure these logs get printed, when I do want to view the logs at this verbosity level ? Currently I only see the logs printed at l.Log.Info , which is default verbosity level as 0.

Activity icon
issue

thockin issue go-logr/logr

thockin
thockin

"go get github.com/go-logr/logr/funcr" got error

github.com/go-logr/logr/funcr

../../go/src/github.com/go-logr/logr/funcr/funcr.go:398:16: undefined: strconv.FormatComplex ../../go/src/github.com/go-logr/logr/funcr/funcr.go:400:16: undefined: strconv.FormatComplex ../../go/src/github.com/go-logr/logr/funcr/funcr.go:443:16: undefined: strconv.FormatComplex ../../go/src/github.com/go-logr/logr/funcr/funcr.go:445:16: undefined: strconv.FormatComplex

Activity icon
issue

thockin issue comment kubernetes/git-sync

thockin
thockin

Invalid reference when changing branches

Hello. I'm on v3.3.0 and got things working nicely with an initial value of GIT_SYNC_BRANCH as main. However if I try to update the branch to anything else on my existing volume, I'm getting "invalid reference" errors.

INFO: detected pid 1, running init handler
I0610 01:28:06.722177      11 main.go:495]  "level"=0 "msg"="starting up"  "args"=["/git-sync"] "pid"=11
I0610 01:28:07.135477      11 main.go:888]  "level"=0 "msg"="update required"  "local"="ed4da7e65a9102d789db2674abeafee07e42ff45" "remote"="4ddcd3cfec8da15ccb5562e3bed3a572674e05af" "rev"="HEAD"
I0610 01:28:07.135509      11 main.go:666]  "level"=0 "msg"="syncing git"  "hash"="4ddcd3cfec8da15ccb5562e3bed3a572674e05af" "rev"="HEAD"
I0610 01:28:08.603194      11 main.go:687]  "level"=0 "msg"="adding worktree"  "branch"="origin/test" "path"="/git/4ddcd3cfec8da15ccb5562e3bed3a572674e05af"
E0610 01:28:08.603337      11 main.go:168]  "msg"="too many failures, aborting" "error"="Run(git worktree add /git/4ddcd3cfec8da15ccb5562e3bed3a572674e05af origin/test): exit status 128: { stdout: \"\", stderr: \"fatal: invalid reference: origin/test\\n\" }"  "failCount"=0

I'm certain origin/test is a valid and pushed branch reference. Just to double I cloned the repo from scratch and ran git worktree add ./git/4ddcd3cfec8da15ccb5562e3bed3a572674e05af origin/test locally with no issues. Changing GIT_SYNC_BRANCH back to main makes everything happy again.

I suspect if I start from scratch on a fresh volume, the test branch it'll work, but wondering if this supposed to work or if I'm doing something wrong. Thanks in advance!

thockin
thockin

I am failing to repro this. Tell me where this doesn't match what you are doing?

$ ./bin/linux_amd64/git-sync -v 10 --repo https://github.com/kubernetes/git-sync --branch release-3.x --root /tmp/g --one-time
I0507 10:56:00.534829  114660 cmd.go:48] "level"=5 "msg"="running command" "cwd"="" "cmd"="git config --global gc.autoDetach false"
I0507 10:56:00.537247  114660 cmd.go:72] "level"=6 "msg"="command result" "stdout"="" "stderr"=""
I0507 10:56:00.537263  114660 cmd.go:48] "level"=5 "msg"="running command" "cwd"="" "cmd"="git config --global gc.pruneExpire now"
I0507 10:56:00.539402  114660 cmd.go:72] "level"=6 "msg"="command result" "stdout"="" "stderr"=""
I0507 10:56:00.539437  114660 main.go:474] "level"=0 "msg"="starting up" "pid"=114660 "args"=["./bin/linux_amd64/git-sync","-v","10","--repo","https://github.com/kubernetes/git-sync","--branch","release-3.x","--root","/tmp/g","--one-time"]
I0507 10:56:00.539475  114660 main.go:924] "level"=0 "msg"="cloning repo" "origin"="https://github.com/kubernetes/git-sync" "path"="/tmp/g"
I0507 10:56:00.539489  114660 cmd.go:48] "level"=5 "msg"="running command" "cwd"="" "cmd"="git clone -v --no-checkout -b release-3.x https://github.com/kubernetes/git-sync /tmp/g"
I0507 10:56:17.361533  114660 cmd.go:72] "level"=6 "msg"="command result" "stdout"="" "stderr"="Cloning into '/tmp/g'...
POST git-upload-pack (415 bytes)
POST git-upload-pack (gzip 1738 to 886 bytes)"
I0507 10:56:17.361559  114660 cmd.go:48] "level"=5 "msg"="running command" "cwd"="/tmp/g" "cmd"="git rev-parse HEAD"
I0507 10:56:17.364012  114660 cmd.go:72] "level"=6 "msg"="command result" "stdout"="8dea3f4be563ff40656caf337574c4bb9eac30d3" "stderr"=""
I0507 10:56:17.364028  114660 main.go:738] "level"=0 "msg"="syncing git" "rev"="HEAD" "hash"="8dea3f4be563ff40656caf337574c4bb9eac30d3"
I0507 10:56:17.364046  114660 cmd.go:48] "level"=5 "msg"="running command" "cwd"="/tmp/g" "cmd"="git fetch -f --tags https://github.com/kubernetes/git-sync release-3.x"
I0507 10:56:17.918525  114660 cmd.go:72] "level"=6 "msg"="command result" "stdout"="" "stderr"="From https://github.com/kubernetes/git-sync
 * branch            release-3.x -> FETCH_HEAD"
I0507 10:56:17.918544  114660 cmd.go:48] "level"=5 "msg"="running command" "cwd"="/tmp/g" "cmd"="git cat-file -t 8dea3f4be563ff40656caf337574c4bb9eac30d3"
I0507 10:56:17.921188  114660 cmd.go:72] "level"=6 "msg"="command result" "stdout"="commit" "stderr"=""
I0507 10:56:17.921203  114660 cmd.go:48] "level"=5 "msg"="running command" "cwd"="/tmp/g" "cmd"="git rev-parse 8dea3f4be563ff40656caf337574c4bb9eac30d3"
I0507 10:56:17.923703  114660 cmd.go:72] "level"=6 "msg"="command result" "stdout"="8dea3f4be563ff40656caf337574c4bb9eac30d3" "stderr"=""
I0507 10:56:17.923721  114660 main.go:727] "level"=1 "msg"="removing worktree" "path"="/tmp/g/8dea3f4be563ff40656caf337574c4bb9eac30d3"
I0507 10:56:17.923749  114660 cmd.go:48] "level"=5 "msg"="running command" "cwd"="/tmp/g" "cmd"="git worktree prune"
I0507 10:56:17.926942  114660 cmd.go:72] "level"=6 "msg"="command result" "stdout"="" "stderr"=""
I0507 10:56:17.926972  114660 cmd.go:48] "level"=5 "msg"="running command" "cwd"="/tmp/g" "cmd"="git worktree add --detach /tmp/g/8dea3f4be563ff40656caf337574c4bb9eac30d3 8dea3f4be563ff40656caf337574c4bb9eac30d3 --no-checkout"
I0507 10:56:17.934151  114660 cmd.go:72] "level"=6 "msg"="command result" "stdout"="" "stderr"="Preparing worktree (detached HEAD 8dea3f4)"
I0507 10:56:17.934171  114660 main.go:773] "level"=0 "msg"="adding worktree" "path"="/tmp/g/8dea3f4be563ff40656caf337574c4bb9eac30d3" "branch"="origin/release-3.x"
I0507 10:56:17.934269  114660 cmd.go:48] "level"=5 "msg"="running command" "cwd"="/tmp/g/8dea3f4be563ff40656caf337574c4bb9eac30d3" "cmd"="git reset --hard 8dea3f4be563ff40656caf337574c4bb9eac30d3"
I0507 10:56:18.075897  114660 cmd.go:72] "level"=6 "msg"="command result" "stdout"="HEAD is now at 8dea3f4 Merge pull request #509 from thockin/v3-releasing" "stderr"=""
I0507 10:56:18.075916  114660 main.go:834] "level"=0 "msg"="reset worktree to hash" "path"="/tmp/g/8dea3f4be563ff40656caf337574c4bb9eac30d3" "hash"="8dea3f4be563ff40656caf337574c4bb9eac30d3"
I0507 10:56:18.075924  114660 main.go:839] "level"=0 "msg"="updating submodules"
I0507 10:56:18.075933  114660 cmd.go:48] "level"=5 "msg"="running command" "cwd"="/tmp/g/8dea3f4be563ff40656caf337574c4bb9eac30d3" "cmd"="git submodule update --init --recursive"
I0507 10:56:18.117147  114660 cmd.go:72] "level"=6 "msg"="command result" "stdout"="" "stderr"=""
I0507 10:56:18.117179  114660 main.go:695] "level"=1 "msg"="creating tmp symlink" "root"="/tmp/g/" "dst"="8dea3f4be563ff40656caf337574c4bb9eac30d3" "src"="tmp-link"
I0507 10:56:18.117189  114660 cmd.go:48] "level"=5 "msg"="running command" "cwd"="/tmp/g/" "cmd"="ln -snf 8dea3f4be563ff40656caf337574c4bb9eac30d3 tmp-link"
I0507 10:56:18.117979  114660 cmd.go:72] "level"=6 "msg"="command result" "stdout"="" "stderr"=""
I0507 10:56:18.117995  114660 main.go:700] "level"=1 "msg"="renaming symlink" "root"="/tmp/g/" "old_name"="tmp-link" "new_name"="git-sync"
I0507 10:56:18.118003  114660 cmd.go:48] "level"=5 "msg"="running command" "cwd"="/tmp/g/" "cmd"="mv -T tmp-link git-sync"
I0507 10:56:18.119076  114660 cmd.go:72] "level"=6 "msg"="command result" "stdout"="" "stderr"=""
I0507 10:56:18.119093  114660 cmd.go:48] "level"=5 "msg"="running command" "cwd"="/tmp/g" "cmd"="git gc --auto"
I0507 10:56:18.121589  114660 cmd.go:72] "level"=6 "msg"="command result" "stdout"="" "stderr"=""

$ ./bin/linux_amd64/git-sync -v 10 --repo https://github.com/kubernetes/git-sync --branch master --root /tmp/g --one-time
I0507 10:57:40.018867  115075 cmd.go:48] "level"=5 "msg"="running command" "cwd"="" "cmd"="git config --global gc.autoDetach false"
I0507 10:57:40.027793  115075 cmd.go:72] "level"=6 "msg"="command result" "stdout"="" "stderr"=""
I0507 10:57:40.027855  115075 cmd.go:48] "level"=5 "msg"="running command" "cwd"="" "cmd"="git config --global gc.pruneExpire now"
I0507 10:57:40.035931  115075 cmd.go:72] "level"=6 "msg"="command result" "stdout"="" "stderr"=""
I0507 10:57:40.036001  115075 main.go:474] "level"=0 "msg"="starting up" "pid"=115075 "args"=["./bin/linux_amd64/git-sync","-v","10","--repo","https://github.com/kubernetes/git-sync","--branch","master","--root","/tmp/g","--one-time"]
I0507 10:57:40.036088  115075 cmd.go:48] "level"=5 "msg"="running command" "cwd"="/tmp/g/git-sync" "cmd"="git rev-parse HEAD"
I0507 10:57:40.045162  115075 cmd.go:72] "level"=6 "msg"="command result" "stdout"="8dea3f4be563ff40656caf337574c4bb9eac30d3" "stderr"=""
I0507 10:57:40.045224  115075 cmd.go:48] "level"=5 "msg"="running command" "cwd"="/tmp/g/git-sync" "cmd"="git ls-remote -q https://github.com/kubernetes/git-sync refs/heads/master"
I0507 10:57:40.942987  115075 cmd.go:72] "level"=6 "msg"="command result" "stdout"="c71d1cb890de054a8be2ee69d023a8c5cf4e1ad1	refs/heads/master" "stderr"=""
I0507 10:57:40.943012  115075 main.go:1069] "level"=0 "msg"="update required" "rev"="HEAD" "local"="8dea3f4be563ff40656caf337574c4bb9eac30d3" "remote"="c71d1cb890de054a8be2ee69d023a8c5cf4e1ad1"
I0507 10:57:40.943026  115075 main.go:738] "level"=0 "msg"="syncing git" "rev"="HEAD" "hash"="c71d1cb890de054a8be2ee69d023a8c5cf4e1ad1"
I0507 10:57:40.943039  115075 cmd.go:48] "level"=5 "msg"="running command" "cwd"="/tmp/g" "cmd"="git fetch -f --tags https://github.com/kubernetes/git-sync master"
I0507 10:57:41.682668  115075 cmd.go:72] "level"=6 "msg"="command result" "stdout"="" "stderr"="From https://github.com/kubernetes/git-sync
 * branch            master     -> FETCH_HEAD"
I0507 10:57:41.682690  115075 cmd.go:48] "level"=5 "msg"="running command" "cwd"="/tmp/g" "cmd"="git cat-file -t c71d1cb890de054a8be2ee69d023a8c5cf4e1ad1"
I0507 10:57:41.685834  115075 cmd.go:72] "level"=6 "msg"="command result" "stdout"="commit" "stderr"=""
I0507 10:57:41.685851  115075 cmd.go:48] "level"=5 "msg"="running command" "cwd"="/tmp/g" "cmd"="git rev-parse c71d1cb890de054a8be2ee69d023a8c5cf4e1ad1"
I0507 10:57:41.688555  115075 cmd.go:72] "level"=6 "msg"="command result" "stdout"="c71d1cb890de054a8be2ee69d023a8c5cf4e1ad1" "stderr"=""
I0507 10:57:41.688572  115075 main.go:727] "level"=1 "msg"="removing worktree" "path"="/tmp/g/c71d1cb890de054a8be2ee69d023a8c5cf4e1ad1"
I0507 10:57:41.688596  115075 cmd.go:48] "level"=5 "msg"="running command" "cwd"="/tmp/g" "cmd"="git worktree prune"
I0507 10:57:41.691513  115075 cmd.go:72] "level"=6 "msg"="command result" "stdout"="" "stderr"=""
I0507 10:57:41.691533  115075 cmd.go:48] "level"=5 "msg"="running command" "cwd"="/tmp/g" "cmd"="git worktree add --detach /tmp/g/c71d1cb890de054a8be2ee69d023a8c5cf4e1ad1 c71d1cb890de054a8be2ee69d023a8c5cf4e1ad1 --no-checkout"
I0507 10:57:41.700448  115075 cmd.go:72] "level"=6 "msg"="command result" "stdout"="" "stderr"="Preparing worktree (detached HEAD c71d1cb)"
I0507 10:57:41.700474  115075 main.go:773] "level"=0 "msg"="adding worktree" "path"="/tmp/g/c71d1cb890de054a8be2ee69d023a8c5cf4e1ad1" "branch"="origin/master"
I0507 10:57:41.700597  115075 cmd.go:48] "level"=5 "msg"="running command" "cwd"="/tmp/g/c71d1cb890de054a8be2ee69d023a8c5cf4e1ad1" "cmd"="git reset --hard c71d1cb890de054a8be2ee69d023a8c5cf4e1ad1"
I0507 10:57:41.818498  115075 cmd.go:72] "level"=6 "msg"="command result" "stdout"="HEAD is now at c71d1cb Merge pull request #512 from thockin/v4-releasing" "stderr"=""
I0507 10:57:41.818520  115075 main.go:834] "level"=0 "msg"="reset worktree to hash" "path"="/tmp/g/c71d1cb890de054a8be2ee69d023a8c5cf4e1ad1" "hash"="c71d1cb890de054a8be2ee69d023a8c5cf4e1ad1"
I0507 10:57:41.818525  115075 main.go:839] "level"=0 "msg"="updating submodules"
I0507 10:57:41.818530  115075 cmd.go:48] "level"=5 "msg"="running command" "cwd"="/tmp/g/c71d1cb890de054a8be2ee69d023a8c5cf4e1ad1" "cmd"="git submodule update --init --recursive"
I0507 10:57:41.849352  115075 cmd.go:72] "level"=6 "msg"="command result" "stdout"="" "stderr"=""
I0507 10:57:41.849401  115075 main.go:695] "level"=1 "msg"="creating tmp symlink" "root"="/tmp/g/" "dst"="c71d1cb890de054a8be2ee69d023a8c5cf4e1ad1" "src"="tmp-link"
I0507 10:57:41.849412  115075 cmd.go:48] "level"=5 "msg"="running command" "cwd"="/tmp/g/" "cmd"="ln -snf c71d1cb890de054a8be2ee69d023a8c5cf4e1ad1 tmp-link"
I0507 10:57:41.850029  115075 cmd.go:72] "level"=6 "msg"="command result" "stdout"="" "stderr"=""
I0507 10:57:41.850038  115075 main.go:700] "level"=1 "msg"="renaming symlink" "root"="/tmp/g/" "old_name"="tmp-link" "new_name"="git-sync"
I0507 10:57:41.850045  115075 cmd.go:48] "level"=5 "msg"="running command" "cwd"="/tmp/g/" "cmd"="mv -T tmp-link git-sync"
I0507 10:57:41.850892  115075 cmd.go:72] "level"=6 "msg"="command result" "stdout"="" "stderr"=""
I0507 10:57:41.850900  115075 main.go:727] "level"=1 "msg"="removing worktree" "path"="/tmp/g/8dea3f4be563ff40656caf337574c4bb9eac30d3"
I0507 10:57:41.873906  115075 cmd.go:48] "level"=5 "msg"="running command" "cwd"="/tmp/g" "cmd"="git worktree prune"
I0507 10:57:41.876560  115075 cmd.go:72] "level"=6 "msg"="command result" "stdout"="" "stderr"=""
I0507 10:57:41.876575  115075 cmd.go:48] "level"=5 "msg"="running command" "cwd"="/tmp/g" "cmd"="git gc --auto"
I0507 10:57:41.879638  115075 cmd.go:72] "level"=6 "msg"="command result" "stdout"="" "stderr"=""
May
6
2 weeks ago
open pull request

thockin wants to merge kubernetes/kubernetes

thockin
thockin

Ingress API: rework the ingressClassName API documentation

What type of PR is this?

/kind documentation /sig network

What this PR does / why we need it:

This PR is following up #107675 and adds a suggestion for improving the API docs.

Does this PR introduce a user-facing change?

NONE
thockin
thockin

I know it's allowed, but I'd prefer to keep the comments ASCII if we can

pull request

thockin merge to kubernetes/kubernetes

thockin
thockin

Ingress API: rework the ingressClassName API documentation

What type of PR is this?

/kind documentation /sig network

What this PR does / why we need it:

This PR is following up #107675 and adds a suggestion for improving the API docs.

Does this PR introduce a user-facing change?

NONE
pull request

thockin merge to kubernetes/kubernetes

thockin
thockin

Ingress API: rework the ingressClassName API documentation

What type of PR is this?

/kind documentation /sig network

What this PR does / why we need it:

This PR is following up #107675 and adds a suggestion for improving the API docs.

Does this PR introduce a user-facing change?

NONE
Activity icon
issue

thockin issue comment kubernetes/kubernetes

thockin
thockin

Clarify ExternalTrafficPolicy/InternalTrafficPolicy definitions

What type of PR is this?

/kind documentation

What this PR does / why we need it:

Updates API docs based on discussion in #108526 and changes in #106497.

Which issue(s) this PR fixes:

Fixes #108526

Does this PR introduce a user-facing change?

(no, but it documents changes that were already release-noted in #106497)

NONE

/sig network /triage accepted /priority important-soon /milestone v1.24 /assign @thockin

thockin
thockin
Activity icon
issue

thockin issue comment kubernetes/git-sync

thockin
thockin

Submodule content not updating

Hi, i would like to implement multi-repository support for dags using helm chart. Configured submodules that link to 2 repositories

MAIN_REPO
.gitmodules
REPO_1
REPO_2
[submodule "REPO_1"]
	path = REPO_1
	url = "repo1_url"
[submodule "REPO_2»]
	path = REPO_2
	url = "repo2_url"

Where used image: k8s.gcr.io/git-sync/git-sync:v3.4.0 and indicated

env: 
      - name: "GIT_SYNC_SUBMODULES"
        value: "recursive"

But the contents of the submodules are not updated. Please tell me how can i do this?

thockin
thockin

This is showing me that upstream didn't change. I admit that I am not an expert on submodules - how are you setting this up that doesn't touch upstream?

Here's my e2e test - how would you change this to repro whatever you are doing?

https://github.com/kubernetes/git-sync/blob/release-3.x/test_e2e.sh#L1384-L1431

open pull request

thockin wants to merge kubernetes/website

thockin
thockin

Add blog article “Avoid collisions assigning IP to Services” for KEP 3070 feature(s)

Feature blog for "Kubernetes 1.24: Avoid Collisions Assigning IP Addresses to Services"

thockin
thockin

...with a specific ClusterIP...

open pull request

thockin wants to merge kubernetes/website

thockin
thockin

Add blog article “Avoid collisions assigning IP to Services” for KEP 3070 feature(s)

Feature blog for "Kubernetes 1.24: Avoid Collisions Assigning IP Addresses to Services"

thockin
thockin
open pull request

thockin wants to merge kubernetes/website

thockin
thockin

Add blog article “Avoid collisions assigning IP to Services” for KEP 3070 feature(s)

Feature blog for "Kubernetes 1.24: Avoid Collisions Assigning IP Addresses to Services"

thockin
thockin
pull request

thockin merge to kubernetes/website

thockin
thockin

Add blog article “Avoid collisions assigning IP to Services” for KEP 3070 feature(s)

Feature blog for "Kubernetes 1.24: Avoid Collisions Assigning IP Addresses to Services"

thockin
thockin

Just nits, LGTM on content

pull request

thockin merge to kubernetes/website

thockin
thockin

Add blog article “Avoid collisions assigning IP to Services” for KEP 3070 feature(s)

Feature blog for "Kubernetes 1.24: Avoid Collisions Assigning IP Addresses to Services"

thockin
thockin

Just nits, LGTM on content

pull request

thockin merge to kubernetes/kubernetes

thockin
thockin

Refactor kube-proxy internal naming for Service Port Name string

Signed-off-by: gkarthiks [email protected]

What type of PR is this?

Refactoring variable name (Service Port Name type:string) for meaningful string variable.

/kind cleanup

What this PR does / why we need it:

Renames the various occurrence of the variable that holds the string type value of the service port name to be unanimously refer svcPortNameString/svcPortName/svcptNameString.

Which issue(s) this PR fixes:

Fixes #108806

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


/cc @thockin

thockin
thockin

The main loop definitely reads better!

open pull request

thockin wants to merge kubernetes/kubernetes

thockin
thockin

Refactor kube-proxy internal naming for Service Port Name string

Signed-off-by: gkarthiks [email protected]

What type of PR is this?

Refactoring variable name (Service Port Name type:string) for meaningful string variable.

/kind cleanup

What this PR does / why we need it:

Renames the various occurrence of the variable that holds the string type value of the service port name to be unanimously refer svcPortNameString/svcPortName/svcptNameString.

Which issue(s) this PR fixes:

Fixes #108806

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


/cc @thockin

thockin
thockin

one commit each, though please :)

open pull request

thockin wants to merge kubernetes/kubernetes

thockin
thockin

Refactor kube-proxy internal naming for Service Port Name string

Signed-off-by: gkarthiks [email protected]

What type of PR is this?

Refactoring variable name (Service Port Name type:string) for meaningful string variable.

/kind cleanup

What this PR does / why we need it:

Renames the various occurrence of the variable that holds the string type value of the service port name to be unanimously refer svcPortNameString/svcPortName/svcptNameString.

Which issue(s) this PR fixes:

Fixes #108806

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


/cc @thockin

thockin
thockin

if svcInfo was renamed, this would be even more readable, like:

svcPortName := svcPort.nameString

or

svcptName := svcPort.nameString

or

spName := svcPort.nameString

open pull request

thockin wants to merge kubernetes/kubernetes

thockin
thockin

Refactor kube-proxy internal naming for Service Port Name string

Signed-off-by: gkarthiks [email protected]

What type of PR is this?

Refactoring variable name (Service Port Name type:string) for meaningful string variable.

/kind cleanup

What this PR does / why we need it:

Renames the various occurrence of the variable that holds the string type value of the service port name to be unanimously refer svcPortNameString/svcPortName/svcptNameString.

Which issue(s) this PR fixes:

Fixes #108806

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


/cc @thockin

thockin
thockin

this whole type could be servicePortInfo or servicePort

open pull request

thockin wants to merge kubernetes/kubernetes

thockin
thockin

Refactor kube-proxy internal naming for Service Port Name string

Signed-off-by: gkarthiks [email protected]

What type of PR is this?

Refactoring variable name (Service Port Name type:string) for meaningful string variable.

/kind cleanup

What this PR does / why we need it:

Renames the various occurrence of the variable that holds the string type value of the service port name to be unanimously refer svcPortNameString/svcPortName/svcptNameString.

Which issue(s) this PR fixes:

Fixes #108806

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


/cc @thockin

thockin
thockin

and proxy.BaseServiceInfo could be BaseServicePort or ServicePortDescriptor ?

and ServiceMap

and ...

open pull request

thockin wants to merge kubernetes/kubernetes

thockin
thockin

Refactor kube-proxy internal naming for Service Port Name string

Signed-off-by: gkarthiks [email protected]

What type of PR is this?

Refactoring variable name (Service Port Name type:string) for meaningful string variable.

/kind cleanup

What this PR does / why we need it:

Renames the various occurrence of the variable that holds the string type value of the service port name to be unanimously refer svcPortNameString/svcPortName/svcptNameString.

Which issue(s) this PR fixes:

Fixes #108806

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


/cc @thockin

thockin
thockin

if the type was renamed, then this field could stay as-is - smaller diff?