Skip to content

Conversation

@flora-hofmann-frequenz
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings July 10, 2025 12:22
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 PR corrects the timestamp field used when iterating over metric and state samples, switching from sample_time to sampled_at.

  • Use sampled_at instead of sample_time for metric samples
  • Use sampled_at instead of sample_time for state entries
Comments suppressed due to low confidence (2)

src/frequenz/client/reporting/_types.py:95

  • Add a unit test to verify that sampled_at is correctly converted to UTC datetime for metric samples.
                ts = sample.sampled_at.ToDatetime().replace(tzinfo=timezone.utc)

src/frequenz/client/reporting/_types.py:130

  • Add a unit test to verify that sampled_at is correctly converted to UTC datetime for state entries.
                ts = state.sampled_at.ToDatetime().replace(tzinfo=timezone.utc)

@github-actions github-actions bot added the part:docs Affects the documentation label Jul 10, 2025
RELEASE_NOTES.md Outdated
## Bug Fixes

- Update example in README to use `receive_single_component_data`.
- Keep `sampled_at` for metric retrieval.
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't need a release notes entry since it wouldn't change between two releases

@flora-hofmann-frequenz flora-hofmann-frequenz added the cmd:skip-release-notes It is not necessary to update release notes for this PR label Jul 10, 2025
@flora-hofmann-frequenz flora-hofmann-frequenz added this pull request to the merge queue Jul 10, 2025
Merged via the queue into frequenz-floss:v0.x.x with commit a68bf49 Jul 10, 2025
5 checks passed
@flora-hofmann-frequenz flora-hofmann-frequenz deleted the fix_sample_error branch July 10, 2025 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmd:skip-release-notes It is not necessary to update release notes for this PR part:docs Affects the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants