Skip to content

Add Configurable HTTP/2 Support #254

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

Merged
merged 2 commits into from
Oct 7, 2021

Conversation

Gerg
Copy link
Member

@Gerg Gerg commented Oct 1, 2021

  • nginx can not serve both HTTP/1 and HTTP/2 on the same port, if the
    port does not use TLS. See https://trac.nginx.org/nginx/ticket/816.
  • Implementation mirrors force_https to make it user-configurable
  • new staticfile option of enable_http2 and use of environment
    variable ENABLE_HTTP2 to configure nginx
  • Route HTTP/2 configuration is available via manifest when using cf cli
    v7 or with the map-route command when using cf cli v8
  • since cutlass only supports cf cli v6, testing bypasses cutlass with
    "cf curl" commands. These can be replaced with proper cf cli commands
    when upgrading the cf cli version
  • integration tests only runs on api 2.172.0 or higher

[cloudfoundry/routing-release#200]

Co-authored-by: Michael Oleske moleske@vmware.com

Thanks for contributing to the buildpack. To speed up the process of reviewing your pull request please provide us with:

  • A short explanation of the proposed change:

  • An explanation of the use cases your change solves

  • I have viewed signed and have submitted the Contributor License Agreement

  • I have made this pull request to the develop branch

  • I have added an integration test

- nginx can not serve both HTTP/1 and HTTP/2 on the same port, if the
port does not use TLS. See https://trac.nginx.org/nginx/ticket/816.
- Implementation mirrors force_https to make it user-configurable
- new staticfile option of `enable_http2` and use of environment
variable `ENABLE_HTTP2` to configure nginx
- Route HTTP/2 configuration is available via manifest when using cf cli
v7 or with the map-route command when using cf cli v8
- since cutlass only supports cf cli v6, testing bypasses cutlass with
"cf curl" commands. These can be replaced with proper cf cli commands
when upgrading the cf cli version
- integration tests only runs on api 2.172.0 or higher

[cloudfoundry/routing-release#200]

Co-authored-by: Michael Oleske <moleske@vmware.com>
@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/179788221

The labels on this github issue will be updated when the story is started.

Expect(err).To(BeNil())
apiVersion, err := semver.Make(apiVersionString)
Expect(err).To(BeNil())
apiHasHttp2, err := semver.ParseRange("> 2.172.0")
Copy link
Member

Choose a reason for hiding this comment

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

Do all v3 endpoints support HTTP/2 ? This semver will pass all v3 endpoints.

However, answering/fixing this is probably not required for this PR as we don't really check this in other parts of the test

Copy link
Member

Choose a reason for hiding this comment

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

We need capi 1.118.0 which has api version 2.172.0 and 3.107.0. We only need to check 2.x.x version as capi releases always bump api version. We could switch it to 3.107.0 if that makes it less confusing

Copy link
Member

Choose a reason for hiding this comment

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

No, that makes sense. Thanks for explaining.

I didn't make the connection that you don't care about v2 vs v3 but instead you care about the underlying CAPI functionality. I also didn't make the connection that ensuring the api version 2.172.0 also guarantees the specific v3 endpoints you require.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, but shouldn't the > read >=?

Copy link
Member

Choose a reason for hiding this comment

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

Yes you're right. I shall update that

@robdimsdale
Copy link
Member

This looks good, and the integration tests pass. There are some stylistic changes I'd like to see (e.g. enableHttp2 should really be enableHTTP2) but we don't have to block this PR on those changes.

@robdimsdale robdimsdale merged commit d0930d1 into cloudfoundry:develop Oct 7, 2021
@moleske moleske deleted the enable_http2 branch October 7, 2021 17:46
Gerg added a commit to pet-forks/docs-buildpacks that referenced this pull request Oct 8, 2021
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.

4 participants