Skip to content

Commit

Permalink
Merge pull request #70 from Peefy/fix-cache-env-set
Browse files Browse the repository at this point in the history
fix: cache env set in the function code
  • Loading branch information
Peefy authored Apr 16, 2024
2 parents 8a2e214 + 81e9bbc commit 9976402
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 9976402

Please sign in to comment.