Starship icon indicating copy to clipboard operation
Starship copied to clipboard

[RFC] New consistent file naming for module directory

Open nascentcore-eng opened this issue 1 year ago • 3 comments

What's the motivation? Is it related to a problem? Please describe the background and rationale. Currently an eBPF+WASM module's files do not have consistent naming inside the module's directory. For example, ddos_event's directory looks as below: image

This creates confusion for readers, and likely causes actual engineering toils in the near future when we want to provide more client-side tooling for Starship users.

Describe the solution you'd like The new naming schema:

  • eBPF source file: <module-name>.<eBPF framework>.<source code file type>; for ddos_event, the module name is ddos_event, the eBPF framework is bcc, the source code is written in c, so the name should be ddos_event.bcc.c.
  • eBPF binary file: <module-name>.bpf ddos_event.wasm.
  • WASM source file: <module-name>.wasm.<source code file type>
  • WASM binary file: <module-name>.wasm; as the frontend languages used for compiling WASM binary files are all standard high-level languages like c/c++/go/rust, there is no need to have the framework component; ddos_event's wasm file is named
  • Manifest: <module-name>.json

Describe alternatives you've considered

  • BCC's eBPF source file named with .bcc suffix, that is not as intuitive as using .bcc.c.
  • Manifest can be in yaml format

Additional context, for example, Kubernetes versions, Kernel versions etc. This change potentially helps implementing a new module distribution mechanism in https://github.com/tricorder-observability/Starship/issues/68; as a consistent file naming schema allows easier automation in building distributed packages.

nascentcore-eng avatar Mar 26 '23 03:03 nascentcore-eng

An example is in https://github.com/tricorder-observability/Starship/tree/main/modules/sample_json

nascentcore-eng avatar Mar 26 '23 03:03 nascentcore-eng

The Web UI and CLI would need to be updated to take advantage of this new naming scheme.

nascentcore-eng avatar Mar 26 '23 03:03 nascentcore-eng

@feuyeux @owl-ltt @zhoujie16 WDYT?

nascentcore-eng avatar Mar 26 '23 03:03 nascentcore-eng