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

🧹Remove unreferenced protobuf messages #433

Closed
wants to merge 1 commit into from

Conversation

baum
Copy link
Collaborator

@baum baum commented Feb 11, 2024

No description provided.

@caroav caroav requested a review from gbregman February 13, 2024 13:27
control/cli.py Outdated
@@ -26,8 +26,6 @@
from .utils import GatewayUtils
from .utils import GatewayEnumUtils

BASE_GATEWAY_VERSION="1.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

This has nothing to do with protobuf cleanup and it removes an existing behavior. As we broke the protocol between the CLI and the gateway in version 1.0.0 we added this test to give an error in case the user try to mix pre-1.0.0 version with a 1.0.0 one. This combination wouldn't work so we wanted to give a clear message about it. If you think this should be removed you need to discuss it with @caroav . It can't be done as part of a cleanup.

Copy link
Collaborator Author

@baum baum Feb 14, 2024

Choose a reason for hiding this comment

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

@gbregman thank you for review.

I was not sure about the functionality of BASE_GATEWAY_VERSION or about its value.

I could imagine a CLI logic that rejects interaction with gateways reporting incompatible versions. For example, verifying compatibility behind the scenes during the handshake before executing the requested CLI command, such as "add namespace". However, in the current implementation, where it's used as a warning in the gw_get_info function, it seems odd.

Regarding the value, why don't we just compare the gateway version with CLI one, why this constant is required?

Please share you thoughts.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@baum I suggest to detach this from the proto-buf cleanup PR. Then we can continue discussing this in another issue. Otherwise this discussion will hold this PR in the air for too long.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@caroav would it be acceptable

  1. in gw_get_info function, restore the compare logic, however compare gateway version to CLI one
  2. remove the constant

Copy link
Contributor

Choose a reason for hiding this comment

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

@baum we do compare the CLI and gw versions and issue a warning if they don't match. Anyway we needed something which will work even in cases there CLI-gw protocol is broken. So, I made sure the fewtching of the version still works after the protocol changes so we could issue the warning about the broken protocol.

@baum baum force-pushed the proto_cleanup branch 2 times, most recently from 94526c5 to d36c8cc Compare February 19, 2024 13:26
@baum baum force-pushed the proto_cleanup branch 2 times, most recently from fb0c499 to 663f806 Compare March 4, 2024 15:26
- minor trtype cleanup
- gw_get_info compare with CLI version

Signed-off-by: Alexander Indenbaum <[email protected]>
@@ -229,15 +227,6 @@ def get_actions(act_list):
acts += ", '" + a["name"] + "'"
return acts[2:]

def format_adrfam(self, adrfam):
Copy link
Contributor

Choose a reason for hiding this comment

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

@baum why did you remove this formatting? This has nothing to do with protobuf cleanup. I wanted the output to have IPv4 and IPv6 which is the normal way to display address families. I don't understand why you insist on changing that.

@baum baum closed this Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants