Skip to content

Updated Ginger Play Itegtration to remove Ginger Html Report Service URL#4275

Merged
Maheshkale447 merged 4 commits into
Releases/Betafrom
Feature/AccountReportChanges
Sep 5, 2025
Merged

Updated Ginger Play Itegtration to remove Ginger Html Report Service URL#4275
Maheshkale447 merged 4 commits into
Releases/Betafrom
Feature/AccountReportChanges

Conversation

@Maheshkale447

@Maheshkale447 Maheshkale447 commented Aug 4, 2025

Copy link
Copy Markdown
Contributor

Thank you for your contribution.
Before submitting this PR, please make sure:

  • PR description and commit message should describe the changes done in this PR
  • Verify the PR is pointing to correct branch i.e. Release or Beta branch if the code fix is for specific release , else point it to master
  • Latest Code from master or specific release branch is merged to your branch
  • No unwanted\commented\junk code is included
  • No new warning upon build solution
  • Code Summary\Comments are added to my code which explains what my code is doing
  • Existing unit test cases are passed
  • New Unit tests are added for your development
  • Sanity Tests are successfully executed for New and Existing Functionality
  • Verify that changes are compatible with all relevant browsers and platforms.
  • After creating pull request there should not be any conflicts
  • Resolve all Codacy comments
  • Builds and checks are passed before PR is sent for review
  • Resolve code review comments
  • Update the Help Library document to match any feature changes

Summary by CodeRabbit

  • Chores
    • Removed a deprecated HTML report configuration setting.
    • Switched report URL resolution to use the account-report gateway when the central gateway is configured, simplifying report service routing.

@coderabbitai

coderabbitai Bot commented Aug 4, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Removed the HTML_REPORT_SERVICE_URL config key and its constant; GetHTMLReportServiceUrl() now constructs the HTML report URL using GingerPlayConfiguration.GingerPlayGatewayUrl + ACCOUNT_REPORT_SERVICE_URL. Minor whitespace/formatting tweaks only.

Changes

Cohort / File(s) Change Summary
App config
Ginger/Ginger/App.config
Removed the HTML_REPORT_SERVICE_URL appSettings entry.
Endpoint manager
Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs
Removed the HTML_REPORT_SERVICE_URL constant and updated GetHTMLReportServiceUrl() to return GingerPlayConfiguration.GingerPlayGatewayUrl + ACCOUNT_REPORT_SERVICE_URL. Minor whitespace edits.

Sequence Diagram(s)

sequenceDiagram
    participant Caller
    participant GingerPlayEndPointManager
    participant GingerPlayConfiguration

    Caller->>GingerPlayEndPointManager: Request HTML report URL
    GingerPlayEndPointManager->>GingerPlayConfiguration: Read GingerPlayGatewayUrl & ACCOUNT_REPORT_SERVICE_URL
    GingerPlayConfiguration-->>GingerPlayEndPointManager: Return values
    GingerPlayEndPointManager-->>Caller: Return GingerPlayGatewayUrl + ACCOUNT_REPORT_SERVICE_URL
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

A rabbit nudged a config key away,
Swapped a constant for a gatewayed way.
URLs now hop in tidy rows,
Whitespace neat where code now flows.
🐇

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch Feature/AccountReportChanges

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🔭 Outside diff range comments (1)
Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs (1)

128-129: Fix inconsistent error messages in GetHTMLReportServiceUrl().

The error messages in the catch block reference "Account Report Service URL" but this method is GetHTMLReportServiceUrl(), which could confuse users during troubleshooting.

-                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.");
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6b39d12 and c4f74db.

📒 Files selected for processing (2)
  • Ginger/Ginger/App.config (0 hunks)
  • Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs (3 hunks)
💤 Files with no reviewable changes (1)
  • Ginger/Ginger/App.config
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: prashelke
PR: Ginger-Automation/Ginger#3429
File: Ginger/Ginger/AutomatePageLib/AddActionMenu/WindowExplorer/Common/WindowExplorerPage.xaml.cs:1139-1142
Timestamp: 2024-07-26T22:04:12.930Z
Learning: The user has updated the code by removing or addressing the commented code as suggested in the review.
Learnt from: IamRanjeetSingh
PR: Ginger-Automation/Ginger#3720
File: Ginger/Ginger/SolutionWindows/TreeViewItems/NewTreeViewItemBase.cs:574-606
Timestamp: 2024-07-26T22:04:12.930Z
Learning: User IamRanjeetSingh prefers minimal changes in patch updates for stability. Typo corrections or similar minor code improvements may be deferred to later updates.
📚 Learning: in `newrunsetpage.xaml.cs`, the methods `generatehtmlreportfromremote()` and `generatehtmlreportfrom...
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#3909
File: Ginger/Ginger/RunSetPageLib/NewRunSetPage.xaml.cs:2328-2346
Timestamp: 2024-09-16T16:34:20.667Z
Learning: In `NewRunSetPage.xaml.cs`, the methods `GenerateHTMLReportFromRemote()` and `GenerateHTMLReportFromLocal()` are kept separate because the application first tries to load remote data, and if not found, it falls back to loading local data.

Applied to files:

  • Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs
📚 Learning: xml documentation is not required for interface methods in the ginger project as per team preference...
Learnt from: GokulBothe99
PR: Ginger-Automation/Ginger#4095
File: Ginger/GingerCoreNET/Drivers/CoreDrivers/Web/IBrowserTab.cs:117-117
Timestamp: 2025-02-11T13:35:40.039Z
Learning: XML documentation is not required for interface methods in the Ginger project as per team preference.

Applied to files:

  • Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs
📚 Learning: in the ginger project, gateway url fields in configuration pages do not require encryption handling ...
Learnt from: AmanPrasad43
PR: Ginger-Automation/Ginger#4246
File: Ginger/Ginger/ExternalConfigurations/GingerPlayConfigurationpage.xaml.cs:182-196
Timestamp: 2025-07-10T09:13:22.527Z
Learning: In the Ginger project, Gateway URL fields in configuration pages do not require encryption handling like Client ID and Client Secret fields do. URLs are typically public endpoints and don't contain sensitive information that needs encryption protection, unlike authentication credentials.

Applied to files:

  • Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs
🔇 Additional comments (2)
Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs (2)

87-87: LGTM! Clean whitespace formatting.

The whitespace cleanup improves code consistency.

Also applies to: 94-94


106-106: LGTM! Updated to use unified report service URL.

The change to use ACCOUNT_REPORT_SERVICE_URL instead of the removed HTML_REPORT_SERVICE_URL consolidates the reporting services, which aligns with the PR objectives.

Comment thread Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs Outdated
@AmanPrasad43
AmanPrasad43 changed the base branch from master to Releases/Beta September 5, 2025 18:08

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs (3)

113-116: Add deprecation warnings when falling back to centralized HTML report URLs.

Surface a WARN log when using CentralizedHTMLReportServiceURL or the LoggerConfig backward-compat value so users know to migrate.

Apply:

-                else if (!string.IsNullOrEmpty(GingerPlayConfiguration.CentralizedHTMLReportServiceURL))
+                else if (!string.IsNullOrEmpty(GingerPlayConfiguration.CentralizedHTMLReportServiceURL))
                 {
+                    Reporter.ToLog(eLogLevel.WARN, "CentralizedHTMLReportServiceURL is deprecated; using it for backward compatibility. Please configure GingerPlayGatewayUrl to route to ACCOUNT_REPORT_SERVICE_URL.");
                     return GingerPlayConfiguration.CentralizedHTMLReportServiceURL;
                 }
-                else if (!string.IsNullOrEmpty(LoggerConfig.GetCentralizedHtmlReportServiceURLBackwardCompatibility()))
+                else if (!string.IsNullOrEmpty(LoggerConfig.GetCentralizedHtmlReportServiceURLBackwardCompatibility()))
                 {
+                    Reporter.ToLog(eLogLevel.WARN, "Using centralized HTML Report Service URL from LoggerConfig for backward compatibility. Please migrate to GingerPlayGatewayUrl + ACCOUNT_REPORT_SERVICE_URL.");
                     GingerPlayConfiguration.CentralizedHTMLReportServiceURL = LoggerConfig.GetCentralizedHtmlReportServiceURLBackwardCompatibility();

Also applies to: 117-123


131-136: Fix copy-paste error: messages refer to “Account Report” instead of “HTML Report”.

Incorrect user-facing text in the HTML method’s exception handler.

Apply:

-                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.");

105-112: Mark GetHTMLReportServiceUrl obsolete and delegate to GetAccountReportServiceUrl
No lingering references to the HTML-specific URL exist and GetAccountReportServiceUrl() is implemented; apply the diff below to obsolete the HTML method and forward its logic:

-        public static string GetHTMLReportServiceUrl()
+        [Obsolete("HTML Report Service URL has been consolidated; use GetAccountReportServiceUrl().")]
+        public static string GetHTMLReportServiceUrl()
         {
             try
-                if (!string.IsNullOrEmpty(GingerPlayConfiguration.GingerPlayGatewayUrl) && GingerPlayConfiguration.GingerPlayReportServiceEnabled)
-                {
-                    return GingerPlayConfiguration.GingerPlayGatewayUrl + ACCOUNT_REPORT_SERVICE_URL;
-                }
-                else if (!string.IsNullOrEmpty(GingerPlayConfiguration.CentralizedHTMLReportServiceURL))
-                {
-                    return GingerPlayConfiguration.CentralizedHTMLReportServiceURL;
-                }
-                else if (!string.IsNullOrEmpty(LoggerConfig.GetCentralizedHtmlReportServiceURLBackwardCompatibility()))
-                {
-                    GingerPlayConfiguration.CentralizedHTMLReportServiceURL = LoggerConfig.GetCentralizedHtmlReportServiceURLBackwardCompatibility();
-                    GingerPlayConfiguration.GingerPlayEnabled = true;
-                    GingerPlayConfiguration.GingerPlayReportServiceEnabled = true;
-                    return GingerPlayConfiguration.CentralizedHTMLReportServiceURL;
-                }
-                else
-                {
-                    Reporter.ToLog(eLogLevel.ERROR, "Error occurred while getting HTML Report Service URL");
-                    Reporter.ToUser(eUserMsgKey.StaticErrorMessage, "Failed to retrieve the HTML Report Service URL. Please check the configuration.");
-                    return null;
-                }
+                return GetAccountReportServiceUrl();
             }
             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

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c4f74db and bd073ef.

📒 Files selected for processing (2)
  • Ginger/Ginger/App.config (0 hunks)
  • Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs (2 hunks)
💤 Files with no reviewable changes (1)
  • Ginger/Ginger/App.config
🧰 Additional context used
🧬 Code graph analysis (1)
Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs (2)
Ginger/GingerCoreCommon/ReporterLib/Reporter.cs (1)
  • Reporter (28-357)
Ginger/GingerCoreCommon/External/Configurations/GingerPlayConfiguration.cs (1)
  • GingerPlayConfiguration (23-240)
🔇 Additional comments (1)
Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs (1)

109-112: Good consolidation: HTML URL now resolves via Account Report service path.

Switching to GingerPlayGatewayUrl + ACCOUNT_REPORT_SERVICE_URL aligns with the PR goal to remove the dedicated HTML service URL.

Comment on lines 89 to 95
else
{
Reporter.ToLog(eLogLevel.ERROR, "Error occurred while getting Account Report Service URL");

return null;
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Notify the user on failure (parity with HTML/AI/Execution methods).

GetAccountReportServiceUrl() logs an error but doesn’t show a user message; others do. Add Reporter.ToUser(...) for consistent UX.

Apply:

                 else
                 {
                     Reporter.ToLog(eLogLevel.ERROR, "Error occurred while getting Account Report Service URL");
+                    Reporter.ToUser(eUserMsgKey.StaticErrorMessage, "Failed to retrieve the Account Report Service URL. Please check the configuration.");
                     return null;
                 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
else
{
Reporter.ToLog(eLogLevel.ERROR, "Error occurred while getting Account Report Service URL");
return null;
}
}
else
{
Reporter.ToLog(eLogLevel.ERROR, "Error occurred while getting Account Report Service URL");
Reporter.ToUser(eUserMsgKey.StaticErrorMessage, "Failed to retrieve the Account Report Service URL. Please check the configuration.");
return null;
}
🤖 Prompt for AI Agents
In Ginger/GingerCoreNET/External/GingerPlay/GingerPlayEndPointManager.cs around
lines 89-95, the error branch logs the failure but doesn't notify the user; add
a Reporter.ToUser(...) call immediately after Reporter.ToLog(...) with a clear
user-facing message (e.g., "Error occurred while getting Account Report Service
URL") mirroring the log, include error details if an exception object is
available, then return null as before so UX matches the other methods.

Comment on lines 96 to 101
catch (Exception ex)
{
Reporter.ToLog(eLogLevel.ERROR, $"Error occurred while getting Account Report Service URL: {ex.Message}");

return null;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Also surface exception to user for account report URL.

Mirror the HTML/AI/Execution patterns in the exception path.

Apply:

             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.");
                 return null;
             }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
catch (Exception ex)
{
Reporter.ToLog(eLogLevel.ERROR, $"Error occurred while getting Account Report Service URL: {ex.Message}");
return null;
}
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.");
return null;
}

@Maheshkale447
Maheshkale447 merged commit 6975963 into Releases/Beta Sep 5, 2025
8 checks passed
@Maheshkale447
Maheshkale447 deleted the Feature/AccountReportChanges branch September 5, 2025 18:24
@coderabbitai coderabbitai Bot mentioned this pull request Oct 17, 2025
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant