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

fix: compatible with stream entry id metric for redis version 6.x/5.x. #917

Merged
merged 4 commits into from
Jul 15, 2024

Conversation

gitsang
Copy link
Contributor

@gitsang gitsang commented Jul 1, 2024

The entry id in different versions of redis is not always in the 17th and 19th positions of the xinfo stream.

In 6.x and 5.x, first-entry is 11th, last-entry is 13th

@coveralls
Copy link

coveralls commented Jul 1, 2024

Pull Request Test Coverage Report for Build 372

Details

  • 13 of 13 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.06%) to 84.188%

Totals Coverage Status
Change from base Build 367: 0.06%
Covered Lines: 1986
Relevant Lines: 2359

💛 - Coveralls

Copy link
Owner

@oliver006 oliver006 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, change looks good, just two minor questions.

exporter/streams_test.go Outdated Show resolved Hide resolved
exporter/streams.go Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Jul 3, 2024

Pull Request Test Coverage Report for Build 373

Details

  • 13 of 13 (100.0%) changed or added relevant lines in 1 file are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.07%) to 84.061%

Files with Coverage Reduction New Missed Lines %
exporter/streams.go 3 71.43%
Totals Coverage Status
Change from base Build 367: -0.07%
Covered Lines: 1983
Relevant Lines: 2359

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jul 3, 2024

Pull Request Test Coverage Report for Build 374

Details

  • 13 of 13 (100.0%) changed or added relevant lines in 1 file are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.07%) to 84.061%

Files with Coverage Reduction New Missed Lines %
exporter/streams.go 3 71.43%
Totals Coverage Status
Change from base Build 367: -0.07%
Covered Lines: 1983
Relevant Lines: 2359

💛 - Coveralls

@gitsang gitsang changed the title fix: compatible with stream entry id metric for redis version 6.x. fix: compatible with stream entry id metric for redis version 6.x/5.x. Jul 3, 2024
@gitsang
Copy link
Contributor Author

gitsang commented Jul 3, 2024

Already rebase the code and commit:

  • Change strings.Contains to strings.EqualFold
  • TestStreamsGetStreamInfo: Change judgment for XxxEntryId from isNotTestTimestamp to the same accurate judgment as TestStreamsGetStreamInfoUsingValKey7.

exporter/streams.go Outdated Show resolved Hide resolved
- use simple equal to judge the index of entry id
- format prerequisite judgement grouping
@coveralls
Copy link

coveralls commented Jul 4, 2024

Pull Request Test Coverage Report for Build 375

Details

  • 12 of 15 (80.0%) changed or added relevant lines in 1 file are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.2%) to 83.947%

Changes Missing Coverage Covered Lines Changed/Added Lines %
exporter/streams.go 12 15 80.0%
Files with Coverage Reduction New Missed Lines %
exporter/streams.go 3 69.8%
Totals Coverage Status
Change from base Build 367: -0.2%
Covered Lines: 1982
Relevant Lines: 2361

💛 - Coveralls

Copy link
Owner

@oliver006 oliver006 left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

@oliver006 oliver006 merged commit 9be2665 into oliver006:master Jul 15, 2024
4 of 5 checks passed
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