Skip to content

Fetaure/version mismatch#4288

Merged
Maheshkale447 merged 6 commits into
Releases/Betafrom
Fetaure/VersionMismatch
Aug 29, 2025
Merged

Fetaure/version mismatch#4288
Maheshkale447 merged 6 commits into
Releases/Betafrom
Fetaure/VersionMismatch

Conversation

@Maheshkale447

@Maheshkale447 Maheshkale447 commented Aug 29, 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

    • Added an “In Progress” run status for clearer execution tracking.
    • Execution reports now record start times for actions, activities, business flows, runners, and runsets for more accurate timelines.
    • Improved version comparison using a structured record-based approach and support for 2-part version formats.
  • Bug Fixes

    • More reliable upgrade decisions, gracefully handling invalid and beta version strings.
  • Tests

    • Added comprehensive tests covering lower/same/higher/invalid/beta version comparison scenarios.

Mahesh Kale added 2 commits August 29, 2025 20:37
1. Updated status enum with inrpgoress status to match with account report contract
2. Removed duplicate data being sent to account report
3. Added new way to comapre versions using records and also added its unit test cases
@coderabbitai

coderabbitai Bot commented Aug 29, 2025

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

Walkthrough

Adds eRunStatus.InProgress; introduces VersionParts record and ConvertApplicationVersionToRecord; updates AccountReport end-data mappings to set StartTimeStamp and stop populating certain identity fields; implements record-based solution-version comparison with new APIs and tests; updates solution upgrade flow to use record-based comparison.

Changes

Cohort / File(s) Summary
Run status enum update
Ginger/GingerCoreCommon/EnumsLib/eStatus.cs
Added eRunStatus.InProgress and adjusted enum separators.
Version parsing utilities
Ginger/GingerCoreCommon/GeneralLib/ApplicationInfo.cs
Added public nested record VersionParts and ConvertApplicationVersionToRecord(string); added precompiled regexes and refactored ConvertApplicationVersionToLong.
Execution logger mappings
Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportEntitiesDataMapping.cs
End-data mappings now assign StartTimeStamp from source objects; identity fields for Action/Activity/ActivityGroup end-data are commented out; other fields unchanged.
Solution upgrade version comparison (record-based)
Ginger/GingerCoreNET/SolutionRepositoryLib/UpgradeLib/SolutionUpgrade.cs
Added CurrentVersionAsRecord (VersionParts), new CompareSolutionFileGingerVersionToCurrentByRecord and CompareVersionsByRecord; GetSolutionFilesWithVersion updated to use record-based comparison; legacy string-based method retained.
Unit tests for version comparison
Ginger/GingerCoreNETUnitTest/SolutionRepositoryLib/SolutionUpgradeTest.cs
New MSTest suite SolutionVersionUpgradeTest validating record- and string-based comparison behavior (lower/same/higher/invalid/beta), with temp-file helpers and cleanup.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Caller as Caller
  participant SU as SolutionUpgrade
  participant FS as FileSystem
  participant AI as ApplicationInfo

  rect rgba(221,238,255,0.5)
    note over Caller,SU: New record-based comparison flow
    Caller->>SU: CompareSolutionFileGingerVersionToCurrentByRecord(filePath, ref fileVerStr)
    SU->>FS: Read file and extract GingerVersion
    FS-->>SU: fileVerStr
    SU->>AI: ConvertApplicationVersionToRecord(ApplicationBackendVersion)
    AI-->>SU: appVersion (VersionParts)
    SU->>AI: ConvertApplicationVersionToRecord(fileVerStr)
    AI-->>SU: fileVersion (VersionParts)
  end

  alt fileVersion == "3.0.0.0Beta"
    SU->>SU: treat as LowerVersion (special-case)
  end

  rect rgba(232,245,233,0.5)
    SU->>SU: CompareVersionsByRecord(appVersion, fileVersion)
    SU-->>Caller: eGingerVersionComparisonResult (Lower / Same / Higher / ComparisonFailed)
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~55 minutes

Possibly related PRs

  • Improvereportperformance #3899 — Modifies the same AccountReportEntitiesDataMapping.cs end-data mappings (timestamp/identity handling), likely overlapping.

Suggested reviewers

  • prashelke

Poem

A rabbit hops through version trees,
I count the parts with gentle ease.
InProgress now, I log the start,
Records compared, the tests take part.
A carrot cheer for tidy art. 🥕🐰

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent 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 df3457f and e0bd343.

📒 Files selected for processing (3)
  • Ginger/GingerCoreCommon/GeneralLib/ApplicationInfo.cs (2 hunks)
  • Ginger/GingerCoreNET/SolutionRepositoryLib/UpgradeLib/SolutionUpgrade.cs (3 hunks)
  • Ginger/GingerCoreNETUnitTest/SolutionRepositoryLib/SolutionUpgradeTest.cs (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch Fetaure/VersionMismatch

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.

@Maheshkale447
Maheshkale447 changed the base branch from Releases/Beta-Published/Beta-2024.3.2.0 to Releases/Beta August 29, 2025 15:16

@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: 7

Caution

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

⚠️ Outside diff range comments (1)
Ginger/GingerCoreCommon/GeneralLib/ApplicationInfo.cs (1)

175-225: Keep semantics aligned between ConvertApplicationVersionToLong and …ToRecord.

Both default 2-part versions to Build=99, Revision=99; good. Consider adding a single internal helper to avoid drift in future edits.

I can extract a shared parser returning VersionParts and rewrite ConvertApplicationVersionToLong to consume it.

📜 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 db2f786 and df3457f.

📒 Files selected for processing (5)
  • Ginger/GingerCoreCommon/EnumsLib/eStatus.cs (1 hunks)
  • Ginger/GingerCoreCommon/GeneralLib/ApplicationInfo.cs (4 hunks)
  • Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportEntitiesDataMapping.cs (6 hunks)
  • Ginger/GingerCoreNET/SolutionRepositoryLib/UpgradeLib/SolutionUpgrade.cs (3 hunks)
  • Ginger/GingerCoreNETUnitTest/SolutionRepositoryLib/SolutionUpgradeTest.cs (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (3)
Ginger/GingerCoreCommon/GeneralLib/ApplicationInfo.cs (1)
Ginger/GingerCoreCommon/ReporterLib/Reporter.cs (1)
  • Reporter (28-357)
Ginger/GingerCoreNETUnitTest/SolutionRepositoryLib/SolutionUpgradeTest.cs (2)
Ginger/GingerCoreNET/SolutionRepositoryLib/UpgradeLib/SolutionUpgrade.cs (1)
  • SolutionUpgrade (51-478)
Ginger/GingerCoreCommon/GeneralLib/ApplicationInfo.cs (1)
  • VersionParts (227-263)
Ginger/GingerCoreNET/SolutionRepositoryLib/UpgradeLib/SolutionUpgrade.cs (2)
Ginger/GingerCoreCommon/GeneralLib/ApplicationInfo.cs (3)
  • ApplicationInfo (25-264)
  • ApplicationInfo (29-31)
  • VersionParts (227-263)
Ginger/GingerCoreCommon/ReporterLib/Reporter.cs (1)
  • Reporter (28-357)
🔇 Additional comments (11)
Ginger/GingerCoreNET/SolutionRepositoryLib/UpgradeLib/SolutionUpgrade.cs (1)

29-29: Good use of static imports for cleaner code.

The using static directive improves readability by avoiding repetitive namespace qualifications.

Ginger/GingerCoreNETUnitTest/SolutionRepositoryLib/SolutionUpgradeTest.cs (3)

46-52: Good test coverage for enum values.

The test ensures all expected enum values are defined, which helps catch accidental removals or renames.


55-107: Excellent test coverage for version comparison scenarios.

The tests comprehensively cover various scenarios (lower, same, higher, invalid, beta versions) and verify consistency between the old and new comparison methods. This ensures backward compatibility.


80-80: Nice touch with the future-proof comment!

The comment "For People who will be using Ginger in 2050" adds humor while clearly indicating the test's purpose.

Ginger/GingerCoreCommon/EnumsLib/eStatus.cs (1)

37-39: Ensure numeric parity between eRunStatus and external eExecutionStatus

eRunStatus relies on implicit sequential values, while eExecutionStatus lives in AccountReport.Contracts.Enum (not in this repo) and is cast directly—please verify its numeric values match or introduce explicit assignments or an explicit mapping function to prevent invalid casts.

Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportEntitiesDataMapping.cs (6)

87-92: EndData: Identity fields removed — confirm API contract for updates.

By omitting EntityId/AccountReportDbActivityId/ExecutionId/Name in EndData, the payload relies on Id alone for upsert/correlation. Validate the centralized report API doesn’t require these fields on “end” updates.

If there’s an API schema file, please point to it; otherwise I can grep for the DTO validation on the server side.


166-171: Activity EndData: same identity-field removal — verify backend expectations.

Same concern as for actions. If the server uses composite keys, this change could break deduplication.

I can scan for server-side usage of these fields if you share the service repo path.


246-251: ActivityGroup EndData: identity fields removed — verify.

Repeat of the above for activity groups. Ensure “Start then End” flow sends enough identifiers for an idempotent update.

Happy to help add integration tests for the ingestion path.


317-317: StartTimeStamp added to BusinessFlow EndData — LGTM.

Good for parity with StartData; avoids null StartTimeStamp server-side.


449-449: Runner EndData StartTimeStamp — LGTM.

Consistent with other entities; no issues spotted.


534-534: RunSet EndData StartTimeStamp — LGTM.

Matches the StartData/EndData symmetry across entities.

Comment thread Ginger/GingerCoreCommon/GeneralLib/ApplicationInfo.cs
Comment thread Ginger/GingerCoreCommon/GeneralLib/ApplicationInfo.cs
Comment thread Ginger/GingerCoreNET/SolutionRepositoryLib/UpgradeLib/SolutionUpgrade.cs Outdated
Comment thread Ginger/GingerCoreNETUnitTest/SolutionRepositoryLib/SolutionUpgradeTest.cs Outdated
@Maheshkale447
Maheshkale447 merged commit fd572e4 into Releases/Beta Aug 29, 2025
3 of 4 checks passed
@Maheshkale447
Maheshkale447 deleted the Fetaure/VersionMismatch branch August 29, 2025 15:52
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