-
Notifications
You must be signed in to change notification settings - Fork 502
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
fix: type mismatch in TidbMonitor remoteTimeout #5734
Conversation
Welcome @IMMORTALxJO! It looks like this is your first PR to pingcap/tidb-operator 🎉 |
a36e3d2
to
7013978
Compare
@IMMORTALxJO If we want to modify the CRD, we need to modify the Go struct in types.go and then re-generate the CRD ( |
5b165ea
to
73ea1b8
Compare
@csuzhangxc thank you, I've added the missing file with Go struct. |
It seems still need to re-generate other files, can you run |
@csuzhangxc sorry for the delay, added |
@IMMORTALxJO can you fix the problem reported in CI? https://github.com/pingcap/tidb-operator/actions/runs/12186746269/job/34009983048?pr=5734 |
@csuzhangxc thank you, fixed tests, please check |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5734 +/- ##
==========================================
+ Coverage 57.19% 63.09% +5.89%
==========================================
Files 259 263 +4
Lines 33233 45660 +12427
==========================================
+ Hits 19008 28807 +9799
- Misses 12291 14845 +2554
- Partials 1934 2008 +74
|
/run-all-tests |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: csuzhangxc The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
/cherry-pick release-1.6 |
@csuzhangxc: new pull request created to branch In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
Co-authored-by: Aleksandr Prusov <[email protected]>
* change remoteTimeout type in pingcap.com_tidbmonitors.yaml * fix remoteTimeout tests
What problem does this PR solve?
Fix the bug where
tidbmonitor.spec.prometheus.remoteWrite.remoteTimeout
CRD only accepts integers:However, if we pass an integer and check the operator logs, we will see that the operator fails to unmarshal the TiDBMonitor resource because it expected a string instead:
the definition of the struct field in code - here
What is changed and how does it work?
Changed field type in tidbmonitors CRD, from integer to string.
Code changes
Tests
Side effects
Related changes
Release Notes
Please refer to Release Notes Language Style Guide before writing the release note.