Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run: validate metadata #2739

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

mauriciovasquezbernal
Copy link
Member

Validate metadata before running the gadget


#2512 changed the way how the matadata was validated (all validation was almost removed). I think it's still a good idea to validate the whole metadata before processing the gadget and in the same place. This will allow to use the same logic to validate the metadata also when building the gadget.


A deeper discussion will be the role of the metadata now that we agreed to make the macros to define tracers and other mandatory in #2560. Perhaps things like MapName and StructName aren't needed anymore now that those are contained in the eBPF program itself?.

Any thoughts on this?

Signed-off-by: Mauricio Vásquez <mauriciov@microsoft.com>
Signed-off-by: Mauricio Vásquez <mauriciov@microsoft.com>
Signed-off-by: Mauricio Vásquez <mauriciov@microsoft.com>
Signed-off-by: Mauricio Vásquez <mauriciov@microsoft.com>
@blanquicet
Copy link
Member

blanquicet commented Apr 24, 2024

Perhaps things like MapName and StructName aren't needed anymore now that those are contained in the eBPF program itself?.

Yeah, the metadata file would have only the struct and eBPF params sections (btw, we can now drop the params defaultValue field). We don't need to associate the structs to the data sources anymore.

In other words, with the macros we define data sources and params, and how they will behave. With the metadata, we configure only the "style" and documentation things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants