Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(#8582): fixes http2 declaration warning #8661

Merged
merged 2 commits into from
Oct 24, 2023

Conversation

mrjones-plip
Copy link
Contributor

@mrjones-plip mrjones-plip commented Oct 24, 2023

fixes http2 declaration warning

close #8582

Code review checklist

  • Readable: Concise, well named, follows the style guide, documented if necessary.
  • Tested: Unit and/or e2e where appropriate
  • Backwards compatible: Works with existing data and configuration or includes a migration. Any breaking changes documented in the release notes.

Compose URLs

If Build CI hasn't passed, these may 404:

License

The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.

@mrjones-plip
Copy link
Contributor Author

How to test:

  • check out this branch
  • deploy CHT4 with docker helper
  • check with curl that CHT defaults to http2, can be forced to http2 and can fall back to http1.1:
    curl  -sI  https://CHT_URL:CHT_PORT/  -o/dev/null -w '%{http_version}\n' 
    curl --http2 -sI  https://CHT_URL:CHT_PORT  -o/dev/null -w '%{http_version}\n' 
    curl --http1.1 -sI  https://CHT_URL:CHT_PORT/  -o/dev/null -w '%{http_version}\n' 
    
  • find nginx container name: docker ps --format '{{.Names}}'|grep nginx
  • assuming your container is called 4_4_test_nginx_1, copy in updated config: docker exec -it 4_4_test_nginx_1 /usr/sbin/nginx -s reload
  • recheck with curl that CHT defaults to http2, can be forced to http2 and can fall back to http1.1:
    curl  -sI  https://CHT_URL:CHT_PORT/  -o/dev/null -w '%{http_version}\n' 
    curl --http2 -sI  https://CHT_URL:CHT_PORT  -o/dev/null -w '%{http_version}\n' 
    curl --http1.1 -sI  https://CHT_URL:CHT_PORT/  -o/dev/null -w '%{http_version}\n' 
    
  • restart container and check with docker logs CONTAINER_NAME that the warning isn't there: warn] the "listen ... http2" directive is deprecated

Copy link
Contributor

@nydr nydr left a comment

Choose a reason for hiding this comment

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

LGTM, love that you're paying attention to these details!

Sidenote: This directive was introduced in 1.25.1 [ref] which the nginx container was upgraded to a few months ago. Since the configuration is packaged with the binary I can't imagine it can cause any issues but noting this just in case

@nydr
Copy link
Contributor

nydr commented Oct 24, 2023

Optional: If you feel up for it feel free to add your test cases to nginx/tests/with_mock.bats, currently it's only looking at http headers

@mrjones-plip mrjones-plip merged commit 242d184 into master Oct 24, 2023
34 checks passed
@mrjones-plip mrjones-plip deleted the 8582-tidy-up-http2-warning branch October 24, 2023 18:36
@mrjones-plip
Copy link
Contributor Author

Optional: If you feel up for it feel free to add your test cases to nginx/tests/with_mock.bats, currently it's only looking at http headers

d'oh - Missed opportunity here! I should have said "Run Makefile tests" as you already had tests in there for http1.1 and http2 checks. That said, I skipped adding more because what we have is sufficient.

Benmuiruri pushed a commit that referenced this pull request Oct 26, 2023
* fix http2 declaration per #8582

* remove http2 from port 80
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.

improve nginx config to avoid "listen ... http2 directive is deprecated" warning
2 participants