Skip to content

alloy validate throws error when livedebugging block is defined in config.alloy #3769

Closed
@carlos-lehmann

Description

@carlos-lehmann

What's wrong?

Hey there,

awesome that we got a validate cli recently... I ran it against our config.alloy and noticed, possibly, a bug with livedebugging:

root@0c10545b76af:/home/alloy# alloy validate config.alloy
Error: configmap.alloy:1:1: component "livedebugging" must have a label

1 | livedebugging {
  | ^^^^^^^^^^^^^
2 |     enabled = true

Error: configmap.alloy:1:1: cannot find the definition of component name "livedebugging"

1 | livedebugging {
  | ^^^^^^^^^^^^^
2 |     enabled = true

Error: validation failed

Steps to reproduce

  1. create a config.alloy with:
livedebugging {
	enabled = true
}
  1. docker run grafana/alloy:v1.9.0
  2. export ALLOY_CONTAINER=$(docker ps | grep alloy | awk '{print$1}')
  3. docker cp config.alloy $ALLOY_CONTAINER:/home/alloy/config.alloy
  4. docker exec -it $ALLOY_CONTAINER /bin/bash
  5. alloy validate /home/alloy/config.alloy

I also tried with --stability-level=experimental as I wasn't sure whether livedebugging is now GA:

alloy validate --stability.level=experimental config.alloy
Error: configmap.alloy:1:1: component "livedebugging" must have a label

1 | livedebugging {
  | ^^^^^^^^^^^^^
2 |     enabled = true

Error: configmap.alloy:1:1: cannot find the definition of component name "livedebugging"

1 | livedebugging {
  | ^^^^^^^^^^^^^
2 |     enabled = true

Error: validation failed

With the same result. After removing the livedebugging block the validation succeeded.

System information

irrelevant

Software version

v1.9.0

Configuration


Logs


Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions