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 bug by keeping track of interval within the explorer #1266

Merged
merged 13 commits into from
Nov 9, 2022
Merged

fix bug by keeping track of interval within the explorer #1266

merged 13 commits into from
Nov 9, 2022

Conversation

derek-ho
Copy link
Collaborator

@derek-ho derek-ho commented Nov 8, 2022

Signed-off-by: Derek Ho dxho@amazon.com

Description

Keeps track of interval selected in the explorer and timechart header so that the interval is not reset whenever the query changes

Issues Resolved

#1249

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

joshuali925 and others added 7 commits November 1, 2022 13:12
Signed-off-by: Joshua Li <joshuali925@gmail.com>
Signed-off-by: Rupal Mahajan <maharup@amazon.com>
(cherry picked from commit eef1979)

Co-authored-by: Rupal Mahajan <maharup@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
@derek-ho derek-ho marked this pull request as ready for review November 8, 2022 16:13
@derek-ho derek-ho requested a review from a team as a code owner November 8, 2022 16:13
Signed-off-by: Derek Ho <dxho@amazon.com>
@@ -389,13 +393,15 @@ export const Explorer = ({
getVisualizations();
getAvailableFields(`search source=${curIndex}`);
} else {
findAutoInterval(startTime, endTime);
if (!selectedIntervalRef.current || selectedIntervalRef.current.text === 'Auto') {
findAutoInterval(startingTime, endingTime);
Copy link
Member

Choose a reason for hiding this comment

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

what's the difference between startingTime and startTime?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I may need someone more familiar with this component/code (@mengweieric ?) - but from what I can tell this explorer is rendered by both Application analytics and event analytics - for event analytics startTime is undefined, resulting in auto interval not getting picked up. In either case startingTime should be already set above based on the query so I think(?) this is a more general implementation

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes confirmed. Event analytics previously does not use any passed in start/starting time, I think later there's live tail introduced with starting/ending time for differentiating existing start/end time just for reusing the exiting data fetching

Signed-off-by: Derek Ho <dxho@amazon.com>
@codecov-commenter
Copy link

codecov-commenter commented Nov 8, 2022

Codecov Report

Merging #1266 (4cae301) into 2.4 (a1527c5) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##                2.4    #1266   +/-   ##
=========================================
  Coverage     70.27%   70.27%           
  Complexity      292      292           
=========================================
  Files            42       42           
  Lines          2395     2395           
  Branches        248      248           
=========================================
  Hits           1683     1683           
  Misses          571      571           
  Partials        141      141           
Flag Coverage Δ
opensearch-observability 70.27% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Derek Ho <dxho@amazon.com>
Signed-off-by: Derek Ho <dxho@amazon.com>
joshuali925
joshuali925 previously approved these changes Nov 8, 2022
mengweieric
mengweieric previously approved these changes Nov 8, 2022
@derek-ho derek-ho changed the base branch from 2.x to 2.4 November 8, 2022 21:30
@derek-ho derek-ho dismissed stale reviews from mengweieric and joshuali925 November 8, 2022 21:30

The base branch was changed.

@joshuali925
Copy link
Member

CI failed, retrying. not sure why recently bootstrap often fails

@mengweieric mengweieric self-requested a review November 9, 2022 17:17
@derek-ho derek-ho merged commit 82d634c into opensearch-project:2.4 Nov 9, 2022
@derek-ho derek-ho deleted the fix-plot-autointerval branch November 9, 2022 19:09
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.

4 participants