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

Add timestamp to log messages in test_helper.tcl #714

Closed
wants to merge 9 commits into from

Conversation

PingXie
Copy link
Member

@PingXie PingXie commented Jun 29, 2024

  • Introduced current_time function to generate a formatted timestamp.
  • Updated log messages in read_from_test_client to include timestamps.

This change aims to help analyze the recent slew of test timeout issues by providing precise timing information in the logs, allowing for better tracking and debugging of test execution times.

https://github.com/hwware/valkey/actions/runs/9715726013/job/26817778389#step:6:3736

PingXie and others added 8 commits June 13, 2024 17:38
to avoid restarting Valkey server during the test.

The `DEBUG RESTART` procedure was not always reliable, as sometimes
the server would fail to restart, leading to flaky tests.

Signed-off-by: Ping Xie <[email protected]>
…ca versions.

Added logic to iterate through the list of replicas and check for any replicas
running a version older than 8.0.0. Older replicas do not support the CLUSTER
SETSLOT command on replicas. If such a replica is found, the replication is
skipped and falls back to the old (non-replicated) behavior.

Signed-off-by: Ping Xie <[email protected]>
@PingXie PingXie requested a review from enjoy-binbin June 29, 2024 04:00
Copy link

codecov bot commented Jun 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.28%. Comparing base (7719dbb) to head (5276b84).
Report is 7 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable     #714      +/-   ##
============================================
+ Coverage     70.26%   70.28%   +0.02%     
============================================
  Files           110      111       +1     
  Lines         60108    60215     +107     
============================================
+ Hits          42234    42323      +89     
- Misses        17874    17892      +18     

see 11 files with indirect coverage changes

@madolson
Copy link
Member

Github has timestamps:

image

I actually don't like this change because I have my own way of adding in a timestamp when running tests. I would at the very least like to have an optional to enable it.

@PingXie
Copy link
Member Author

PingXie commented Jun 30, 2024

Nice!

How do you add timestamps locally? I can make this optional as I'd like to have timestamps locally too but if there is already a way that doesn't require code change that would be even better.

Copy link
Member

@enjoy-binbin enjoy-binbin left a comment

Choose a reason for hiding this comment

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

i think it is a good idea to add this, i've had this thought in the past. Do you have a screenshot of the example output?

@madolson
Copy link
Member

madolson commented Jul 1, 2024

How do you add timestamps locally? I can make this optional as I'd like to have timestamps locally too but if there is already a way that doesn't require code change that would be even better.

Typically I use ts which is available in moreutils (which is available on mac and practically all linux distros), and gives an output like:

madolson@MacBook-Air-5 valkey % ./runtest |ts
Jun 30 22:02:19 Cleanup: may take some time... OK
Jun 30 22:02:19 Starting test server at port 21079
Jun 30 22:02:19 [ready]: 12546
Jun 30 22:02:19 Testing unit/pubsub

@madolson
Copy link
Member

madolson commented Jul 1, 2024

i think it is a good idea to add this, i've had this thought in the past. Do you have a screenshot of the example output?

You can check the CI link, https://github.com/valkey-io/valkey/actions/runs/9721454412/job/26834153304?pr=714.

@PingXie
Copy link
Member Author

PingXie commented Jul 2, 2024

I think ts is great. There is no need for this PR then. Less is more :-)

@PingXie PingXie closed this Jul 2, 2024
@PingXie PingXie deleted the test-timestamp branch July 7, 2024 02:37
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