Skip to content

Commit 70beacc

Browse files
committed
[DEBUG] Add more logs to debug athena
1 parent 6ea1817 commit 70beacc

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

.github/workflows/drivers-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,6 @@ jobs:
343343
timeout_minutes: 20
344344
command: |
345345
cd ./packages/cubejs-testing-drivers
346-
export DEBUG=testcontainers
346+
export DEBUG=testcontainers*
347347
yarn ${{ matrix.database }}-full
348348

packages/cubejs-athena-driver/src/AthenaDriver.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,7 @@ export class AthenaDriver extends BaseDriver implements DriverInterface {
480480
...(this.config.catalog != null ? { QueryExecutionContext: { Catalog: this.config.catalog } } : {})
481481
};
482482
const { QueryExecutionId } = await this.athena.startQueryExecution(request);
483+
console.log('athena started query ', query, QueryExecutionId);
483484
return { QueryExecutionId: checkNonNullable('StartQueryExecution', QueryExecutionId) };
484485
}
485486

packages/cubejs-testing-drivers/src/helpers/buildPreaggs.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,22 @@ export async function buildPreaggs(
5353
selector: any,
5454
) {
5555
return new Promise((resolve, reject) => {
56+
console.log('Starting building pre-agg', selector);
57+
5658
postRequest(
5759
port,
5860
'/cubejs-api/v1/pre-aggregations/jobs',
5961
token,
6062
{ action: 'post', selector },
6163
).then((post) => {
64+
console.log('Building pre-agg postRequest callback', selector);
65+
6266
readData(post).then((_jobs) => {
67+
console.log('Building pre-agg readData callback', selector);
68+
6369
const jobs = <string[]>JSON.parse(_jobs.toString());
70+
71+
console.log('Building pre-agg readData jobs', selector, jobs);
6472
if (jobs.length === 0) {
6573
resolve(true);
6674
} else {
@@ -73,6 +81,7 @@ export async function buildPreaggs(
7381
{ action: 'get', resType: 'object', tokens: jobs },
7482
);
7583
const statuses = JSON.parse((await readData(get)).toString());
84+
console.log('Building pre-agg readData jobs statuses', selector, statuses);
7685
Object.keys(statuses).forEach((t: string) => {
7786
const { status } = statuses[t];
7887
if (status.indexOf('failure') >= 0) {
@@ -135,7 +144,7 @@ export async function hookPreaggs(
135144
},
136145
tokens,
137146
);
138-
147+
139148
selectors.forEach((info) => {
140149
const { status } = info;
141150
if (status.indexOf('failure') >= 0) {

packages/cubejs-testing-drivers/src/tests/testQueries.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ export function testQueries(type: string, { includeIncrementalSchemaSuite, exten
141141

142142
// MUST be the first test in the list!
143143
execute('must built pre-aggregations', async () => {
144+
console.log('Starting building pre-aggs');
144145
await buildPreaggs(env.cube.port, apiToken, {
145146
timezones: ['UTC'],
146147
preAggregations: ['Customers.RAExternal'],

0 commit comments

Comments
 (0)