-
Notifications
You must be signed in to change notification settings - Fork 84
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
[ch] update test times #5663
[ch] update test times #5663
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
325e3ab
to
d730c55
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.
LGTM, but see some nits (action v2
sounds too old at this point)
- name: Install Dependencies | ||
run: pip3 install boto3==1.19.12 rockset==1.0.3 | ||
run: python -m pip install boto3==1.19.12 clickhouse-connect==0.7.16 requests==2.26.0 |
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 you please explain why changing python
to python3
is necessary?
run: python -m pip install boto3==1.19.12 clickhouse-connect==0.7.16 requests==2.26.0 | |
run: python3 -m pip install boto3==1.19.12 clickhouse-connect==0.7.16 requests==2.26.0 |
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.
I switched from python3 to python since I added the setup python step, which makes the default python the version that gets setup in the setup step
endpoint = os.environ["CLICKHOUSE_ENDPOINT"] | ||
# I cannot figure out why these values aren't being handled automatically | ||
# when it is fine in the lambda | ||
if endpoint.startswith("https://"): |
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.
You might want to use something like https://docs.python.org/3/library/urllib.parse.html to get the hostname, scheme, and port number
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.
I did some testing right now, and it doesn't seem to handle having vs not having https:// well
I also found this in the docs
"Following the syntax specifications in RFC 1808, urlparse recognizes a netloc only if it is properly introduced by ‘//’. Otherwise the input is presumed to be a relative URL and thus to start with a path component."
res = get_clickhouse_client().query(query, params) | ||
json_res = [] | ||
# convert to json | ||
for row in res.result_rows: |
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.
Interesting, so clickhouse_connect
Python client use this format while the typescript one already does the column name mapping. Maybe there is an option to clickhouse_connect
, but I haven't been able to find it in https://clickhouse.com/docs/en/integrations/python
Took a brief look to check that results looked similar. There were differences in decimals, I assume due to floating point stuff, which made it hard to be sure so I'm not entirely sure they're exactly the same