-
Notifications
You must be signed in to change notification settings - Fork 61
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
Allowing ports to be string so that they can be variable refs #825
Conversation
Codecov Report
@@ Coverage Diff @@
## main #825 +/- ##
=======================================
Coverage 74.06% 74.06%
=======================================
Files 119 119
Lines 7821 7821
=======================================
Hits 5793 5793
Misses 2028 2028
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
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.
Can we add validation on the port numbers whent they are strings? Idea for example - https://stackoverflow.com/questions/12968093/regex-to-validate-port-number
port: int(min=1, max=65535) | ||
service_port: int(min=1, max=65535, required=False) | ||
port: any(int(min=1, max=65535), str(matches='[0-9]*'), required=False) | ||
service_port: any(int(min=1, max=65535), str(matches='[0-9]*'), required=False) |
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.
Is there a way to limit the string to 65535, or atleast 5 digits at max?
tcp: int(required=False) | ||
grpc: int(required=False) | ||
websocket: int(required=False) | ||
http: any(int(min=1, max=65535), str(matches='[0-9]*'), required=False) |
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.
same comment as above - some validation...
@bigbitbus excellent suggestion |
300030c
to
c5ab774
Compare
Description
Safety checklist
How has this change been tested, beside unit tests?
Manually