Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
Merge branch 'master' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
rossjones committed Mar 12, 2018
2 parents ccd46e2 + 1d5580a commit 15808b4
Show file tree
Hide file tree
Showing 12 changed files with 5 additions and 15 deletions.
1 change: 0 additions & 1 deletion backdrop/core/config/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ def load_paas_settings():
if service['name'] == 'gds-performance-platform-mongodb-service':
credentials = service['credentials']
paas['DATABASE_URL'] = credentials['uri']
paas['DEFAULT_COLLECTION'] = credentials['name']
ca_cert = b64decode(credentials['ca_certificate_base64'])
paas['CA_CERTIFICATE'] = ca_cert
if 'REDIS_DATABASE_NUMBER' in os.environ:
Expand Down
2 changes: 1 addition & 1 deletion backdrop/read/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def fetch(data_set_config):
data_set = DataSet(storage, data_set_config)

try:
query = parse_query_from_request(request, app.config)
query = parse_query_from_request(request)
data = data_set.execute_query(query)

except InvalidOperationError:
Expand Down
1 change: 0 additions & 1 deletion backdrop/read/config/development.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
STAGECRAFT_URL = 'http://localhost:3103'

SIGNON_API_USER_TOKEN = 'development-oauth-access-token'
DEFAULT_COLLECTION = 'default'

try:
from .development_environment import *
Expand Down
1 change: 0 additions & 1 deletion backdrop/read/config/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@
SIGNON_API_USER_TOKEN = os.getenv('SIGNON_API_USER_TOKEN')
LOG_LEVEL = "INFO"
SESSION_COOKIE_SECURE = True
DEFAULT_COLLECTION = PAAS.get('DEFAULT_COLLECTION')
1 change: 0 additions & 1 deletion backdrop/read/config/staging.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@
SIGNON_API_USER_TOKEN = os.getenv('SIGNON_API_USER_TOKEN')
LOG_LEVEL = "INFO"
SESSION_COOKIE_SECURE = True
DEFAULT_COLLECTION = PAAS.get('DEFAULT_COLLECTION')
1 change: 0 additions & 1 deletion backdrop/read/config/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
LOG_LEVEL = "ERROR"

DATA_SET_RATE_LIMIT = '10000/second'
DEFAULT_COLLECTION = 'default'

from development import STAGECRAFT_URL, SIGNON_API_USER_TOKEN
8 changes: 4 additions & 4 deletions backdrop/read/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
__all__ = ['parse_query_from_request']


def parse_query_from_request(request, config):
def parse_query_from_request(request):
"""Parses a Query object from a flask request"""
return Query.create(**parse_request_args(request.args, config.get('DEFAULT_COLLECTION', 'default')))
return Query.create(**parse_request_args(request.args))


def if_present(func, value):
Expand All @@ -17,7 +17,7 @@ def if_present(func, value):
return func(value)


def parse_request_args(request_args, default_collection='default'):
def parse_request_args(request_args):
args = dict()

args['start_at'] = if_present(parse_time_as_utc,
Expand Down Expand Up @@ -67,7 +67,7 @@ def parse_filter_by(filter_by, is_regex):
args['collect'].append(tuple(collect_arg.split(':')))
else:
args['collect'].append(
(collect_arg, default_collection))
(collect_arg, 'default'))

args['flatten'] = if_present(boolify, request_args.get('flatten'))
args['inclusive'] = if_present(boolify, request_args.get('inclusive'))
Expand Down
1 change: 0 additions & 1 deletion backdrop/transformers/config/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@
STAGECRAFT_OAUTH_TOKEN = os.getenv('STAGECRAFT_OAUTH_TOKEN')
BACKDROP_READ_URL = 'https://performance-platform-backdrop-read-production.cloudapps.digital/data'
BACKDROP_WRITE_URL = 'https://performance-platform-backdrop-write-production.cloudapps.digital/data'
DEFAULT_COLLECTION = PAAS.get('DEFAULT_COLLECTION')
1 change: 0 additions & 1 deletion backdrop/write/config/development.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
}

STAGECRAFT_COLLECTION_ENDPOINT_TOKEN = 'dev-create-endpoint-token'
DEFAULT_COLLECTION = 'default'

try:
from development_environment import *
Expand Down
1 change: 0 additions & 1 deletion backdrop/write/config/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@
SECRET_KEY = os.getenv('SECRET_KEY')
STAGECRAFT_COLLECTION_ENDPOINT_TOKEN = os.getenv(
'STAGECRAFT_COLLECTION_ENDPOINT_TOKEN')
DEFAULT_COLLECTION = PAAS.get('DEFAULT_COLLECTION')
1 change: 0 additions & 1 deletion backdrop/write/config/staging.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@
SECRET_KEY = os.getenv('SECRET_KEY')
STAGECRAFT_COLLECTION_ENDPOINT_TOKEN = os.getenv(
'STAGECRAFT_COLLECTION_ENDPOINT_TOKEN')
DEFAULT_COLLECTION = PAAS.get('DEFAULT_COLLECTION')
1 change: 0 additions & 1 deletion backdrop/write/config/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"evl_volumetrics": ["_timestamp", "service", "transaction"],
}
BROKER_URL = 'memory://'
DEFAULT_COLLECTION = 'default'

from development import (STAGECRAFT_COLLECTION_ENDPOINT_TOKEN, STAGECRAFT_URL,
SIGNON_API_USER_TOKEN)
Expand Down

0 comments on commit 15808b4

Please sign in to comment.