update wrong memory format in the flinkdeployment-cr.yaml#7585
update wrong memory format in the flinkdeployment-cr.yaml#7585XiShanYongYe-Chang wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses an inconsistency in memory resource definitions within the project's E2E test manifests and corresponding test assertions. By standardizing memory units to 'Mi', the changes ensure that resource requests are correctly interpreted by the Kubernetes scheduler and match the expected behavior in the test suite. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request corrects the memory resource units in several E2E test files and manifests, changing '100m' and '200m' to '100Mi' and '200Mi' to correctly represent mebibytes instead of millicores for memory. There are no review comments, and I have no feedback to provide.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7585 +/- ##
==========================================
- Coverage 42.16% 42.15% -0.01%
==========================================
Files 879 879
Lines 54731 54731
==========================================
- Hits 23076 23074 -2
- Misses 29911 29913 +2
Partials 1744 1744
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: changzhen <changzhen5@huawei.com>
60206c8 to
5ab6b57
Compare
| })) | ||
| actualCPU := component.ReplicaRequirements.ResourceRequest[corev1.ResourceCPU] | ||
| actualMemory := component.ReplicaRequirements.ResourceRequest[corev1.ResourceMemory] | ||
| gomega.Expect(actualCPU.Cmp(resource.MustParse(expectedCPU))).Should(gomega.Equal(0), |
There was a problem hiding this comment.
How about:
| gomega.Expect(actualCPU.Cmp(resource.MustParse(expectedCPU))).Should(gomega.Equal(0), | |
| gomega.Expect(actualCPU.Equal(resource.MustParse(expectedCPU))).Should(gomega.BeTure, |
There was a problem hiding this comment.
The Cmp method and the Equal method both perform semantic comparisons (ignoring differences in internal formats), with the distinction lying in their return values. At the underlying level, both methods first convert the two Quantities into a unified numerical form before performing the comparison. Therefore, both approaches are correct in their implementation and have no fundamental difference.
There was a problem hiding this comment.
Yes, you're totally right. The Equal function is just a wrapper around q.Cmp(v) == 0, so both are fine with me. My only concern is that using Equal seems more common and easier to understand. This is just my suggestion, so feel free to take it or leave it.
|
/hold |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
The
flinkdeployment-cr.yamluse 100m (milli-bytes) of memory. As noted, memory should be specified in realistic units like Mi (e.g., 100Mi / 100M) rather than milli-bytes (m), which represent fractional bytes and are not meaningful for memory in Kubernetes.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: