Skip to content

Commit

Permalink
Use correct API key when fetching from Iodide
Browse files Browse the repository at this point in the history
  • Loading branch information
openjck authored and Allen Short committed Jul 17, 2019
1 parent 13d4670 commit bdcac43
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changelog
=========

2019.7.4
--------

:date: 2019-07-17

* Use the correct API key to fetch query result JSON from Iodide

2019.7.3
--------

Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ services:
REDASH_IODIDE_URL:
REDASH_IODIDE_NOTEBOOK_API_URL:
REDASH_IODIDE_AUTH_TOKEN:
REDASH_IODIDE_DEFAULT_API_KEY:
worker:
image: mozilla/redash:rc
command: scheduler
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
long_description=readme,
long_description_content_type="text/x-rst",
name="redash-stmo",
version="2019.7.3",
version="2019.7.4",
description="Extensions to Redash by Mozilla",
python_requires="==2.*,>=2.7.0",
project_urls={"homepage": "https://github.com/mozilla/redash-stmo"},
Expand Down
2 changes: 1 addition & 1 deletion src/redash_stmo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# file, you can obtain one at http://mozilla.org/MPL/2.0/.
"""Extensions to Redash by Mozilla"""

__version__ = "2019.7.3"
__version__ = "2019.7.4"
2 changes: 1 addition & 1 deletion src/redash_stmo/integrations/iodide/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def post(self, query_id):
"redash_url": base_href(),
"query_id": query_id,
"title": query.name,
"api_key": settings.IODIDE_DEFAULT_API_KEY,
"api_key": query.api_key,
}
rendered_template = render_template_string(source, **context)
headers = {
Expand Down
3 changes: 0 additions & 3 deletions src/redash_stmo/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,3 @@

# The auth token that this extension uses to create new Iodide notebooks
IODIDE_AUTH_TOKEN = os.environ.get("REDASH_IODIDE_AUTH_TOKEN", "")

# The API key that Iodide uses to fetch data from Redash
IODIDE_DEFAULT_API_KEY = os.environ.get("REDASH_IODIDE_DEFAULT_API_KEY", "")

1 comment on commit bdcac43

@jezdez
Copy link
Contributor

@jezdez jezdez commented on bdcac43 Jul 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, nice! I forgot each query has an API key. This makes this so much leaner!

Please sign in to comment.