Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add controller name to periodical_enqueue_source #8198

Merged
merged 2 commits into from
Sep 12, 2024

Conversation

kaovilai
Copy link
Member

@kaovilai kaovilai commented Sep 9, 2024

The code changes are related to the NewPeriodicalEnqueueSource function in the kube/periodical_enqueue_source.go file. This function is used to create a new instance of the PeriodicalEnqueueSource struct, which is responsible for periodically enqueueing objects into a work queue.

The changes involve adding two new parameters to this function: controllerName string and modifying the existing logger parameter to include additional fields.

Here's what changed:

  1. A new controllerName parameter was added to the NewPeriodicalEnqueueSource function.
  2. The logger parameter now includes an additional field with the value of reflect.TypeOf(objList).String() and another field with the value of controllerName.

These changes are to adding more context or metadata to the logging output, possibly for debugging or monitoring purposes.

The other files (restore_operations_controller.go, schedule_controller.go, and their respective test files) were modified to use this updated NewPeriodicalEnqueueSource function with the new controllerName parameter.

Thank you for contributing to Velero!

Please add a summary of your change

Does your change fix a particular issue?

Fixes #(issue)

Please indicate you've done the following:

  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Created a changelog file or added /kind changelog-not-required as a comment on this pull request.
  • Updated the corresponding documentation in site/content/docs/main.

@kaovilai
Copy link
Member Author

kaovilai commented Sep 9, 2024

/kind changelog-not-required

@github-actions github-actions bot added the kind/changelog-not-required PR does not require a user changelog. Often for docs, website, or build changes label Sep 9, 2024
@kaovilai kaovilai force-pushed the pes-controller branch 3 times, most recently from f2f03e6 to 84ec3e5 Compare September 9, 2024 15:43
Copy link

codecov bot commented Sep 9, 2024

Codecov Report

Attention: Patch coverage is 9.09091% with 10 lines in your changes missing coverage. Please review.

Project coverage is 59.19%. Comparing base (b92143d) to head (c8aa37d).
Report is 21 commits behind head on main.

Files with missing lines Patch % Lines
pkg/controller/backup_deletion_controller.go 0.00% 1 Missing ⚠️
pkg/controller/backup_operations_controller.go 0.00% 1 Missing ⚠️
pkg/controller/backup_repository_controller.go 0.00% 1 Missing ⚠️
...g/controller/backup_storage_location_controller.go 0.00% 1 Missing ⚠️
pkg/controller/backup_sync_controller.go 0.00% 1 Missing ⚠️
pkg/controller/data_download_controller.go 0.00% 1 Missing ⚠️
pkg/controller/download_request_controller.go 0.00% 1 Missing ⚠️
pkg/controller/gc_controller.go 0.00% 1 Missing ⚠️
pkg/controller/restore_operations_controller.go 0.00% 1 Missing ⚠️
pkg/controller/schedule_controller.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8198      +/-   ##
==========================================
- Coverage   59.23%   59.19%   -0.04%     
==========================================
  Files         367      367              
  Lines       30516    30730     +214     
==========================================
+ Hits        18076    18191     +115     
- Misses      10985    11085     +100     
+ Partials     1455     1454       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

The code changes are related to the `NewPeriodicalEnqueueSource` function in the `kube/periodical_enqueue_source.go` file. This function is used to create a new instance of the `PeriodicalEnqueueSource` struct, which is responsible for periodically enqueueing objects into a work queue.

The changes involve adding two new parameters to this function: `controllerName string` and modifying the existing `logger` parameter to include additional fields.

Here's what changed:

1. A new `controllerName` parameter was added to the `NewPeriodicalEnqueueSource` function.

These changes are to adding more context or metadata to the logging output, possibly for debugging or monitoring purposes.

The other files (`restore_operations_controller.go`, `schedule_controller.go`, and their respective test files) were modified to use this updated `NewPeriodicalEnqueueSource` function with the new `controllerName` parameter.

Signed-off-by: Tiger Kaovilai <[email protected]>
sseago
sseago previously approved these changes Sep 9, 2024
@ywk253100 ywk253100 merged commit 5b4c8cd into vmware-tanzu:main Sep 12, 2024
43 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has-changelog has-unit-tests kind/changelog-not-required PR does not require a user changelog. Often for docs, website, or build changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants