Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kcl v0.10.10 is failing to start #206

Open
fraenkel opened this issue Dec 10, 2024 · 17 comments
Open

kcl v0.10.10 is failing to start #206

fraenkel opened this issue Dec 10, 2024 · 17 comments
Assignees
Labels
bug Something isn't working

Comments

@fraenkel
Copy link
Contributor

What happened?

Upgrading to 0.10.10

{"level":"info","ts":1733853420.7700005,"caller":"fn/fn.go:37","msg":"Running Function","tag":""}
{"level":"info","ts":1733853420.7716818,"caller":"fn/fn.go:37","msg":"Running Function","tag":""}
{"level":"info","ts":1733853420.7729983,"caller":"fn/fn.go:37","msg":"Running Function","tag":""}
2024/12/10 17:57:00 failed to write file:  /tmp/kcl.mod open /tmp/kcl.mod: permission denied

How can we reproduce it?

Just switched from 0.10.8 to 0.10.10

What environment did it happen in?

Function version: 0.10.10

I see there was a previous issue which hit a similar issue over the KCL_CACHE_PATH.
The current image has KCL_CACHE_PATH=/tmp

@fraenkel fraenkel added the bug Something isn't working label Dec 10, 2024
@fraenkel
Copy link
Contributor Author

fraenkel commented Dec 10, 2024

So the v0.10.10 images have files in /tmp whereas they didn't before.

root@2066a6833416:/# ls /tmp
kcl.mod  kcl.mod.lock

@irizzant
Copy link

Hitting the same here, v0.10.9 works fine

@vfarcic
Copy link

vfarcic commented Dec 11, 2024

Hitting the same as well.

@dmvariphy
Copy link

dmvariphy commented Dec 11, 2024

We're seeing this as well with v0.10.10.

EDIT: We did see the v0.10.10 function go ready after deleting a Configuration package - not sure if that had anything to do with it, or if the issue is intermittent. The function had been restarting for almost an hour before that though.

EDIT2: If it helps at all, we see the issue when running kind on wsl, but not when running kind on linux.

@Peefy
Copy link
Collaborator

Peefy commented Dec 12, 2024

cc @zong-zhe @He1pa

@vfarcic
Copy link

vfarcic commented Dec 13, 2024

Can you remove the latest release until this is resolved? Otherwise, it'll fail for anyone using >= as the dependency version which results in the latest release of the function being deployed.

@zong-zhe
Copy link
Collaborator

Can you remove the latest release until this is resolved? Otherwise, it'll fail for anyone using >= as the dependency version which results in the latest release of the function being deployed.

Sorry😞, I'm on my way home. This release will be removed soon when I get home.

@zong-zhe
Copy link
Collaborator

Hi @vfarcic, @fraenkel, @irizzant, @dmvariphy

I've rolled back version 0.10.10 to a pre-release to prevent this issue from blocking your work.

@dmvariphy
Copy link

Thanks for doing that @zong-zhe!

@dzmoore
Copy link

dzmoore commented Dec 16, 2024

Hey @zong-zhe, I'm still pulling xpkg.upbound.io/crossplane-contrib/function-kcl:v0.10.10 with a >= dependency in my crossplane.yaml file (I think this is what @vfarcic was referring to in #206 (comment)). e.g.

apiVersion: meta.pkg.crossplane.io/v1
kind: Configuration
# ...
spec:
  # ...
  dependsOn:
   # ...
    - function: xpkg.upbound.io/crossplane-contrib/function-kcl
      version: ">=v0.9.0"
$ k logs -n crossplane-system -l pkg.crossplane.io/function=crossplane-contrib-function-kcl
{"level":"info","ts":1734388399.8846216,"caller":"fn/fn.go:37","msg":"Running Function","tag":""}
2024/12/16 22:33:19 failed to write file:  /tmp/kcl.mod open /tmp/kcl.mod: permission denied

$ k get functions.pkg.crossplane.io crossplane-contrib-function-kcl 
NAME                              INSTALLED   HEALTHY   PACKAGE                                                    AGE
crossplane-contrib-function-kcl   True        False     xpkg.upbound.io/crossplane-contrib/function-kcl:v0.10.10   6m21s

Is there any chance that the package is still in the registry (maybe needs to be removed), or is there maybe a cache I need to clear locally?

I can work around it for now by manually changing crossplane.yaml and re-creating my Kind cluster, but just wanted to mention we're running into this.

@vfarcic
Copy link

vfarcic commented Dec 16, 2024

Using >= as a dependency version is common in Crossplane meaning that many users of KCL functions are potentially affected. Please remove the latest release from the marketplace as a hot-fix.

@irizzant
Copy link

I agree, my renovate bot still shows 0.10.10 as available

@zong-zhe
Copy link
Collaborator

zong-zhe commented Dec 17, 2024

Hi @irizzant, @vfarcic, @dzmoore, @fraenkel, @dmvariphy

The 0.10.10 will be removed soon.

@vfarcic
Copy link

vfarcic commented Dec 17, 2024

It works. Thanks a ton @zong-zhe.

@mproffitt
Copy link

Pulling v0.10.10 has caused issues when using OCI images and I will also presume github due to missing CA certificates.

This is a regression of #191 which was fixed in 0.10.10 and will affect some users.

Side question - is it worth pinning this issue for visibility until a new release is out that replaces .10 or is a fix expected soon?

@zong-zhe
Copy link
Collaborator

Pulling v0.10.10 has caused issues when using OCI images and I will also presume github due to missing CA certificates.

This is a regression of #191 which was fixed in 0.10.10 and will affect some users.

Side question - is it worth pinning this issue for visibility until a new release is out that replaces .10 or is a fix expected soon?

Hi @mproffitt

We have found the issue and are working on fixing it for 0.10.10; soon, 0.10.10 will be re-released.

@zong-zhe
Copy link
Collaborator

Hi @fraenkel @irizzant @vfarcic @dmvariphy @dzmoore @mproffitt 😄

I republished 0.10.10. If there is any problem, @ me here, thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants