Skip to content

Conversation

@amotl
Copy link
Member

@amotl amotl commented Nov 15, 2025

About

Improve integration testing with Npgsql.

Details

With the drawback of introducing redundancies by retiring the use of the universal test runner ngr in this case, the CI workflow recipe gains the benefit of being able to directly manipulate the version numbers of dependency packages.

This improves the setup, because the test suite can now be validated against pre-release versions of the Npgsql package.
Npgsql is important for CrateDB, because the .NET connectivity relies on it, provided by its PostgreSQL wire compatibility.

@coderabbitai
Copy link

coderabbitai bot commented Nov 15, 2025

Walkthrough

Two GitHub Actions workflows were updated to add an npgsql-version matrix (including 8.*, 9.*, and prerelease), remove a deprecated "Set up uv" step, and replace single-step test invocations with multi-line scripts that conditionally install the appropriate Npgsql/Npgsql.EntityFrameworkCore.PostgreSQL package (handling prerelease, latest, and pinned versions), list packages, and run tests in their respective csharp directories.

Changes

Cohort / File(s) Summary
EFCore workflow
\.github/workflows/lang-csharp-efcore.yml
Added npgsql-version matrix and included it in the workflow display name; removed "Set up uv" step; replaced Validate step with a script that sets working directory to by-language/csharp-efcore, conditionally installs Npgsql.EntityFrameworkCore.PostgreSQL (--prerelease for prerelease, --version=* for latest, --version=<value> otherwise), lists packages, and runs dotnet test.
Npgsql workflow
\.github/workflows/lang-csharp-npgsql.yml
Expanded npgsql-version matrix to include 8.*, 9.*, and prerelease; removed "Set up uv" step; replaced the single-step validation with a multi-line script that cds into by-language/csharp-npgsql, conditionally installs Npgsql (handling prerelease, latest, and pinned versions), lists packages, and runs dotnet test.

Sequence Diagram(s)

sequenceDiagram
  participant GH as GitHub Actions Runner
  participant Repo as Repository
  participant Dotnet as dotnet CLI

  rect rgb(250,250,255)
  GH->>Repo: checkout
  GH->>Dotnet: setup dotnet (existing)
  end

  Note right of GH: For each matrix value (npgsql-version)
  rect rgb(245,255,240)
  GH->>GH: set NPGSQL_VERSION = matrix.npgsql-version
  GH->>Repo: cd by-language/csharp-efcore or csharp-npgsql
  alt NPGSQL_VERSION == "prerelease"
    GH->>Dotnet: dotnet add package <Package> --prerelease
  else NPGSQL_VERSION == "latest"
    GH->>Dotnet: dotnet add package <Package> --version=*
  else
    GH->>Dotnet: dotnet add package <Package> --version=<NPGSQL_VERSION>
  end
  GH->>Dotnet: dotnet list package
  GH->>Dotnet: dotnet test
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Verify conditional install branches (prerelease vs latest vs pinned) are implemented exactly as intended.
  • Confirm display-name interpolation and matrix syntax are correct.
  • Ensure working directories (by-language/csharp-efcore, by-language/csharp-npgsql) and test commands match repository layout.

Poem

🐰 I hopped through YAML with a joyful twitch,
Planted version rows and fixed a glitch.
With prerelease hops and pinned-version tunes,
CI hums softly beneath the moons. ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: improving .NET/CI testing with support for pre-release versions of Npgsql, which matches the core objective of the changeset.
Description check ✅ Passed The description is directly related to the changeset, explaining the motivation (pre-release Npgsql testing), the trade-off (retiring ngr), and the technical context (Npgsql's importance for .NET connectivity).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch npgsql-unobfuscate-version-pinning

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.

@amotl amotl force-pushed the npgsql-unobfuscate-version-pinning branch 5 times, most recently from 18f367f to c483007 Compare November 15, 2025 15:48
@amotl amotl marked this pull request as ready for review November 15, 2025 15:48
coderabbitai[bot]

This comment was marked as resolved.

@amotl amotl force-pushed the npgsql-unobfuscate-version-pinning branch from c483007 to 2568003 Compare November 15, 2025 15:53
With the drawback of introducing redundancies by retiring the use
of the universal test runner `ngr` in this case, the CI workflow
recipe gains the benefit of being able to directly manipulate the
version numbers of dependency packages.

This improves the setup, because the test suite can now be validated
against pre-release versions of the Npgsql package.

Npgsql is important for CrateDB, because the .NET connectivity
relies on it, provided by its PostgreSQL wire compatibility.
coderabbitai[bot]

This comment was marked as resolved.

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.

2 participants