Skip to content

Fix the build of the exec function tests on Unix - #4831

Merged
efiacor merged 1 commit into
kptdev:mainfrom
Nikshay1:fix/exec-unix-test-execerror
Oct 27, 2026
Merged

efiacor merged 1 commit into
kptdev:mainfrom
Nikshay1:fix/exec-unix-test-execerror

Conversation

@Nikshay1

@Nikshay1 Nikshay1 commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Description

On current main, the pkg/fn/runtime tests don't build on Linux and macOS:

pkg/fn/runtime/exec_unix_test.go:110:18: undefined: ExecError

#4800 added exec_unix_test.go, which uses ExecError from pkg/fn/runtime. Around the same time, #4822 moved ExecError to api/fnresult/v1. Each PR was green on its own. This PR changes that one reference to fnresultv1.ExecError. The import is already there.

Motivation

Any PR that changes code and is rebased onto main would fail build-test-docker and build-test-podman on this. The test is mine from #4800, so I wanted to fix it before it trips someone else. I think it went unnoticed because the Go workflow hasn't run on a push to main since 2025-09-10. I can open an issue about that if it's useful.

Testing

go vet ./pkg/fn/runtime/ and go test ./pkg/fn/runtime/ pass on this branch. On main, the package fails to build.

AI usage

I have used AI in the creation of this PR.

I have used the following AI tools:

  • Claude Code (Claude Opus 5.5) to find and write the fix
  • Codex (gpt-6.1-sol) to review the fix

kptdev#4822 moved ExecError to the fnresult API package, and kptdev#4800 added
exec_unix_test.go, which still uses runtime.ExecError.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Nikshay <nikshayyadav90@gmail.com>
@Nikshay1
Nikshay1 requested review from a team and a balanced review from Copilot October 27, 2026 15:20
@netlify

netlify Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for kptdocs ready!

Name Link
🔨 Latest commit 0d1f7f8
🔍 Latest deploy log https://app.netlify.com/projects/kptdocs/deploys/6ae0c13cde851cc922657570
😎 Deploy Preview https://deploy-preview-4831--kptdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The single-line correction matches the runtime’s returned error type and resolves the test compilation failure without changing behavior.

No open issues 🎉

What changed in this PR

Fixes the Unix exec-function test build failure caused by the relocation of ExecError to the API module in #4822.

Changes:

  • Uses fnresultv1.ExecError in the timeout test, preserving existing assertions and leaving production behavior unchanged.
File Description
pkg/​fn/​runtime/​exec_unix_test.go Qualifies the error type with its API package using the existing import.

Review effort: Balanced

@sonarqubecloud

Copy link
Copy Markdown

@efiacor
efiacor merged commit 2849aec into kptdev:main Oct 27, 2026
27 checks passed
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.

4 participants