From 0174b05a2cc39971ee45fd92270cb268a918b57b Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Wed, 3 Jul 2024 07:24:28 -0700
Subject: [PATCH 1/4] build(deps): bump github.com/aws/aws-sdk-go-v2 from
1.30.0 to 1.30.1 (#1004)
Bumps
[github.com/aws/aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2)
from 1.30.0 to 1.30.1.
Commits
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/aws/aws-sdk-go-v2&package-manager=go_modules&previous-version=1.30.0&new-version=1.30.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
go.mod | 4 ++--
go.sum | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/go.mod b/go.mod
index e965b11e0..08d424631 100644
--- a/go.mod
+++ b/go.mod
@@ -3,7 +3,7 @@ module github.com/runfinch/finch
go 1.22.0
require (
- github.com/aws/aws-sdk-go-v2 v1.30.0
+ github.com/aws/aws-sdk-go-v2 v1.30.1
github.com/docker/cli v27.0.3+incompatible
github.com/docker/docker v27.0.3+incompatible
github.com/golang/mock v1.6.0
@@ -29,7 +29,7 @@ require (
)
require (
- github.com/aws/smithy-go v1.20.2 // indirect
+ github.com/aws/smithy-go v1.20.3 // indirect
github.com/containerd/containerd v1.7.16 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
diff --git a/go.sum b/go.sum
index 20352df24..6d513110e 100644
--- a/go.sum
+++ b/go.sum
@@ -1,9 +1,9 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
-github.com/aws/aws-sdk-go-v2 v1.30.0 h1:6qAwtzlfcTtcL8NHtbDQAqgM5s6NDipQTkPxyH/6kAA=
-github.com/aws/aws-sdk-go-v2 v1.30.0/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM=
-github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q=
-github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E=
+github.com/aws/aws-sdk-go-v2 v1.30.1 h1:4y/5Dvfrhd1MxRDD77SrfsDaj8kUkkljU7XE83NPV+o=
+github.com/aws/aws-sdk-go-v2 v1.30.1/go.mod h1:nIQjQVp5sfpQcTc9mPSr1B0PaWK5ByX9MOoDadSN4lc=
+github.com/aws/smithy-go v1.20.3 h1:ryHwveWzPV5BIof6fyDvor6V3iUL7nTfiTKXHiW05nE=
+github.com/aws/smithy-go v1.20.3/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
From d99977dbbce7f0d7c109976bf0502246d2b27bf1 Mon Sep 17 00:00:00 2001
From: Austin Vazquez <55906459+austinvazquez@users.noreply.github.com>
Date: Wed, 3 Jul 2024 07:53:27 -0700
Subject: [PATCH 2/4] ci: remove Homebrew release automation (#1010)
Issue #, if available:
The Homebrew release automation failed during the v1.2.1 release due to
Finch now added to the Homebrew autobump list.
*Description of changes:*
This change removes the Homebrew release workflow from the release
workflows. Finch has been added to the autobump list which means the
updates are now handled on the Homebrew side.
*Testing done:*
CI is successful
- [x] I've reviewed the guidance in CONTRIBUTING.md
#### License Acceptance
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
Signed-off-by: Austin Vazquez
---
.github/workflows/release-automation.yaml | 5 -
.github/workflows/release-homebrew.yaml | 293 ----------------------
2 files changed, 298 deletions(-)
delete mode 100644 .github/workflows/release-homebrew.yaml
diff --git a/.github/workflows/release-automation.yaml b/.github/workflows/release-automation.yaml
index 73fee8fa3..51e4e06fc 100644
--- a/.github/workflows/release-automation.yaml
+++ b/.github/workflows/release-automation.yaml
@@ -35,11 +35,6 @@ jobs:
with:
ref_name: ${{ needs.get-latest-tag.outputs.tag }}
- release-homebrew:
- needs: upload-pkg-and-dependency-source-code-to-release
- secrets: inherit
- uses: ./.github/workflows/release-homebrew.yaml
-
build-and-test-finch-msi:
needs: get-latest-tag
uses: ./.github/workflows/build-and-test-msi.yaml
diff --git a/.github/workflows/release-homebrew.yaml b/.github/workflows/release-homebrew.yaml
deleted file mode 100644
index f93d72f06..000000000
--- a/.github/workflows/release-homebrew.yaml
+++ /dev/null
@@ -1,293 +0,0 @@
-# "release" runner tag is to make target hosts deterministic for easy clean up.
-# TODO: Remove the "release" runner tag when installer tests are stable.
-name: Release Homebrew
-on:
- workflow_dispatch:
- workflow_call:
-
-jobs:
- get-latest-tag:
- name: Get the latest release tag
- runs-on: ubuntu-latest
- outputs:
- tag: ${{ steps.latesttag.outputs.tag }}
- version: ${{ steps.latestversion.outputs.version }}
- steps:
- - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- with:
- fetch-depth: 0
- - name: 'Get the latest tag'
- id: latesttag
- uses: "WyriHaximus/github-action-get-previous-tag@04e8485ecb6487243907e330d522ff60f02283ce" # v1.4.0
- - name: 'Convert tag to version'
- id: latestversion
- run: |
- version=${{ steps.latesttag.outputs.tag }}
- if [ -z $version ]; then
- echo ERROR: Failed to get the latest tag
- exit 1
- fi
- if [[ $version == v* ]]; then
- version="${version:1}"
- fi
- echo "version=$version" >> ${GITHUB_OUTPUT}
-
- # TODO: fix the arm64 test installer.
- # Currently the first time of calling any Finch command in arm64 hosts triggered by Github action will fail by
- # the error "Error: Process completed with exit code 137." So the arm64 job will fail.
- # We temporarily use follow-up manual steps to complete and clean up it.
- macos-arm64-test-installer:
- needs: get-latest-tag
- strategy:
- fail-fast: false
- matrix:
- os:
- [
- [self-hosted, macos, arm64, 11, release],
- [self-hosted, macos, arm64, 14, release],
- [self-hosted, macos, arm64, 13, release],
- ]
- runs-on: ${{ matrix.os }}
- timeout-minutes: 180
- env:
- FINCH_TAG: ${{ needs.get-latest-tag.outputs.tag }}
- FINCH_VERSION: ${{ needs.get-latest-tag.outputs.version }}
- steps:
- - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- with:
- ref: ${{ env.FINCH_TAG }}
- fetch-depth: 0
- persist-credentials: false
- submodules: true
- - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
- with:
- go-version-file: go.mod
- cache: true
- - name: Clean up previous files
- run: |
- sudo rm -rf /opt/finch
- sudo rm -rf ~/.finch
- if pgrep '^qemu-system'; then
- sudo pkill '^qemu-system'
- fi
- if pgrep '^socket_vmnet'; then
- sudo pkill '^socket_vmnet'
- fi
- cd $(brew --repo homebrew/cask)
- brew uninstall --cask ./Casks/f/finch.rb || true
- shell: zsh {0}
- - name: Set up Homebrew
- id: set-up-homebrew
- uses: Homebrew/actions/setup-homebrew@40a8596d17543401e57ee60f640c2a5df7c88904 # master
- - name: Bump local cask version
- run: |
- brew update-reset
- # disable the default behaviour of downloading JSON files from formulae.brew.sh for pacakge installation since Homebrew 4.0.0
- # Ref. https://brew.sh/2023/02/16/homebrew-4.0.0/
- export HOMEBREW_NO_INSTALL_FROM_API=1
- cd $(brew --repo homebrew/cask)
- echo "Update the local Finch cask with version $FINCH_VERSION"
- brew bump-cask-pr --write-only --version=$FINCH_VERSION finch
- shell: zsh {0}
- - name: Silently install
- run: |
- export HOMEBREW_NO_INSTALL_FROM_API=1
- cd $(brew --repo homebrew/cask)
- brew install --cask ./Casks/f/finch.rb
- shell: zsh {0}
- - name: Install Rosetta 2
- run: echo "A" | softwareupdate --install-rosetta || true
- - name: Build project
- run: |
- brew install lz4 automake autoconf libtool yq
- export PATH="/opt/homebrew/opt/libtool/libexec/gnubin:$PATH"
- make
- shell: zsh {0}
- - name: Multiple instances of Finch test
- run: |
- # start two Finch VM instances
- ./_output/bin/finch vm init
- finch vm init
- # start a container in each VM instance
- ./_output/bin/finch pull alpine
- finch pull alpine
- ./_output/bin/finch run --name test-ctr1 alpine
- finch run --name test-ctr2 alpine
- # check whether containers exist
- if ! ./_output/bin/finch ps -a | grep 'test-ctr1'; then
- echo "ERROR: The container test-ctr1 doesn't exist in the built finch VM"
- exit 1
- fi
- if ./_output/bin/finch ps -a | grep 'test-ctr2'; then
- echo "ERROR: The container test-ctr2 shoudn't exist in the built finch VM"
- exit 1
- fi
- if ! finch ps -a | grep 'test-ctr2'; then
- echo "ERROR: The container test-ctr2 doesn't exist in the installed finch VM"
- exit 1
- fi
- if finch ps -a | grep 'test-ctr1'; then
- echo "ERROR: The container test-ctr1 shoudn't exist in the installed finch VM"
- exit 1
- fi
- # clean up the VMs
- ./_output/bin/finch vm stop && ./_output/bin/finch vm remove
- finch vm stop && finch vm remove
- - name: Clean up multiple instance test
- run: |
- sudo rm -rf ./_output
- export HOMEBREW_NO_INSTALL_FROM_API=1
- cd $(brew --repo homebrew/cask)
- # Need to reinstall because there were errors on arm64 11.7 and arm64 12.6 hosts after running multiple instances tests,
- # that caused the VM initialization failure in the e2e test.
- # Example workflow run https://github.com/runfinch/finch/actions/runs/4367457552/jobs/7638794529
- brew reinstall --cask ./Casks/f/finch.rb
- shell: zsh {0}
- - name: Run e2e tests
- uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
- with:
- timeout_minutes: 180
- max_attempts: 3
- command: INSTALLED=true make test-e2e
- - name: Silently uninstall
- if: ${{ always() }}
- run: |
- cd $(brew --repo homebrew/cask)
- brew uninstall --zap --cask ./Casks/f/finch.rb
- if [ -d "/Applications/Finch" ]; then
- echo ERROR: Finch is not uninstalled
- exit 1
- fi
- shell: zsh {0}
- macos-amd64-test-installer:
- needs: get-latest-tag
- strategy:
- fail-fast: false
- matrix:
- os:
- [
- [self-hosted, macos, amd64, 11, release],
- [self-hosted, macos, amd64, 14, release],
- [self-hosted, macos, amd64, 13, release],
- ]
- runs-on: ${{ matrix.os }}
- timeout-minutes: 180
- env:
- FINCH_TAG: ${{ needs.get-latest-tag.outputs.tag }}
- FINCH_VERSION: ${{ needs.get-latest-tag.outputs.version }}
- steps:
- - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- with:
- ref: ${{ env.FINCH_TAG }}
- fetch-depth: 0
- persist-credentials: false
- submodules: true
- - uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
- with:
- go-version-file: go.mod
- cache: true
- - name: Clean up previous files
- run: |
- sudo rm -rf /opt/finch
- sudo rm -rf ~/.finch
- if pgrep '^qemu-system'; then
- sudo pkill '^qemu-system'
- fi
- if pgrep '^socket_vmnet'; then
- sudo pkill '^socket_vmnet'
- fi
- cd $(brew --repo homebrew/cask)
- brew uninstall --cask ./Casks/f/finch.rb || true
- shell: zsh {0}
- - name: Set up Homebrew
- id: set-up-homebrew
- uses: Homebrew/actions/setup-homebrew@40a8596d17543401e57ee60f640c2a5df7c88904 # master
- - name: Bump local cask version
- run: |
- brew update-reset
- export HOMEBREW_NO_INSTALL_FROM_API=1
- cd $(brew --repo homebrew/cask)
- echo "Update the local Finch cask with version $FINCH_VERSION"
- brew bump-cask-pr --write-only --version=$FINCH_VERSION finch
- shell: zsh {0}
- - name: Silently install
- run: |
- export HOMEBREW_NO_INSTALL_FROM_API=1
- cd $(brew --repo homebrew/cask)
- brew install --cask ./Casks/f/finch.rb
- shell: zsh {0}
- - name: Install Rosetta 2
- run: echo "A" | softwareupdate --install-rosetta || true
- - name: Build project
- run: |
- brew install lz4 automake autoconf libtool yq
- export PATH="/opt/homebrew/opt/libtool/libexec/gnubin:$PATH"
- make
- shell: zsh {0}
- - name: Multiple instances of Finch test
- run: |
- # start two Finch VM instances
- ./_output/bin/finch vm init
- finch vm init
- # start a container in each VM instance
- ./_output/bin/finch pull alpine
- finch pull alpine
- ./_output/bin/finch run --name test-ctr1 alpine
- finch run --name test-ctr2 alpine
- # check whether containers exist
- if ! ./_output/bin/finch ps -a | grep 'test-ctr1'; then
- echo "ERROR: The container test-ctr1 doesn't exist in the built finch VM"
- exit 1
- fi
- if ./_output/bin/finch ps -a | grep 'test-ctr2'; then
- echo "ERROR: The container test-ctr2 shoudn't exist in the built finch VM"
- exit 1
- fi
- if ! finch ps -a | grep 'test-ctr2'; then
- echo "ERROR: The container test-ctr2 doesn't exist in the installed finch VM"
- exit 1
- fi
- if finch ps -a | grep 'test-ctr1'; then
- echo "ERROR: The container test-ctr1 shoudn't exist in the installed finch VM"
- exit 1
- fi
- # clean up the VMs
- ./_output/bin/finch vm stop && ./_output/bin/finch vm remove
- finch vm stop && finch vm remove
- - name: Clean up multiple instance test
- run: |
- sudo rm -rf ./_output
- export HOMEBREW_NO_INSTALL_FROM_API=1
- cd $(brew --repo homebrew/cask)
- brew reinstall --cask ./Casks/f/finch.rb
- shell: zsh {0}
- - name: Run e2e tests
- uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
- with:
- timeout_minutes: 180
- max_attempts: 3
- command: INSTALLED=true make test-e2e
- - name: Silently uninstall
- if: ${{ always() }}
- run: |
- cd $(brew --repo homebrew/cask)
- brew uninstall --zap --cask ./Casks/f/finch.rb
- if [ -d "/Applications/Finch" ]; then
- echo ERROR: Finch is not uninstalled
- exit 1
- fi
- shell: zsh {0}
- pr-to-homebrew:
- needs: [get-latest-tag, macos-arm64-test-installer, macos-amd64-test-installer]
- runs-on: macos-latest
- steps:
- - name: Set up Homebrew
- id: set-up-homebrew
- uses: Homebrew/actions/setup-homebrew@40a8596d17543401e57ee60f640c2a5df7c88904 # master
- - name: Open a pull request to homebrwe-cask
- run: brew bump-cask-pr --version=${FINCH_VERSION} finch
- shell: zsh {0}
- env:
- FINCH_VERSION: ${{ needs.get-latest-tag.outputs.version }}
- HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
-
From e8d3e4c9e3432fd8c756c4843411cd006adb0ddd Mon Sep 17 00:00:00 2001
From: Austin Vazquez <55906459+austinvazquez@users.noreply.github.com>
Date: Wed, 3 Jul 2024 07:54:32 -0700
Subject: [PATCH 3/4] ci: drop macOS 11 runners in packager testing (#1011)
Issue #, if available:
https://github.com/runfinch/infrastructure/issues/649
*Description of changes:*
macOS 11 is EOL so packaging testing can be dropped to reduce macOS
runner costs for CI.
*Testing done:*
CI is successful
- [x] I've reviewed the guidance in CONTRIBUTING.md
#### License Acceptance
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
Signed-off-by: Austin Vazquez
---
.github/workflows/build-and-test-pkg.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/build-and-test-pkg.yaml b/.github/workflows/build-and-test-pkg.yaml
index c9b76a41e..1e5fe3f4c 100644
--- a/.github/workflows/build-and-test-pkg.yaml
+++ b/.github/workflows/build-and-test-pkg.yaml
@@ -56,7 +56,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- version: [11, 13, 14]
+ version: [13, 14]
needs:
- get-tag-name
- macos-aarch64-pkg-build
@@ -73,7 +73,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- version: [11, 13, 14]
+ version: [13, 14]
needs:
- get-tag-name
- macos-x86-64-pkg-build
From 7f5f13bd1e62162be5a385d0254424e8784414fa Mon Sep 17 00:00:00 2001
From: Austin Vazquez <55906459+austinvazquez@users.noreply.github.com>
Date: Wed, 3 Jul 2024 13:04:25 -0700
Subject: [PATCH 4/4] ci: apply WSL hanging workaround to MSI builder (#1012)
Issue #, if available:
The MSI builder workflow is stuck due to WSL hanging issue.
*Description of changes:*
This change applies the workaround for WSL hanging to the MSI builder
workflow.
*Testing done:*
CI is successful
- [x] I've reviewed the guidance in CONTRIBUTING.md
#### License Acceptance
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
Signed-off-by: Austin Vazquez
---
.github/workflows/build-and-test-msi.yaml | 6 ++++++
.github/workflows/ci.yaml | 3 +++
2 files changed, 9 insertions(+)
diff --git a/.github/workflows/build-and-test-msi.yaml b/.github/workflows/build-and-test-msi.yaml
index 71c7166a6..3889edf60 100644
--- a/.github/workflows/build-and-test-msi.yaml
+++ b/.github/workflows/build-and-test-msi.yaml
@@ -199,6 +199,9 @@ jobs:
aws-region: ${{ secrets.REGION }}
- name: Remove Finch VM
run: |
+ # We want these cleanup commands to always run, ignore errors so the step completes.
+ $ErrorActionPreference = 'Ignore'
+ taskkill /f /im wslservice.exe 2> nul || cmd /c "exit /b 0"
wsl --list --verbose
wsl --shutdown
wsl --unregister lima-finch
@@ -241,6 +244,9 @@ jobs:
make test-e2e-vm
- name: Remove Finch VM
run: |
+ # We want these cleanup commands to always run, ignore errors so the step completes.
+ $ErrorActionPreference = 'Ignore'
+ taskkill /f /im wslservice.exe 2> nul || cmd /c "exit /b 0"
wsl --list --verbose
wsl --shutdown
Start-Sleep -s 10
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index b2a917b1e..ce96740f1 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -240,6 +240,9 @@ jobs:
aws-region: ${{ secrets.REGION }}
- name: Remove Finch VM
run: |
+ # We want these cleanup commands to always run, ignore errors so the step completes.
+ $ErrorActionPreference = 'Ignore'
+ taskkill /f /im wslservice.exe 2> nul || cmd /c "exit /b 0"
wsl --list --verbose
wsl --shutdown
wsl --unregister lima-finch