Skip to content

fix: add guard clause for MetricsInterval#2084

Merged
nddq merged 4 commits intomicrosoft:mainfrom
uuditmisra:fix-ticker-panic
Mar 20, 2026
Merged

fix: add guard clause for MetricsInterval#2084
nddq merged 4 commits intomicrosoft:mainfrom
uuditmisra:fix-ticker-panic

Conversation

@uuditmisra
Copy link
Copy Markdown
Contributor

@uuditmisra uuditmisra commented Feb 27, 2026

Prevent panic: runtime error: invalid duration when MetricsInterval is missing or set to 0. Added a default fallback to 10s and a warning log to inform the user of the configuration issue.

Closes #2029

Description

Please provide a brief description of the changes made in this pull request.

Related Issue

If this pull request is related to any issue, please mention it here. Additionally, make sure that the issue is assigned to you before submitting this pull request.

Checklist

  • I have read the contributing documentation.
  • I signed and signed-off the commits (git commit -S -s ...). See this documentation on signing commits.
  • I have correctly attributed the author(s) of the code.
  • I have tested the changes locally.
  • I have followed the project's style guidelines.
  • I have updated the documentation, if necessary.
  • I have added tests, if applicable.

Screenshots (if applicable) or Testing Completed

Please add any relevant screenshots or GIFs to showcase the changes made.

Additional Notes

Add any additional notes or context about the pull request here.


Please refer to the CONTRIBUTING.md file for more information on how to contribute to this project.

@uuditmisra uuditmisra requested a review from a team as a code owner February 27, 2026 20:23
@uuditmisra
Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

@uuditmisra uuditmisra force-pushed the fix-ticker-panic branch 3 times, most recently from c139c30 to 981eee8 Compare March 3, 2026 05:43
@uuditmisra uuditmisra changed the title fix(pkg/plugin/dropreason): add guard clause for MetricsInterval fix: add guard clause for MetricsInterval Mar 3, 2026
Copy link
Copy Markdown
Member

@nddq nddq left a comment

Choose a reason for hiding this comment

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

The approach is sound overall, just need to move the fix to the correct position to it will apply to all plugins. That's said, might be a good idea to include the default metricsInterval in the Helm values as well for this PR.

Comment thread pkg/plugin/dropreason/dropreason_linux.go
Comment thread pkg/plugin/dropreason/dropreason_linux_test.go Outdated
Signed-off-by: Uudit Misra <uuditmisra@gmail.com>
Signed-off-by: Uudit Misra <uuditmisra@gmail.com>
Signed-off-by: Uudit Misra <uuditmisra@gmail.com>
@nddq nddq added this pull request to the merge queue Mar 20, 2026
Merged via the queue into microsoft:main with commit 7c589a7 Mar 20, 2026
29 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.

[Bug] Retina Agent panics on startup when MetricsInterval is not provided

2 participants