macrometacorp / pyc8 Goto Github PK
View Code? Open in Web Editor NEWOfficial Python SDK for Macrometa
License: Apache License 2.0
Official Python SDK for Macrometa
License: Apache License 2.0
Currently driver fails to subscribe to database changes when global dns is used. It works fine with the region dns.
Updating C8 with latest SSL certificates caused Ambassador to restart and break replication for "demo" tenant.
Ambassador restarted after update
Host Ports: 0/TCP, 0/TCP, 0/TCP, 0/TCP, 0/TCP
State: Running
Started: Mon, 12 Apr 2021 15:53:24 +0000
Last State: Terminated
Reason: Error
Exit Code: 137
Started: Mon, 12 Apr 2021 15:52:00 +0000
Finished: Mon, 12 Apr 2021 15:53:22 +0000
Ready: True
Restart Count: 6
Just wondering. I noticed that in the class constructor, the default protocol is plain http
. Seems like the saner behavior (now days) would be to default to HTTPS and allow the user to specify HTTP.
Here's the constructor I'm referring to:
Line 26 in c4288ec
Of course, this would break things for users who are leaving this unspecified, so maybe it's not an option now anyway for backwards compatibility.
Also, while I'm nitpicking about minor details, we make HTTP the default protocol and make 80 the default port, right? But if a user specifies HTTPS and then doesn't specify a port, then the port will stay at the default, right? Which is 80. So anytime you change the protocol, you almost certainly have to specify a port now. The more convenient way to do this would be to make the default port None
, then (if it's still None
in the constructor, meaning the user didn't specify a port), we set it to either 80 or 443 depending on the value of protocol
. Like so:
def __init__(self, protocol="https", host='127.0.0.1', port=None,
geofabric="_system", stream_port=constants.STREAM_PORT,
email=None, password=None, http_client=None, token=None, apikey=None):
if port is None: # only force the port to default if user didn't supply an explicit port
if protocol == 'http':
port = 80
elif protocol == 'https':
port = 443
else:
raise Exception(f'Unsupported protocol: {protocol}')
The current system handles this by just forcing the port to 443 if the protocol is 'https'
, no matter what the user supplies as port
. This is actually a bug - what if the user is running HTTPS on a port other than 443? After all, that consideration is the whole reason this parameter exists for the user to supply!
Lines 38 to 39 in c4288ec
Just some thoughts! I'd be happy to submit a patch for this myself if that would be helpful. By the way, thanks for making an awesome product!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.