Skip to content

Commit

Permalink
Merge pull request #1211 from airbnb/missing_alerts_table_creation_du…
Browse files Browse the repository at this point in the history
…ring_init

Missing alerts table creation during init
  • Loading branch information
chunyong-lin committed Mar 26, 2020
2 parents 7a14dcf + 7b4411e commit f7f69e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions streamalert_cli/athena/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,11 +370,6 @@ def create_table(table, bucket, config, schema_override=None):

athena_client = get_athena_client(config)

config_data_bucket = firehose_data_bucket(config)
if not config_data_bucket:
LOGGER.error('The \'firehose\' module is not enabled in global.json')
return False

# Check if the table exists
if athena_client.check_table_exists(sanitized_table_name):
LOGGER.info('The \'%s\' table already exists.', sanitized_table_name)
Expand All @@ -399,6 +394,11 @@ def create_table(table, bucket, config, schema_override=None):

else: # all other tables are log types

config_data_bucket = firehose_data_bucket(config)
if not config_data_bucket:
LOGGER.warning('The \'firehose\' module is not enabled in global.json')
return False

# Use the bucket if supplied, otherwise use the default data bucket
bucket = bucket or config_data_bucket

Expand Down
2 changes: 1 addition & 1 deletion streamalert_cli/terraform/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def handler(cls, options, config):
if not create_log_tables(config=config):
return

LOGGER.info('Building remainding infrastructure')
LOGGER.info('Building remaining infrastructure')
return tf_runner(refresh=False)

@staticmethod
Expand Down

0 comments on commit f7f69e2

Please sign in to comment.