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

gocollector tests: Adjust CI to tell us when generated files were manually changed + refactor? #1575

Open
ArthurSens opened this issue Aug 9, 2024 · 7 comments
Assignees

Comments

@ArthurSens
Copy link
Member

While working on #1559, we noticed that the generated files for the go collector can be manually changed and CI won't block the merge.

Let's investigate this and adjust :)

@bwplotka
Copy link
Member

bwplotka commented Aug 9, 2024

Yup, CI is NOT running this generative script.

We only check if metrics given by the runtime is what we expect in those generated _test files and then complain with instruction to potentially rerun that script. This helps us to figure out what metrics changed across Go version. That's the main goal of those files.

You might be right some CI check that would rerun this script and point mismatch on TOP of our existing test would let us know if someone shoveled some custom manual code to those files.

Do you mind adding clear acceptance criteria to description?

@bwplotka
Copy link
Member

bwplotka commented Aug 14, 2024

This might need proper refactor e.g. have one generated set in internals and separate logic to filter those for test purposes (it's just regex)

@bwplotka bwplotka changed the title Adjust CI to tell us when generated files were manually changed. gocollector tests: Adjust CI to tell us when generated files were manually changed + refactor? Aug 20, 2024
@bwplotka
Copy link
Member

Ideally I would also have only one script that generates both package files 🤔

@bwplotka
Copy link
Member

Acceptance Criteria

@augustodsgv
Copy link

Hello guys, I would like to start contributing to the project and this issue was recommend to me. Can i start working on this?

@ArthurSens
Copy link
Member Author

Sure thing! Is the discussion here enough for you to start working, or do you feel like you need extra guidance?

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

No branches or pull requests

3 participants