GH-48068: [C++][FlightRPC] Linux ODBC: Configure Dremio instance to allow remote testing#49695
GH-48068: [C++][FlightRPC] Linux ODBC: Configure Dremio instance to allow remote testing#49695alinaliBQ wants to merge 3 commits intoapache:mainfrom
Conversation
Authored by Justin Co-authored-by: justing-bq <justin.gossett@improving.com>
* Disable non-odbc workflows * Install `netcat` and set `ARROW_FLIGHT_SQL_ODBC_CONN` * Attempt to enable docker network Update compose.yaml Add executable bash script * add commands for testing Dremio instance value * Change to use `host.docker.internal` * Change test to run remote test Update cpp_extra.yml * Use `localhost` as hostname * Use `dremio_container` as host * Clean up PR * Test remote instance * CI can connect to remote instance, revert "Test remote instance" This reverts commit db975bf. * Disable ODBC Debian build * Seeing segfault at ODBC test. Can probably be solved by passing test linkage = static like we did with Ubuntu. Since we don't have capacity to work on Debian now, we can close this.
|
|
There was a problem hiding this comment.
Is there a reason we can't keep this in the same compose file as everything else?
There was a problem hiding this comment.
I have moved this inside the same compose file at project root. There is no preference from my end
There was a problem hiding this comment.
Could you compose.yaml because it's the preferred file name?
See also: #47806
There was a problem hiding this comment.
Yup, I have moved this inside the compose.yaml at project root.
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| #!/bin/bash |
There was a problem hiding this comment.
Could you move the shebang to the first line?
There was a problem hiding this comment.
Could you enable pre-commit hooks for this file?
| -d "{ \"userName\": \"$ADMIN_USER\", \"password\": \"$ADMIN_PASSWORD\" }" \ | ||
| | grep -oP '(?<="token":")[^"]+') | ||
|
|
||
| SQL_QUERY="Create Table \$scratch.ODBCTest As SELECT CAST(2147483647 AS INTEGER) AS sinteger_max, CAST(9223372036854775807 AS BIGINT) AS sbigint_max, CAST(999999999 AS DECIMAL(38,0)) AS decimal_positive, CAST(3.40282347E38 AS FLOAT) AS float_max, CAST(1.7976931348623157E308 AS DOUBLE) AS double_max, CAST(true AS BOOLEAN) AS bit_true, CAST(DATE '9999-12-31' AS DATE) AS date_max, CAST(TIME '23:59:59' AS TIME) AS time_max, CAST(TIMESTAMP '9999-12-31 23:59:59' AS TIMESTAMP) AS timestamp_max;" |
There was a problem hiding this comment.
How about format this for easy to read?
| SQL_QUERY="Create Table \$scratch.ODBCTest As SELECT CAST(2147483647 AS INTEGER) AS sinteger_max, CAST(9223372036854775807 AS BIGINT) AS sbigint_max, CAST(999999999 AS DECIMAL(38,0)) AS decimal_positive, CAST(3.40282347E38 AS FLOAT) AS float_max, CAST(1.7976931348623157E308 AS DOUBLE) AS double_max, CAST(true AS BOOLEAN) AS bit_true, CAST(DATE '9999-12-31' AS DATE) AS date_max, CAST(TIME '23:59:59' AS TIME) AS time_max, CAST(TIMESTAMP '9999-12-31 23:59:59' AS TIMESTAMP) AS timestamp_max;" | |
| SQL_QUERY=" | |
| Create Table \$scratch.ODBCTest As | |
| SELECT CAST(2147483647 AS INTEGER) AS sinteger_max, | |
| CAST(9223372036854775807 AS BIGINT) AS sbigint_max, | |
| CAST(999999999 AS DECIMAL(38,0)) AS decimal_positive, | |
| CAST(3.40282347E38 AS FLOAT) AS float_max, | |
| CAST(1.7976931348623157E308 AS DOUBLE) AS double_max, | |
| CAST(true AS BOOLEAN) AS bit_true, | |
| CAST(DATE '9999-12-31' AS DATE) AS date_max, | |
| CAST(TIME '23:59:59' AS TIME) AS time_max, | |
| CAST(TIMESTAMP '9999-12-31 23:59:59' AS TIMESTAMP) AS timestamp_max; | |
| " |
3f9bd41 to
7b6d340
Compare
- Move `dremio` to `compose.yaml` at project root - Move shebang to first line - add `set_up_dremio_instance.sh` to pre-commit hook - Fix `SQL_QUERY` variable format
7b6d340 to
4a892cf
Compare
alinaliBQ
left a comment
There was a problem hiding this comment.
Addressed code review comments
There was a problem hiding this comment.
I have moved this inside the same compose file at project root. There is no preference from my end
There was a problem hiding this comment.
Yup, I have moved this inside the compose.yaml at project root.
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| #!/bin/bash |
| -d "{ \"userName\": \"$ADMIN_USER\", \"password\": \"$ADMIN_PASSWORD\" }" \ | ||
| | grep -oP '(?<="token":")[^"]+') | ||
|
|
||
| SQL_QUERY="Create Table \$scratch.ODBCTest As SELECT CAST(2147483647 AS INTEGER) AS sinteger_max, CAST(9223372036854775807 AS BIGINT) AS sbigint_max, CAST(999999999 AS DECIMAL(38,0)) AS decimal_positive, CAST(3.40282347E38 AS FLOAT) AS float_max, CAST(1.7976931348623157E308 AS DOUBLE) AS double_max, CAST(true AS BOOLEAN) AS bit_true, CAST(DATE '9999-12-31' AS DATE) AS date_max, CAST(TIME '23:59:59' AS TIME) AS time_max, CAST(TIMESTAMP '9999-12-31 23:59:59' AS TIMESTAMP) AS timestamp_max;" |
Rationale for this change
GH-48068
The goal is to run remote tests against the Dremio instance on Ubuntu-latest runner, as Dremio docker instances are only available on Linux and they are not supported on macOS/Windows GitHub Actions.
What changes are included in this PR?
Note: Enabling Linux tests in CI will be in a separate PR. This PR prepares the Dremio instance for remote testing, which will be used when ODBC Linux tests are supported in CI.
Are these changes tested?
Tested in CI at local repository.
Are there any user-facing changes?
N/A