Skip to content

Commit

Permalink
Merge pull request #21 from ONE7live/fix_netdr_vendor
Browse files Browse the repository at this point in the history
fix: add vendor after version update
  • Loading branch information
duanmengkk authored Dec 29, 2024
2 parents f1cc5cd + dc90f43 commit 9b93e5a
Show file tree
Hide file tree
Showing 4,783 changed files with 693,655 additions and 137,357 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
23 changes: 12 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version: '1.22'
- name: golint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v6
with:
version: v1.54.1
version: v1.54
args: --timeout 5m
verify:
name: verify
runs-on: ubuntu-22.04
Expand All @@ -28,27 +29,27 @@ jobs:
working-directory: ${{ env.WORKSPACE }}
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ${{ env.WORKSPACE }}
- name: Install Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version: '1.22'
build:
name: build
needs: verify
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '1.20'
go-version: '1.22'
- name: Compile
run: make netctl

4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module github.com/kosmos.io/netdoctor

go 1.22.9
go 1.22.0

toolchain go1.22.9

require (
github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213
Expand Down
18 changes: 16 additions & 2 deletions pkg/utils/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,24 @@ func WaitPodReady(c kubernetes.Interface, namespace, selector string, timeout in

// waitPodReady Poll up to timeout seconds for pod to enter running state.
// Returns an error if the pod never enters the running state.
func waitPodReady(c kubernetes.Interface, namespaces, podName string, timeout time.Duration) error {
return wait.PollImmediate(time.Second, timeout, isPodReady(c, namespaces, podName))
func waitPodReady(c kubernetes.Interface, namespace string, podName string, timeout time.Duration) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()

err := wait.PollUntilContextTimeout(ctx, time.Second, timeout, false, func(ctx context.Context) (bool, error) {
return isPodReady(c, namespace, podName)()
})
if err != nil {
return err
}

return nil
}

//func waitPodReady(c kubernetes.Interface, namespaces, podName string, timeout time.Duration) error {
// return wait.PollImmediate(time.Second, timeout, isPodReady(c, namespaces, podName))
//}

func podStatus(pod *corev1.Pod) string {
for _, value := range pod.Status.ContainerStatuses {
if pod.Status.Phase == corev1.PodRunning {
Expand Down
1 change: 1 addition & 0 deletions vendor/github.com/NYTimes/gziphandler/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions vendor/github.com/NYTimes/gziphandler/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 75 additions & 0 deletions vendor/github.com/NYTimes/gziphandler/CODE_OF_CONDUCT.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions vendor/github.com/NYTimes/gziphandler/CONTRIBUTING.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9b93e5a

Please sign in to comment.