Skip to content

Commit

Permalink
Increase capturing
Browse files Browse the repository at this point in the history
  • Loading branch information
cscollett committed Aug 30, 2024
1 parent 78785b1 commit d94014c
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def get_job_logs(job_id):


# Function to analyze logs for environment and issue information
import re

def analyze_logs(log_content):
os_id = None
version_id = None
Expand All @@ -45,12 +47,12 @@ def analyze_logs(log_content):
python_version = None
issues_found = False

# Simplified patterns to match the log format
id_pattern = re.compile(r'.*ID: (.+)')
version_id_pattern = re.compile(r'.*VERSION_ID: (.+)')
version_codename_pattern = re.compile(r'.*VERSION_CODENAME: (.+)')
full_version_pattern = re.compile(r'.*FULL VERSION: (.+)')
python_version_pattern = re.compile(r'.*LANGUAGE VERSION: (.+)')
# Updated patterns to match the log format
id_pattern = re.compile(r'.*ENV_OUTPUT_ID: (.+)')
version_id_pattern = re.compile(r'.*ENV_OUTPUT_VERSION_ID: (.+)')
version_codename_pattern = re.compile(r'.*ENV_OUTPUT_VERSION_CODENAME: (.+)')
full_version_pattern = re.compile(r'.*ENV_OUTPUT_FULL_VERSION: (.+)')
python_version_pattern = re.compile(r'.*ENV_OUTPUT_LANGUAGE_VERSION: (.+)')

# Patterns to capture possible errors
error_patterns = [
Expand All @@ -61,7 +63,7 @@ def analyze_logs(log_content):
re.compile(r'.*critical.*', re.IGNORECASE),
]

# Flag to only start capturing after seeing the environment start marker
# Flag to start capturing after seeing the environment start marker
in_environment_output = False
log_lines = log_content.splitlines()

Expand Down

0 comments on commit d94014c

Please sign in to comment.