numaproj / numaflow

Kubernetes-native platform to run massively parallel data/streaming jobs
https://numaflow.numaproj.io
Apache License 2.0
1.01k stars 98 forks source link

Use yaml node tags to enforce NUMAFLOW_DEBUG string type #1742

Closed th0ger closed 1 month ago

th0ger commented 1 month ago

The repos are full of the following verbose templates:

containerTemplate:
  env:
    - name: NUMAFLOW_DEBUG
      value: "true" # DO NOT forget the double quotes!!!

Instead of the verbose comments, I suggest to use YAML node tags

      value: !!str "true"

This would also make the following valid:

      value: !!str true

Coverage:

$ grep -Rnw . -e 'value:[[:space:]]"true"'
./numaflow-go/pkg/sideinput/examples/simple_sideinput/README.md:69:            value: "true" # DO NOT forget the double quotes!!!
./numaflow-go/pkg/sideinput/examples/simple_sideinput/pipeline.yaml:29:            value: "true" # DO NOT forget the double quotes!!!
./numaflow-go/pkg/sideinput/examples/sideinput_function/README.md:71:            value: "true" # DO NOT forget the double quotes!!!
./numaflow/examples/7-reduce-sliding-window.yaml:13:            value: "true" # DO NOT forget the double quotes!!!
./numaflow/examples/7-reduce-sliding-window.yaml:20:            value: "true" # DO NOT forget the double quotes!!!
./numaflow/examples/7-reduce-sliding-window.yaml:47:            value: "true" # DO NOT forget the double quotes!!!
./numaflow/docs/development/debugging.md:24:            value: "true" # DO NOT forget the double quotes!!!
./numaflow/docs/development/debugging.md:49:            value: "true" # DO NOT forget the double quotes!!!
./numaflow/config/apps/redis/redis-minimal.yaml:69:              value: "true"
./numaflow/config/apps/kafka/kafka-minimal.yaml:83:              value: "true"
./numaflow/config/apps/kafka/kafka-minimal.yaml:85:              value: "true"
./numaflow/test/manifests/kustomization.yaml:22:          value: "true"
./numaflow/test/e2e/testdata/watermark.yaml:18:            value: "true" # DO NOT forget the double quotes!!!
./numaflow/test/e2e/testdata/watermark.yaml:27:            value: "true" # DO NOT forget the double quotes!!!
./numaflow/test/e2e/testdata/watermark.yaml:35:            value: "true" # DO NOT forget the double quotes!!!
./numaflow/test/e2e/testdata/watermark.yaml:44:            value: "true" # DO NOT forget the double quotes!!!
./numaflow-python/examples/sideinput/simple-sideinput/pipeline.yaml:29:            value: "true" # DO NOT forget the double quotes!!!
./numaflow-python/examples/sink/async_log/pipeline.yaml:28:                value: "true"
./numaflow-python/examples/sink/log/pipeline.yaml:28:                value: "true"
./numaflow-python/examples/reduce/counter/pipeline.yaml:25:              value: "true"
./numaflow-python/examples/map/flatmap/pipeline.yaml:21:              value: "true"
./numaflow-python/examples/map/flatmap/pipeline.yaml:32:            value: "true" # DO NOT forget the double quotes!!!
./numaflow-python/examples/map/multiproc_map/pipeline.yaml:21:              value: "true"
./numaflow-python/examples/map/multiproc_map/pipeline.yaml:34:            value: "true" # DO NOT forget the double quotes!!!
./numaflow-python/examples/mapstream/flatmap_stream/pipeline.yaml:27:              value: "true"
./numaflow-python/examples/mapstream/flatmap_stream/pipeline.yaml:40:            value: "true" # DO NOT forget the double quotes!!!
./numaflow-python/examples/reducestream/counter/pipeline.yaml:25:              value: "true"
./numaflow-python/examples/reducestream/sum/pipeline.yaml:25:              value: "true"

Message from the maintainers:

If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.