-
Notifications
You must be signed in to change notification settings - Fork 592
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: Fix scripts for Bazel integration tests #13978
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
|
Oops! Looks like you failed the Howto
♻️ Updated: ✅ The check is passing the Python Format Check after the last commit. |
@@ -58,29 +58,30 @@ DENY_LIST_NOT_YET_BAZELIFIED=( | |||
"./lte/gateway/python/integ_tests/cloud_tests" | |||
"./lte/gateway/python/integ_tests/federated_tests" | |||
"./lte/gateway/python/integ_tests/s1aptests/workflow" | |||
"./lte/gateway/python/integ_tests/s1aptests/test_enable_ipv6_iface.py" |
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.
FYI: This just changes the order of the files, no files added or removed.
Was this just a Bazel issue or did it affect the tests on the make-build AGW as well? |
@@ -60,7 +60,8 @@ | |||
from orc8r.protos.directoryd_pb2_grpc import GatewayDirectoryServiceStub | |||
|
|||
DEFAULT_GRPC_TIMEOUT = 10 | |||
|
|||
MAGTIVATE_CMD = "source /home/vagrant/build/python/bin/activate" |
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.
This is just a refactoring as these values were used in various places.
@@ -21,74 +21,34 @@ | |||
|
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.
Reasons for the refactorings:
- the script was using sys.exit for communication that values were already changed - especially the return code 1 did basically "override" the return code 1 if the script was not found
- in general sys.exit > 0 should only be used for errors
- it does not seem relevant for the usage if the config values already had the desired values
- -> do not check the current values and always override
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 % py formatting fixes
respective tests (in make based workflow) did run successfully with this change - see https://github.com/nstng/magma/actions/runs/3091802252
@mpfirrmann it was just an issue with bazel - the solution for |
Signed-off-by: Krisztián Varga <krisztian.varga@tngtech.com>
…ap_utils.py) Signed-off-by: Krisztián Varga <krisztian.varga@tngtech.com>
Signed-off-by: Krisztián Varga <krisztian.varga@tngtech.com>
Signed-off-by: Krisztián Varga <krisztian.varga@tngtech.com>
1341a0e
to
f1ec46b
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.
Looking good to me, just a few questions.
else: | ||
print("Failed to configure") | ||
raise Exception("Failed to configure the IPV6 interface!") |
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.
This is to make the test fail early?
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.
to make it fail at all - the test was not failing if the script was not executed successfully
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.
See also #13982 why it would be good for this step to fail if the script has problems - it was only visible by info logging that the script was not executed.
execute_icmpv6_cmd = ( | ||
"sudo /home/vagrant/build/python/bin/python3 " | ||
+ "/home/vagrant/magma/lte/gateway/python/scripts/icmpv6.py " | ||
MAGTIVATE_CMD |
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.
It looks like this didn't activate the venv before, but I assume that's no problem?
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.
It was not done before and in the test runs it was not necessary. Assumption is that it is not needed for this script.
imports = [ORC8R_ROOT], | ||
legacy_create_init = False, | ||
deps = ["//orc8r/gateway/python/magma/configuration:service_configs"], | ||
) |
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.
This is the main part of the fix?
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.
Yes, now the script is build with bazel and can be used by the integration tests.
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
Summary
Some integration tests are not properly working with Bazel because of not reachable scripts. these are
test_enable_ipv6_iface
test_ipv6_paging_with_dedicated_bearer
test_ipv4v6_paging_with_dedicated_bearer
This PR fixes these issues.
Test Plan
CI.
Additional Information