Open Vishal1297 opened 4 months ago
@lkingland Can i look into this?
I forgot to mention that this is happening in WSL.
@lkingland Can i look into this?
Yes, please. I see Matej already set you as assignee 👍
After digging into this, I discovered that functions were initially referred to as "faas" in the Knative Func repository. However, everything was later renamed to "function" after pull request #210.
According to the error, the build process is attempting to execute code that requires a module named "function/faas". However, this path is missing a domain name and appears to be a source directory.
I'm not sure if there's any connection between these two points, but I couldn't find any explicit mention of the "function/faas" module in the Func repository.
Can someone elaborate over this?
@Sanket-0510 can you at least reproduce this issue? I do not recall running into this on Linux.
@matejvasek I am on linux, I tried reproducing this error but on my side the function was build successfully, no such error. @Vishal1297 can you verify this again, are you still facing this issue?
@matejvasek I am on linux, I tried reproducing this error but on my side the function was build successfully, no such error. @Vishal1297 can you verify this again, are you still facing this issue?
I faced this issue only once and I got error after doing a change in go module name (github.com/Vishal1297/function)
Hello, I am able to reproduce this issue.
Steps To Reproduce [OS: Linux]
Hi @Vishal1297 @Sanket-0510 , I ran into the same error today. Is it solved? I tried latest func from main, but still got same issue.
kn version
Version: v1.13.0
Build Date: 2024-01-24 16:48:59
Git Revision: 543522a3
Supported APIs:
* Serving
- serving.knative.dev/v1 (knative-serving v1.13.0)
* Eventing
- sources.knative.dev/v1 (knative-eventing v1.13.0)
- eventing.knative.dev/v1 (knative-eventing v1.13.0)
func version
v0.40.0-57-g8f3f718a
go version
go version go1.22.0 linux/amd64
Logs:
➜ bing-search-tool git:(master) func run
Building function image
Still building
Still building
Yes, still building
Don't give up on me
2024/03/15 18:15:11.835122 DEBUG: Pulling image ghcr.io/knative/builder-jammy-tiny:latest
latest: Pulling from knative/builder-jammy-tiny
Digest: sha256:1cb6a617b2f290cbc9ca1cb9c2c0504b896ddce88b8351aa4d8d71f0ba3551eb
Status: Image is up to date for ghcr.io/knative/builder-jammy-tiny:latest
2024/03/15 18:15:15.649143 DEBUG: CheckReadAccess succeeded for the run image index.docker.io/paketobuildpacks/run-jammy-tiny:latest
2024/03/15 18:15:15.649157 DEBUG: Selected run image index.docker.io/paketobuildpacks/run-jammy-tiny:latest
2024/03/15 18:15:15.649167 DEBUG: Pulling image index.docker.io/paketobuildpacks/run-jammy-tiny:latest
latest: Pulling from paketobuildpacks/run-jammy-tiny
Digest: sha256:8972e2b07e13266bd51d04289e2454f8ab50d94d0a8b2bc6ea705931ddf5fe85
Status: Image is up to date for paketobuildpacks/run-jammy-tiny:latest
2024/03/15 18:15:17.994305 DEBUG: Creating builder with the following buildpacks:
2024/03/15 18:15:17.994311 DEBUG: -> paketo-community/rust@0.35.0
2024/03/15 18:15:17.994311 DEBUG: -> paketo-buildpacks/procfile@5.6.4
2024/03/15 18:15:17.994312 DEBUG: -> paketo-buildpacks/syft@1.32.1
2024/03/15 18:15:17.994313 DEBUG: -> paketo-community/cargo@0.10.1
2024/03/15 18:15:17.994313 DEBUG: -> paketo-community/rust-dist@1.19.0
2024/03/15 18:15:17.994314 DEBUG: -> paketo-community/rustup@1.9.1
2024/03/15 18:15:17.994315 DEBUG: -> dev.knative-extensions.go@0.0.6
2024/03/15 18:15:17.994315 DEBUG: -> paketo-buildpacks/go@4.8.0
2024/03/15 18:15:17.994316 DEBUG: -> paketo-buildpacks/ca-certificates@3.6.8
2024/03/15 18:15:17.994317 DEBUG: -> paketo-buildpacks/environment-variables@4.5.7
2024/03/15 18:15:17.994317 DEBUG: -> paketo-buildpacks/git@1.0.8
2024/03/15 18:15:17.994320 DEBUG: -> paketo-buildpacks/go-build@2.2.1
2024/03/15 18:15:17.994321 DEBUG: -> paketo-buildpacks/go-dist@2.5.0
2024/03/15 18:15:17.994322 DEBUG: -> paketo-buildpacks/go-mod-vendor@1.0.29
2024/03/15 18:15:17.994322 DEBUG: -> paketo-buildpacks/image-labels@4.5.6
2024/03/15 18:15:17.994323 DEBUG: -> paketo-buildpacks/procfile@5.6.9
2024/03/15 18:15:17.994323 DEBUG: -> paketo-buildpacks/watchexec@2.9.0
2024/03/15 18:15:17.994324 DEBUG: -> paketo-buildpacks/java-native-image@9.0.0
2024/03/15 18:15:17.994325 DEBUG: -> paketo-buildpacks/bellsoft-liberica@10.5.3
2024/03/15 18:15:17.994326 DEBUG: -> paketo-buildpacks/ca-certificates@3.6.8
2024/03/15 18:15:17.994326 DEBUG: -> paketo-buildpacks/datadog@5.4.0
2024/03/15 18:15:17.994327 DEBUG: -> paketo-buildpacks/environment-variables@4.5.7
2024/03/15 18:15:17.994327 DEBUG: -> paketo-buildpacks/executable-jar@6.8.4
2024/03/15 18:15:17.994331 DEBUG: -> paketo-buildpacks/gradle@7.8.1
2024/03/15 18:15:17.994332 DEBUG: -> paketo-buildpacks/image-labels@4.5.6
2024/03/15 18:15:17.994332 DEBUG: -> paketo-buildpacks/leiningen@4.7.0
2024/03/15 18:15:17.994333 DEBUG: -> paketo-buildpacks/maven@6.15.13
2024/03/15 18:15:17.994334 DEBUG: -> paketo-buildpacks/native-image@5.12.8
2024/03/15 18:15:17.994334 DEBUG: -> paketo-buildpacks/procfile@5.6.9
2024/03/15 18:15:17.994335 DEBUG: -> paketo-buildpacks/quarkus@0.2.5
2024/03/15 18:15:17.994336 DEBUG: -> paketo-buildpacks/sbt@6.12.12
2024/03/15 18:15:17.994336 DEBUG: -> paketo-buildpacks/spring-boot@5.27.10
2024/03/15 18:15:17.994337 DEBUG: -> paketo-buildpacks/syft@1.45.0
2024/03/15 18:15:17.994337 DEBUG: -> paketo-buildpacks/upx@3.4.8
2024/03/15 18:15:17.994338 DEBUG: -> paketo-buildpacks/java@12.0.0
2024/03/15 18:15:17.994339 DEBUG: -> paketo-buildpacks/apache-tomcat@7.15.0
2024/03/15 18:15:17.994339 DEBUG: -> paketo-buildpacks/apache-tomee@1.8.1
2024/03/15 18:15:17.994340 DEBUG: -> paketo-buildpacks/azure-application-insights@5.17.4
2024/03/15 18:15:17.994341 DEBUG: -> paketo-buildpacks/bellsoft-liberica@10.5.3
2024/03/15 18:15:17.994345 DEBUG: -> paketo-buildpacks/ca-certificates@3.6.8
2024/03/15 18:15:17.994346 DEBUG: -> paketo-buildpacks/clojure-tools@2.8.15
2024/03/15 18:15:17.994347 DEBUG: -> paketo-buildpacks/datadog@5.4.0
2024/03/15 18:15:17.994347 DEBUG: -> paketo-buildpacks/dist-zip@5.6.9
2024/03/15 18:15:17.994348 DEBUG: -> paketo-buildpacks/encrypt-at-rest@4.5.15
2024/03/15 18:15:17.994349 DEBUG: -> paketo-buildpacks/environment-variables@4.5.7
2024/03/15 18:15:17.994349 DEBUG: -> paketo-buildpacks/executable-jar@6.8.4
2024/03/15 18:15:17.994350 DEBUG: -> paketo-buildpacks/google-stackdriver@9.0.0
2024/03/15 18:15:17.994351 DEBUG: -> paketo-buildpacks/gradle@7.8.1
2024/03/15 18:15:17.994351 DEBUG: -> paketo-buildpacks/image-labels@4.5.6
2024/03/15 18:15:17.994352 DEBUG: -> paketo-buildpacks/jattach@1.6.0
2024/03/15 18:15:17.994353 DEBUG: -> paketo-buildpacks/java-memory-assistant@1.4.10
2024/03/15 18:15:17.994353 DEBUG: -> paketo-buildpacks/leiningen@4.7.0
2024/03/15 18:15:17.994354 DEBUG: -> paketo-buildpacks/liberty@4.0.1
2024/03/15 18:15:17.994354 DEBUG: -> paketo-buildpacks/maven@6.15.13
2024/03/15 18:15:17.994355 DEBUG: -> paketo-buildpacks/node-engine@3.2.2
2024/03/15 18:15:17.994356 DEBUG: -> paketo-buildpacks/procfile@5.6.9
2024/03/15 18:15:17.994357 DEBUG: -> paketo-buildpacks/quarkus@0.2.5
2024/03/15 18:15:17.994358 DEBUG: -> paketo-buildpacks/sbt@6.12.12
2024/03/15 18:15:17.994358 DEBUG: -> paketo-buildpacks/spring-boot@5.27.10
2024/03/15 18:15:17.994359 DEBUG: -> paketo-buildpacks/syft@1.45.0
2024/03/15 18:15:17.994360 DEBUG: -> paketo-buildpacks/watchexec@2.9.0
2024/03/15 18:15:17.994360 DEBUG: -> paketo-buildpacks/yarn@1.3.2
2024/03/15 18:15:17.994361 DEBUG: -> paketo-buildpacks/procfile@5.6.9
2024/03/15 18:15:18.233208 DEBUG: Using build cache volume pack-cache-bing-search-tool_bing-search-tool_latest-0028ace14382.build
2024/03/15 18:15:18.233240 DEBUG: Running the creator on OS linux from image pack.local/builder/6468686d71796a6e7277:latest with:
2024/03/15 18:15:18.233241 DEBUG: Container Settings:
2024/03/15 18:15:18.233243 DEBUG: Args: /cnb/lifecycle/creator -daemon -launch-cache /launch-cache -app /workspace -cache-dir /cache -run-image index.docker.io/paketobuildpacks/run-jammy-tiny:latest -gid 0 -uid 0 localhost:5000/bing-search-tool/bing-search-tool:latest
2024/03/15 18:15:18.233244 DEBUG: System Envs: CNB_PLATFORM_API=0.12
2024/03/15 18:15:18.233245 DEBUG: Image: pack.local/builder/6468686d71796a6e7277:latest
2024/03/15 18:15:18.233246 DEBUG: User: root
2024/03/15 18:15:18.233250 DEBUG: Labels: map[author:pack]
2024/03/15 18:15:18.233251 DEBUG: Host Settings:
2024/03/15 18:15:18.233252 DEBUG: Binds: pack-cache-bing-search-tool_bing-search-tool_latest-0028ace14382.build:/cache /var/run/docker.sock:/var/run/docker.sock pack-cache-bing-search-tool_bing-search-tool_latest-0028ace14382.launch:/launch-cache pack-layers-hpxfrmbgax:/layers pack-app-exoodiquvg:/workspace
2024/03/15 18:15:18.233253 DEBUG: Network Mode: host
===> ANALYZING
Restoring data for SBOM from previous image
===> DETECTING
paketo-buildpacks/go-dist 2.5.0
dev.knative-extensions.go 0.0.6
===> RESTORING
Restoring metadata for "paketo-buildpacks/go-dist:go" from cache
Restoring metadata for "dev.knative-extensions.go:app" from app image
Restoring data for "paketo-buildpacks/go-dist:go" from cache
Restoring data for SBOM from cache
===> BUILDING
Paketo Buildpack for Go Distribution 2.5.0
Resolving Go version
Candidate version sources (in priority order):
<unknown> -> ""
Selected Go version (using <unknown>): 1.21.7
Executing build process
Installing Go 1.21.7
Completed in 38.742s
Generating SBOM for /layers/paketo-buildpacks_go-dist/go
Completed in 0s
> Knative Functions Go Buildpack
Fetching framework dependencies
go: malformed module path "function/faas": missing dot in first path element
ERROR: failed to build: exit status 1
Error: failed to build the function: executing lifecycle: failed with status code: 51
Also forget to mention that I'm running on Linux too, with :
bing-search-tool git:(master) lsb_release -a
No LSB modules are available.
Distributor ID: Linuxmint
Description: Linux Mint 21.3
Release: 21.3
Codename: virginia
➜ bing-search-tool git:(master) docker version
Client: Docker Engine - Community
Version: 25.0.3
API version: 1.44
Go version: go1.21.6
Git commit: 4debf41
Built: Tue Feb 6 21:13:09 2024
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 25.0.3
API version: 1.44 (minimum version 1.24)
Go version: go1.21.6
Git commit: f417435
Built: Tue Feb 6 21:13:09 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.28
GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb
runc:
Version: 1.1.12
GitCommit: v1.1.12-0-g51d5e94
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Hi @drriguz,
For me I modified module name in go.mod file. Try deleting the go.mod & go.sum file.
Run following commands
go mod init function
go mod tidy
module function
go 1.21.4
@Vishal1297 I think I find the cause: it must be module function
in go.mod, if you change it to any other module name, you got this error. However, it seems to be a bug.
@Sanket-0510 could you look at it again?
I'm new in Knative, and trying to run golang hello kn func example on my local.
After running the build command, I am getting a weird error - go: malformed module path "function/faas": missing dot in first path element
ENV
func.yaml
Logs