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

chore(pipelined): More mypy fixes #12884

Merged
merged 6 commits into from Jun 2, 2022
Merged

Conversation

voisey
Copy link
Contributor

@voisey voisey commented May 31, 2022

Summary

Follow up to #12833 and #12875.

Test Plan

  • magma-dev: bazel test lte/gateway/python/magma/pipelined/...
  • magma-dev: ./bazel/scripts/run_sudo_tests.sh lte/gateway/python/magma/pipelined/

@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines. label May 31, 2022
@github-actions
Copy link
Contributor

Thanks for opening a PR! 💯

A couple initial guidelines

Howto

  • Reviews. The "Reviewers" listed for this PR are the Magma maintainers who will shepherd it.
  • Checks. All required CI checks must pass before merge.
  • Merge. Once approved and passing CI checks, use the ready2merge label to indicate the maintainers can merge your PR.

More info

Please take a moment to read through the Magma project's

If this is your first Magma PR, also consider reading

@github-actions github-actions bot added the component: agw Access gateway-related issue label May 31, 2022
@github-actions
Copy link
Contributor

github-actions bot commented May 31, 2022

feg-workflow

    2 files  202 suites   38s ⏱️
371 tests 371 ✔️ 0 💤 0
385 runs  385 ✔️ 0 💤 0

Results for commit ad5645e.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented May 31, 2022

dp-workflow

  2 files    2 suites   3m 9s ⏱️
15 tests 15 ✔️ 0 💤 0

Results for commit ad5645e.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented May 31, 2022

agw-workflow

     77 files     122 suites   6m 23s ⏱️
1 151 tests 1 147 ✔️ 4 💤 0
1 152 runs  1 148 ✔️ 4 💤 0

Results for commit ad5645e.

♻️ This comment has been updated with latest results.

@voisey voisey marked this pull request as ready for review May 31, 2022 13:46
@voisey voisey requested review from a team, koolzz and vktng May 31, 2022 13:46
Signed-off-by: Cameron Voisey <cameron.voisey@tngtech.com>
…atting"

Signed-off-by: Cameron Voisey <cameron.voisey@tngtech.com>
Signed-off-by: Cameron Voisey <cameron.voisey@tngtech.com>
Signed-off-by: Cameron Voisey <cameron.voisey@tngtech.com>
Signed-off-by: Cameron Voisey <cameron.voisey@tngtech.com>
Signed-off-by: Cameron Voisey <cameron.voisey@tngtech.com>
Comment on lines +666 to +667
cookie (int): a hex cookie value for the request
cookie_mask (int): a hex cookie mask for the request
Copy link
Contributor

Choose a reason for hiding this comment

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

What does "hex" mean in this context?

Copy link
Contributor Author

@voisey voisey Jun 1, 2022

Choose a reason for hiding this comment

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

Good question. I meant things like this which is input to the function I've modified here, for example.

Note that Python seems to consider it to be an integer as I have declared here:

>>> OVS_COOKIE_MATCH_ALL = 0xffffffff
>>> type(OVS_COOKIE_MATCH_ALL)
<class 'int'>

though the built-in hex function actually returns strings:

>>> int(str(OVS_COOKIE_MATCH_ALL), 0)
4294967295
>>> hex(4294967295)
'0xffffffff'

Copy link
Contributor

Choose a reason for hiding this comment

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

All right, so it is just an int for Python. I guess they write it in hexadecimal because the variable is used as a bitmask.

Comment on lines +666 to +667
cookie (int): a hex cookie value for the request
cookie_mask (int): a hex cookie mask for the request
Copy link
Contributor

Choose a reason for hiding this comment

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

All right, so it is just an int for Python. I guess they write it in hexadecimal because the variable is used as a bitmask.

Copy link
Contributor

@vktng vktng left a comment

Choose a reason for hiding this comment

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

LGTM.

@voisey voisey merged commit 2cfc6ac into magma:master Jun 2, 2022
emakeev pushed a commit to emakeev/magma that referenced this pull request Aug 5, 2022
* chore(pipelined): Remove commented out print statements

Signed-off-by: Cameron Voisey <cameron.voisey@tngtech.com>

* chore(pipelined): Fix "Not all arguments converted during string formatting"

Signed-off-by: Cameron Voisey <cameron.voisey@tngtech.com>

* chore(pipelined): Fix 'Function "builtins.hex" is not valid as a type'

Signed-off-by: Cameron Voisey <cameron.voisey@tngtech.com>

* chore(pipelined): Fix incompatible argument with superclass

Signed-off-by: Cameron Voisey <cameron.voisey@tngtech.com>

* chore(pipelined): Fix "Incompatible types in assignment"

Signed-off-by: Cameron Voisey <cameron.voisey@tngtech.com>

* chore(pipelined): Remove more commented out code

Signed-off-by: Cameron Voisey <cameron.voisey@tngtech.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: agw Access gateway-related issue size/S Denotes a PR that changes 10-29 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants