Repository navigation
Knowledge and Security say when they were really last refreshed - #825
Merged
Merged
Conversation
The Knowledge base's updated_at was the newest time a knowledge base's settings were edited, so a team whose Confluence source synced minutes ago read "Updated 12 days ago". It is now the newest successful sync of a source or ready upload across the team's bases, and stopped_at says when a source's last sync stopped. Security took its time only from findings, so a scan that found nothing new left it looking stale. It now also counts the scan times on the team's security state record.
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.
Summary
The sources overview's Knowledge row could show a date days old while a knowledge source had synced successfully minutes before.
bases::sizeset the Knowledge base'supdated_atto the newestupdated_atof the team's knowledge base records, which only changes when a base's settings are edited. It now uses the newest successful source sync (last_success_at) or ready upload across the team's bases, and addsstopped_atwhen a source's last sync stopped, so the dashboard says so instead of showing an old date.Auditing the other rows: Security took its time only from findings, so a scan that found nothing new looked stale. It now also counts the scan times on the team's
SECURITY_STATErecord. Code and Work are live, Infrastructure already counts the account read time (RES_READ#), and Logs counts each finding'supdated_at, which every log scan refreshes.Changes
gateway/src/bases.rsknowledge_times: picks the newest successful sync or ready upload (synced items and uploads still processing don't count; sources of deleted bases don't count) and the newest stop of an unpaused source in error. Times compare as times, not strings.advisory_polled_at,dependabot_checked_at,osv_synced_atandepss_synced_at.stopped_at.Verification
knowledge_is_as_fresh_as_its_newest_sync_or_upload_not_its_settings.cargo fmt --checkandcargo clippy -p gateway --all-targets -- -D warningsare clean;cargo test -p gatewaygives 1286 passed, 0 failed.