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
chore: bazelified python services are tested for missing modules #12503
Conversation
Thanks for opening a PR! 💯
Howto
More infoPlease take a moment to read through the Magma project's
If this is your first Magma PR, also consider reading
|
301e1ce
to
031fc22
Compare
Oops! Looks like you failed the Howto
♻️ Updated: ✅ The check is passing the DCO check after the last commit. |
f2dc96b
to
6f5398a
Compare
6f5398a
to
031fc22
Compare
Do you have screenshots of what failure cases might look like in CI? What type error a user might see, for example. |
Yes, here is a failed summary: You can find the complete log here: https://github.com/magma/magma/runs/6095247329?check_suite_focus=true |
Looks great! :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great and this seems useful to have! I keep thinking that it would be great to have a comment bot that comments on failure to point to relevant Wiki page or the #bazel channel, but that is out of scope for this PR :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally - lgtm.
Signed-off-by: Krisztián Varga <krisztian.varga@tngtech.com>
Signed-off-by: Krisztián Varga <krisztian.varga@tngtech.com>
031fc22
to
417ca6e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Yes, here is a failed summary: You can find the complete log here: https://github.com/magma/magma/runs/6095247329?check_suite_focus=true
Yes, this is in progress and will be possible with the CI code ownership. |
…ma#12503) * chore: bazelified python services are tested for missing modules Signed-off-by: Krisztián Varga <krisztian.varga@tngtech.com> * chore: test_python_service_imports.sh is included in the CI pipeline Signed-off-by: Krisztián Varga <krisztian.varga@tngtech.com>
Signed-off-by: Krisztián Varga krisztian.varga@tngtech.com
Summary
The bazelified python services can be built successfully with bazel, but this does not mean that every necessary module is imported. The script provided here starts up these services and looks for
ModuleNotFoundError
in the logs. The script is added to the CI pipeline inside the "Bazel Build & Test" job.Test Plan
To test all python services:
bazel/scripts/test_python_service_imports.sh
To test all python services inside a provided directory (recursively):
bazel/scripts/test_python_service_imports.sh lte/gateway/python/magma/
To test a single specified service:
bazel/scripts/test_python_service_imports.sh lte/gateway/python/magma/monitord:monitord
Additional Information