Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/github.com/docker/dock…
Browse files Browse the repository at this point in the history
…er-26.1.5incompatible
  • Loading branch information
plyr4 committed Sep 20, 2024
2 parents cf7b077 + 0593c8f commit d20fd7d
Show file tree
Hide file tree
Showing 19 changed files with 269 additions and 272 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: install go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
# use version from go.mod file
go-version-file: 'go.mod'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: install go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
# use version from go.mod file
go-version-file: 'go.mod'
Expand All @@ -47,7 +47,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@23acc5c183826b7a8a97bce3cecc52db901f8251 # v3.25.10
uses: github/codeql-action/init@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -58,7 +58,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@23acc5c183826b7a8a97bce3cecc52db901f8251 # v3.25.10
uses: github/codeql-action/autobuild@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -72,4 +72,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@23acc5c183826b7a8a97bce3cecc52db901f8251 # v3.25.10
uses: github/codeql-action/analyze@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
2 changes: 1 addition & 1 deletion .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fetch-depth: 0

- name: install go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
# use version from go.mod file
go-version-file: 'go.mod'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fetch-depth: 0

- name: install go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
# use version from go.mod file
go-version-file: 'go.mod'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: install go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
# use version from go.mod file
go-version-file: 'go.mod'
Expand All @@ -37,7 +37,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: install go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
# use version from go.mod file
go-version-file: 'go.mod'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: install go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
# use version from go.mod file
go-version-file: 'go.mod'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: install go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
# use version from go.mod file
go-version-file: 'go.mod'
Expand Down
51 changes: 24 additions & 27 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,31 @@ on:
jobs:
validate:
runs-on: ubuntu-latest

steps:
- name: clone
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: clone
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: install go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true
check-latest: true
- name: install go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
# use version from go.mod file
go-version-file: "go.mod"
cache: true
check-latest: true

- name: validate
run: |
# Check that go mod tidy produces a zero diff; clean up any changes afterwards.
go mod tidy && git diff --exit-code; code=$?; git checkout -- .; (exit $code)
# Check that go vet ./... produces a zero diff; clean up any changes afterwards.
go vet ./... && git diff --exit-code; code=$?; git checkout -- .; (exit $code)
# Check that go fmt ./... produces a zero diff; clean up any changes afterwards.
go fmt ./... && git diff --exit-code; code=$?; git checkout -- .; (exit $code)
# Check that go fix ./... produces a zero diff; clean up any changes afterwards.
#
# Renable this after https://github.com/golang/go/commit/7fd62ba821b1044e8e4077df052b0a1232672d57
# has been released.
# go fix ./... && git diff --exit-code; code=$?; git checkout -- .; (exit $code)
- name: validate
run: |
# Check that go mod tidy produces a zero diff; clean up any changes afterwards.
go mod tidy && git diff --exit-code; code=$?; git checkout -- .; (exit $code)
# Check that go vet ./... produces a zero diff; clean up any changes afterwards.
go vet ./... && git diff --exit-code; code=$?; git checkout -- .; (exit $code)
# Check that go fmt ./... produces a zero diff; clean up any changes afterwards.
go fmt ./... && git diff --exit-code; code=$?; git checkout -- .; (exit $code)
# Check that go fix ./... produces a zero diff; clean up any changes afterwards.
go fix ./... && git diff --exit-code; code=$?; git checkout -- .; (exit $code)
- name: validate spec
run: |
sudo make spec-install
make spec
- name: validate spec
run: |
sudo make spec-install
make spec
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0

FROM alpine:3.20.1@sha256:b89d9c93e9ed3597455c90a0b88a8bbb5cb7188438f70953fede212a0c4394e0 as certs
FROM alpine:3.20.3@sha256:beefdbd8a1da6d2915566fde36db9db0b524eb737fc57cd1367effd16dc0d06d as certs

RUN apk add --update --no-cache ca-certificates

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-alpine
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: Apache-2.0

FROM alpine:3.20.1@sha256:b89d9c93e9ed3597455c90a0b88a8bbb5cb7188438f70953fede212a0c4394e0
FROM alpine:3.20.3@sha256:beefdbd8a1da6d2915566fde36db9db0b524eb737fc57cd1367effd16dc0d06d

RUN apk add --update --no-cache ca-certificates

Expand Down
16 changes: 13 additions & 3 deletions cmd/vela-worker/operate.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,19 @@ func (w *Worker) operate(ctx context.Context) error {

// spawn goroutine for phoning home
executors.Go(func() error {
// five second ticker for signal handling
ticker := time.NewTicker(5 * time.Second)
defer ticker.Stop()

// initialize timer for check-in
timer := time.After(0)

for {
select {
case <-gctx.Done():
logrus.Info("completed looping on worker registration")
return nil
default:
case <-timer:
// check in attempt loop
for {
// register or update the worker
Expand Down Expand Up @@ -145,9 +152,12 @@ func (w *Worker) operate(ctx context.Context) error {
return err
}

// sleep for the configured time
time.Sleep(w.Config.CheckIn)
// set timer to next check in
timer = time.After(w.Config.CheckIn)
}

// five second ticker
<-ticker.C
}
})

Expand Down
12 changes: 6 additions & 6 deletions executor/linux/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func TestLinux_CreateBuild(t *testing.T) {
Duplicate().
WithBuild(_build).
WithRepo(_build.GetRepo()).
Compile(test.pipeline)
Compile(context.Background(), test.pipeline)
if err != nil {
t.Errorf("unable to compile %s pipeline %s: %v", test.name, test.pipeline, err)
}
Expand Down Expand Up @@ -325,7 +325,7 @@ func TestLinux_PlanBuild(t *testing.T) {
Duplicate().
WithBuild(_build).
WithRepo(_build.GetRepo()).
Compile(test.pipeline)
Compile(context.Background(), test.pipeline)
if err != nil {
t.Errorf("unable to compile %s pipeline %s: %v", test.name, test.pipeline, err)
}
Expand Down Expand Up @@ -608,7 +608,7 @@ func TestLinux_AssembleBuild(t *testing.T) {
Duplicate().
WithBuild(_build).
WithRepo(_build.GetRepo()).
Compile(test.pipeline)
Compile(context.Background(), test.pipeline)
if err != nil {
t.Errorf("unable to compile %s pipeline %s: %v", test.name, test.pipeline, err)
}
Expand Down Expand Up @@ -843,7 +843,7 @@ func TestLinux_ExecBuild(t *testing.T) {
Duplicate().
WithBuild(_build).
WithRepo(_build.GetRepo()).
Compile(test.pipeline)
Compile(context.Background(), test.pipeline)
if err != nil {
t.Errorf("unable to compile %s pipeline %s: %v", test.name, test.pipeline, err)
}
Expand Down Expand Up @@ -1486,7 +1486,7 @@ func TestLinux_StreamBuild(t *testing.T) {
Duplicate().
WithBuild(_build).
WithRepo(_build.GetRepo()).
Compile(test.pipeline)
Compile(context.Background(), test.pipeline)
if err != nil {
t.Errorf("unable to compile %s pipeline %s: %v", test.name, test.pipeline, err)
}
Expand Down Expand Up @@ -1760,7 +1760,7 @@ func TestLinux_DestroyBuild(t *testing.T) {
Duplicate().
WithBuild(_build).
WithRepo(_build.GetRepo()).
Compile(test.pipeline)
Compile(context.Background(), test.pipeline)
if err != nil {
t.Errorf("unable to compile %s pipeline %s: %v", test.name, test.pipeline, err)
}
Expand Down
2 changes: 1 addition & 1 deletion executor/linux/outputs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ func TestLinux_Outputs_exec(t *testing.T) {
WithBuild(_build).
WithRepo(_build.GetRepo()).
WithUser(_build.GetRepo().GetOwner()).
Compile(file)
Compile(context.Background(), file)
if err != nil {
t.Errorf("unable to compile pipeline %s: %v", test.pipeline, err)
}
Expand Down
2 changes: 1 addition & 1 deletion executor/linux/secret_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ func TestLinux_Secret_exec(t *testing.T) {
WithBuild(_build).
WithRepo(_build.GetRepo()).
WithUser(_build.GetRepo().GetOwner()).
Compile(file)
Compile(context.Background(), file)
if err != nil {
t.Errorf("unable to compile pipeline %s: %v", test.pipeline, err)
}
Expand Down
2 changes: 1 addition & 1 deletion executor/linux/stage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestLinux_CreateStage(t *testing.T) {
WithBuild(_build).
WithRepo(_build.GetRepo()).
WithUser(_build.GetRepo().GetOwner()).
Compile(_file)
Compile(context.Background(), _file)
if err != nil {
t.Errorf("unable to compile pipeline %s: %v", _file, err)
}
Expand Down
12 changes: 6 additions & 6 deletions executor/local/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func TestLocal_CreateBuild(t *testing.T) {
WithRepo(_build.GetRepo()).
WithLocal(true).
WithUser(_build.GetRepo().GetOwner()).
Compile(test.pipeline)
Compile(context.Background(), test.pipeline)
if err != nil {
t.Errorf("unable to compile pipeline %s: %v", test.pipeline, err)
}
Expand Down Expand Up @@ -143,7 +143,7 @@ func TestLocal_PlanBuild(t *testing.T) {
WithRepo(_build.GetRepo()).
WithLocal(true).
WithUser(_build.GetRepo().GetOwner()).
Compile(test.pipeline)
Compile(context.Background(), test.pipeline)
if err != nil {
t.Errorf("unable to compile pipeline %s: %v", test.pipeline, err)
}
Expand Down Expand Up @@ -261,7 +261,7 @@ func TestLocal_AssembleBuild(t *testing.T) {
WithRepo(_build.GetRepo()).
WithLocal(true).
WithUser(_build.GetRepo().GetOwner()).
Compile(test.pipeline)
Compile(context.Background(), test.pipeline)
if err != nil {
t.Errorf("unable to compile pipeline %s: %v", test.pipeline, err)
}
Expand Down Expand Up @@ -365,7 +365,7 @@ func TestLocal_ExecBuild(t *testing.T) {
WithRepo(_build.GetRepo()).
WithLocal(true).
WithUser(_build.GetRepo().GetOwner()).
Compile(test.pipeline)
Compile(context.Background(), test.pipeline)
if err != nil {
t.Errorf("unable to compile pipeline %s: %v", test.pipeline, err)
}
Expand Down Expand Up @@ -561,7 +561,7 @@ func TestLocal_StreamBuild(t *testing.T) {
WithRepo(_build.GetRepo()).
WithLocal(true).
WithUser(_build.GetRepo().GetOwner()).
Compile(test.pipeline)
Compile(context.Background(), test.pipeline)
if err != nil {
t.Errorf("unable to compile pipeline %s: %v", test.pipeline, err)
}
Expand Down Expand Up @@ -682,7 +682,7 @@ func TestLocal_DestroyBuild(t *testing.T) {
WithRepo(_build.GetRepo()).
WithLocal(true).
WithUser(_build.GetRepo().GetOwner()).
Compile(test.pipeline)
Compile(context.Background(), test.pipeline)
if err != nil {
t.Errorf("unable to compile pipeline %s: %v", test.pipeline, err)
}
Expand Down
2 changes: 1 addition & 1 deletion executor/local/stage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestLocal_CreateStage(t *testing.T) {
WithRepo(_build.GetRepo()).
WithLocal(true).
WithUser(_build.GetRepo().GetOwner()).
Compile(_file)
Compile(context.Background(), _file)
if err != nil {
t.Errorf("unable to compile pipeline %s: %v", _file, err)
}
Expand Down
Loading

0 comments on commit d20fd7d

Please sign in to comment.