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

Oracle-bm-timeout-fix #456

Merged
merged 2 commits into from
Jan 17, 2025
Merged

Oracle-bm-timeout-fix #456

merged 2 commits into from
Jan 17, 2025

Conversation

a-dubs
Copy link
Collaborator

@a-dubs a-dubs commented Jan 15, 2025

do not squash merge, rebase merge to keep the two separate commits please!

@a-dubs a-dubs force-pushed the oracle-bm-timeout-fix branch 3 times, most recently from c8f275a to 499cfae Compare January 15, 2025 18:06
Copy link
Contributor

@uhryniuk uhryniuk left a comment

Choose a reason for hiding this comment

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

🖖

@a-dubs
Copy link
Collaborator Author

a-dubs commented Jan 15, 2025

no idea what is broken with the ci-integration-tests job ☹️
but ignoring that CI should be good to go

Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

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

I'm ok with it as-is, but I have a suggestion inline.

pycloudlib/oci/instance.py Outdated Show resolved Hide resolved
@a-dubs a-dubs force-pushed the oracle-bm-timeout-fix branch 2 times, most recently from 3323e72 to 9856837 Compare January 17, 2025 17:12
Raising a timeout exception instead of a generic exception allows
for consumers of pycloudlib to retry when instance launching fails
due to timing out. This is important when trying to launch BM
instances which can sometimes fail to provision even when the
Oracle API reports their being sufficient capacity.
@a-dubs a-dubs force-pushed the oracle-bm-timeout-fix branch 2 times, most recently from 11d5061 to a24fc02 Compare January 17, 2025 17:27
Add new class variable `ready_timeout` that can be customizable
per cloud. Changed the default to 10m but kept EC2's at 40m.

Also, updated the public function instance.wait() to explicitly
accept an optional ready_timeout arg. If not given, will use
the default value defined for that instance class.
@a-dubs a-dubs force-pushed the oracle-bm-timeout-fix branch from a24fc02 to b2ea654 Compare January 17, 2025 17:34
Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

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

One more question inline.

@@ -15,6 +15,7 @@ class EC2Instance(BaseInstance):
"""EC2 backed instance."""

_type = "ec2"
ready_timeout = 40 # To keep backwards compatibility (will lower soon)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ready_timeout = 40 # To keep backwards compatibility (will lower soon)
ready_timeout = 40 # To keep backwards compatibility (will lower soon)

(this is a joke, don't actually apply this)

pycloudlib/ibm_classic/instance.py Show resolved Hide resolved
Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

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

LGTM!

@a-dubs a-dubs merged commit 8e029ed into canonical:main Jan 17, 2025
4 of 5 checks passed
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.

3 participants