Skip to content

Conversation

@devanshjainms
Copy link
Contributor

This pull request improves the robustness and accuracy of telemetry data reporting and HTML report rendering in the Ansible roles. The main changes ensure that time calculations are correctly handled as integer epoch values and that report naming is more resilient to missing variables.

Telemetry and Reporting Improvements:

  • Updated the calculation of DurationSeconds in post-telemetry-data.yml to explicitly convert start and end times to integer epoch seconds before subtraction, ensuring accurate duration reporting even when input formats vary.

  • Enhanced the logic for setting test_group_name in render-html-report.yml to handle cases where test_group_name, target_os_family, or ansible_os_family might be undefined, defaulting to sensible fallback values and ensuring the name is always constructed in uppercase as appropriate.

Copilot AI review requested due to automatic review settings December 16, 2025 00:16
@devanshjainms devanshjainms requested a review from a team as a code owner December 16, 2025 00:16
Copy link

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 pull request attempts to improve telemetry data reporting and HTML report generation by making duration calculations more explicit and handling undefined variables more defensively. However, the PR introduces a critical bug in the datetime conversion logic that will cause runtime failures.

Key Changes:

  • Modified duration calculation in post-telemetry-data.yml to explicitly convert datetime strings to epoch integers
  • Enhanced test_group_name construction in render-html-report.yml with defensive checks for undefined variables

Critical Issue:
The datetime conversion uses to_datetime('%s') incorrectly - this filter expects input in epoch seconds format, but the actual input strings are in '%Y-%m-%d %H:%M:%S' format, which will cause parsing failures at runtime.

Reviewed changes

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

File Description
src/roles/misc/tasks/post-telemetry-data.yml Attempts to improve duration calculation by converting to epoch integers, but uses incorrect datetime filter syntax that will fail at runtime
src/roles/misc/tasks/render-html-report.yml Adds defensive checks for undefined variables (test_group_name, target_os_family, ansible_os_family) with nested conditionals and fallback values

@hdamecharla hdamecharla self-assigned this Dec 16, 2025
Copy link
Contributor

@dhruvmicrosoft dhruvmicrosoft left a comment

Choose a reason for hiding this comment

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

lg!

@devanshjainms devanshjainms merged commit f85682b into Azure:development-dec-2025 Dec 18, 2025
6 checks passed
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