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: Set default values for traits in VelaUX #913

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

am6737
Copy link
Contributor

@am6737 am6737 commented Oct 5, 2024

  • Addressed the issue where default values for traits (including "cpuscaler", "hpa", "resource", "k8s-update-strategy") were not being set properly.

Description of your changes

Fixes #650

I have:

  • Read and followed KubeVela's contribution process.
  • Related Docs updated properly. In a new feature or configuration option, an update to the documentation is necessary.
  • Run yarn lint to ensure the frontend changes are ready for review.
  • Run make reviewableto ensure the server changes are ready for review.
  • Added backport release-x.y labels to auto-backport this PR if necessary.

Special notes for your reviewer

@am6737 am6737 changed the title fix: Set default values for traits in VelaUX Fix: Set default values for traits in VelaUX Oct 5, 2024
Copy link

codecov bot commented Oct 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.08%. Comparing base (2ab672c) to head (0ee5c80).
Report is 6 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (2ab672c) and HEAD (0ee5c80). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (2ab672c) HEAD (0ee5c80)
apiserver-unittests 1 0
server-e2e-tests 2 1
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #913      +/-   ##
==========================================
- Coverage   59.01%   51.08%   -7.94%     
==========================================
  Files         116      116              
  Lines       19846    16511    -3335     
==========================================
- Hits        11713     8435    -3278     
- Misses       6696     6833     +137     
+ Partials     1437     1243     -194     
Flag Coverage Δ
apiserver-unittests ?
server-e2e-tests 51.08% <ø> (+2.77%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -176,6 +177,32 @@ class UISchema extends Component<Props, State> {
});
};

initFormValues = () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we need to do this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for your feedback! I realized the issue and have updated the code accordingly.

Looking forward to your thoughts!

Added `setDefaultProperties` to ensure default values are correctly set for traits like "cpuscaler", "hpa", "resource", and "k8s-update-strategy".

Signed-off-by: am6737 <1359816810@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] VelaUX does not set the default value of Trait "cpuscaler"
3 participants