Skip to content

Less verbose curl health checks#1462

Merged
smola merged 1 commit intomainfrom
smola/healthcheck-no-progress
Aug 8, 2023
Merged

Less verbose curl health checks#1462
smola merged 1 commit intomainfrom
smola/healthcheck-no-progress

Conversation

@smola
Copy link
Copy Markdown
Member

@smola smola commented Aug 7, 2023

Description

Cleaner logs.

Before:

08:08:13.947 DEBUG    Healthcheck #12: ExecResult(exit_code=7, output=b'  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n\r  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\r  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\ncurl: (7) Failed to connect to localhost port 7777 after 0 ms: Connection refused\n')
08:08:24.943 DEBUG    Healthcheck #13: ExecResult(exit_code=22, output=b'  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n\r  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\r  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0\r  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0\r  0     0    0     0    0     0      0      0 --:--:--  0:00:03 --:--:--     0\r  0     0    0     0    0     0      0      0 --:--:--  0:00:04 --:--:--     0\r  0     0    0     0    0     0      0      0 --:--:--  0:00:05 --:--:--     0\r  0     0    0     0    0     0      0      0 --:--:--  0:00:06 --:--:--     0\r  0     0    0     0    0     0      0      0 --:--:--  0:00:07 --:--:--     0\r  0     0    0     0    0     0      0      0 --:--:--  0:00:08 --:--:--     0\r  0     0    0     0    0     0      0      0 --:--:--  0:00:09 --:--:--     0\r  0  1046    0     0    0     0      0      0 --:--:--  0:00:09 --:--:--     0\ncurl: (22) The requested URL returned error: 404\n')

After:

12:21:01.169 DEBUG    Healthcheck #5: ExecResult(exit_code=7, output=b'curl: (7) Failed to connect to localhost port 7777 after 0 ms: Connection refused\n')
12:21:07.115 DEBUG    Healthcheck #6: ExecResult(exit_code=22, output=b'curl: (22) The requested URL returned error: 404\n')

Motivation

Workflow

  1. ⚠️⚠️ Create your PR as draft
  2. Follow the style guidelines of this project (See how to easily lint the code)
  3. Work on you PR until the CI passes (if something not related to your task is failing, you can ignore it)
  4. Mark it as ready for review

Once your PR is reviewed, you can merge it! ❤️

Reviewer checklist

  • Check what scenarios are modified. If needed, add the relevant label (run-parametric-scenario, run-profiling-scenario...). If this PR modifies any system-tests internal, then add the run-all-scenarios label (more info).
  • CI is green
    • If not, failing jobs are not related to this change (and you are 100% sure about this statement)
  • if any of build-some-image label is present
    1. is the image labl have been updated ?
    2. just before merging, locally build and push the image to hub.docker.com
  • if a scenario is added (or removed), add (or remove) it in system-test-dasboard nightly

@smola smola force-pushed the smola/healthcheck-no-progress branch 3 times, most recently from 12d35b8 to 2cfa04d Compare August 7, 2023 10:43
@smola smola changed the title Use --no-progress-meter on curl health checks Less verbose curl health checks Aug 7, 2023
@smola smola force-pushed the smola/healthcheck-no-progress branch from 2cfa04d to 40fa56c Compare August 7, 2023 11:00
Cleaner logs.

Before:

```
08:08:13.947 DEBUG    Healthcheck #12: ExecResult(exit_code=7, output=b'  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n\r  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\r  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\ncurl: (7) Failed to connect to localhost port 7777 after 0 ms: Connection refused\n')
08:08:24.943 DEBUG    Healthcheck #13: ExecResult(exit_code=22, output=b'  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n                                 Dload  Upload   Total   Spent    Left  Speed\n\r  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0\r  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0\r  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0\r  0     0    0     0    0     0      0      0 --:--:--  0:00:03 --:--:--     0\r  0     0    0     0    0     0      0      0 --:--:--  0:00:04 --:--:--     0\r  0     0    0     0    0     0      0      0 --:--:--  0:00:05 --:--:--     0\r  0     0    0     0    0     0      0      0 --:--:--  0:00:06 --:--:--     0\r  0     0    0     0    0     0      0      0 --:--:--  0:00:07 --:--:--     0\r  0     0    0     0    0     0      0      0 --:--:--  0:00:08 --:--:--     0\r  0     0    0     0    0     0      0      0 --:--:--  0:00:09 --:--:--     0\r  0  1046    0     0    0     0      0      0 --:--:--  0:00:09 --:--:--     0\ncurl: (22) The requested URL returned error: 404\n')
```

After:

```
12:21:01.169 DEBUG    Healthcheck #5: ExecResult(exit_code=7, output=b'curl: (7) Failed to connect to localhost port 7777 after 0 ms: Connection refused\n')
12:21:07.115 DEBUG    Healthcheck #6: ExecResult(exit_code=22, output=b'curl: (22) The requested URL returned error: 404\n')
```
@smola smola force-pushed the smola/healthcheck-no-progress branch from 40fa56c to 3fb42f0 Compare August 7, 2023 11:03
@smola smola marked this pull request as ready for review August 7, 2023 11:14
@smola smola requested a review from a team as a code owner August 7, 2023 11:14
Copy link
Copy Markdown
Collaborator

@cbeauchesne cbeauchesne left a comment

Choose a reason for hiding this comment

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

Could you copy here the output when the healthcheck fails ?

@smola
Copy link
Copy Markdown
Member Author

smola commented Aug 8, 2023

@cbeauchesne In the description I posted examples of how failing healthcheck attempts show up in the logs. When the healthcheck completely fails, the output to the terminal is almost unchanged:

Executing warmups...
Exit: Healthcheck curl --fail --silent --show-error localhost:7777 failed for system-tests-weblog
! _pytest.outcomes.Exit: Healthcheck xcurl --fail --silent --show-error localhost:7777 failed for system-tests-weblog !

@cbeauchesne
Copy link
Copy Markdown
Collaborator

🤦 😄

@smola smola merged commit 6f1eb1b into main Aug 8, 2023
@smola smola deleted the smola/healthcheck-no-progress branch August 8, 2023 10:31
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