[BUGFIX] Table: use last data point instead of first in buildRawTableData#736
Merged
Merged
Conversation
tgitelman
force-pushed
the
fix/table-use-last-value
branch
from
July 19, 2026 17:47
8d23d3c to
9d65d62
Compare
tgitelman
force-pushed
the
fix/table-use-last-value
branch
from
July 21, 2026 09:18
9d65d62 to
e2ebed8
Compare
jgbernalp
approved these changes
Jul 21, 2026
jgbernalp
enabled auto-merge
July 21, 2026 09:44
Member
|
type-check failed. Can you check @tgitelman please |
auto-merge was automatically disabled
July 21, 2026 11:26
Head branch was pushed to by a user without write access
tgitelman
force-pushed
the
fix/table-use-last-value
branch
from
July 21, 2026 11:26
e2ebed8 to
212c9b2
Compare
buildRawTableData() hardcodes ts.values[0] — always picking the first data point from range query results. When a datasource plugin sends query_range despite the table requesting instant mode, the first step covers a stale time window while the last step is current. StatChart panels (using calculation: last) show correct values; the table does not. Fix: use ts.values[ts.values.length - 1] instead of ts.values[0] for value extraction, timestamp, and CSV export. Also add a guard for empty values arrays. Ref: perses/perses#4270 Signed-off-by: Tal Gitelman <tgitelma@redhat.com>
tgitelman
force-pushed
the
fix/table-use-last-value
branch
from
July 21, 2026 11:28
212c9b2 to
080ff35
Compare
Nexucis
approved these changes
Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
buildRawTableData() hardcodes ts.values[0] — always picking the first data point from range query results. When a datasource plugin sends query_range despite the table requesting instant mode, the first step covers a stale time window while the last step is current. StatChart panels (using calculation: last) show correct values; the table does not.
Fix: use ts.values[ts.values.length - 1] instead of ts.values[0] for value extraction, timestamp, and CSV export. Also add a guard for empty values arrays.
Ref: perses/perses#4270
Description
Screenshots
Checklist
[<catalog_entry>] <commit message>naming convention using one of thefollowing
catalog_entryvalues:FEATURE,ENHANCEMENT,BUGFIX,BREAKINGCHANGE,DOC,IGNORE.UI Changes