Skip to content

Conversation

@gabrielfernandes-codes
Copy link

@gabrielfernandes-codes gabrielfernandes-codes commented Jun 19, 2020

Context

The motivation of this pull request are the following:

1 - For some reason, the response from cgi-fcgi had a different header size in case of the path was non-existent, in this way, even 404 responses weren't failing, since tail +5 was suppressing the response message as well.
2 - Checking only the response message could reduce the customizability of the script, that also could be used to check other endpoint instead only the fpm-status page, so in case this healthz page would reply something as 400, 500 or 503 for example, it wouldn't be possible to fail the health check.

In this way, the changes done substituted a single check for failed responses message, to a verification of failed response codes, in compliance of Kubernetes probe failure requirements.(https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)

Changes

  • Tests included
  • Documentation updated
  • Commit message is clear

Copy link
Owner

@renatomefi renatomefi left a comment

Choose a reason for hiding this comment

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

Hello @fernandesGabriel,

Thanks for this contribution, I think it's a good addition to the script!

I added some comments, and could you please also add tests for the change?

Thanks again!

@renatomefi renatomefi added this to the v0.6.0 milestone Jul 6, 2020
@renatomefi renatomefi added the enhancement New feature or request label Jul 6, 2020
@gabrielfernandes-codes
Copy link
Author

Hi @renatomefi

Sorry for the long time to reply you. I will take a look on your messages, as well as why the tests haven't passed.

@gabrielfernandes-codes gabrielfernandes-codes force-pushed the check-for-response-status-code branch from d6795dc to 2c1bd6c Compare November 28, 2020 17:49
@gabrielfernandes-codes
Copy link
Author

@renatomefi I have updated this branch as my user was associated with my work email. Also made some minor adjustments. Please review and let me know if there is anything I should change. Tests are commented out as it would require a #38 to make it work properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants