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

update example to adapt Envoy 1.31 #742

Merged
merged 1 commit into from
Sep 27, 2024
Merged

update example to adapt Envoy 1.31 #742

merged 1 commit into from
Sep 27, 2024

Conversation

spacewander
Copy link
Member

and some more chore changes.
Signed-off-by: spacewander [email protected]

@github-actions github-actions bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 24, 2024
Copy link

codecov bot commented Sep 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.44%. Comparing base (d01ea9d) to head (843fa48).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #742   +/-   ##
=======================================
  Coverage   88.44%   88.44%           
=======================================
  Files         132      132           
  Lines        6475     6475           
=======================================
  Hits         5727     5727           
  Misses        536      536           
  Partials      212      212           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 24, 2024
and some more chore changes.
Signed-off-by: spacewander <[email protected]>
@spacewander spacewander marked this pull request as ready for review September 24, 2024 10:38
google.golang.org/protobuf v1.33.0
mosn.io/htnn/api v0.3.2
google.golang.org/protobuf v1.34.1
mosn.io/htnn/api v0.3.3-0.20240924080219-d01ea9d6301e
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it fair to say this api is not compatible for envoy 1.29 after the lib upgraded? Or we support both 1.28 and 1.31?

Copy link
Member Author

Choose a reason for hiding this comment

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

I wrote a compatible layer for Envoy 1.29, so both Envoy 1.29 and 1.31 are supported. If we need to support Envoy 1.30, we can write a compatible layer for it.

Here are the steps to support Envoy 1.29: https://github.com/mosn/htnn/blob/main/site/content/en/docs/developer-guide/dataplane_support.md#choosing-the-target-data-plane-version. We use replace in go.mod and build tag to switch the Envoy SDK we used as Go doesn't support multiple version of the same library in one module. If you use the latest Envoy (1.31), you don't need to do anything - the support is out of the box.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks a lot! We're using envoy 1.31 for now, and having some old versions running in production as well. In case we will probably need to support multiple envoy versions in the long term for some useful filters, I would like to have your clarification here in the examples to guide us about maintaining multiple envoy versions for this example golang filter.

Copy link
Member Author

Choose a reason for hiding this comment

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

@wonderflow
Feel free to open an issue to ask for a new example about running HTNN on the old Envoy.
For now, you can refer to

COPY patch/switch-envoy-go-version.sh patch/switch-envoy-go-version.sh
COPY common.mk common.mk
# hadolint ignore=DL3003
RUN ./patch/switch-envoy-go-version.sh 1.29.5 && \
cd plugins/ && \
ENVOY_API_VERSION=1.29 make build-so-local

In this living code we build a shared lib target to the istio 1.21.3's data plane (which is covered by the e2e tests).

BTW, I don't recommend using HTNN on Envoy < 1.29. Versions before that are too old unless you can backport the latest Envoy Golang filter to an old version.

Copy link
Contributor

Choose a reason for hiding this comment

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

The dockefile above is helpful, thanks! What is our compatible strategy? I don't want old version support, but in the feature let's say when envoy 1.32 or newer version come out, when will we retire the 1.29 support?

Copy link
Member Author

Choose a reason for hiding this comment

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

What is our compatible strategy?

We will maintain the Envoy X support as long as Envoy still provides security updates for version X or the istio version used by Ant Group (currently 1.21) requires version X.

Copy link
Contributor

Choose a reason for hiding this comment

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

that's cool

@spacewander spacewander merged commit 513925a into main Sep 27, 2024
17 checks passed
@spacewander spacewander deleted the 9241 branch September 27, 2024 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants