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: remove duplicated form.getFieldValue in ensureValidAcceleratorType #2698

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

yomybaby
Copy link
Member

@yomybaby yomybaby commented Sep 9, 2024

TL;DR

Fixed form field value retrieval for accelerator type in ResourceAllocationFormItems component.

What changed?

Updated the ensureValidAcceleratorType function(#2628) to correctly retrieve the accelerator type from the form. The previous implementation was incorrectly nested, potentially leading to undefined values. The new implementation directly accesses the 'resource.acceleratorType' field.

How to test?

Please ref to the #2628 's "How to test" section

Why make this change?

This change ensures that the correct accelerator type is always retrieved from the form, preventing potential bugs or unexpected behavior when validating or updating the accelerator type. It improves the reliability of the resource allocation process and enhances the overall user experience when configuring resources.

Copy link

graphite-app bot commented Sep 9, 2024

Your org requires the Graphite merge queue for merging into main

Add the label “flow:merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “flow:hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@github-actions github-actions bot added the size:XS ~10 LoC label Sep 9, 2024
Copy link
Member Author

yomybaby commented Sep 9, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @yomybaby and the rest of your teammates on Graphite Graphite

Copy link

github-actions bot commented Sep 9, 2024

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements 5.47% 337/6156
🔴 Branches 5.06% 214/4230
🔴 Functions 3.11% 63/2023
🔴 Lines 5.37% 323/6012

Test suite run success

90 tests passing in 11 suites.

Report generated by 🧪jest coverage report action from d591ffe

@yomybaby yomybaby marked this pull request as ready for review September 9, 2024 12:59
@yomybaby yomybaby merged commit 7eaa5f1 into main Sep 9, 2024
10 checks passed
@yomybaby yomybaby deleted the fix/duplicated-form-getfieldvalue branch September 9, 2024 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XS ~10 LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant