Send Execution Log to Central Report#4317
Conversation
|
Warning Rate limit exceeded@prashelke has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 22 minutes and 30 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughAdds a new HTTP log4net appender and supporting API handler to batch and send execution logs to a central service, plus runtime wiring (ExecutionId, InstanceId, ApiUrl), CLI/config integrations, log4net configuration and appSettings, and endpoint resolution helpers. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant User
participant CLI as CLIProcessor
participant Dyn as CLIDynamicFile
participant GLog as GingerLog
participant App as HttpLogAppender
participant ARH as AccountReportApiHandler
participant API as CentralAPI
User->>CLI: Start with URL (may include ?instanceId=...)
CLI->>GLog: SetHTTPLogAppenderAPIUrl(baseUrl)
CLI->>GLog: SetHTTPLogAppenderInstanceId(instanceId)
CLI->>Dyn: Load dynamic execution JSON
Dyn->>GLog: SetHTTPLogAppenderExecutionId(executionId)
note over App: Background worker batches logs by BatchSize or FlushInterval
CLI->>App: Append logging events
App->>App: Buffer until batch or interval
App->>ARH: SendExecutionLogToCentralDBAsync(ApiUrl, ExecutionId, InstanceId, LogData)
ARH-->>API: POST /execution-log
API-->>ARH: 200 / error
alt success
ARH-->>App: ack
else failure
App->>App: retry with backoff up to MaxRetryDelaySeconds
end
sequenceDiagram
autonumber
participant Run as RunsetExecutor
participant GLog as GingerLog
participant App as HttpLogAppender
Run->>Run: Start RunRunset
Run->>GLog: SetHTTPLogAppenderExecutionId(ExecutionID)
note over App: Subsequent logs include ExecutionId for central correlation
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 31
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (9)
Ginger/Ginger/App.config(1 hunks)Ginger/Ginger/App.xaml.cs(1 hunks)Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportApiHandler.cs(3 hunks)Ginger/GingerCoreNET/Run/RunsetExecutor.cs(4 hunks)Ginger/GingerCoreNET/RunLib/CLILib/CLIDynamicFile.cs(2 hunks)Ginger/GingerCoreNET/RunLib/CLILib/CLIProcessor.cs(2 hunks)Ginger/GingerCoreNET/log4netLib/GingerLog.cs(3 hunks)Ginger/GingerCoreNET/log4netLib/HttpLogAppender.cs(1 hunks)Ginger/GingerCoreNET/log4netLib/log4net.config(1 hunks)
🧰 Additional context used
🧠 Learnings (8)
📚 Learning: 2025-04-25T13:29:45.059Z
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it provides access to the `ObservableList<>` class which is used throughout the file for collections of RunSetConfig, AnalyzerItemBase, and ApplicationPOMModel objects.
Applied to files:
Ginger/GingerCoreNET/RunLib/CLILib/CLIProcessor.csGinger/GingerCoreNET/RunLib/CLILib/CLIDynamicFile.csGinger/GingerCoreNET/Run/RunsetExecutor.csGinger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportApiHandler.csGinger/GingerCoreNET/log4netLib/GingerLog.cs
📚 Learning: 2025-06-16T10:37:13.073Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4232
File: Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/VRTAnalyzer.cs:19-22
Timestamp: 2025-06-16T10:37:13.073Z
Learning: In Ginger codebase, both `using amdocs.ginger.GingerCoreNET;` and `using Amdocs.Ginger.CoreNET;` are valid and serve different purposes. The first (lowercase) contains the WorkSpace class and related workspace functionality, while the second (proper case) contains drivers like GenericAppiumDriver and other core functionality. Both may be required in files that use types from both namespaces.
Applied to files:
Ginger/GingerCoreNET/RunLib/CLILib/CLIDynamicFile.csGinger/GingerCoreNET/Run/RunsetExecutor.cs
📚 Learning: 2025-04-25T13:29:45.059Z
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it imports the ObservableList<> class which is used throughout the file.
Applied to files:
Ginger/GingerCoreNET/RunLib/CLILib/CLIDynamicFile.csGinger/GingerCoreNET/Run/RunsetExecutor.csGinger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportApiHandler.csGinger/GingerCoreNET/log4netLib/GingerLog.cs
📚 Learning: 2025-03-20T11:10:30.816Z
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4137
File: Ginger/Ginger/SourceControl/SourceControlProjectsPage.xaml.cs:21-21
Timestamp: 2025-03-20T11:10:30.816Z
Learning: The `Amdocs.Ginger.Common.SourceControlLib` namespace is required in files that reference the `GingerSolution` class for source control operations in the Ginger automation framework.
Applied to files:
Ginger/GingerCoreNET/RunLib/CLILib/CLIDynamicFile.csGinger/GingerCoreNET/Run/RunsetExecutor.csGinger/GingerCoreNET/log4netLib/GingerLog.cs
📚 Learning: 2024-10-15T07:06:51.444Z
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#3958
File: Ginger/Ginger/App.xaml.cs:246-246
Timestamp: 2024-10-15T07:06:51.444Z
Learning: In `Ginger/Ginger/App.xaml.cs`, the `cliProcessor` field is used in multiple methods (`ParseCommandLineArguments` and `RunNewCLI`), so it should remain as a class-level field.
Applied to files:
Ginger/Ginger/App.xaml.cs
📚 Learning: 2025-09-05T10:50:57.706Z
Learnt from: Maheshkale447
PR: Ginger-Automation/Ginger#4293
File: Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportApiHandler.cs:56-60
Timestamp: 2025-09-05T10:50:57.706Z
Learning: In AccountReportApiHandler.cs, the _isRunSetDataSent flag is correctly initialized to true by default. This flag acts as a circuit breaker where true allows operations to proceed and false blocks downstream operations after a RunSet send failure. The optimistic default (true) is necessary to allow the initial RunSet send attempt.
Applied to files:
Ginger/GingerCoreNET/Run/RunsetExecutor.csGinger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportApiHandler.cs
📚 Learning: 2025-09-05T10:53:38.154Z
Learnt from: Maheshkale447
PR: Ginger-Automation/Ginger#4293
File: Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportApiHandler.cs:0-0
Timestamp: 2025-09-05T10:53:38.154Z
Learning: In AccountReportApiHandler.cs, the user confirmed that the _isRunSetDataSent flag follows a "fail first" circuit breaker pattern where it starts optimistically as true to allow initial operations, and only gets set to false after actual failures occur. This prevents unnecessary blocking before any failure has been detected.
Applied to files:
Ginger/GingerCoreNET/Run/RunsetExecutor.cs
📚 Learning: 2025-09-30T06:03:09.360Z
Learnt from: AmanPrasad43
PR: Ginger-Automation/Ginger#4314
File: Ginger/GingerCoreNET/RunLib/DynamicExecutionLib/DynamicExecutionManager.cs:960-976
Timestamp: 2025-09-30T06:03:09.360Z
Learning: In GingerPlayDetails configuration mapping (file: Ginger/GingerCoreNET/RunLib/DynamicExecutionLib/DynamicExecutionManager.cs), both EnableAccountReportService and EnableHTMLReportService should be mapped from gingerPlayConfig.GingerPlayReportServiceEnabled as they represent the same underlying service.
Applied to files:
Ginger/GingerCoreNET/Run/RunsetExecutor.cs
🧬 Code graph analysis (6)
Ginger/GingerCoreNET/RunLib/CLILib/CLIProcessor.cs (1)
Ginger/GingerCoreNET/log4netLib/GingerLog.cs (3)
GingerLog(36-269)SetHTTPLogAppenderAPIUrl(239-268)SetHTTPLogAppenderInstanceId(208-237)
Ginger/GingerCoreNET/RunLib/CLILib/CLIDynamicFile.cs (1)
Ginger/GingerCoreNET/log4netLib/GingerLog.cs (3)
GingerLog(36-269)SetHTTPLogAppenderExecutionId(177-206)SetHTTPLogAppenderAPIUrl(239-268)
Ginger/GingerCoreNET/log4netLib/HttpLogAppender.cs (1)
Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportApiHandler.cs (20)
Task(125-175)Task(177-199)Task(201-216)Task(218-241)Task(243-265)Task(267-289)Task(319-357)Task(360-392)Task(394-439)Task(442-474)Task(476-500)Task(592-618)Task(620-650)Task(652-679)AccountReportApiHandler(39-680)AccountReportApiHandler(66-89)AccountReportApiHandler(90-93)List(502-530)List(532-560)List(562-590)
Ginger/GingerCoreNET/Run/RunsetExecutor.cs (4)
Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportApiHandler.cs (3)
AccountReportApiHandler(39-680)AccountReportApiHandler(66-89)AccountReportApiHandler(90-93)Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs (2)
GingerPlayEndPointManager(27-253)GetAccountReportServiceUrl(69-103)Ginger/GingerCoreNET/WorkSpaceLib/WorkSpace.cs (1)
WorkSpace(61-1006)Ginger/GingerCoreNET/log4netLib/GingerLog.cs (2)
GingerLog(36-269)SetHTTPLogAppenderExecutionId(177-206)
Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportApiHandler.cs (2)
Ginger/GingerCoreCommon/ReporterLib/Reporter.cs (1)
Reporter(28-357)Ginger/GingerCoreNET/log4netLib/GingerLog.cs (1)
ToLog(94-125)
Ginger/GingerCoreNET/log4netLib/GingerLog.cs (3)
Ginger/GingerCoreNET/log4netLib/HttpLogAppender.cs (2)
Append(111-131)HttpLogAppender(13-192)Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportApiHandler.cs (3)
AccountReportApiHandler(39-680)AccountReportApiHandler(66-89)AccountReportApiHandler(90-93)Ginger/GingerCoreCommon/ReporterLib/Reporter.cs (1)
Reporter(28-357)
🔇 Additional comments (7)
Ginger/GingerCoreNET/Run/RunsetExecutor.cs (1)
26-26: LGTM!The using directive for
Amdocs.Ginger.CoreNET.log4netLibis correctly added to support the new HTTP log appender configuration.Ginger/GingerCoreNET/log4netLib/log4net.config (1)
23-23: LGTM!The appender reference is correctly added to the root logger, enabling the HttpLogAppender for all log events.
Ginger/GingerCoreNET/RunLib/CLILib/CLIDynamicFile.cs (1)
21-21: LGTM!The using directive for
Amdocs.Ginger.CoreNET.log4netLibis correctly added to support HTTP log appender configuration.Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportApiHandler.cs (3)
64-64: LGTM: Per-instance LogId for correlation.The
LogIdis correctly scoped as instance-level and initialized once perAccountReportApiHandlerto correlate all logs sent by this handler instance. This supports tracing multiple concurrent executions.
620-620: Clarify why ApiUrl is a parameter.The
AccountReportApiHandleralready hasEndPointUrlset in the constructor. Why doesSendExecutionLogToCentralDBAsynctakeApiUrlas a parameter instead of usingEndPointUrl? This creates inconsistency and potential for passing the wrong URL.Consider refactoring to use
EndPointUrldirectly, or document why the parameter is necessary.
652-679: LGTM: Clean error handling and response validation.The helper method correctly sends the REST request, validates the response, and provides clear success/failure logging. Error handling is appropriate with exceptions caught and logged.
Ginger/GingerCoreNET/log4netLib/HttpLogAppender.cs (1)
111-131: LGTM - Proper defensive copying for thread safety.The implementation correctly creates a defensive copy of the
LoggingEventand snapshots its properties to prevent race conditions when the async worker processes the queue. This is essential for ensuring data integrity in a multi-threaded logging environment.
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs (1)
151-152: Fix inconsistent error message.The error message on line 151 mentions "Account Report Service URL" but should reference "HTML Report Service URL" to match the method's purpose.
Apply this diff:
catch (Exception ex) { - Reporter.ToLog(eLogLevel.ERROR, $"Error occurred while getting Account Report Service URL: {ex.Message}"); - Reporter.ToUser(eUserMsgKey.StaticErrorMessage, "Failed to retrieve the Account Report Service URL. Please check the configuration."); + Reporter.ToLog(eLogLevel.ERROR, $"Error occurred while getting HTML Report Service URL: {ex.Message}"); + Reporter.ToUser(eUserMsgKey.StaticErrorMessage, "Failed to retrieve the HTML Report Service URL. Please check the configuration."); return null; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (11)
Ginger/Ginger/App.config(1 hunks)Ginger/Ginger/App.xaml.cs(1 hunks)Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs(3 hunks)Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportApiHandler.cs(2 hunks)Ginger/GingerCoreNET/Run/RunsetExecutor.cs(4 hunks)Ginger/GingerCoreNET/RunLib/CLILib/CLIDynamicFile.cs(3 hunks)Ginger/GingerCoreNET/RunLib/CLILib/CLIHelper.cs(3 hunks)Ginger/GingerCoreNET/RunLib/CLILib/CLIProcessor.cs(4 hunks)Ginger/GingerCoreNET/log4netLib/GingerLog.cs(3 hunks)Ginger/GingerCoreNET/log4netLib/HttpLogAppender.cs(1 hunks)Ginger/GingerCoreNET/log4netLib/log4net.config(1 hunks)
🧰 Additional context used
🧠 Learnings (8)
📚 Learning: 2025-04-25T13:29:45.059Z
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it provides access to the `ObservableList<>` class which is used throughout the file for collections of RunSetConfig, AnalyzerItemBase, and ApplicationPOMModel objects.
Applied to files:
Ginger/GingerCoreNET/log4netLib/GingerLog.csGinger/GingerCoreNET/Run/RunsetExecutor.csGinger/GingerCoreNET/RunLib/CLILib/CLIDynamicFile.csGinger/GingerCoreNET/RunLib/CLILib/CLIProcessor.cs
📚 Learning: 2025-04-25T13:29:45.059Z
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4188
File: Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs:22-23
Timestamp: 2025-04-25T13:29:45.059Z
Learning: The `using Amdocs.Ginger.Repository;` statement in Ginger/GingerCoreNET/RunLib/CLILib/DoOptionsHanlder.cs is necessary as it imports the ObservableList<> class which is used throughout the file.
Applied to files:
Ginger/GingerCoreNET/log4netLib/GingerLog.csGinger/GingerCoreNET/Run/RunsetExecutor.csGinger/GingerCoreNET/RunLib/CLILib/CLIDynamicFile.cs
📚 Learning: 2024-10-15T07:06:51.444Z
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#3958
File: Ginger/Ginger/App.xaml.cs:246-246
Timestamp: 2024-10-15T07:06:51.444Z
Learning: In `Ginger/Ginger/App.xaml.cs`, the `cliProcessor` field is used in multiple methods (`ParseCommandLineArguments` and `RunNewCLI`), so it should remain as a class-level field.
Applied to files:
Ginger/Ginger/App.xaml.cs
📚 Learning: 2025-09-30T06:03:09.397Z
Learnt from: AmanPrasad43
PR: Ginger-Automation/Ginger#4314
File: Ginger/GingerCoreNET/RunLib/DynamicExecutionLib/DynamicExecutionManager.cs:960-976
Timestamp: 2025-09-30T06:03:09.397Z
Learning: In GingerPlayDetails configuration mapping (file: Ginger/GingerCoreNET/RunLib/DynamicExecutionLib/DynamicExecutionManager.cs), both EnableAccountReportService and EnableHTMLReportService should be mapped from gingerPlayConfig.GingerPlayReportServiceEnabled as they represent the same underlying service.
Applied to files:
Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.csGinger/GingerCoreNET/Run/RunsetExecutor.cs
📚 Learning: 2025-06-16T10:37:13.073Z
Learnt from: prashelke
PR: Ginger-Automation/Ginger#4232
File: Ginger/GingerCoreNET/ActionsLib/UI/VisualTesting/VRTAnalyzer.cs:19-22
Timestamp: 2025-06-16T10:37:13.073Z
Learning: In Ginger codebase, both `using amdocs.ginger.GingerCoreNET;` and `using Amdocs.Ginger.CoreNET;` are valid and serve different purposes. The first (lowercase) contains the WorkSpace class and related workspace functionality, while the second (proper case) contains drivers like GenericAppiumDriver and other core functionality. Both may be required in files that use types from both namespaces.
Applied to files:
Ginger/GingerCoreNET/Run/RunsetExecutor.csGinger/GingerCoreNET/RunLib/CLILib/CLIDynamicFile.cs
📚 Learning: 2025-03-20T11:10:30.816Z
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4137
File: Ginger/Ginger/SourceControl/SourceControlProjectsPage.xaml.cs:21-21
Timestamp: 2025-03-20T11:10:30.816Z
Learning: The `Amdocs.Ginger.Common.SourceControlLib` namespace is required in files that reference the `GingerSolution` class for source control operations in the Ginger automation framework.
Applied to files:
Ginger/GingerCoreNET/Run/RunsetExecutor.csGinger/GingerCoreNET/RunLib/CLILib/CLIDynamicFile.cs
📚 Learning: 2025-09-05T10:50:57.706Z
Learnt from: Maheshkale447
PR: Ginger-Automation/Ginger#4293
File: Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportApiHandler.cs:56-60
Timestamp: 2025-09-05T10:50:57.706Z
Learning: In AccountReportApiHandler.cs, the _isRunSetDataSent flag is correctly initialized to true by default. This flag acts as a circuit breaker where true allows operations to proceed and false blocks downstream operations after a RunSet send failure. The optimistic default (true) is necessary to allow the initial RunSet send attempt.
Applied to files:
Ginger/GingerCoreNET/Run/RunsetExecutor.csGinger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportApiHandler.cs
📚 Learning: 2025-09-05T10:53:38.154Z
Learnt from: Maheshkale447
PR: Ginger-Automation/Ginger#4293
File: Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportApiHandler.cs:0-0
Timestamp: 2025-09-05T10:53:38.154Z
Learning: In AccountReportApiHandler.cs, the user confirmed that the _isRunSetDataSent flag follows a "fail first" circuit breaker pattern where it starts optimistically as true to allow initial operations, and only gets set to false after actual failures occur. This prevents unnecessary blocking before any failure has been detected.
Applied to files:
Ginger/GingerCoreNET/Run/RunsetExecutor.cs
🧬 Code graph analysis (7)
Ginger/GingerCoreNET/log4netLib/GingerLog.cs (2)
Ginger/GingerCoreNET/log4netLib/HttpLogAppender.cs (2)
Append(145-165)HttpLogAppender(19-256)Ginger/GingerCoreCommon/ReporterLib/Reporter.cs (1)
Reporter(28-357)
Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs (4)
Ginger/GingerCoreCommon/External/Configurations/GingerPlayConfiguration.cs (1)
GingerPlayConfiguration(23-240)Ginger/GingerCoreNET/WorkSpaceLib/WorkSpace.cs (1)
WorkSpace(61-1006)Ginger/GingerCoreCommon/WorkSpaceLib/Solution.cs (2)
Solution(43-657)Solution(54-57)Ginger/GingerCoreCommon/ReportsLib/ExecutionLoggerConfiguration.cs (3)
GetCentralLoggerEndPointURLBackwardCompatibility(197-197)GetCentralizedHtmlReportServiceURLBackwardCompatibility(200-200)GetExecutionServiceURLBackwardCompatibility(203-203)
Ginger/GingerCoreNET/Run/RunsetExecutor.cs (2)
Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportApiHandler.cs (3)
AccountReportApiHandler(37-695)AccountReportApiHandler(64-87)AccountReportApiHandler(88-91)Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs (2)
GingerPlayEndPointManager(27-271)GetAccountReportServiceUrl(87-121)
Ginger/GingerCoreNET/RunLib/CLILib/CLIDynamicFile.cs (2)
Ginger/GingerCoreNET/log4netLib/GingerLog.cs (4)
GingerLog(34-225)SetHTTPLogAppenderExecutionId(141-166)SetHTTPLogAppenderAPIUrl(196-224)ToLog(92-123)Ginger/GingerCoreCommon/ReporterLib/Reporter.cs (1)
Reporter(28-357)
Ginger/GingerCoreNET/RunLib/CLILib/CLIProcessor.cs (2)
Ginger/GingerCoreCommon/ReporterLib/Reporter.cs (1)
Reporter(28-357)Ginger/GingerCoreNET/log4netLib/GingerLog.cs (5)
ToLog(92-123)GingerLog(34-225)SetHTTPLogAppenderAPIUrl(196-224)SetHTTPLogAppenderInstanceId(168-194)SetHTTPLogAppenderExecutionId(141-166)
Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportApiHandler.cs (2)
Ginger/GingerCoreNET/Run/RunsetExecutor.cs (2)
Task(430-440)Task(442-663)Ginger/GingerCoreCommon/ReporterLib/Reporter.cs (1)
Reporter(28-357)
Ginger/GingerCoreNET/log4netLib/HttpLogAppender.cs (4)
Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportApiHandler.cs (19)
Task(123-173)Task(175-197)Task(199-214)Task(216-239)Task(241-263)Task(265-287)Task(317-355)Task(358-390)Task(392-437)Task(440-472)Task(474-498)Task(590-616)Task(618-665)AccountReportApiHandler(37-695)AccountReportApiHandler(64-87)AccountReportApiHandler(88-91)List(500-528)List(530-558)List(560-588)Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs (2)
GingerPlayEndPointManager(27-271)GetAccountReportServiceUrlByGateWay(78-85)Ginger/GingerCoreNET/WorkSpaceLib/WorkSpace.cs (1)
WorkSpace(61-1006)Ginger/GingerCoreCommon/ReporterLib/Reporter.cs (1)
Reporter(28-357)
🔇 Additional comments (9)
Ginger/GingerCoreNET/RunLib/CLILib/CLIProcessor.cs (1)
333-342: Double-check instanceId parsing typeWe now require the
instanceIdquery string to parse aslong, but GingerPlay deep links previously handed it out as a GUID. If the gateway still emits GUID values, this will always fail theTryParse, log an error, and abort CLI execution. Please confirm the upstream format (and adjust back toGuid.TryParseif it’s still a GUID) before we ship.Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs (3)
78-85: LGTM!The new helper method correctly computes the account report service URL from the gateway configuration with proper null-checks.
87-121: LGTM!The updated logic correctly delegates URL resolution with proper null-safety and includes backward-compatibility migration.
180-211: LGTM!The execution service URL resolution follows the same safe pattern with proper null-checks and backward-compatibility handling.
Ginger/GingerCoreNET/log4netLib/GingerLog.cs (3)
141-166: LGTM!The method correctly sets
ExecutionIdon the HTTP log appender only when provided and not already set, with proper null-checks and error handling.
168-194: LGTM!The method correctly sets
InstanceIdon the HTTP log appender only when provided and not already set, following the same safe pattern asSetHTTPLogAppenderExecutionId.
196-224: LGTM!The method correctly validates and sets
ApiUrlon the HTTP log appender with proper null-checks and error handling.Ginger/GingerCoreNET/log4netLib/HttpLogAppender.cs (2)
116-143: LGTM!The lifecycle methods correctly initialize and shut down the background worker with proper cancellation and timeout handling.
145-165: LGTM!The
Appendmethod correctly clones theLoggingEventand its properties to prevent race conditions between synchronous logging and asynchronous processing.
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (2)
Ginger/GingerCoreNET/log4netLib/HttpLogAppender.cs (2)
31-45: Fix ApiUrl setter to allow initial assignment
The setter currently requires_apiUrlto already hold a value before accepting a new one, so the very first attempt to configure the appender viaGingerLog.SetHTTPLogAppenderAPIUrl(...)is ignored. This leaves the appender permanently pointing to an empty URL and prevents any logs from being sent. Please flip the logic so that we always accept the initial non-empty assignment (and later updates when the value actually changes).set { - if(!string.IsNullOrWhiteSpace(_apiUrl) && !string.IsNullOrWhiteSpace(value) && value != _apiUrl) + if (string.IsNullOrWhiteSpace(_apiUrl) || (!string.IsNullOrWhiteSpace(value) && value != _apiUrl)) { _apiUrl = value; } }
154-229: Guard numeric config parsing to keep the worker alive
Multiple calls toint.Parse(FlushIntervalSeconds/MaxRetryDelaySeconds)assume perfect configuration; a single non-numeric value (e.g. a typo in appSettings) throwsFormatException, abortsProcessQueue, and stops all log delivery. Please parse and validate these settings once (e.g. duringActivateOptions) usingint.TryParse, fall back to sane defaults, and reuse the parsed integers insideProcessQueue.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
Ginger/GingerCoreNET/log4netLib/HttpLogAppender.cs(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
Ginger/GingerCoreNET/log4netLib/HttpLogAppender.cs (4)
Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportApiHandler.cs (19)
Task(123-173)Task(175-197)Task(199-214)Task(216-239)Task(241-263)Task(265-287)Task(317-355)Task(358-390)Task(392-437)Task(440-472)Task(474-498)Task(590-616)Task(618-665)AccountReportApiHandler(37-695)AccountReportApiHandler(64-87)AccountReportApiHandler(88-91)List(500-528)List(530-558)List(560-588)Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs (2)
GingerPlayEndPointManager(27-271)GetAccountReportServiceUrlByGateWay(78-85)Ginger/GingerCoreNET/WorkSpaceLib/WorkSpace.cs (1)
WorkSpace(61-1006)Ginger/GingerCoreCommon/ReporterLib/Reporter.cs (1)
Reporter(28-357)
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
Ginger/GingerCoreNET/log4netLib/HttpLogAppender.cs(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
Ginger/GingerCoreNET/log4netLib/HttpLogAppender.cs (3)
Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportApiHandler.cs (19)
Task(123-173)Task(175-197)Task(199-214)Task(216-239)Task(241-263)Task(265-287)Task(317-355)Task(358-390)Task(392-437)Task(440-472)Task(474-498)Task(590-616)Task(618-665)AccountReportApiHandler(37-695)AccountReportApiHandler(64-87)AccountReportApiHandler(88-91)List(500-528)List(530-558)List(560-588)Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs (2)
GingerPlayEndPointManager(27-271)GetAccountReportServiceUrlByGateWay(78-85)Ginger/GingerCoreNET/WorkSpaceLib/WorkSpace.cs (1)
WorkSpace(61-1006)
a20e96e
into
Releases/Official-Release
Thank you for your contribution.
Before submitting this PR, please make sure:
Summary by CodeRabbit
New Features
Chores