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

Remove urlwait in favor of waitfor #35

Merged
merged 4 commits into from
Nov 5, 2024
Merged

Remove urlwait in favor of waitfor #35

merged 4 commits into from
Nov 5, 2024

Conversation

relud
Copy link
Member

@relud relud commented Nov 4, 2024

as suggested in #28 (comment)

adds support for non-http services based on https://github.com/pmac/urlwait/blob/master/urlwait.py#L89 so that socorro and tecken can also drop urlwait

also adds missing make updatereqs command to match other obs team repos

fixes #38

@relud relud requested a review from willkg November 4, 2024 20:19
@relud relud requested a review from a team as a code owner November 4, 2024 20:19
@relud relud force-pushed the relud-remove-urlwait branch from c022861 to 79685a6 Compare November 4, 2024 21:19
Copy link
Contributor

@willkg willkg 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 not currently set up to test obs-common, but I figured I'd do this comment and then test tomorrow.

obs_common/waitfor.py Show resolved Hide resolved
@@ -28,6 +46,9 @@ def main(args=None):
)
parser.add_argument("--verbose", action="store_true")
parser.add_argument("--timeout", type=int, default=15, help="Wait timeout")
Copy link
Contributor

Choose a reason for hiding this comment

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

I documented this poorly--it's very confusing. What's really going on is that waitfor will keep attempting with a 5-second timeout until this timeout parameter is exceeded.

At some point, we should either rename this argument or fix the documentation. We don't have to do that in this PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

changed the --timeout help string to "Seconds after which to stop retrying. This is separate from the timeout for individual attempts, which is 5 seconds."

Copy link
Contributor

@willkg willkg left a comment

Choose a reason for hiding this comment

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

I suggested a couple of minor changes, but otherwise this is good.

At some point, we should change the name of the timeout argument and docs so that is clearer, but we can do that later.

obs_common/waitfor.py Show resolved Hide resolved
@relud relud requested a review from willkg November 5, 2024 16:01
Copy link
Contributor

@willkg willkg left a comment

Choose a reason for hiding this comment

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

Looks great!

default=15,
help=(
"Seconds after which to stop retrying. This is separate from the timeout "
"for individual attempts, which is 5 seconds."
Copy link
Contributor

Choose a reason for hiding this comment

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

💯

@relud relud added this pull request to the merge queue Nov 5, 2024
Merged via the queue into main with commit 939163f Nov 5, 2024
3 checks passed
@relud relud deleted the relud-remove-urlwait branch November 5, 2024 16:13
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.

Support postgres database url in waitfor
2 participants