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

ci: Use upstream envoy.code.check #19737

Merged
merged 1 commit into from
Mar 9, 2022

Conversation

phlax
Copy link
Member

@phlax phlax commented Jan 30, 2022

Signed-off-by: Ryan Northey ryan@synca.io

Commit Message:

This PR updates CI to use an upstream tool that integrates 4 of the current format CI checks:

  • flake8
  • glint
  • shellcheck
  • yapf

Additional Description:

The tool can be run with:

$ bazel run //tools/code:check  # -- -c glint shellcheck python_yapf python_flake8

The -- --fix flag works for yapf only

Also worth mentioning is that the following will only check changes against eg main (commits/branches/etc should work)

$ bazel run //tools/code:check  -- -s main

This should allow us to use the tool in git hooks once enough of the checks have been integrated

We can add more of the format checks to the tool after

There are also various other planned improvements

See https://github.com/envoyproxy/pytooling/milestones for general roadmap

I would also like to rationalize the format check part of CI as we go (the pytest/tooling ci jobs can be removed fairly imminently)

As the new tool produces quite a bit of logging ive had to make it run first - so as it doesnt bury the logs from other checkers

For that reason, i added a message at the bottom of the log output to advise searching above

A failing check run can be seen here:

In addition to adding the envoy.code.check tool this PR also brings in newer versions of core libs that have been fixed/optimized/cleaned up significantly in this release

release info/milestone for this PR

Next milestone is the next iteration of the dep.checker - mostly cleanups/fixes i think

https://github.com/envoyproxy/pytooling/milestone/2

Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

@repokitteh-read-only repokitteh-read-only bot added the deps Approval required for changes to Envoy's external dependencies label Jan 30, 2022
@repokitteh-read-only
Copy link

CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to (bazel/.*repos.*\.bzl)|(bazel/dependency_imports\.bzl)|(api/bazel/.*\.bzl)|(.*/requirements\.txt)|(.*\.patch).
envoyproxy/dependency-shepherds assignee is @htuch

🐱

Caused by: #19737 was opened by phlax.

see: more, trace.

@phlax phlax force-pushed the tooling-upstream-format-check branch 2 times, most recently from 3dac769 to 02d502e Compare January 30, 2022 19:41
@phlax phlax marked this pull request as draft January 30, 2022 20:02
@phlax phlax force-pushed the tooling-upstream-format-check branch from 02d502e to 749f6d3 Compare January 30, 2022 20:12
@phlax phlax changed the title [WIP] ci: Use upstream envoy.format.check ci: Use upstream envoy.format.check Jan 30, 2022
@phlax phlax marked this pull request as ready for review January 30, 2022 22:26
@phlax phlax requested review from kfaseela and htuch January 30, 2022 22:26
@phlax
Copy link
Member Author

phlax commented Jan 30, 2022

cc @kfaseela @ME-ON1

@phlax phlax marked this pull request as draft January 30, 2022 22:27
@phlax
Copy link
Member Author

phlax commented Jan 30, 2022

oops - wrong PR! sorry!

@phlax phlax changed the title ci: Use upstream envoy.format.check [WIP] ci: Use upstream envoy.format.check Jan 30, 2022
@phlax phlax changed the title [WIP] ci: Use upstream envoy.format.check [WIP] ci: Use upstream envoy.code.check Feb 3, 2022
@phlax phlax force-pushed the tooling-upstream-format-check branch 3 times, most recently from 35eda0b to 631a74d Compare February 7, 2022 05:56
@phlax phlax force-pushed the tooling-upstream-format-check branch 8 times, most recently from a07a158 to dac63b5 Compare March 4, 2022 10:02
@phlax phlax marked this pull request as ready for review March 4, 2022 10:04
@phlax phlax changed the title [WIP] ci: Use upstream envoy.code.check ci: Use upstream envoy.code.check Mar 4, 2022
@phlax phlax force-pushed the tooling-upstream-format-check branch from dac63b5 to a256004 Compare March 4, 2022 10:24
Signed-off-by: Ryan Northey <ryan@synca.io>
@phlax phlax force-pushed the tooling-upstream-format-check branch from a256004 to 03a8b0c Compare March 4, 2022 11:39
@moderation
Copy link
Contributor

Looks great

/lgtm deps

@repokitteh-read-only repokitteh-read-only bot removed the deps Approval required for changes to Envoy's external dependencies label Mar 7, 2022
Copy link
Member

@htuch htuch 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!

@htuch htuch merged commit 4abc226 into envoyproxy:main Mar 9, 2022
JuniorHsu pushed a commit to JuniorHsu/envoy that referenced this pull request Mar 17, 2022
This PR updates CI to use an upstream tool that integrates 4 of the current format CI checks:
- flake8
- glint
- shellcheck
- yapf

The tool can be run with:

$ bazel run //tools/code:check  # -- -c glint shellcheck python_yapf python_flake8
The -- --fix flag works for yapf only

Also worth mentioning is that the following will only check changes against eg main (commits/branches/etc should work)

$ bazel run //tools/code:check  -- -s main
This should allow us to use the tool in git hooks once enough of the checks have been integrated

We can add more of the format checks to the tool after

There are also various other planned improvements

See https://github.com/envoyproxy/pytooling/milestones for general roadmap

I would also like to rationalize the format check part of CI as we go (the pytest/tooling ci jobs can be removed fairly imminently)

As the new tool produces quite a bit of logging ive had to make it run first - so as it doesnt bury the logs from other checkers

For that reason, i added a message at the bottom of the log output to advise searching above

A failing check run can be seen here:

https://dev.azure.com/cncf/envoy/_build/results?buildId=103005&view=logs&j=c5dd2866-6ab3-5f3c-3a44-4cef0ec909b5&t=a9eb66d6-8944-5769-b3f7-476949dadcb8&l=7560
https://dev.azure.com/cncf/envoy/_build/results?buildId=103005&view=logs&j=c5dd2866-6ab3-5f3c-3a44-4cef0ec909b5&t=a9eb66d6-8944-5769-b3f7-476949dadcb8&l=7433
https://dev.azure.com/cncf/envoy/_build/results?buildId=103005&view=logs&j=c5dd2866-6ab3-5f3c-3a44-4cef0ec909b5&t=a9eb66d6-8944-5769-b3f7-476949dadcb8&l=7292
https://dev.azure.com/cncf/envoy/_build/results?buildId=103005&view=logs&j=c5dd2866-6ab3-5f3c-3a44-4cef0ec909b5&t=a9eb66d6-8944-5769-b3f7-476949dadcb8&l=124
https://dev.azure.com/cncf/envoy/_build/results?buildId=103005&view=logs&j=c5dd2866-6ab3-5f3c-3a44-4cef0ec909b5&t=a9eb66d6-8944-5769-b3f7-476949dadcb8&l=251
https://dev.azure.com/cncf/envoy/_build/results?buildId=103005&view=logs&j=c5dd2866-6ab3-5f3c-3a44-4cef0ec909b5&t=a9eb66d6-8944-5769-b3f7-476949dadcb8&l=7050
In addition to adding the envoy.code.check tool this PR also brings in newer versions of core libs that have been fixed/optimized/cleaned up significantly in this release

release info/milestone for this PR

https://github.com/envoyproxy/pytooling/milestone/1
https://github.com/envoyproxy/pytooling/releases/tag/2022-03-04.0

Next milestone is the next iteration of the dep.checker - mostly cleanups/fixes i think

https://github.com/envoyproxy/pytooling/milestone/2

Signed-off-by: Ryan Northey <ryan@synca.io>
Signed-off-by: kuochunghsu <kuochunghsu@pinterest.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