From d4a00e937842c258d7ccd0582c9d2c6b8eb34ebe Mon Sep 17 00:00:00 2001 From: alokgoswami-ag Date: Fri, 7 Mar 2025 11:27:38 +0530 Subject: [PATCH 1/8] updated readme file --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7842cb3..53a069c 100644 --- a/README.md +++ b/README.md @@ -52,21 +52,36 @@ Create a virtualenv if required and install required packages using "pip install 4. The CI_DailyBuildUpdates.py script when invoked with command line arguments info_type as "detailed" and zone, it will display the builds details in the provided zone. ```python3 CI_DailyBuildUpdates.py --info_type detailed --zone syd04``` + + 5. The CI_DailyBuildUpdates.py script when invoked with command line arguments info_type as "detailed" and --job_type as "pa", it will display the builds details in the given job type. + + ```python3 CI_DailyBuildUpdates.py --info_type detailed --job_type pa``` 2. **CI_JobHistory.py:** The CI_JobHistory.py is a script which allows user to query a specific information from all builds that ran on the CI system within a given date range. ```python3 CI_JobHistory.py``` + ```python3 CI_Jobhistory.py --zone ``` This command line allows user to fetch querry based on zone type. + ```python3 CI_Jobhistory.py --job_type ``` This command line allows user to fetch querry based on job type. + ```python3 CI_Jobhistory.py --filter ``` This command line allows user to fetch querry based on search filter. + 1. Interactive Execution: The CI_JobHistory.py can be executed in a interactive mode by setting JENKINS variable as False in config.ini file. 2. Non-Interactive Execution: The CI_JobHistory.py can be executed in a non-interactive mode by setting JENKINS variable as True in config.ini file, along with the JENKINS variable user needs to provide values for the following variables: ``` selected_ci: CI's from where to fetch the jobs. + query_option: Query code to fetch information from builds. + • Check Node Crash: Detects if a node crashed during execution. + • Brief Job Information: Provides a summary of job execution. + • Detailed Job Information: Fetches in-depth details of jobs. + • Failed Test Cases: Lists test cases that failed in the CI run. + • Get Builds with Test Case Failures: Identifies builds where given test cases failed. + • Test Case Failure Frequency: Analyzes how often test cases fail. + • Get Build Based on Release: Retrieves builds corresponding to a specific release before_date: End date. after_date: Start date. - query_option: Query code to fetch information from builds. tc_name: Testcase name which will be used in quering the failure frequency. ``` From 2ee3c396dcf1cf57878be54ccdb3d17418a4e322 Mon Sep 17 00:00:00 2001 From: alokgoswami-ag Date: Mon, 10 Mar 2025 11:12:16 +0530 Subject: [PATCH 2/8] updated readme file --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 53a069c..30159ef 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,9 @@ Create a virtualenv if required and install required packages using "pip install • Get Builds with Test Case Failures: Identifies builds where given test cases failed. • Test Case Failure Frequency: Analyzes how often test cases fail. • Get Build Based on Release: Retrieves builds corresponding to a specific release + release: Provide initial release + next release: provide latest release + before_date: End date. after_date: Start date. tc_name: Testcase name which will be used in quering the failure frequency. From caf22887197861e262cb9463335145bb8e747452 Mon Sep 17 00:00:00 2001 From: alokgoswami-ag Date: Tue, 11 Mar 2025 11:10:47 +0530 Subject: [PATCH 3/8] added space --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 30159ef..3633241 100644 --- a/README.md +++ b/README.md @@ -62,8 +62,11 @@ Create a virtualenv if required and install required packages using "pip install 2. **CI_JobHistory.py:** The CI_JobHistory.py is a script which allows user to query a specific information from all builds that ran on the CI system within a given date range. ```python3 CI_JobHistory.py``` + ```python3 CI_Jobhistory.py --zone ``` This command line allows user to fetch querry based on zone type. + ```python3 CI_Jobhistory.py --job_type ``` This command line allows user to fetch querry based on job type. + ```python3 CI_Jobhistory.py --filter ``` This command line allows user to fetch querry based on search filter. From 25b5cf4b4ba84b82c385570ed6fac47d60dba7b8 Mon Sep 17 00:00:00 2001 From: KeerthanaAP Date: Thu, 20 Feb 2025 15:29:01 +0530 Subject: [PATCH 4/8] Added fix for the issue in fetching release info for 4.19 releases Signed-off-by: KeerthanaAP --- constants.py | 3 ++- monitor.py | 19 +++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/constants.py b/constants.py index 515052c..c9ca210 100644 --- a/constants.py +++ b/constants.py @@ -1,4 +1,5 @@ PROW_VIEW_URL = "https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs" JOB_LINK_URL= "https://prow.ci.openshift.org/" -RELEASE_URL = "https://ppc64le.ocp.releases.ci.openshift.org/releasestream/4-stable-ppc64le/release/" +STABLE_RELEASE_URL = "https://ppc64le.ocp.releases.ci.openshift.org/releasestream/4-stable-ppc64le/release/" +DEV_PREVIEW_RELEASE_URL = "https://ppc64le.ocp.releases.ci.openshift.org/releasestream/4-dev-preview-ppc64le/release/" HYPERVISOR_CONNECTION_ERROR = "failed to connect to the hypervisor" diff --git a/monitor.py b/monitor.py index a0d7a60..57f3ac2 100644 --- a/monitor.py +++ b/monitor.py @@ -17,20 +17,27 @@ def fetch_release_date(release): ''' Returns the created date of release ''' - url = constants.RELEASE_URL + release + try: + url = constants.STABLE_RELEASE_URL + release response = requests.get(url, verify=False, timeout=15) + if response.status_code == 404: + url = constants.DEV_PREVIEW_RELEASE_URL + release + response = requests.get(url, verify=False, timeout=15) + if response.status_code == 404: + print(f"Failed to get the release page. {response.text}") + sys.exit(1) if response.status_code == 200: - soup = BeautifulSoup(response.text, 'html.parser') - p_elements = soup.find_all("p") - for p in p_elements: + soup = BeautifulSoup(response.text, 'html.parser') + p_elements = soup.find_all("p") + for p in p_elements: p_ele = p.string if p_ele: if "Created:" in p_ele: start_date = p_ele.split(" ")[1]+" "+p_ele.split(" ")[2] break - return start_date - else: + return start_date + else: print(f"Failed to get the release page. {response.text}") sys.exit(1) except requests.Timeout as e: From dcc883458d04f56a5448d5c1846c125b8e366b17 Mon Sep 17 00:00:00 2001 From: alokgoswami-ag Date: Fri, 7 Mar 2025 11:27:38 +0530 Subject: [PATCH 5/8] updated readme file --- README.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7842cb3..53a069c 100644 --- a/README.md +++ b/README.md @@ -52,21 +52,36 @@ Create a virtualenv if required and install required packages using "pip install 4. The CI_DailyBuildUpdates.py script when invoked with command line arguments info_type as "detailed" and zone, it will display the builds details in the provided zone. ```python3 CI_DailyBuildUpdates.py --info_type detailed --zone syd04``` + + 5. The CI_DailyBuildUpdates.py script when invoked with command line arguments info_type as "detailed" and --job_type as "pa", it will display the builds details in the given job type. + + ```python3 CI_DailyBuildUpdates.py --info_type detailed --job_type pa``` 2. **CI_JobHistory.py:** The CI_JobHistory.py is a script which allows user to query a specific information from all builds that ran on the CI system within a given date range. ```python3 CI_JobHistory.py``` + ```python3 CI_Jobhistory.py --zone ``` This command line allows user to fetch querry based on zone type. + ```python3 CI_Jobhistory.py --job_type ``` This command line allows user to fetch querry based on job type. + ```python3 CI_Jobhistory.py --filter ``` This command line allows user to fetch querry based on search filter. + 1. Interactive Execution: The CI_JobHistory.py can be executed in a interactive mode by setting JENKINS variable as False in config.ini file. 2. Non-Interactive Execution: The CI_JobHistory.py can be executed in a non-interactive mode by setting JENKINS variable as True in config.ini file, along with the JENKINS variable user needs to provide values for the following variables: ``` selected_ci: CI's from where to fetch the jobs. + query_option: Query code to fetch information from builds. + • Check Node Crash: Detects if a node crashed during execution. + • Brief Job Information: Provides a summary of job execution. + • Detailed Job Information: Fetches in-depth details of jobs. + • Failed Test Cases: Lists test cases that failed in the CI run. + • Get Builds with Test Case Failures: Identifies builds where given test cases failed. + • Test Case Failure Frequency: Analyzes how often test cases fail. + • Get Build Based on Release: Retrieves builds corresponding to a specific release before_date: End date. after_date: Start date. - query_option: Query code to fetch information from builds. tc_name: Testcase name which will be used in quering the failure frequency. ``` From 9cabd58b8c324ff96dad1e9963696016424c7149 Mon Sep 17 00:00:00 2001 From: alokgoswami-ag Date: Mon, 10 Mar 2025 11:12:16 +0530 Subject: [PATCH 6/8] updated readme file --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 53a069c..30159ef 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,9 @@ Create a virtualenv if required and install required packages using "pip install • Get Builds with Test Case Failures: Identifies builds where given test cases failed. • Test Case Failure Frequency: Analyzes how often test cases fail. • Get Build Based on Release: Retrieves builds corresponding to a specific release + release: Provide initial release + next release: provide latest release + before_date: End date. after_date: Start date. tc_name: Testcase name which will be used in quering the failure frequency. From a5170dcdaca13f5bcefa38072cf7888d07248f21 Mon Sep 17 00:00:00 2001 From: alokgoswami-ag Date: Tue, 11 Mar 2025 11:10:47 +0530 Subject: [PATCH 7/8] added space --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 30159ef..3633241 100644 --- a/README.md +++ b/README.md @@ -62,8 +62,11 @@ Create a virtualenv if required and install required packages using "pip install 2. **CI_JobHistory.py:** The CI_JobHistory.py is a script which allows user to query a specific information from all builds that ran on the CI system within a given date range. ```python3 CI_JobHistory.py``` + ```python3 CI_Jobhistory.py --zone ``` This command line allows user to fetch querry based on zone type. + ```python3 CI_Jobhistory.py --job_type ``` This command line allows user to fetch querry based on job type. + ```python3 CI_Jobhistory.py --filter ``` This command line allows user to fetch querry based on search filter. From 751c49903ede2abbf1d0c8c820756cd0987e6766 Mon Sep 17 00:00:00 2001 From: Alok Goswami Date: Tue, 15 Apr 2025 14:51:31 +0530 Subject: [PATCH 8/8] Delete constants.py --- constants.py | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 constants.py diff --git a/constants.py b/constants.py deleted file mode 100644 index c9ca210..0000000 --- a/constants.py +++ /dev/null @@ -1,5 +0,0 @@ -PROW_VIEW_URL = "https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs" -JOB_LINK_URL= "https://prow.ci.openshift.org/" -STABLE_RELEASE_URL = "https://ppc64le.ocp.releases.ci.openshift.org/releasestream/4-stable-ppc64le/release/" -DEV_PREVIEW_RELEASE_URL = "https://ppc64le.ocp.releases.ci.openshift.org/releasestream/4-dev-preview-ppc64le/release/" -HYPERVISOR_CONNECTION_ERROR = "failed to connect to the hypervisor"