Skip to content

Update/details view template config migration #3403

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

teboho
Copy link
Contributor

@teboho teboho commented Jun 13, 2025

#3170

config migration

Summary by CodeRabbit

  • Chores
    • Updated project configuration to embed a new migration file as a resource in the application build.

Copy link
Contributor

coderabbitai bot commented Jun 13, 2025

Walkthrough

The project file for the Shesha.Application project was updated to embed a new configuration migration file, package20250613_1026.shaconfig, as an embedded resource while also excluding it from normal content processing. No changes were made to code or public entities.

Changes

File(s) Change Summary
shesha-core/src/Shesha.Application/Shesha.Application.csproj Added package20250613_1026.shaconfig as an embedded resource and excluded it from normal content processing.

Poem

A shiny new config, tucked inside the code,
Embedded and hidden, in the project it rode.
No classes were altered, no methods set free—
Just a file on a journey, as snug as can be.
🐰✨


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.
    • Explain this complex logic.
    • 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. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai 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 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

Documentation and Community

  • 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.

@teboho teboho requested a review from James-Baloyi June 13, 2025 10:49
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
shesha-core/src/Shesha.Application/Shesha.Application.csproj (1)

31-130: Consider using wildcards to simplify maintenance
Manually listing each .shaconfig leads to frequent manual updates and PR churn. You can consolidate these entries using wildcard patterns:

-    <ItemGroup>
-        <None Remove="ConfigMigrations\package20240123_1429.shaconfig" />
-        ...
-        <None Remove="ConfigMigrations\package20250613_1026.shaconfig" />
-        <None Remove="Excel\template.xlsx" />
-    </ItemGroup>
+    <ItemGroup>
+        <None Remove="ConfigMigrations\*.shaconfig" />
+        <None Remove="Excel\template.xlsx" />
+    </ItemGroup>

-    <ItemGroup>
-        <EmbeddedResource Include="ConfigMigrations\package20240201_1221.shaconfig" />
-        ...
-        <EmbeddedResource Include="ConfigMigrations\package20250613_1026.shaconfig" />
-        <EmbeddedResource Include="Excel\template.xlsx" />
-    </ItemGroup>
+    <ItemGroup>
+        <EmbeddedResource Include="ConfigMigrations\*.shaconfig" />
+        <EmbeddedResource Include="Excel\template.xlsx" />
+    </ItemGroup>

This will automatically handle all existing and future migrations without manual edits.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7c7a14c and 73f15f3.

📒 Files selected for processing (1)
  • shesha-core/src/Shesha.Application/Shesha.Application.csproj (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build-attempt
🔇 Additional comments (1)
shesha-core/src/Shesha.Application/Shesha.Application.csproj (1)

126-126: Embed the migration as a resource
The line <EmbeddedResource Include="ConfigMigrations\package20250613_1026.shaconfig" /> ensures this config is packaged into the assembly alongside existing migrations.

@@ -78,6 +78,7 @@
<None Remove="ConfigMigrations\package20250130_1900.shaconfig" />
<None Remove="ConfigMigrations\package20250212_0911.shaconfig" />
<None Remove="ConfigMigrations\package20250228_1711.shaconfig" />
<None Remove="ConfigMigrations\package20250613_1026.shaconfig" />
Copy link
Contributor

@coderabbitai coderabbitai bot Jun 13, 2025

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Exclude new migration from default content
You've correctly added <None Remove="ConfigMigrations\package20250613_1026.shaconfig" /> to prevent this migration file from being treated as standard content.

Please verify that the file exists at the expected path with the following check:


🏁 Script executed:

#!/usr/bin/env bash
if [ ! -f "shesha-core/src/Shesha.Application/ConfigMigrations/package20250613_1026.shaconfig" ]; then
  echo "Error: Config migration file missing!"
  exit 1
fi

Length of output: 193


I want to confirm whether the migration file exists elsewhere in the repo. Let's search for it by name:


🏁 Script executed:

#!/usr/bin/env bash
echo "Locating package20250613_1026.shaconfig in the repository..."
find . -type f -name "package20250613_1026.shaconfig"

Length of output: 184


Let’s verify whether the file lives under a different name or the directory is missing. Please run:


🏁 Script executed:

#!/usr/bin/env bash
echo "Searching for any .shaconfig files in the repo…"
find . -type f -iname '*.shaconfig'

echo
echo "Listing contents of ConfigMigrations directory (if it exists)…"
ls -R shesha-core/src/Shesha.Application/ConfigMigrations || echo "➜ Directory not found"

Length of output: 497


Missing migration file or incorrect path
The <None Remove="ConfigMigrations/package20250613_1026.shaconfig" /> entry in Shesha.Application.csproj won’t have any effect because the ConfigMigrations directory—and thus the file—does not exist in the repo.

• File under review:

  • shesha-core/src/Shesha.Application/Shesha.Application.csproj (line 81)

• Snippet:

      <None Remove="ConfigMigrations/package20250613_1026.shaconfig" />

Action required:

  • Confirm whether the migration file was added under a different path or name, and update the <None Remove> path accordingly.
  • If you intend to exclude this migration, ensure the file is present at shesha-core/src/Shesha.Application/ConfigMigrations/package20250613_1026.shaconfig.
  • Otherwise, remove or correct the None Remove entry so it reflects an existing file.
🤖 Prompt for AI Agents
In shesha-core/src/Shesha.Application/Shesha.Application.csproj at line 81, the
<None Remove="ConfigMigrations/package20250613_1026.shaconfig" /> entry
references a migration file that does not exist at the specified path. Verify if
the migration file exists elsewhere in the repository under a different path or
name and update the Remove attribute accordingly. If the file should be excluded
but is missing, add it to the ConfigMigrations directory at the specified
location. Otherwise, remove or correct this entry to reference an existing file
to ensure the exclusion works as intended.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is how we add form config migrations

Copy link
Contributor

Choose a reason for hiding this comment

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

@teboho Got it—adding the <None Remove="ConfigMigrations\*.shaconfig" /> line first and then dropping the actual .shaconfig file in a follow-up commit is the usual workflow for form-config migrations.

At the moment the file isn’t in the repo, so the build will succeed but the migration itself won’t ship until the file is added. Just let me know if you’re planning to push the package20250613_1026.shaconfig file later; otherwise everything in the .csproj looks consistent with the established pattern.

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