Skip to content

fix: Handle first timestamp in deployment logs more carefully#1914

Open
vpodzime wants to merge 1 commit intomendersoftware:masterfrom
vpodzime:master-bad_depl_log_tstamp
Open

fix: Handle first timestamp in deployment logs more carefully#1914
vpodzime wants to merge 1 commit intomendersoftware:masterfrom
vpodzime:master-bad_depl_log_tstamp

Conversation

@vpodzime
Copy link
Contributor

@vpodzime vpodzime commented Mar 12, 2026

Depending on the system and build configuration, the timestamps in logs can use lower (likely) or higher (unlikely) time resolution than expected (nanoseconds). So in case of a deployment failure with corrupted logs, when using the first timestamp as a replacement in the extra (THE ORIGINAL LOGS CONTAINED INVALID ENTRIES) log entry, care must be taken to make sure the extra log entry still has a valid timestamp and that the result is valid JSON.

Ticket: MEN-9427
Changelog: commit

Steps:

  • code fix
  • new unit tests
  • new integration test

@mender-test-bot
Copy link

@vpodzime, start a full client pipeline with:

  • mentioning me and start client pipeline

my commands and options

You can prevent me from automatically starting CI pipelines:

  • if your pull request title starts with "[NoCI] ..."

You can trigger a client pipeline on multiple prs with:

  • mentioning me and start client pipeline --pr mender/127 --pr mender-connect/255

You can trigger GitHub->GitLab branch sync with:

  • mentioning me and sync

You can print PR statistics for a repository with:

  • mentioning me and print fast pr stats (Team stats only)
  • mentioning me and print full pr stats (Detailed report)
  • options: --repo <repo>, --team <name>, --all-repos, --exclude-drafts, --exclude-user <user>
  • mentioning me and print full pr stats --repo mender --all-repos --exclude-drafts

You can cherry pick to a given branch or branches with:

  • mentioning me and:
 cherry-pick to:
 * 1.0.x
 * 2.0.x

Depending on the system and build configuration, the timestamps
in logs can use lower (likely) or higher (unlikely) time
resolution than expected (nanoseconds). So in case of a
deployment failure with corrupted logs, when using the first
timestamp as a replacement in the extra `(THE ORIGINAL LOGS
CONTAINED INVALID ENTRIES)` log entry, care must be taken to make
sure the extra log entry still has a valid timestamp and that the
result is valid JSON.

Ticket: MEN-9427
Changelog: commit
Signed-off-by: Vratislav Podzimek <vratislav.podzimek+auto-signed@northern.tech>
@vpodzime vpodzime force-pushed the master-bad_depl_log_tstamp branch from 9bfb7fd to 1f83b7d Compare March 12, 2026 16:30
@mender-test-bot
Copy link

mender-test-bot commented Mar 12, 2026

Merging these commits will result in the following changelog entries:

Changelogs

mender (master-bad_depl_log_tstamp)

New changes in mender since master:

Bug Fixes
  • Handle first timestamp in deployment logs more carefully

    Depending on the system and build configuration, the timestamps
    in logs can use lower (likely) or higher (unlikely) time
    resolution than expected (nanoseconds). So in case of a
    deployment failure with corrupted logs, when using the first
    timestamp as a replacement in the extra (THE ORIGINAL LOGS CONTAINED INVALID ENTRIES) log entry, care must be taken to make
    sure the extra log entry still has a valid timestamp and that the
    result is valid JSON.
    (MEN-9427)

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.

2 participants