Skip to content

test(remote)[PART4c]: Refactor remote handler tests to use teststorage.Appendable mock#17838

Closed
bwplotka wants to merge 4 commits intomainfrom
bwplotka/a2-remote-test
Closed

test(remote)[PART4c]: Refactor remote handler tests to use teststorage.Appendable mock#17838
bwplotka wants to merge 4 commits intomainfrom
bwplotka/a2-remote-test

Conversation

@bwplotka
Copy link
Member

@bwplotka bwplotka commented Jan 12, 2026

Splitting work from #17675 into smaller PRs.

This PR:

  • Refactors remote handler tests to use our new mock Appendable for maintainability AND to reduce amount of changes when switching to AppendableV2.
  • I decided to remove some cases around metadata WAL and ST zero as this logic is tested on TSDB side and fully moved to TSDB for AppendableV2.
  • I removed bad tests around OOO/duplicate samples in RW request. Prod code does not validate this. Added ticket to verify if this is what we want (not related to AppendableV2): remote write receive: Validate bad requests around sample ordering/dups #17841

Related to #17632

Chained on top of:

Does this PR introduce a user-facing change?

NONE

Found in #17838 and by
Krajo comment

Signed-off-by: bwplotka <bwplotka@gmail.com>
…impl

Signed-off-by: bwplotka <bwplotka@gmail.com>
@bwplotka bwplotka force-pushed the bwplotka/a2-storage-support branch from 49ea7b0 to 1a80486 Compare January 12, 2026 13:31
…e.Appendable mock

Signed-off-by: bwplotka <bwplotka@gmail.com>
@bwplotka bwplotka force-pushed the bwplotka/a2-remote-test branch from cbf00bb to 32881bc Compare January 12, 2026 13:32
@bwplotka bwplotka marked this pull request as ready for review January 12, 2026 13:32
Copy link
Contributor

@aknuds1 aknuds1 left a comment

Choose a reason for hiding this comment

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

I did a quick scan, and didn't find any problems that aren't in the previous PRs this is based on. I'll wait until the PRs depended on are merged, before making any final review.

bwplotka added a commit that referenced this pull request Jan 14, 2026
…le (#17834)

* feat(teststorage)[PART4a]: Add AppendableV2 support for mock Appendable

Signed-off-by: bwplotka <bwplotka@gmail.com>

* fix: adjusted AppenderV1 flow for reliability

Found in #17838 and by
Krajo comment

Signed-off-by: bwplotka <bwplotka@gmail.com>

* addressed comments

Signed-off-by: bwplotka <bwplotka@gmail.com>

* fix broken appV2 commit and rollback; added tests

Signed-off-by: bwplotka <bwplotka@gmail.com>

---------

Signed-off-by: bwplotka <bwplotka@gmail.com>
@bwplotka bwplotka force-pushed the bwplotka/a2-storage-support branch from 1a80486 to 8a2921e Compare January 14, 2026 13:57
// Append implements storage.AppenderV2.
func (t *timestampTrackerV2) Append(ref storage.SeriesRef, _ labels.Labels, _, ts int64, _ float64, h *histogram.Histogram, fh *histogram.FloatHistogram, opts storage.AOptions) (storage.SeriesRef, error) {
switch {
case fh != nil, h != nil:
Copy link
Member

@ywwg ywwg Jan 14, 2026

Choose a reason for hiding this comment

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

is it considered a violation of spec to send both a histogram and float histogram in a single call? (if not, then shouldn't we count 2 if both are set?)

Copy link
Member Author

Choose a reason for hiding this comment

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

It is violation, yes.

Copy link
Member Author

Choose a reason for hiding this comment

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

image

@bwplotka bwplotka marked this pull request as draft January 16, 2026 09:05
@bwplotka bwplotka force-pushed the bwplotka/a2-storage-support branch 3 times, most recently from 051cdd6 to f61a83b Compare January 16, 2026 10:47
Base automatically changed from bwplotka/a2-storage-support to main January 16, 2026 13:04
@bwplotka
Copy link
Member Author

bwplotka commented Feb 2, 2026

Switched to per ingestion PR, e.g. OTLP #17992

@bwplotka bwplotka closed this Feb 2, 2026
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