Fix Content-Length header missing + enable ping testing#7
Open
matteopozza wants to merge 2 commits intomainfrom
Open
Fix Content-Length header missing + enable ping testing#7matteopozza wants to merge 2 commits intomainfrom
matteopozza wants to merge 2 commits intomainfrom
Conversation
We noticed that AlmaLinux server stopped returning the Content-Length header, which the tool uses to make some checks. Turns out this is due to python requests including gzip as an Accept-Encoding, which is then chosen by AlmaLinux server as the encoding used for the reply. The commit fixes the issue declaring to accept only deflate as encoding. When deflate is chosen, Content-Length header is returned among the headers of the reply. Currently, when we run the tool as a container, we pass the environment variable IMAGEBUILDER_DISABLE_PINGING. If the variable is actually not defined in the environment running the container, the result is that the variable IMAGEBUILDER_DISABLE_PINGING gets defined and it is passed as an empty string. As a result, pinging tests are never executed. The commit fixes the problem by checking if the variable is either None or matches and empty string.
Author
|
Commit a10139c is to fix this style issue: https://pylint.pycqa.org/en/latest/user_guide/messages/refactor/too-many-statements.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We noticed that AlmaLinux server stopped returning the Content-Length header,
which the tool uses to make some checks. Turns out this is due to python
requests including gzip as an Accept-Encoding, which is then chosen by
AlmaLinux server as the encoding used for the reply. The commit fixes the issue
declaring to accept only deflate as encoding. When deflate is chosen,
Content-Length header is returned among the headers of the reply.
Currently, when we run the tool as a container, we pass the environment
variable IMAGEBUILDER_DISABLE_PINGING. If the variable is actually not defined
in the environment running the container, the result is that the variable
IMAGEBUILDER_DISABLE_PINGING gets defined and it is passed as an empty string.
As a result, pinging tests are never executed. The commit fixes the problem by
checking if the variable is either None or matches and empty string.