You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2018/12/21 13:54:14 UTC
[GitHub] potiuk opened a new pull request #4350: [AIRFLOW-3527] Cloud SQL
Proxy has shorter path for UNIX socket
potiuk opened a new pull request #4350: [AIRFLOW-3527] Cloud SQL Proxy has shorter path for UNIX socket
URL: https://github.com/apache/incubator-airflow/pull/4350
Make sure you have checked _all_ steps below.
### Jira
- [ ] My PR addresses the following [Airflow Jira](https://issues.apache.org/jira/browse/AIRFLOW-3527)
### Description
- [x] Here are some details about my PR, including screenshots of any UI changes:
There is a limitation of UNIX socket path length as described in
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_un.h.html#tag_13_67_04
Cloud SQL Proxy uses generated path and it can get longer than the limit
in case of POSTGRES connections especially (POSTGRES adds few characters on
its own). The error returned by sqlproxy in this case is pretty vague
(invalid path) - it makes it difficult to understand the problem by
the user.
This commit fixes it in two ways:
* makes it less likely that the path length will be exceeded
by shorter random string generated for the socket directory.
* raises an Error in case of calculated path is too long
### Tests
- [x] My PR adds the following unit tests:
CloudSqlQueryValidationTest:
* test_create_operator_with_too_long_unix_socket_path
* test_create_operator_with_not_too_long_unix_socket_path
### Commits
- [x] My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
1. Subject is separated from body by a blank line
1. Subject is limited to 50 characters (not including Jira issue reference)
1. Subject does not end with a period
1. Subject uses the imperative mood ("add", not "adding")
1. Body wraps at 72 characters
1. Body explains "what" and "why", not "how"
### Documentation
- [x] No documentation update is needed.
### Code Quality
- [x] Passes `flake8`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services