Skip to content

Releases/beta published/beta 2025.4.1#4312

Merged
Maheshkale447 merged 5 commits into
masterfrom
Releases/Beta-Published/Beta-2025.4.1
Sep 26, 2025
Merged

Releases/beta published/beta 2025.4.1#4312
Maheshkale447 merged 5 commits into
masterfrom
Releases/Beta-Published/Beta-2025.4.1

Conversation

@Maheshkale447

@Maheshkale447 Maheshkale447 commented Sep 26, 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

  • New Features
    • Automatic per-user workspace for repositories; created on demand.
    • Improved connectivity to sources using self-signed certificates.
  • Bug Fixes
    • More reliable cleanup and locking of temporary repository folders, reducing collisions and stale state.
    • Source control updates now recover from corrupted local repositories by cleaning and retrying.
  • Refactor
    • Unified source control setup with stronger error handling and clearer logging (success, warnings, and exceptions).
    • CLI logs clearer download outcomes and uses safer fallbacks for temporary repo paths.

@coderabbitai

coderabbitai Bot commented Sep 26, 2025

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

Walkthrough

Introduces a default per-user repository folder, refactors RepoFolderManager to optionalize base path and shift data files to a local user area, hardens directory clearing, alters HTTP certificate validation (accept-all) in specific paths, adjusts CLI temp repo handling and logging, modifies Git pull error handling, and refactors SourceControlIntegration’s creation/configuration flow. Adds unit tests.

Changes

Cohort / File(s) Summary
General utilities
Ginger/GingerCoreCommon/GeneralLib/General.cs, Ginger/GingerCoreCommon/GeneralLib/HttpUtilities.cs
Adds General.DefaultGingerReposFolder with lazy init and ensured directory. Rewrites ClearDirectoryContent with attribute resets and retry logic. In HttpUtilities, sets certificate validation callbacks to unconditionally succeed for specific HttpClient usages; minor formatting.
Repo folder manager + tests
Ginger/GingerCoreCommon/WorkSpaceLib/RepoFolderManager.cs, Ginger/GingerCoreCommonTest/WorkSpaceLib/RepoFolderManagerTests.cs
Changes RepoFolderManager ctor to (processId, baseWorkingFolder = null) and defaults base to General.DefaultGingerReposFolder. Moves lock/assign data to LocalUserApplicationData subfolder, updates file paths, strengthens error handling, and ensures cleanup. Adds comprehensive MSTest suite covering assignment, reuse, stale cleanup, concurrency, lock contention, and corrupted JSON.
CLI adjustments
Ginger/GingerCoreNET/RunLib/CLILib/CLIHelper.cs, Ginger/GingerCoreNET/RunLib/CLILib/CLIProcessor.cs
CLIHelper: adds success log, improves error logging with exception, constructs RepoFolderManager with processId only, downgrades one log from ERROR to WARN on fallback. CLIProcessor: whitespace-only tweak.
Source control core
Ginger/GingerCoreNET/SourceControl/GITSourceControl.cs, Ginger/GingerCoreNET/SourceControl/SourceControlIntegration.cs
GITSourceControl: Pull now rethrows on exception; GetLatest handles null result and conflict branches explicitly. SourceControlIntegration: adds helpers to create/configure SC, derive solution info and URIs; refactors DownloadSolution to use helpers; adds retry path for corrupted local Git (disconnect, clear folder, retry fetch).
Plugin test tweak
Ginger/GingerPluginCoreTest/CommunicationProtocol/GingerSocket2Test.cs
Skips Run10ClientsParallel on OSX via runtime OS check; adds import.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant CLI as CLIHelper
  participant RFM as RepoFolderManager
  participant SCI as SourceControlIntegration
  participant SC as SourceControlBase
  participant FS as FileSystem

  CLI->>RFM: new RepoFolderManager(processId)
  RFM-->>CLI: AssignFolder() => temp repo path
  CLI->>SCI: DownloadSolution(solutionFolder, settings)
  SCI->>SCI: GetSolutionInfo(solutionFolder)
  SCI->>SCI: CreateSourceControl()
  SCI->>SCI: ConfigureSourceControl(SC, solutionFolder)
  alt Local repo exists
    SCI->>SC: GetLatest()
    alt result is success
      SCI-->>CLI: return success
    else result is null/conflict/error
      SCI->>SC: Disconnect()
      SCI->>FS: ClearDirectoryContent(solutionFolder) with retries
      SCI->>SC: GetProject(projectUri, solutionFolder)
      SCI-->>CLI: return outcome
    end
  else No local repo
    SCI->>SC: GetProject(projectUri, solutionFolder)
    SCI-->>CLI: return outcome
  end
Loading
sequenceDiagram
  autonumber
  participant Proc as Process
  participant RFM as RepoFolderManager
  participant FS as FileSystem
  participant DF as Data Files

  Proc->>RFM: AssignFolder(processId)
  RFM->>DF: Acquire lock (repo_folder_pool.lock)
  RFM->>DF: Load assignments (repo_folder_pool_assignments.json)
  RFM->>FS: Ensure base folder exists (DefaultGingerReposFolder)
  alt Existing assignment valid
    RFM-->>Proc: Return assigned folder
  else No assignment
    RFM->>FS: Create unique subfolder
    RFM->>DF: Save assignments
    RFM-->>Proc: Return new folder
  end
  RFM->>DF: Release lock
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested reviewers

  • IamRanjeetSingh
  • prashelke

Poem

Hop-hop, a repo burrow new,
Paths tidy-cleared, with retries too.
Git pulls check, then bounce and mend,
CLI logs the journey’s end.
Certs say “okay!” (just for now),
Tests parade and take a bow.
—A rabbit signs with a cheerful “wow!” 🐇✨

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch Releases/Beta-Published/Beta-2025.4.1

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6e6ede6 and 6a0b05b.

📒 Files selected for processing (9)
  • Ginger/GingerCoreCommon/GeneralLib/General.cs (2 hunks)
  • Ginger/GingerCoreCommon/GeneralLib/HttpUtilities.cs (2 hunks)
  • Ginger/GingerCoreCommon/WorkSpaceLib/RepoFolderManager.cs (6 hunks)
  • Ginger/GingerCoreCommonTest/WorkSpaceLib/RepoFolderManagerTests.cs (1 hunks)
  • Ginger/GingerCoreNET/RunLib/CLILib/CLIHelper.cs (3 hunks)
  • Ginger/GingerCoreNET/RunLib/CLILib/CLIProcessor.cs (1 hunks)
  • Ginger/GingerCoreNET/SourceControl/GITSourceControl.cs (5 hunks)
  • Ginger/GingerCoreNET/SourceControl/SourceControlIntegration.cs (4 hunks)
  • Ginger/GingerPluginCoreTest/CommunicationProtocol/GingerSocket2Test.cs (2 hunks)

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@Maheshkale447
Maheshkale447 merged commit 9eb5c9a into master Sep 26, 2025
48 of 64 checks passed
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