Skip to content

Comments

Use standard helper function for verifying that the TLS rotation worked#3090

Closed
madolson wants to merge 2 commits intovalkey-io:unstablefrom
madolson:tls-fix
Closed

Use standard helper function for verifying that the TLS rotation worked#3090
madolson wants to merge 2 commits intovalkey-io:unstablefrom
madolson:tls-fix

Conversation

@madolson
Copy link
Member

The test was previously rolling it's own log checking, but we have helper functions. I noticed a few other instances, but there are active test failures so just targeting that right now.

@madolson madolson added the run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) label Jan 21, 2026
Copilot AI review requested due to automatic review settings January 21, 2026 20:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors TLS test code to use the standard wait_for_log_messages helper function instead of custom log file reading logic. The changes improve code maintainability by eliminating duplicated file handling code and using the established test utility.

Changes:

  • Replaced manual log file reading and pattern matching with wait_for_log_messages helper calls
  • Simplified waiting for TLS reload completion messages in multiple test scenarios
  • Maintained equivalent behavior while reducing code complexity

Comment on lines -206 to -211
wait_for_condition 50 100 {
set fd [open $logfile r]
set logs [read $fd]
close $fd
[string match {*TLS materials reloaded successfully*} $logs]
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

This can never have worked. The condition can't contain variable assignments. Didn't we run the TLS tests at all before merging the PR?

invalid bareword "set"
in expression "
                    set fd [open $logfile r]
...";
should be "$set" or "{set}" or "set(...)" or ...
    while executing
"wait_for_condition 50 100 {
                    set fd [open $logfile r]
                    set logs [read $fd]
                    close $fd

Copy link
Member Author

@madolson madolson Jan 21, 2026

Choose a reason for hiding this comment

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

Yeah, it never could have worked. Looks like no tests run with TLS, I thought we ran some permutation.

Also, I'm really confused at the new failures.

Run extra test label doesn't seem to work correctly anymore. It just runs on unstable, it doesn't merge in the change.

Copy link
Contributor

Choose a reason for hiding this comment

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

Wow, it was running on the wrong branch. Yeah I see where we broke it. 🤦 Very not fun to find out the extra tests hasn't worked for a while... Good to see it fixed quickly in #2907!

@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.39%. Comparing base (4b5a48a) to head (a4509eb).
⚠️ Report is 3 commits behind head on unstable.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #3090   +/-   ##
=========================================
  Coverage     74.39%   74.39%           
=========================================
  Files           129      129           
  Lines         71011    71011           
=========================================
+ Hits          52826    52831    +5     
+ Misses        18185    18180    -5     

see 18 files with indirect coverage changes

🚀 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.

@madolson madolson changed the title Use standard helper function for verifying that the TLS worked Use standard helper function for verifying that the TLS rotation worked Jan 21, 2026
Copilot AI review requested due to automatic review settings January 21, 2026 22:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.

…ns successfull

Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
@madolson madolson added run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) and removed run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) labels Jan 21, 2026
@github-actions github-actions bot removed the run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) label Jan 21, 2026
@madolson madolson added the run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) label Jan 21, 2026
@github-actions github-actions bot removed the run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) label Jan 21, 2026
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
@madolson madolson added the run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) label Jan 22, 2026
@github-actions github-actions bot removed the run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) label Jan 22, 2026
@sarthakaggarwal97 sarthakaggarwal97 added the run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) label Jan 22, 2026
@github-actions github-actions bot removed the run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) label Jan 22, 2026
@yang-z-o
Copy link
Contributor

yang-z-o commented Jan 22, 2026

Hi @madolson,

I’ve fixed the unit tests in #3094. Sorry for the inconvenience.

I had issues running the unit tests locally(I’m not sure if this is a common issue for macOS users - #2999 (comment)), so I relied on CI for validation, but I didn’t realize that the CI jobs don’t include the TLS tests.

@zuiderkwast zuiderkwast added the run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) label Jan 22, 2026
@github-actions github-actions bot removed the run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) label Jan 22, 2026
@madolson
Copy link
Member Author

@yang-z-o thanks! I got distracted since our ci wasnt working correctly :) we can move to your pr

@madolson madolson closed this Jan 22, 2026
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