garden-io / garden

Automation for Kubernetes development and testing. Spin up production-like environments for development, testing, and CI on demand. Use the same configuration and workflows at every step of the process. Speed up your builds and test runs via shared result caching
https://garden.io
Mozilla Public License 2.0
3.39k stars 275 forks source link

Crash: highlight is not a function #5442

Open stefreak opened 12 months ago

stefreak commented 12 months ago

Crash report

Error message

Unable to resolve status for Deploy foo. It is likely missing or outdated. This can come up if the deployment has runtime dependencies that are not resolvable, i.e. not deployed or invalid.

and

Encountered an unexpected Garden error. This is likely a bug šŸ‚

You can help by reporting this on GitHub: https://github.com/garden-io/garden/issues/new?labels=bug,crash&template=CRASH.md&title=Crash%3A%20highlight%20is%20not%20a%20function

Please attach the following information to the bug report after making sure that the error message does not contain sensitive information:

TypeError: highlight is not a function
    at highlightYaml (file:///Users/steffen/Library/Application%20Support/io.garden.garden/1700246687-AJiCnyg.r/rollup/garden.mjs:214964:12)
    at renderData (file:///Users/steffen/Library/Application%20Support/io.garden.garden/1700246687-AJiCnyg.r/rollup/garden.mjs:215093:16)
    at file:///Users/steffen/Library/Application%20Support/io.garden.garden/1700246687-AJiCnyg.r/rollup/garden.mjs:215002:40
    at Array.map (<anonymous>)
    at combineRenders (file:///Users/steffen/Library/Application%20Support/io.garden.garden/1700246687-AJiCnyg.r/rollup/garden.mjs:215002:22)
    at formatForTerminal (file:///Users/steffen/Library/Application%20Support/io.garden.garden/1700246687-AJiCnyg.r/rollup/garden.mjs:215133:12)
    at TerminalWriter.write (file:///Users/steffen/Library/Application%20Support/io.garden.garden/1700246687-AJiCnyg.r/rollup/garden.mjs:215499:21)
    at RootLogger.log (file:///Users/steffen/Library/Application%20Support/io.garden.garden/1700246687-AJiCnyg.r/rollup/garden.mjs:309828:24)
    at CoreLog.log (file:///Users/steffen/Library/Application%20Support/io.garden.garden/1700246687-AJiCnyg.r/rollup/garden.mjs:215285:19)
    at CoreLog.info (file:///Users/steffen/Library/Application%20Support/io.garden.garden/1700246687-AJiCnyg.r/rollup/garden.mjs:215336:21)

See .garden/error.log for detailed error message

What did you do?

ran garden get status with this config:

# garden.yml
apiVersion: garden.io/v1
kind: Project
name: foo
environments:
  - name: local

---
kind: Build
type: exec
name: foo
spec:
  command: [echo, "hello world"]

---
kind: Deploy
type: exec
name: foo
spec:
  deployCommand: [echo, "${actions.build.foo.outputs.log}"]

---

kind: Test
type: exec
name: foo
dependencies:
 - deploy.foo
spec:
  command: [echo, "Success"]

Your environment

Frequency

Reproducable

Workaround

Downgrade to 0.13.19 until we released a fixed version

Additional context

stefreak commented 11 months ago

Only seems to happen with release binaries, so this seems to be an issue caused by rollup bundling.

vvagaytsev commented 11 months ago

We have a PR with the rollup version bump (#5518), but it does not fix the issue.