File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -787,12 +787,14 @@ def get_analysis_report(
787787 log_type : str ,
788788 parser_id : str ,
789789 report_id : str ,
790+ timeout : int = 60 ,
790791 ) -> dict [str , Any ]:
791792 """Get a parser analysis report.
792793 Args:
793794 log_type: Log type of the parser.
794795 parser_id: The ID of the parser.
795796 report_id: The ID of the analysis report.
797+ timeout: Optional timeout in seconds (default: 60).
796798 Returns:
797799 Dictionary containing the analysis report.
798800 Raises:
@@ -803,28 +805,34 @@ def get_analysis_report(
803805 log_type = log_type ,
804806 parser_id = parser_id ,
805807 report_id = report_id ,
808+ timeout = timeout ,
806809 )
807810
808811 def trigger_github_checks (
809812 self ,
810813 associated_pr : str ,
811814 log_type : str ,
815+ timeout : int = 60 ,
812816 ) -> dict [str , Any ]:
813817 """Trigger GitHub checks for a parser.
814818
815819 Args:
816820 associated_pr: The PR string (e.g., "owner/repo/pull/123").
817821 log_type: The string name of the LogType enum.
822+ timeout: Optional request timeout in seconds (default: 60).
818823
819824 Returns:
820825 Dictionary containing the response details.
821826
822827 Raises:
823- SecOpsError: If gRPC modules or client stub are not available.
824- APIError: If the gRPC API request fails.
828+ SecOpsError: If modules or client stub are not available.
829+ APIError: If the API request fails.
825830 """
826831 return _trigger_github_checks (
827- self , associated_pr = associated_pr , log_type = log_type
832+ self ,
833+ associated_pr = associated_pr ,
834+ log_type = log_type ,
835+ timeout = timeout ,
828836 )
829837
830838 def get_stats (
Original file line number Diff line number Diff line change @@ -450,7 +450,7 @@ def trigger_github_checks(
450450 client: ChronicleClient instance
451451 associated_pr: The PR string (e.g., "owner/repo/pull/123").
452452 log_type: The string name of the LogType enum.
453- timeout: Optional RPC timeout in seconds (default: 60).
453+ timeout: Optional request timeout in seconds (default: 60).
454454
455455 Returns:
456456 Dictionary containing the response details.
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ def mock_client():
2121
2222def test_trigger_github_checks (mock_client , monkeypatch ):
2323 """Test ChronicleClient.trigger_github_checks."""
24- # Mock the underlying implementation to avoid gRPC dependency in tests
24+ # Mock the underlying implementation to avoid REST dependency in tests
2525 mock_impl = MagicMock (
2626 return_value = {"message" : "Success" , "details" : "Started" }
2727 )
You can’t perform that action at this time.
0 commit comments