Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Add logs and stats to sync loop #573

Merged
merged 2 commits into from
Jun 5, 2023
Merged

Add logs and stats to sync loop #573

merged 2 commits into from
Jun 5, 2023

Conversation

EngHabu
Copy link
Contributor

@EngHabu EngHabu commented Jun 2, 2023

TL;DR

Add info logging for when a sync loop starts and ends and add stats at the end of the sync loop to the log.

Type

  • Bug Fix
  • Feature
  • Plugin

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added
  • Any pending items have an associated Issue

Tracking Issue

fixes flyteorg/flyte#3743

Signed-off-by: Haytham Abuelfutuh <[email protected]>
@codecov
Copy link

codecov bot commented Jun 2, 2023

Codecov Report

Merging #573 (9c1f358) into master (3379031) will increase coverage by 1.54%.
The diff coverage is n/a.

❗ Current head 9c1f358 differs from pull request most recent head 703cd32. Consider uploading reports for the commit 703cd32 to get more accurate results

@@            Coverage Diff             @@
##           master     #573      +/-   ##
==========================================
+ Coverage   58.60%   60.14%   +1.54%     
==========================================
  Files         168      168              
  Lines       16256    13289    -2967     
==========================================
- Hits         9527     7993    -1534     
+ Misses       5887     4454    -1433     
  Partials      842      842              
Flag Coverage Δ
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

see 155 files with indirect coverage changes

@EngHabu EngHabu marked this pull request as ready for review June 2, 2023 23:09
katrogan
katrogan previously approved these changes Jun 2, 2023
}
}
}

logger.Infof(ctx, "Completed cluster resource creation loop with stats: %+v", stats)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think it might be useful to log these stats per namespace as well too, since it's easier to reason about the deltas in created/updated at the template level than remembering they get applied n times across all namespaces?

Signed-off-by: Haytham Abuelfutuh <[email protected]>
@EngHabu EngHabu enabled auto-merge (squash) June 2, 2023 23:38
@EngHabu EngHabu requested a review from katrogan June 2, 2023 23:38
@EngHabu EngHabu merged commit 949f5a2 into master Jun 5, 2023
@EngHabu EngHabu deleted the sync-logs branch June 5, 2023 16:32
eapolinario pushed a commit that referenced this pull request Sep 6, 2023
* Add logs and stats to sync loop

Signed-off-by: Haytham Abuelfutuh <[email protected]>

* Add per namespace log as well

Signed-off-by: Haytham Abuelfutuh <[email protected]>

---------

Signed-off-by: Haytham Abuelfutuh <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Housekeeping] Improve logging around cluster sync loops
2 participants