saltstack / saltstack/salt

http.wait_for_successful_query behaviour with `wait_for` and `request_interval`

Open
#55,967 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug severity-medium
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

Description of Issue

If request_interval is a large value, it can extend the wait time well beyond wait_for.

#51045 is similar issue with excessive waiting

Steps to Reproduce Issue
salt-call -l trace --local http.wait_for_successful_query wait_for=2 request_interval=100 http://127.0.0.1:5999

There is nothing on port 5999, so the request times out, but we end up waiting request_interval

Versions Report

This affects the master branch code.

This does not affect any release version for salt, as they do not have request_interval and will instead spam requests as fast as possible until wait_for. That was fixed #53738

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the provided salt-call reproduction, then inspect the implementation of http.wait_for_successful_query and the handling of wait_for and request_interval. Confirm the current timing behavior and identify existing tests around this entry point. Done means a large request_interval cannot extend the total wait beyond wait_for, with the behavior covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.