Skip to content

Commit

Permalink
Merge pull request #309 from Uniswap/fix-analytics
Browse files Browse the repository at this point in the history
fix: use correct buckets for different firehose streams
  • Loading branch information
ConjunctiveNormalForm authored Apr 15, 2024
2 parents d1455bd + 191f13b commit 11a3783
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
5 changes: 0 additions & 5 deletions bin/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,6 @@ export class APIPipeline extends Stack {
value: cosignerSecret,
type: BuildEnvironmentVariableType.SECRETS_MANAGER,
},
IS_TEST: {
value: true,
type: BuildEnvironmentVariableType.PLAINTEXT,
},
},
},
commands: [
Expand Down Expand Up @@ -247,7 +243,6 @@ envVars['URA_ACCOUNT'] = process.env['URA_ACCOUNT'] || '';
envVars['BOT_ACCOUNT'] = process.env['BOT_ACCOUNT'] || '';
envVars['UNISWAP_API'] = process.env['UNISWAP_API'] || '';
envVars['ORDER_SERVICE_URL'] = process.env['ORDER_SERVICE_URL'] || '';
envVars['IS_TEST'] = process.env['IS_TEST'] || '';

new APIStack(app, `${SERVICE_NAME}Stack`, {
env: {
Expand Down
4 changes: 2 additions & 2 deletions bin/stacks/analytics-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ export class AnalyticsStack extends cdk.NestedStack {
username: 'admin',
password: creds.secretValueFromJson('password').toString(),
s3Configuration: {
bucketArn: rfqRequestBucket.bucketArn,
bucketArn: hardRequestBucket.bucketArn,
roleArn: firehoseRole.roleArn,
compressionFormat: 'UNCOMPRESSED',
},
Expand Down Expand Up @@ -708,7 +708,7 @@ export class AnalyticsStack extends cdk.NestedStack {
username: 'admin',
password: creds.secretValueFromJson('password').toString(),
s3Configuration: {
bucketArn: rfqRequestBucket.bucketArn,
bucketArn: hardResponseBucket.bucketArn,
roleArn: firehoseRole.roleArn,
compressionFormat: 'UNCOMPRESSED',
},
Expand Down
6 changes: 2 additions & 4 deletions lib/providers/order/uniswapxService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Logger from 'bunyan';

import { OrderServiceProvider } from '.';

const ORDER_SERVICE_TIMEOUT_MS = 500;
const ORDER_SERVICE_TIMEOUT_MS = 2000;
const V2_ORDER_TYPE = 'Dutch_V2';

export class UniswapXServiceProvider implements OrderServiceProvider {
Expand All @@ -17,11 +17,9 @@ export class UniswapXServiceProvider implements OrderServiceProvider {
async postOrder(order: Order, signature: string, quoteId?: string): Promise<void> {
this.log.info({ orderHash: order.hash() }, 'Posting order to UniswapX Service');

// need to wait for lambda cold starts when CodePipeline runs integration tests after new deployment
const axiosConfig = {
timeout: process.env.IS_TEST ? 5000 : ORDER_SERVICE_TIMEOUT_MS,
timeout: ORDER_SERVICE_TIMEOUT_MS,
};

await axios.post(
`${this.uniswapxServiceUrl}dutch-auction/order`,
{
Expand Down

0 comments on commit 11a3783

Please sign in to comment.