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

[YUNIKORN-958] Expose node utilisation info in new REST calls #362

Closed
wants to merge 1 commit into from

Conversation

anuraagnalluri
Copy link
Contributor

What is this PR for?

Introduce a field in the output of the new REST call -- /ws/v1/partition/{partition}/nodes that displays % utilization.

What type of PR is it?

  • - Bug Fix
  • - Improvement
  • - Feature
  • - Documentation
  • - Hot Fix
  • - Refactoring

Todos

  • Modify node_tests.go to introduce new test.

What is the Jira issue?

How should this be tested?

  • node_tests.go (still need to implement).

Screenshots (if appropriate)

Screen Shot 2022-01-14 at 2 04 17 PM

Questions:

@anuraagnalluri anuraagnalluri marked this pull request as draft January 14, 2022 22:08
@anuraagnalluri
Copy link
Contributor Author

@manirajv06 Attached screenshot of added utilized field. I didn't specify that the unit for this was % in the field name. Should I rename to UtilizedPct or something of the like?

@anuraagnalluri anuraagnalluri marked this pull request as ready for review January 15, 2022 06:57
Copy link
Contributor

@manirajv06 manirajv06 left a comment

Choose a reason for hiding this comment

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

Also, please ensure unit test has been covered in already existing test methods in handlers_test.go

if v > 0 {
m[name] = true
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we avoid this entire for loop and check each res value of "total" directly in below for loop?

@manirajv06
Copy link
Contributor

@manirajv06 Attached screenshot of added utilized field. I didn't specify that the unit for this was % in the field name. Should I rename to UtilizedPct or something of the like?

I don't think this is required. Specifying 'utilized' filed as displayed in screenshot is good enough.

@manirajv06 manirajv06 closed this Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants