Skip to content

Conversation

@mertyldrm
Copy link

@mertyldrm mertyldrm commented Oct 22, 2025

What this PR does / why we need it: Round IntervalFunction under gtime.go file had a faulty condition for 2 years range, since the condition was set to 42 days in ms, every interval longer than 42 days was set to 1 years of interval.

Which issue(s) this PR fixes: This PR fixes the case for 2 years by fixing the condition to 2 years in ms

Fixes
I updated the condition to 63072000000 ms which is 2 years.

Special notes for your reviewer:

Since 3628800000 ms is equal to 42 days any range longer than that falls to the default case which is 1 year. I updated the condition to 63072000000 ms which is 2 years.
@CLAassistant
Copy link

CLAassistant commented Oct 22, 2025

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ mertyldrm
❌ Yusuf Mert Yıldırım


Yusuf Mert Yıldırım seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@grafana-plugins-platform-bot grafana-plugins-platform-bot bot moved this from 📬 Triage to 🔬 In review in Plugins Platform / Grafana Community Oct 22, 2025
Copy link
Contributor

@itsmylife itsmylife left a comment

Choose a reason for hiding this comment

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

That's a nice catch. Do you mind adding/updating the unit test related to that value?

@github-project-automation github-project-automation bot moved this from 🔬 In review to 🧑‍💻 In development in Plugins Platform / Grafana Community Oct 24, 2025
@mertyldrm
Copy link
Author

there you go, i fixed the failing test and added a new one for the default case

@zoltanbedi
Copy link
Member

@mertyldrm your last commit was not made with your GitHub email. Can you please fix that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🧑‍💻 In development

Development

Successfully merging this pull request may close these issues.

4 participants