-
Notifications
You must be signed in to change notification settings - Fork 93
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
base: main
Are you sure you want to change the base?
Conversation
…into update/details-view-template
WalkthroughThe project file for the Shesha.Application project was updated to embed a new configuration migration file, Changes
Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
📒 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" /> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
#3170
config migration
Summary by CodeRabbit