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

Refactor logic in _is_node_in_replacement_valid() to account for node.instance being None #620

Conversation

dreambeyondorange
Copy link
Contributor

Tests

  • Ran unit tests
  • Created local clusters with a mocked delay in instance_manager()

References

  • Link to impacted open issues.
  • Link to related PRs in other packages (i.e. cookbook, node).
  • Link to documentation useful to understand the changes.

Checklist

  • Make sure you are pointing to the right branch.
  • If you're creating a patch for a branch other than develop add the branch name as prefix in the PR title (e.g. [release-3.6]).
  • Check all commits' messages are clear, describing what and why vs how.
  • Make sure to have added unit tests or integration tests to cover the new/modified code.
  • Check if documentation is impacted by this change.

Please review the guidelines for contributing and Pull Request Instructions.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link

codecov bot commented Feb 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.78%. Comparing base (b5c8bb5) to head (a8ca0e1).

Additional details and impacted files
@@             Coverage Diff              @@
##           release-3.9     #620   +/-   ##
============================================
  Coverage        90.78%   90.78%           
============================================
  Files               20       20           
  Lines             3135     3137    +2     
============================================
+ Hits              2846     2848    +2     
  Misses             289      289           
Flag Coverage Δ
unittests 90.78% <100.00%> (+<0.01%) ⬆️

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.

@dreambeyondorange dreambeyondorange force-pushed the backing_instance_timeout branch 2 times, most recently from bf18615 to 19e3106 Compare March 1, 2024 01:55
@dreambeyondorange dreambeyondorange changed the title Refactor logic in _is_node_in_replacement_valid to account for node.instance being None Refactor logic in _is_node_in_replacement_valid() to account for node.instance being None Mar 1, 2024
hanwen-pcluste
hanwen-pcluste previously approved these changes Mar 1, 2024
@dreambeyondorange dreambeyondorange merged commit ecaffb8 into aws:release-3.9 Mar 1, 2024
11 checks passed
dreambeyondorange added a commit that referenced this pull request Mar 1, 2024
…nt_valid()`, `is_backing_instance_valid()`, and unit tests (#622)

* Add logic to `is_backing_instance_valid()` to check the IP to make sure the instance matches what is being tracked (#618)

The missing instance map did not track what the IP address was that was associated with the slurm node.
Because of this if a new instance is launched before an instance becomes healthy, the increment is not reset
for the instance count map.  This change uses a class object to track the data and links the node name to the ip.

Also use the `is_backing_instance_valid()` function in `is_state_healthy()` instead of the plain `node.instance`
object check to allow for the delay in EC2 consistency.

* Refactor logic in `_is_node_in_replacement_valid()` to account for `node.instance` being `None` (#620)

* Add unit tests to cover max_count > 0 in _is_node_in_replacement_valid
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.

2 participants