Skip to content

Conversation

sforests
Copy link
Contributor

@sforests sforests commented Jun 7, 2025

Describe Your Changes

This pull request addresses a bug in the Less method of the tagFilter struct. The original implementation incorrectly assigned the value of isCompositeB by calling tf.isComposite() instead of other.isComposite(). This caused both isCompositeA and isCompositeB to always have the same value, leading to incorrect comparisons when determining the order of tagFilter instances.

Checklist

The following checks are mandatory:

@sforests sforests force-pushed the fix-less-method-in-tagfilter branch from d899117 to 8010151 Compare June 7, 2025 10:10
@jiekun
Copy link
Member

jiekun commented Jun 9, 2025

Hello. This looks like a valid fix to me.

Please also check our contributing guide here, and add a new line in changelog.

@jiekun
Copy link
Member

jiekun commented Jun 9, 2025

Also, there's an empty line at the end of tag_filters_test.go. Please remove it and try testing locally by make check-all again. If you need any help fixing this, please let me know.

@sforests sforests force-pushed the fix-less-method-in-tagfilter branch from e2548be to b6607c2 Compare June 9, 2025 03:33
@jiekun jiekun requested a review from makasim June 9, 2025 03:34
Copy link

codecov bot commented Jun 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.59%. Comparing base (8aaa828) to head (bb593c3).
Report is 3215 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9127      +/-   ##
==========================================
- Coverage   60.37%   58.59%   -1.78%     
==========================================
  Files         411      700     +289     
  Lines       76609   120643   +44034     
==========================================
+ Hits        46253    70693   +24440     
- Misses      27794    46430   +18636     
- Partials     2562     3520     +958     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sforests
Copy link
Contributor Author

sforests commented Jun 9, 2025

Also, there's an empty line at the end of tag_filters_test.go. Please remove it and try testing locally by make check-all again. If you need any help fixing this, please let me know.

Thanks for the reminder! I've added a changelog and cleaned up the extra blank lines in tag_filters_test.go. Is there anything else I should take care of?

@f41gh7 f41gh7 self-requested a review June 9, 2025 11:44
Copy link
Contributor

@f41gh7 f41gh7 left a comment

Choose a reason for hiding this comment

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

LGTM

@sforests sforests requested a review from makasim June 10, 2025 01:10
@valyala valyala merged commit 8f47e30 into VictoriaMetrics:master Jun 10, 2025
@makasim makasim added the waiting for release The change was merged to upstream, but wasn't released yet. label Jun 10, 2025
@valyala
Copy link
Collaborator

valyala commented Jun 10, 2025

@sforests , thanks for the fix!

valyala pushed a commit that referenced this pull request Jun 10, 2025
### Describe Your Changes

This pull request addresses a bug in the Less method of the tagFilter
struct. The original implementation incorrectly assigned the value of
isCompositeB by calling tf.isComposite() instead of other.isComposite().
This caused both isCompositeA and isCompositeB to always have the same
value, leading to incorrect comparisons when determining the order of
tagFilter instances.

### Checklist

The following checks are **mandatory**:

- [x] My change adheres to [VictoriaMetrics contributing
guidelines](https://docs.victoriametrics.com/victoriametrics/contributing/#pull-request-checklist).

---------

Co-authored-by: Zhu Jiekun <jiekun@victoriametrics.com>
MatthiasGrandl pushed a commit to croit/VictoriaMetrics that referenced this pull request Jun 12, 2025
### Describe Your Changes

This pull request addresses a bug in the Less method of the tagFilter
struct. The original implementation incorrectly assigned the value of
isCompositeB by calling tf.isComposite() instead of other.isComposite().
This caused both isCompositeA and isCompositeB to always have the same
value, leading to incorrect comparisons when determining the order of
tagFilter instances.

### Checklist

The following checks are **mandatory**:

- [x] My change adheres to [VictoriaMetrics contributing
guidelines](https://docs.victoriametrics.com/victoriametrics/contributing/#pull-request-checklist).

---------

Co-authored-by: Zhu Jiekun <jiekun@victoriametrics.com>
chocholom pushed a commit to chocholom/VictoriaMetrics that referenced this pull request Jun 12, 2025
### Describe Your Changes

This pull request addresses a bug in the Less method of the tagFilter
struct. The original implementation incorrectly assigned the value of
isCompositeB by calling tf.isComposite() instead of other.isComposite().
This caused both isCompositeA and isCompositeB to always have the same
value, leading to incorrect comparisons when determining the order of
tagFilter instances.

### Checklist

The following checks are **mandatory**:

- [x] My change adheres to [VictoriaMetrics contributing
guidelines](https://docs.victoriametrics.com/victoriametrics/contributing/#pull-request-checklist).

---------

Co-authored-by: Zhu Jiekun <jiekun@victoriametrics.com>
truepele pushed a commit to truepele/VictoriaMetrics that referenced this pull request Jun 21, 2025
### Describe Your Changes

This pull request addresses a bug in the Less method of the tagFilter
struct. The original implementation incorrectly assigned the value of
isCompositeB by calling tf.isComposite() instead of other.isComposite().
This caused both isCompositeA and isCompositeB to always have the same
value, leading to incorrect comparisons when determining the order of
tagFilter instances.

### Checklist

The following checks are **mandatory**:

- [x] My change adheres to [VictoriaMetrics contributing
guidelines](https://docs.victoriametrics.com/victoriametrics/contributing/#pull-request-checklist).

---------

Co-authored-by: Zhu Jiekun <jiekun@victoriametrics.com>
truepele pushed a commit to truepele/VictoriaMetrics that referenced this pull request Jun 21, 2025
### Describe Your Changes

This pull request addresses a bug in the Less method of the tagFilter
struct. The original implementation incorrectly assigned the value of
isCompositeB by calling tf.isComposite() instead of other.isComposite().
This caused both isCompositeA and isCompositeB to always have the same
value, leading to incorrect comparisons when determining the order of
tagFilter instances.

### Checklist

The following checks are **mandatory**:

- [x] My change adheres to [VictoriaMetrics contributing
guidelines](https://docs.victoriametrics.com/victoriametrics/contributing/#pull-request-checklist).

---------

Co-authored-by: Zhu Jiekun <jiekun@victoriametrics.com>
@makasim
Copy link
Contributor

makasim commented Jun 24, 2025

The fix has been included to v1.120.0 release

@makasim makasim removed the waiting for release The change was merged to upstream, but wasn't released yet. label Jun 24, 2025
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.

5 participants