server: fix lastpinged of hosts - #13030
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #13030 +/- ##
============================================
- Coverage 16.26% 16.26% -0.01%
Complexity 13433 13433
============================================
Files 5665 5667 +2
Lines 500530 500731 +201
Branches 60787 60803 +16
============================================
+ Hits 81411 81434 +23
- Misses 410027 410196 +169
- Partials 9092 9101 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Fixes the lastpinged field in listHosts API responses by correctly converting the stored last_ping value into an epoch-milliseconds Date, so the returned timestamp reflects the actual last agent connection time instead of a near-1970 value.
Changes:
- Convert
HostJoinVO.lastPingedfrom the stored compact time unit (System.currentTimeMillis() >> 10) back to epoch milliseconds (<< 10) when populatingHostResponse.lastPinged.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@blueorangutan package |
|
@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18761 |
|
@blueorangutan test keepEnv |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian Build Failed (tid-16699) |
|
[SF] Trillian test result (tid-16705)
|
|
tested ok, one issue (unrelated to this PR I think) while and ..kvm1 as well btw; I redid the |
@DaanHoogland |
ok, so do we make it an issue? not really a bug but a bit unclear and confusing. |
|
seems fine to me but I don’t see the last disconnected in the ui created from this version either. Anyway let’s merge this. |
|
@weizhouapache a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
|
UI build: ✔️ |



Description
This PR fixes the
lastpingedin host response.(note it shows the last time that the agent connected to management server, not the agent heartbeat time)
prior to the change
with the change (another environment)
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?