Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/github.com/gofrs/flock…
Browse files Browse the repository at this point in the history
…-0.12.1
  • Loading branch information
schristoff authored Sep 27, 2024
2 parents 42e0dc1 + fce521d commit 00904e6
Show file tree
Hide file tree
Showing 25 changed files with 51 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-rust-injector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Checkout Repo"
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Install tools
uses: ./.github/actions/install-tools
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-go-mod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Setup golang
uses: ./.github/actions/golang
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Dependency Review
uses: actions/dependency-review-action@5a2ce3f5b92ee19cbb1541a4984c76d921601d7c # v4.3.4
2 changes: 1 addition & 1 deletion .github/workflows/nightly-ecr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Setup golang
uses: ./.github/actions/golang
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-eks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Setup golang
uses: ./.github/actions/golang
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-application-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
packages: write
steps:
- name: "Checkout Repo"
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Auth with AWS
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
steps:
# Checkout the repo and setup the tooling for this job
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0

Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
steps:
# Checkout the repo and setup the tooling for this job
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0

Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
steps:
# Checkout the repo and setup the tooling for this job
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scan-codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Setup golang
uses: ./.github/actions/golang
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scan-docs-and-schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Setup golang
uses: ./.github/actions/golang
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scan-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Run golangci-lint
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- name: "Checkout code"
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
persist-credentials: false

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-bigbang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Setup golang
uses: ./.github/actions/golang
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
needs: build-bigbang
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Download build artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Setup golang
uses: ./.github/actions/golang
Expand All @@ -58,7 +58,7 @@ jobs:
needs: build-e2e
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Download build artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
needs: build-e2e
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Download build artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
needs: build-e2e
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Download build artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
needs: build-e2e
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Download build artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
Expand Down Expand Up @@ -217,7 +217,7 @@ jobs:
needs: build-e2e
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Download build artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-external.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Setup golang
uses: ./.github/actions/golang
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-import.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Setup Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
working-directory: ./site
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Setup Node.js
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Setup golang
uses: ./.github/actions/golang
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Setup golang
uses: ./.github/actions/golang
Expand All @@ -57,7 +57,7 @@ jobs:
needs: build-upgrade
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Download build artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Run Windows unit tests
run: make test-unit
Expand All @@ -44,7 +44,7 @@ jobs:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Build Windows binary and zarf packages
uses: ./.github/actions/packages
Expand Down
16 changes: 8 additions & 8 deletions src/internal/packager/helm/chart.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ func (h *Helm) InstallOrUpgradeChart(ctx context.Context) (types.ConnectStrings,
// No prior release, try to install it.
spinner.Updatef("Attempting chart installation")

_, err = h.installChart(postRender)
_, err = h.installChart(ctx, postRender)
} else if histErr == nil && len(releases) > 0 {
// Otherwise, there is a prior release so upgrade it.
spinner.Updatef("Attempting chart upgrade")

lastRelease := releases[len(releases)-1]

_, err = h.upgradeChart(lastRelease, postRender)
_, err = h.upgradeChart(ctx, lastRelease, postRender)
} else {
// 😭 things aren't working
return fmt.Errorf("unable to verify the chart installation status: %w", histErr)
Expand Down Expand Up @@ -172,7 +172,7 @@ func (h *Helm) TemplateChart(ctx context.Context) (manifest string, chartValues
}

// Perform the loadedChart installation.
templatedChart, err := client.Run(loadedChart, chartValues)
templatedChart, err := client.RunWithContext(ctx, loadedChart, chartValues)
if err != nil {
return "", nil, fmt.Errorf("error generating helm chart template: %w", err)
}
Expand Down Expand Up @@ -241,7 +241,7 @@ func (h *Helm) UpdateReleaseValues(ctx context.Context, updatedValues map[string
client.Wait = true

// Perform the loadedChart upgrade.
_, err = client.Run(h.chart.ReleaseName, lastRelease.Chart, updatedValues)
_, err = client.RunWithContext(ctx, h.chart.ReleaseName, lastRelease.Chart, updatedValues)
if err != nil {
return err
}
Expand All @@ -254,7 +254,7 @@ func (h *Helm) UpdateReleaseValues(ctx context.Context, updatedValues map[string
return fmt.Errorf("unable to find the %s helm release", h.chart.ReleaseName)
}

func (h *Helm) installChart(postRender *renderer) (*release.Release, error) {
func (h *Helm) installChart(ctx context.Context, postRender *renderer) (*release.Release, error) {
// Bind the helm action.
client := action.NewInstall(h.actionConfig)

Expand Down Expand Up @@ -282,10 +282,10 @@ func (h *Helm) installChart(postRender *renderer) (*release.Release, error) {
}

// Perform the loadedChart installation.
return client.Run(loadedChart, chartValues)
return client.RunWithContext(ctx, loadedChart, chartValues)
}

func (h *Helm) upgradeChart(lastRelease *release.Release, postRender *renderer) (*release.Release, error) {
func (h *Helm) upgradeChart(ctx context.Context, lastRelease *release.Release, postRender *renderer) (*release.Release, error) {
// Migrate any deprecated APIs (if applicable)
err := h.migrateDeprecatedAPIs(lastRelease)
if err != nil {
Expand Down Expand Up @@ -315,7 +315,7 @@ func (h *Helm) upgradeChart(lastRelease *release.Release, postRender *renderer)
}

// Perform the loadedChart upgrade.
return client.Run(h.chart.ReleaseName, loadedChart, chartValues)
return client.RunWithContext(ctx, h.chart.ReleaseName, loadedChart, chartValues)
}

func (h *Helm) rollbackChart(name string, version int) error {
Expand Down
9 changes: 4 additions & 5 deletions src/test/external/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package external

import (
"errors"
"path"
"path/filepath"
"strings"
Expand All @@ -31,17 +32,15 @@ func createPodInfoPackageWithInsecureSources(t *testing.T, temp string) {
exec.CmdWithPrint(zarfBinPath, "package", "create", temp, "--confirm", "--output", temp)
}

func verifyWaitSuccess(t *testing.T, timeoutMinutes time.Duration, cmd string, args []string, condition string, onTimeout string) bool {
func waitForCondition(t *testing.T, timeoutMinutes time.Duration, cmd string, args []string, condition string) error {
timeout := time.After(timeoutMinutes * time.Minute)
for {
// delay check 3 seconds
time.Sleep(3 * time.Second)
select {
// on timeout abort
case <-timeout:
t.Error(onTimeout)

return false
return errors.New("timed out waiting for condition")

// after delay, try running
default:
Expand All @@ -52,7 +51,7 @@ func verifyWaitSuccess(t *testing.T, timeoutMinutes time.Duration, cmd string, a
t.Log(string(stdOut), err)
}
if strings.Contains(string(stdOut), condition) {
return true
return nil
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/test/external/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ services:
ports:
- "3000:3000"
- "222:22"
healthcheck:
test: ["CMD", "curl", "-f", "http://gitea.localhost:3000/api/healthz"]
interval: 5s
timeout: 5s
retries: 20
init:
image: gitea/gitea:1.18.1
container_name: gitea.init
Expand Down
7 changes: 3 additions & 4 deletions src/test/external/ext_out_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,9 @@ func (suite *ExtOutClusterTestSuite) SetupSuite() {
suite.NoError(err, "unable to install the gitea-server")

// Wait for gitea to deploy properly
giteaArgs := []string{"inspect", "-f", "{{.State.Status}}", "gitea.init"}
giteaErrStr := "unable to verify the gitea container installed successfully"
success := verifyWaitSuccess(suite.T(), 2, "docker", giteaArgs, "exited", giteaErrStr)
suite.True(success, giteaErrStr)
giteaArgs := []string{"inspect", "-f", "{{.State.Health.Status}}", "gitea.localhost"}
err = waitForCondition(suite.T(), 2, "docker", giteaArgs, "healthy")
suite.NoError(err)

// Connect gitea to the k3d network
err = exec.CmdWithPrint("docker", "network", "connect", "--ip", giteaIP, network, giteaHost)
Expand Down
Loading

0 comments on commit 00904e6

Please sign in to comment.