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

Moving our Python tools from on-host Python to Hermetic Python. #1033

Merged
merged 9 commits into from
Oct 26, 2023

Conversation

mum4k
Copy link
Collaborator

@mum4k mum4k commented Oct 25, 2023

  • updated the bazel WORKSPACE to use hermetic Python.
  • bazel-ified format_python_tools and flake8 executions.
  • migrated our Python requirements management to using a lockfile. Not updating
    the requirements in this PR to keep it small, will do in a follow-up. Just merging all
    the requirements and still using == pins in this PR.
  • removing the pin on the envoyproxy/envoy-build-ubuntu, we are once again
    using the same version as Envoy.
  • disabling our clang-tidy CI check. It doesn't work with the new Docker
    image and hermetic Python. Envoy is working on a new solution upstream which
    we will adopt once available.
  • passing the correct directory to the check_format and format_python_tools
    script, so that it actually checks our files for formatting. This was a
    pre-existing issue which resulted in multiple format violations. Making the
    format check information-only at this PR. Will fix formatting of all files in
    a follow-up.
  • rewrote instructions on how to update Python dependencies. These documents
    will be updated once more in a follow-up PR once I remove pins (==) from
    requirements.in.

Works on #1032

- updated the bazel WORKSPACE to use hermetic Python.
- bazel-ified `format_python_tools` and `flake8` executions.
- migrated our Python requirements management to using a lockfile. Not updating
  the requirements in this PR to keep it small, will do in a follow-up.
- removing the pin on the `envoyproxy/envoy-build-ubuntu`, we are once again
  using the same version as Envoy.
- disabling our `clang-tidy` CI check. It doesn't work with the new Docker
  image and hermetic Python. Envoy is working on a new solution upstream which
  we will adopt once available.
- passing the correct directory to the `check_format` and `format_python_tools`
  script, so that it actually checks our files for formatting. This was a
  pre-existing issue which resulted in multiple format violations. Making the
  format check information-only at this PR. Will fix formatting of all files in
  a follow-up.

Signed-off-by: Jakub Sobon <mumak@google.com>
Signed-off-by: Jakub Sobon <mumak@google.com>
Signed-off-by: Jakub Sobon <mumak@google.com>
Signed-off-by: Jakub Sobon <mumak@google.com>
Signed-off-by: Jakub Sobon <mumak@google.com>
Signed-off-by: Jakub Sobon <mumak@google.com>
@mum4k mum4k marked this pull request as ready for review October 25, 2023 19:35
@mum4k mum4k requested review from phlax and fei-deng October 25, 2023 19:35
@phlax phlax self-assigned this Oct 25, 2023
Copy link
Member

@phlax phlax left a comment

Choose a reason for hiding this comment

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

hopefully helpful review, comments inline ...

.bazelrc Show resolved Hide resolved
bazel/python_dependencies.bzl Outdated Show resolved Hide resolved
docs/root/updating_envoy_dependency.md Outdated Show resolved Hide resolved
tools/BUILD Show resolved Hide resolved
tools/base/BUILD Outdated Show resolved Hide resolved
tools/flake8.py Show resolved Hide resolved
tools/format_python_tools.py Show resolved Hide resolved
Signed-off-by: Jakub Sobon <mumak@google.com>
Signed-off-by: Jakub Sobon <mumak@google.com>
Signed-off-by: Jakub Sobon <mumak@google.com>
@mum4k
Copy link
Collaborator Author

mum4k commented Oct 26, 2023

@phlax PTAL

Copy link
Member

@phlax phlax left a comment

Choose a reason for hiding this comment

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

lgtm, thanks @mum4k

@mum4k mum4k merged commit 10ae347 into envoyproxy:main Oct 26, 2023
10 checks passed
@mum4k mum4k deleted the hermetic_python branch October 26, 2023 17:41
mum4k added a commit to mum4k/nighthawk that referenced this pull request Oct 26, 2023
Not used since envoyproxy#1033.

Signed-off-by: Jakub Sobon <mumak@google.com>
mum4k added a commit that referenced this pull request Oct 27, 2023
Not used since #1033.

Signed-off-by: Jakub Sobon <mumak@google.com>
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.

3 participants