-
Notifications
You must be signed in to change notification settings - Fork 0
Replace brittle path construction with repository root detection in PostgreSQL tests #251
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
Merged
davideme
merged 3 commits into
feature/csharp-postgresql-storage
from
copilot/sub-pr-250
Jan 2, 2026
Merged
Replace brittle path construction with repository root detection in PostgreSQL tests #251
davideme
merged 3 commits into
feature/csharp-postgresql-storage
from
copilot/sub-pr-250
Jan 2, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: davideme <858090+davideme@users.noreply.github.com>
Co-authored-by: davideme <858090+davideme@users.noreply.github.com>
Contributor
Author
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Copilot
AI
changed the title
[WIP] Address feedback on PostgreSQL storage implementation
Replace brittle path construction with repository root detection in PostgreSQL tests
Jan 2, 2026
davideme
added a commit
that referenced
this pull request
Jan 5, 2026
…#250) * Implement PostgreSQL storage with Entity Framework Core for C# (#248) * Initial plan * Implement C# PostgreSQL storage support with Entity Framework Core Co-authored-by: davideme <858090+davideme@users.noreply.github.com> * Fix C# tests by using environment-based PostgreSQL configuration Co-authored-by: davideme <858090+davideme@users.noreply.github.com> * Add PostgreSQL implementation guide for remaining languages Co-authored-by: davideme <858090+davideme@users.noreply.github.com> * Address code review feedback: simplify repository pattern and fix paths Co-authored-by: davideme <858090+davideme@users.noreply.github.com> * Add comprehensive implementation summary and complete C# PostgreSQL support Co-authored-by: davideme <858090+davideme@users.noreply.github.com> * Remove PostgreSQL implementation documentation Deleted POSTGRESQL_IMPLEMENTATION_GUIDE.md and POSTGRESQL_IMPLEMENTATION_SUMMARY.md, which contained implementation steps, patterns, and summary reports for PostgreSQL support across multiple language stacks. * Add unit tests for database and repository logic Added Microsoft.EntityFrameworkCore.InMemory as a test dependency. Introduced unit tests for LampControlDbContext, LampDbEntity, and PostgresLampRepository to verify entity behavior, soft delete logic, CRUD operations, and error handling using the in-memory database provider. * Address PR review feedback: simplify config, clarify health checks, use DB trigger for timestamps, apply actual schema in tests Co-authored-by: davideme <858090+davideme@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: davideme <858090+davideme@users.noreply.github.com> Co-authored-by: Davide Mendolia <davide@gokarumi.com> * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Replace brittle path construction with repository root detection in PostgreSQL tests (#251) * Initial plan * Replace brittle path construction with robust FindRepositoryRoot method Co-authored-by: davideme <858090+davideme@users.noreply.github.com> * Fix XML documentation issues in test files Co-authored-by: davideme <858090+davideme@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: davideme <858090+davideme@users.noreply.github.com> * Fix EF Core timestamp population by using mutable properties and ValueGenerated configuration (#252) * Initial plan * Fix EF Core timestamp generation by using set accessors and ValueGenerated configuration Co-authored-by: davideme <858090+davideme@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: davideme <858090+davideme@users.noreply.github.com> * Update devcontainer and test package versions Added Docker-in-Docker feature to the devcontainer configuration. Updated Microsoft.AspNetCore.Mvc.Testing NuGet package to version 8.0.11 and refreshed transitive dependencies in the lock file for improved compatibility and security. * Update NuGet package versions in packages.lock.json Bump several Microsoft.AspNetCore and Microsoft.Extensions package versions to latest 8.0.x releases in packages.lock.json for LampControlApi. This ensures compatibility with recent bug fixes and improvements from upstream dependencies. * Update dependencies and add BouncyCastle.Cryptography Upgraded Moq, Npgsql.EntityFrameworkCore.PostgreSQL, Microsoft.EntityFrameworkCore.Design, Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore, and Microsoft.EntityFrameworkCore.InMemory to latest versions. Added BouncyCastle.Cryptography as a new package dependency. * Move and restructure test project to separate directory Renamed and relocated all test files from 'src/csharp/LampControlApi/Tests' to 'src/csharp/LampControlApi.Tests' for better project organization. Added a new test project file 'LampControlApi.Tests.csproj' with necessary dependencies and project references. Updated the solution file to include the new test project. * Refactor C# CI workflow for multi-project support Updated the GitHub Actions workflow to operate from the src/csharp directory and explicitly target both LampControlApi and LampControlApi.Tests projects for restore, build, format, test, and security scan steps. Improved dependency caching, artifact paths, and reporting to handle both main and test projects, enabling more robust CI for multi-project solutions. * Move solution file to src/csharp directory Renamed and relocated LampControlApi.sln to src/csharp/LampControlApi.sln. Updated project paths within the solution file to reflect the new location. * Simplify and generalize .NET workflow commands Refactored the GitHub Actions workflow to use more generic dotnet CLI commands, reducing repetition and improving maintainability. Updated dependency caching to include both main and test project lock files. Consolidated package listing and security scanning steps to operate on the solution as a whole rather than individual projects. * Use locked mode for dotnet restore in CI workflow Updated all 'dotnet restore' commands in the csharp-ci GitHub Actions workflow to use the '--locked-mode' flag. This ensures that dependency resolution strictly follows the lock file, improving build reproducibility and reliability. --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: davideme <858090+davideme@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The PostgreSQL repository tests used multiple ".." operators to construct the path to
schema.sql, making them fragile across different test execution environments.Changes
FindRepositoryRoot()helper: Searches upward for.gitdirectory to reliably locate repository rootImplementation
Path construction now uses
Path.Combine(FindRepositoryRoot(), "database", "sql", "postgresql", "schema.sql")instead of relative navigation.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.