Skip to content

Commit

Permalink
removed logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesstottmoj committed Apr 11, 2024
1 parent ffc8408 commit 7e7b5b5
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions controlpanel/frontend/views/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ def _find_related_tool_record(self, chart_name, chart_version, image_tag):
won't affect people usage.
"""
tool_set = Tool.objects.filter(chart_name=chart_name, version=chart_version)
log.info(f"chart_name - {chart_name}, version - {chart_version}, tool_set - {tool_set}")
for item in tool_set:
log.info(f"item image tag - {item.image_tag}, image_tag - {image_tag}")
if item.image_tag == image_tag:
return item
return tool_set.first()
Expand Down Expand Up @@ -108,14 +106,12 @@ def _add_deployed_charts_info(self, tools_info, user, id_token, charts_info):
chart_name, chart_version = deployment.metadata.labels["chart"].rsplit(
"-", 1
)
log.info(f"chart_name - {chart_name}, chart_version - {chart_version}")
image_tag = self._get_tool_deployed_image_tag(
deployment.spec.template.spec.containers
)
tool_box = self._locate_tool_box_by_chart_name(chart_name)
tool_box = tool_box or "Unknown"
tool = self._find_related_tool_record(chart_name, chart_version, image_tag)
log.info(f"tool - {tool}")
if not tool:
log.warn(
"this chart({}-{}) has not available from DB. ".format(
Expand Down Expand Up @@ -159,7 +155,6 @@ def _get_charts_info(self, tool_list):
charts_info = {}
chart_entries = None
for tool in tool_list:
log.info(f"tool version - {tool.version}, tool image tag - {tool.image_tag}")
if tool.version in charts_info:
continue

Expand All @@ -177,7 +172,6 @@ def _get_charts_info(self, tool_list):
image_tag = get_default_image_tag_from_helm_chart(
chart_app_version.chart_url, tool.chart_name
)
log.info(f"chart_info image tag - {image_tag}")
charts_info[tool.version] = image_tag
return charts_info

Expand Down Expand Up @@ -226,7 +220,6 @@ def get_context_data(self, *args, **kwargs):
id_token = user.get_id_token()

context = super().get_context_data(*args, **kwargs)
log.info(f'context tools - {context["tools"]}')
context["user_guidance_base_url"] = settings.USER_GUIDANCE_BASE_URL
context["aws_service_url"] = settings.AWS_SERVICE_URL

Expand All @@ -249,7 +242,6 @@ def get_context_data(self, *args, **kwargs):

# Arrange tools information
charts_info = self._get_charts_info(context["tools"])
log.info(f"charts_info - {charts_info}")
tools_info = self._retrieve_detail_tool_info(
user, context["tools"], charts_info
)
Expand Down

0 comments on commit 7e7b5b5

Please sign in to comment.