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

Fix that pod spec's hash may be changed when new fields are added to the PodSpec #6030

Merged
merged 9 commits into from
Jan 16, 2025

Conversation

fgksgf
Copy link
Member

@fgksgf fgksgf commented Jan 10, 2025

What problem does this PR solve?

What is changed and how does it work?

Code changes

  • Has Go code change
  • Has CI related scripts change

Tests

  • Unit test
  • E2E test
  • Manual test
  • No code

Side effects

  • Breaking backward compatibility
  • Other side effects:

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

Release Notes

Please refer to Release Notes Language Style Guide before writing the release note.


@codecov-commenter
Copy link

codecov-commenter commented Jan 10, 2025

Codecov Report

Attention: Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 69.94%. Comparing base (47fd7e3) to head (c8c890f).
Report is 4 commits behind head on feature/v2.

Additional details and impacted files
@@              Coverage Diff               @@
##           feature/v2    #6030      +/-   ##
==============================================
- Coverage       70.04%   69.94%   -0.11%     
==============================================
  Files             153      154       +1     
  Lines            9441     9508      +67     
==============================================
+ Hits             6613     6650      +37     
- Misses           2828     2858      +30     
Flag Coverage Δ
unittest 69.94% <90.00%> (-0.11%) ⬇️

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

@fgksgf
Copy link
Member Author

fgksgf commented Jan 10, 2025

/run-pull-e2e-kind-v2

1 similar comment
@fgksgf
Copy link
Member Author

fgksgf commented Jan 13, 2025

/run-pull-e2e-kind-v2

@ti-chi-bot ti-chi-bot bot added size/M and removed size/S labels Jan 13, 2025
@fgksgf
Copy link
Member Author

fgksgf commented Jan 15, 2025

/run-pull-e2e-kind-v2


// This prevents the hash from being changed when new fields are added to the `PodSpec` due to K8s version upgrades.
buf := bytes.Buffer{}
_ = podEncoder.Encode(&corev1.Pod{Spec: *spec}, &buf)
Copy link
Member

Choose a reason for hiding this comment

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

panic it to avoid missing unexpected corner case

@fgksgf
Copy link
Member Author

fgksgf commented Jan 16, 2025

/run-pull-e2e-kind-v2

1 similar comment
@fgksgf
Copy link
Member Author

fgksgf commented Jan 16, 2025

/run-pull-e2e-kind-v2

Copy link
Contributor

ti-chi-bot bot commented Jan 16, 2025

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot removed the lgtm label Jan 16, 2025
Copy link
Contributor

ti-chi-bot bot commented Jan 16, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-01-16 07:53:05.959190015 +0000 UTC m=+191457.414236159: ☑️ agreed by csuzhangxc.
  • 2025-01-16 07:53:47.122027278 +0000 UTC m=+191498.577073426: ✖️🔁 reset by ti-chi-bot[bot].

Copy link
Contributor

ti-chi-bot bot commented Jan 16, 2025

New changes are detected. LGTM label has been removed.

@csuzhangxc
Copy link
Member

/run-pull-e2e-kind-v2

@csuzhangxc csuzhangxc merged commit c8b17ac into pingcap:feature/v2 Jan 16, 2025
7 of 8 checks passed
@liubog2008 liubog2008 added the v2 for operator v2 label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants