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

Add V2 support. #11

Merged
merged 9 commits into from
Jan 13, 2025
Merged

Add V2 support. #11

merged 9 commits into from
Jan 13, 2025

Conversation

mattdurham
Copy link
Collaborator

@mattdurham mattdurham commented Jan 13, 2025

This adds V2 support and makes it the default for walqueue. I did not rename the v1 serialization files/vars since I wanted that to be as locked down and immutable as possible. I was going to remove the marhsal bit but its used by benchmarking.

func TestV2E2E(b *testing.T) {
// BenchmarkV2E2E-20 2504 451484 ns/op
dir := b.TempDir()
func TestV2E2E(t *testing.T) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a benchmark but it should be a test.

@mattdurham mattdurham marked this pull request as ready for review January 13, 2025 15:30
@mattdurham mattdurham requested a review from a team as a code owner January 13, 2025 15:30
Copy link

@thampiotr thampiotr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the plans for getting rid of V1, BTW? Since we're in experimental, I think the sooner the better.

@mattdurham
Copy link
Collaborator Author

Likely not removed for some time (or ever?). We will only support reading existing V1 files and all new files will be written as V2.

@mattdurham
Copy link
Collaborator Author

At some point if/when this is adopted by more than Alloy we will have semantic versioning that will allow us to better add rules around removing formats if we want.

@thampiotr
Copy link

I'd think that it's a good idea to remove V1 as we're still in experimental stage and it would reduce the codebase size. A few clusters that are testing this now would lose a few minutes of samples, yes, but I think it's a reasonable expectation given the experimental status.

@mattdurham
Copy link
Collaborator Author

The reason I dont want to remove it is we have some early adopters and they would lose data. I would be open to removing it after a few alloy releases.

Copy link

@thampiotr thampiotr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing major, so LGTM

types/v2/format_test.go Outdated Show resolved Hide resolved
types/v2/format_test.go Show resolved Hide resolved
implementations/prometheus/queue.go Show resolved Hide resolved
types/v2/types.benc.go Show resolved Hide resolved
types/v2/types.benc.go Show resolved Hide resolved
@mattdurham mattdurham merged commit e5fe545 into main Jan 13, 2025
2 checks passed
@mattdurham mattdurham deleted the v2 branch January 13, 2025 17:19
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.

4 participants