Skip to content

Improved logging#10

Open
sbouchet wants to merge 3 commits into
mainfrom
improved_logging
Open

Improved logging#10
sbouchet wants to merge 3 commits into
mainfrom
improved_logging

Conversation

@sbouchet
Copy link
Copy Markdown
Collaborator

@sbouchet sbouchet commented Jun 2, 2026

No description provided.

sbouchet added 3 commits June 2, 2026 14:52
Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>
Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>
Signed-off-by: Stephane Bouchet <sbouchet@redhat.com>

response="000"
count=0
while [ "${response}" != "200" ] && [ ${count} -lt ${TIMEOUT} ]; do
Copy link
Copy Markdown
Contributor

@adietish adietish Jun 2, 2026

Choose a reason for hiding this comment

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

Overall, good improvement: it keeps trying unless response is 200.
But then, if I get this right, it would also do 120 attemps: TIMEOUT is 120, comment says it's seconds. The check counts the attempts though and turns false once count TIMEOUT.
Wrong?

Copy link
Copy Markdown
Collaborator Author

@sbouchet sbouchet Jun 2, 2026

Choose a reason for hiding this comment

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

yes, it will attempt 120 times before failling. i'm using the same timeout as for waiting on the pod to be in running state.
notice the sleep time ( 1s ) so 120 attempts is indeed nearly that amount of time :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ok, still a bit odd to read "do while the number of attempts is lower than the timeout in seconds" 😄
This complaint is more in the realm of nitpicks anyhow.

Copy link
Copy Markdown
Contributor

@adietish adietish left a comment

Choose a reason for hiding this comment

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

+1 beside the TIMEOUT being "number-of-attempts" if my understand is correct (see comment below)

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.

2 participants