Skip to content

Commit

Permalink
fix: prefer service_url over internal_service_url
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian2012 committed Mar 13, 2024
1 parent 4e40f21 commit 8498b88
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion platform_plugin_aspects/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ def plugin_settings(settings):
settings.MAKO_TEMPLATE_DIRS_BASE.append(ROOT_DIRECTORY / "templates")
settings.SUPERSET_CONFIG = {
"internal_service_url": "http://superset:8088",
"service_url": "http://superset.local.edly.io:8088",
"username": "superset",
"password": "superset",
}
Expand Down
2 changes: 1 addition & 1 deletion platform_plugin_aspects/settings/tests/test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_common_settings(self):
common_settings.plugin_settings(settings)
self.assertIn("MAKO_TEMPLATE_DIRS_BASE", settings.__dict__)
self.assertIn("internal_service_url", settings.SUPERSET_CONFIG)
self.assertIn("service_url", settings.SUPERSET_CONFIG)
self.assertNotIn("service_url", settings.SUPERSET_CONFIG)
self.assertIn("username", settings.SUPERSET_CONFIG)
self.assertIn("password", settings.SUPERSET_CONFIG)
self.assertIsNotNone(settings.ASPECTS_INSTRUCTOR_DASHBOARD_UUID)
Expand Down
2 changes: 1 addition & 1 deletion platform_plugin_aspects/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def _generate_guest_token(user, course, superset_config, dashboard_uuid, filters
or None, exception if Superset is missconfigured or cannot generate guest token.
"""
superset_internal_host = _fix_service_url(
superset_config.get("internal_service_url", superset_config.get("service_url"))
superset_config.get("service_url", superset_config.get("internal_service_url"))
)
superset_username = superset_config.get("username")
superset_password = superset_config.get("password")
Expand Down

0 comments on commit 8498b88

Please sign in to comment.