Skip to content

refactor: extract shared func CLI download with checksum verification#132

Merged
creydr merged 1 commit into
functions-dev:mainfrom
creydr:refactor/extract-func-cli-download
May 11, 2026
Merged

refactor: extract shared func CLI download with checksum verification#132
creydr merged 1 commit into
functions-dev:mainfrom
creydr:refactor/extract-func-cli-download

Conversation

@creydr
Copy link
Copy Markdown
Collaborator

@creydr creydr commented May 11, 2026

Summary

  • Extracts download, SHA256 checksum verification, and atomic install logic from internal/funccli/manager.go into a reusable DownloadAndInstall() function in internal/funccli/download.go
  • The test utils (test/utils/func.go) now use the same robust download pipeline instead of a naive HTTP download, gaining checksum verification and atomic install
  • Fixes a CI flake where a cached func CLI binary lost its execute permission and caused fork/exec ... permission denied failures (observed in https://github.com/functions-dev/func-operator/actions/runs/25655429302/job/75302614248)
  • Adds unit tests for the new shared download function covering success, checksum mismatch, download failures, custom HTTP client, nil options, and context cancellation

Extract the download, checksum verification, and atomic install logic
from the funccli manager into a reusable DownloadAndInstall() function.
The test utils now use the same robust pipeline instead of a naive
HTTP download, fixing a CI flake where a cached binary lost its execute
permission.
@creydr creydr enabled auto-merge May 11, 2026 08:28
@creydr creydr added this pull request to the merge queue May 11, 2026
Merged via the queue into functions-dev:main with commit 7d2fb0d May 11, 2026
16 of 17 checks passed
@creydr creydr deleted the refactor/extract-func-cli-download branch May 11, 2026 10:37
@creydr
Copy link
Copy Markdown
Collaborator Author

creydr commented May 12, 2026

/cherry-pick release-0.2

@functions-dev-ci-bot
Copy link
Copy Markdown

Cherry-pick failed for release-0.2, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin release-0.2
git worktree add -d .worktree/cherry-pick-132-to-release-0.2 origin/release-0.2
cd .worktree/cherry-pick-132-to-release-0.2
git switch --create cherry-pick-132-to-release-0.2
git cherry-pick -x 7d2fb0dfe918a781daac7ee00bddebe4f4f675fb

@creydr
Copy link
Copy Markdown
Collaborator Author

creydr commented May 12, 2026

/cherry-pick release-0.3

@functions-dev-ci-bot
Copy link
Copy Markdown

Successfully created cherry-pick PR for release-0.3:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant