Skip to content

Commit

Permalink
fix: cache env set in the function code
Browse files Browse the repository at this point in the history
Signed-off-by: peefy <xpf6677@163.com>
  • Loading branch information
Peefy committed Apr 16, 2024
1 parent 8a2e214 commit 81e9bbc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ env:
XPKG: xpkg.upbound.io/${{ github.repository}}

# The package version to push. The default is 0.0.0-gitsha.
XPKG_VERSION: v0.5.1
XPKG_VERSION: v0.5.2

jobs:
unit-test:
Expand Down
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
package main

import (
"os"

"github.com/alecthomas/kong"

"github.com/crossplane/function-sdk-go"
Expand All @@ -24,6 +26,9 @@ func (c *CLI) Run() error {
return err
}

// Walk around for #68: unset the kcl cache path env variable (the value is /tmp) to avoid the data competition.
os.Unsetenv("KCL_CACHE_PATH")

return function.Serve(&Function{log: log},
function.Listen(c.Network, c.Address),
function.MTLSCertificates(c.TLSCertsDir),
Expand Down

0 comments on commit 81e9bbc

Please sign in to comment.