Skip to content

Comments

rw2sender-fix: Redesign test framework as a sendertest package; add process target#211

Merged
bwplotka merged 4 commits intofeature/rw2senderfixfrom
rw2sender-fix-3
Feb 20, 2026
Merged

rw2sender-fix: Redesign test framework as a sendertest package; add process target#211
bwplotka merged 4 commits intofeature/rw2senderfixfrom
rw2sender-fix-3

Conversation

@bwplotka
Copy link
Member

@bwplotka bwplotka commented Feb 18, 2026

Depends on #210

This rewrites the framework and adds a sample test that shows how it's used.

Removed old tests in this PR:

  • timestamp_int64_milliseconds - tested with TestSample/sample/rw2/prometheus/timestamp
  • timestamp_milliseconds_format (dup)- tested with TestSample/sample/rw2/prometheus/timestamp
  • timestamp_recent - tested with TestSample/sample/rw2/prometheus/timestamp
  • start_timestamp_for_counters (broken, no ST in the input) - tested with TestSample/sample/rw2/prometheus/start_timestamp_for_counters tests.
  • start_timestamp_for_histograms (broken, no ST in the input) - tested with TestSample/sample/rw2/prometheus/start_timestamp_for_histograms tests.
  • start_timestamp_zero_handling - doesn't make sense it's post receiver storage semantics
  • timestamp_precision - dup of timestamp_int64_milliseconds - tested with TestSample/sample/rw2/prometheus/timestamp
  • timestamp_future_values - does not make sense, not part of any spec
  • multiple_samples_same_series - not testing anything

Next PRs will delete/convert rest of the old tests cc @pipiland2612

@bwplotka bwplotka changed the title rw2sender-fix: Redesign test framework as a sendertest package rw2sender-fix: Redesign test framework as a sendertest package; add process target Feb 18, 2026
@bwplotka bwplotka force-pushed the rw2sender-fix-3 branch 3 times, most recently from ba6ab1b to bb4caa2 Compare February 18, 2026 12:57
Copy link
Member

@saswatamcode saswatamcode left a comment

Choose a reason for hiding this comment

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

Generally looks good to me, a couple of questions

if err != nil {
return err
}
fName, err := writeTempFile(string(out), "target-options-*.yaml")
Copy link
Member

Choose a reason for hiding this comment

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

Why is the file named this way?

Copy link
Member Author

Choose a reason for hiding this comment

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

What else would you expect?

I am considering also stdin. I will try to setup CI job for this in Prometheus before merging

Copy link
Member

Choose a reason for hiding this comment

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

I got confused with the -* suffix

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah - it's a magic pattern for random UUID for temp file. Will comment.

Copy link
Contributor

@pipiland2612 pipiland2612 left a comment

Choose a reason for hiding this comment

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

LGTM!

Base automatically changed from rw2senderfix-2 to feature/rw2senderfix February 19, 2026 10:08
Signed-off-by: bwplotka <bwplotka@gmail.com>
@bwplotka bwplotka force-pushed the rw2sender-fix-3 branch 2 times, most recently from 3c217b8 to 46eba96 Compare February 19, 2026 11:20
Signed-off-by: bwplotka <bwplotka@gmail.com>
Signed-off-by: bwplotka <bwplotka@gmail.com>
@bwplotka bwplotka force-pushed the rw2sender-fix-3 branch 2 times, most recently from 948fe20 to 2678811 Compare February 19, 2026 16:49
Signed-off-by: bwplotka <bwplotka@gmail.com>
@bwplotka
Copy link
Member Author

Merging this, but I decided to switch a design to be programmatic more (next PR)

@bwplotka bwplotka merged commit 5192d54 into feature/rw2senderfix Feb 20, 2026
6 checks passed
@bwplotka bwplotka deleted the rw2sender-fix-3 branch February 20, 2026 09:45
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.

3 participants