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

[release-3.8] Raise exception when CreateFleet doesn't return any instance #578 #579

Merged
merged 3 commits into from
Oct 18, 2023

Conversation

lukeseawalker
Copy link
Contributor

Description of changes

  • Raise an exception when CreateFleet doesn't return any instance and the error list in the CreateFleet contains only one error entry. The exception raised is built with the same error code coming from the CreateFleet response, so that this error code can be set into the reason when putting the Slurm nodes into DOWN. This is useful to avoid to trigger the fast capacity failover (error code InsufficientInstanceCapacity) when the CreateFleet call doesn't return any instance because of throttling (error code RequestLimitExceeded).

Tests

  • unit tests added
  • manual tested on running cluster

References

n/a

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.

Raise an exception when CreateFleet doesn't return any instance and the error list in the CreateFleet contains only one error entry.
The exception raised is built with the same error code coming from the CreateFleet response, so that this error code can be set into the reason when putting the Slurm nodes into DOWN.
This is useful to avoid to trigger the fast capacity failover (error code InsufficientInstanceCapacity) when the CreateFleet call doesn't return any instance because of throttling (error code RequestLimitExceeded).

Signed-off-by: Luca Carrogu <[email protected]>
@codecov
Copy link

codecov bot commented Oct 18, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (659d56d) 89.93% compared to head (c80a925) 90.03%.

Additional details and impacted files
@@               Coverage Diff               @@
##           release-3.8     #579      +/-   ##
===============================================
+ Coverage        89.93%   90.03%   +0.10%     
===============================================
  Files               16       16              
  Lines             2692     2699       +7     
===============================================
+ Hits              2421     2430       +9     
+ Misses             271      269       -2     
Flag Coverage Δ
unittests 90.03% <100.00%> (+0.10%) ⬆️

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

Files Coverage Δ
src/slurm_plugin/fleet_manager.py 93.51% <100.00%> (+1.10%) ⬆️
src/slurm_plugin/instance_manager.py 100.00% <100.00%> (ø)

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

@lukeseawalker lukeseawalker merged commit 8899511 into aws:release-3.8 Oct 18, 2023
24 of 25 checks passed
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