Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
# gap with the production compose stack so integration tests exercise the same
# migration / dialect surface the deployed REST + Services see.
POSTGRES_IMAGE=postgres:17-alpine
RABBITMQ_IMAGE=rabbitmq:4.1.4-management
MINIO_IMAGE=minio/minio:RELEASE.2025-07-23T15-54-02Z
ELASTIC_IMAGE=docker.elastic.co/elasticsearch/elasticsearch:9.1.3
RABBITMQ_IMAGE=rabbitmq:4.3.0-management
MINIO_IMAGE=minio/minio:RELEASE.2025-09-07T16-13-09Z
ELASTIC_IMAGE=docker.elastic.co/elasticsearch/elasticsearch:9.4.1

# Container credentials (placeholders; Testcontainers regenerates)
POSTGRES_DB=paperless
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🌐 Web query:

GitHub Actions checkout v6 breaking changes

💡 Result:

The release of actions/checkout v6 introduced a change in how credentials are persisted, but it is generally not a breaking change for most standard workflows [1][2]. The primary change in v6 is that the persist-credentials feature now stores credentials in a separate file under $RUNNER_TEMP instead of directly in the local.git/config file [3][4][2]. This update was implemented to improve credential security [2]. For the vast majority of users, no workflow changes are required [2]. Standard git commands such as git fetch and git push will continue to work automatically because the action automatically configures the necessary git includeIf directives to point to the new credential location [1][2]. There is one specific scenario where this change requires an update: if you are running authenticated git commands from within a Docker container action, you must use Actions Runner version v2.329.0 or later to ensure the runner can access the persisted credentials [4][2].

Citations:


🌐 Web query:

GitHub Actions setup-dotnet v5 breaking changes

💡 Result:

The transition to setup-dotnet v5 introduced several breaking changes that require attention to ensure workflow compatibility [1][2]. Key breaking changes in v5 include: 1. Node.js Version Upgrade: The action was upgraded from Node.js 20 to Node.js 24 [2]. 2. Runner Compatibility: Due to the Node.js upgrade, workflows must run on GitHub Actions runners version v2.327.1 or later [1][2]. If your self-hosted runners are older than this version, the action will fail [1]. 3. Removal of Older.NET Versions: Support for certain older.NET versions was removed, and installation scripts were updated [1]. To ensure a smooth transition, verify that your runner environment meets the minimum version requirement (v2.327.1+) before updating to v5 [1][2]. For further details, you can review the full release notes on the official GitHub repository [1][3].

Citations:


🌐 Web query:

GitHub Actions setup-node v6 breaking changes

💡 Result:

The transition to actions/setup-node v6 introduced several breaking changes and updates to improve workflow performance and configuration [1][2]. Key breaking changes in v6 include: 1. Automatic Caching for npm: Caching is now automatically enabled for npm projects when the packageManager field (either top-level or within devEngines) is set to npm in your package.json [2]. For other package managers like Yarn or pnpm, caching remains disabled by default and must be configured manually using the cache input [2]. 2. Removal of always-auth: The always-auth input has been removed [2]. This input was previously deprecated, and users should remove any references to it from their workflow configurations to avoid potential errors [2]. Additionally, users upgrading to v6 should be aware of the following: - Node.js Version Compatibility: As of mid-2026, GitHub Actions are transitioning to Node.js 24 [3]. While v6 is compatible with newer Node.js environments, ensure your workflows are updated to support these requirements, as older Node.js versions (such as Node 20) are being deprecated [3]. - Configuration Preferences: When using node-version-file: package.json, setup-node now prioritizes devEngines.runtime over engines.node [4][5]. To disable the new automatic caching behavior, you can explicitly set the cache input to false in your workflow file [2]: steps: - uses: actions/setup-node@v6 with: package-manager-cache: false

Citations:


🌐 Web query:

GitHub Actions cache v5 breaking changes

💡 Result:

The transition to actions/cache@v5 does not introduce breaking changes to workflow logic, as the release is designed to be fully backward compatible [1][2]. However, there are critical infrastructure requirements that must be met to ensure the action functions correctly [1][2]. Key requirements for actions/cache@v5 include: 1. Node.js Runtime: The action runs on the Node.js 24 runtime [1][2]. 2. Runner Version: It requires a minimum Actions Runner version of 2.327.1 [1][2]. If you are using self-hosted runners, you must update them to this version or newer before upgrading to v5 to avoid workflow failures [1][2]. The v5 release was part of a broader update to the GitHub Actions cache backend service (v2 APIs), which was rolled out in early 2025 [1][2]. While the action itself is backward compatible, failing to meet the runner version requirement will result in errors [1][2]. Additionally, users should be aware that older versions of actions/cache (specifically v1 and v2) have been retired, and workflows using them will fail [3]. It is recommended to use the latest v5 releases to ensure compatibility with ongoing platform updates, such as the deprecation of Node.js 20 on GitHub Actions runners [4].

Citations:


🌐 Web query:

codecov-action v6 breaking changes and migration guide

💡 Result:

The v6 release of the codecov-action is primarily a major version update to support Node.js 24 [1]. There are no complex migration steps or functional breaking changes to the action's inputs or usage patterns; the primary consideration is environment compatibility [1]. Key details regarding the v6 release: 1. Node.js 24 Support: The primary change in v6 is the transition to Node.js 24 [1]. This may cause issues for users on older environments, such as certain versions of GitHub Enterprise Server (GHES) that do not yet support Node.js 24 [2]. If your environment does not support Node.js 24, you should remain on the v5 release [2]. 2. Migration Guide: There is no extensive migration guide required for v6 because it does not introduce changes to the action's arguments or configuration schema [3][1]. Users can update their workflow files by simply changing the version tag from @v5 to @v6 [4][3]. 3. Context on v5: If you are migrating from an older version (e.g., v4 or earlier) to v6, you should be aware of the changes introduced in v5, which include: - The use of the Codecov Wrapper to encapsulate the CLI [5][6]. - Deprecation of the file argument in favor of files [5][6]. - Deprecation of the plugin argument in favor of plugins [5][6]. - The addition of several new arguments, including binary, gcov_args, gcov_executable, gcov_ignore, gcov_include, report_type, skip_validation, and swift_project [5][6]. If you encounter issues after upgrading to v6, verify that your runner environment supports Node.js 24 [2][1]. If it does not, you can safely revert to the latest v5.x release [2].

Citations:


🏁 Script executed:

cat -n .github/workflows/ci.yml | head -150

Repository: ANcpLua/Paperless

Length of output: 5983


Document minimum Actions Runner requirement for setup-dotnet and cache upgrades.

Both actions/setup-dotnet@v5 and actions/cache@v5 require Actions Runner v2.327.1 or later, but this dependency is not documented in the workflow. GitHub-hosted ubuntu-latest runners satisfy this requirement, but the silent dependency on a specific runner version should be documented. Additionally, actions/setup-node@v6 enables automatic npm caching when package.json contains a packageManager field—silent behavior change that requires verification this won't interfere with the explicit cache: pnpm configuration in the frontend jobs.

For reference: actions/checkout@v6 and codecov/codecov-action@v6 introduce no functional breaking changes and are straightforward upgrades.

Applies to: lines 40 (setup-dotnet), 45 (cache), 110, 131 (setup-node automatic caching).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml at line 35, Add documentation comments in the CI
workflow near the uses: actions/setup-dotnet@v5 and uses: actions/cache@v5 steps
stating the minimum GitHub Actions runner requirement (v2.327.1+) so the
dependency is explicit; in the frontend jobs where uses: actions/setup-node@v6
is used, verify and either disable setup-node's automatic npm caching or
explicitly configure it so it does not conflict with your explicit cache: pnpm
configuration (ensure the cache key/strategy for pnpm remains the authoritative
cache); lastly add a short note that actions/checkout@v6 and
codecov/codecov-action@v6 have no breaking changes.

with:
fetch-depth: 0

- name: Setup .NET 10
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x

- name: Cache NuGet packages
uses: actions/cache@v4
uses: actions/cache@v5
with:
path: |
.nuke/temp
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:

- name: Upload coverage to Codecov
if: always()
uses: codecov/codecov-action@v5
uses: codecov/codecov-action@v6
with:
files: ./Artifacts/coverage/PaperlessREST.Tests/coverage.cobertura.xml,./Artifacts/coverage/PaperlessServices.Tests/coverage.cobertura.xml
flags: backend
Expand All @@ -102,12 +102,12 @@ jobs:
run:
working-directory: PaperlessUI.Angular
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Activate pnpm via corepack
run: |
corepack enable
corepack prepare pnpm@10.30.2 --activate
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version: 22
cache: pnpm
Expand All @@ -123,12 +123,12 @@ jobs:
run:
working-directory: PaperlessUI.React
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Activate pnpm via corepack
run: |
corepack enable
corepack prepare pnpm@10.30.2 --activate
- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
with:
node-version: 22
cache: pnpm
Expand Down
17 changes: 10 additions & 7 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,23 @@
<PackageVersion Include="Microsoft.EntityFrameworkCore.Analyzers" Version="$(MicrosoftEntityFrameworkCoreVersion)" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="$(MicrosoftEntityFrameworkCoreVersion)" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="$(MicrosoftEntityFrameworkCoreVersion)" />
<!-- Transitive pin: Hangfire.PostgreSql 1.21.1 pulls EF Core Relational 10.0.4 — force-unify to 10.0.8 via CentralPackageTransitivePinningEnabled -->
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="$(MicrosoftEntityFrameworkCoreVersion)" />
<PackageVersion Include="Npgsql" Version="$(NpgsqlVersion)" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="$(NpgsqlVersion)" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="$(NpgsqlEntityFrameworkCoreVersion)" />
Comment on lines +27 to +30
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use tab indentation on modified XML lines.

The modified entries are space-indented; this file must use tab indentation per repo rules. Please convert leading spaces to tabs on the changed lines to stay compliant.

As per coding guidelines "Use tab indentation with size of 4 spaces for all files".

Also applies to: 36-43, 85-86

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Directory.Packages.props` around lines 27 - 30, The modified XML lines that
add PackageVersion entries for Microsoft.EntityFrameworkCore.Relational, Npgsql,
and Npgsql.EntityFrameworkCore.PostgreSQL are space-indented; update those
changed lines (and the other reported blocks around the same change) to use a
single tab character for each indent level instead of spaces so the file adheres
to the repo rule "Use tab indentation"; ensure you replace leading spaces with
tabs only on the modified XML elements (the <PackageVersion Include="..."
Version="..."/> lines) and leave the rest unchanged.


<!-- ASP.NET Core 10 -->
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="$(MicrosoftAspNetCoreVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="$(MicrosoftAspNetCoreMvcTestingVersion)" />

<!-- Microsoft.Extensions.* -->
<PackageVersion Include="Microsoft.Extensions.Diagnostics.Testing" Version="$(MicrosoftExtensionsVersion)" />
<!-- Microsoft.Extensions.* runtime line (10.0.x cadence) -->
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="$(MicrosoftExtensionsVersion)" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="$(MicrosoftExtensionsVersion)" />
<PackageVersion Include="Microsoft.Extensions.Options.DataAnnotations" Version="$(MicrosoftExtensionsVersion)" />
<PackageVersion Include="Microsoft.Extensions.Telemetry.Abstractions" Version="$(MicrosoftExtensionsVersion)" />
<PackageVersion Include="Microsoft.Extensions.TimeProvider.Testing" Version="$(MicrosoftExtensionsVersion)" />
<!-- Testing/telemetry extensions track a faster 10.6.x cadence -->
<PackageVersion Include="Microsoft.Extensions.Diagnostics.Testing" Version="$(MicrosoftExtensionsTestingVersion)" />
<PackageVersion Include="Microsoft.Extensions.Telemetry.Abstractions" Version="$(MicrosoftExtensionsTestingVersion)" />
<PackageVersion Include="Microsoft.Extensions.TimeProvider.Testing" Version="$(MicrosoftExtensionsTestingVersion)" />
Comment on lines +41 to +43
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check Version.props for the split Microsoft.Extensions version properties

echo "=== MicrosoftExtensionsVersion and MicrosoftExtensionsTestingVersion in Version.props ==="
rg -n '(MicrosoftExtensionsVersion|MicrosoftExtensionsTestingVersion)' Version.props

echo ""
echo "=== Verify they have different version cadences ==="
cat Version.props | grep -E '<(MicrosoftExtensionsVersion|MicrosoftExtensionsTestingVersion)>'

Repository: ANcpLua/Paperless

Length of output: 509


🏁 Script executed:

#!/bin/bash
# Verify Directory.Packages.props structure and lines around 41-43
echo "=== Directory.Packages.props lines 38-45 ==="
sed -n '38,45p' Directory.Packages.props | cat -A

echo ""
echo "=== Check file line ending type ==="
file Directory.Packages.props

echo ""
echo "=== Verify the full context of PackageVersion entries ==="
sed -n '40,43p' Directory.Packages.props

Repository: ANcpLua/Paperless

Length of output: 1489


Fix line ending compliance: Directory.Packages.props uses LF but requires CRLF.

The version split is justified. Version.props defines MicrosoftExtensionsTestingVersion as 10.6.0, distinct from MicrosoftExtensionsVersion (10.0.8), supporting the documented faster cadence. However, the file currently uses Unix LF line endings instead of the required CRLF per coding guidelines.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Directory.Packages.props` around lines 41 - 43, Directory.Packages.props
currently uses LF line endings but must use CRLF per guidelines; update the file
so its line endings are CRLF (CR+LF) without changing the content (keep the
PackageVersion entries for Microsoft.Extensions.Diagnostics.Testing,
Microsoft.Extensions.Telemetry.Abstractions,
Microsoft.Extensions.TimeProvider.Testing and the use of
$(MicrosoftExtensionsTestingVersion) intact). Ensure your editor or git config
converts the file to CRLF (or commit a conversion) so the repository enforces
CRLF for this file.


<!-- Test stack (AwesomeAssertions + AwesomeAssertions.Analyzers come from ANcpLua.NET.Sdk.Test). -->
<PackageVersion Include="MartinCostello.Logging.XUnit.v3" Version="$(MartinCostelloLoggingXUnitV3Version)" />
Expand Down Expand Up @@ -79,8 +82,8 @@
pulled by Nuke.Common) and GHSA-37gx-xxp4-5rgx / GHSA-w3x6-4m5h-cxqf
(System.Security.Cryptography.Xml 9.0.0). Effective because the SDK turns on
CentralPackageTransitivePinningEnabled. -->
<PackageVersion Include="NuGet.Packaging" Version="7.3.1" />
<PackageVersion Include="System.Security.Cryptography.Xml" Version="10.0.7" />
<PackageVersion Include="NuGet.Packaging" Version="7.6.0" />
<PackageVersion Include="System.Security.Cryptography.Xml" Version="10.0.8" />
</ItemGroup>

</Project>
5 changes: 2 additions & 3 deletions PaperlessREST.Tests/Integration/DatabaseFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ static DatabaseFixture()

public DatabaseFixture()
{
string postgresImage = Environment.GetEnvironmentVariable("POSTGRES_IMAGE") ?? "postgres:16-alpine";
string postgresImage = Environment.GetEnvironmentVariable("POSTGRES_IMAGE") ?? "postgres:17-alpine";
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Handle blank POSTGRES_IMAGE the same as unset.

Line 24 only falls back on null. If CI defines POSTGRES_IMAGE as empty/whitespace, this passes an invalid image name and container startup fails.

Suggested fix
-		string postgresImage = Environment.GetEnvironmentVariable("POSTGRES_IMAGE") ?? "postgres:17-alpine";
+		string? configuredPostgresImage = Environment.GetEnvironmentVariable("POSTGRES_IMAGE");
+		string postgresImage = string.IsNullOrWhiteSpace(configuredPostgresImage)
+			? "postgres:17-alpine"
+			: configuredPostgresImage;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
string postgresImage = Environment.GetEnvironmentVariable("POSTGRES_IMAGE") ?? "postgres:17-alpine";
string? configuredPostgresImage = Environment.GetEnvironmentVariable("POSTGRES_IMAGE");
string postgresImage = string.IsNullOrWhiteSpace(configuredPostgresImage)
? "postgres:17-alpine"
: configuredPostgresImage;
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@PaperlessREST.Tests/Integration/DatabaseFixture.cs` at line 24, The code
currently sets postgresImage from
Environment.GetEnvironmentVariable("POSTGRES_IMAGE") but only falls back on
null; update the assignment so blank or whitespace values are treated as unset
(use string.IsNullOrWhiteSpace on the environment value) and fall back to
"postgres:17-alpine". Locate the variable postgresImage (in the DatabaseFixture
constructor/initialization) and replace the direct GetEnvironmentVariable usage
with a check that uses string.IsNullOrWhiteSpace to decide whether to use the
default image name.


_container = new PostgreSqlBuilder()
.WithImage(postgresImage)
_container = new PostgreSqlBuilder(postgresImage)
.WithWaitStrategy(Wait.ForUnixContainer()
.UntilMessageIsLogged("database system is ready to accept connections"))
.Build();
Expand Down
20 changes: 8 additions & 12 deletions PaperlessREST.Tests/Integration/SharedRestContainerFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,25 @@ static SharedRestContainerFixture()

public SharedRestContainerFixture()
{
string postgresImage = Environment.GetEnvironmentVariable("POSTGRES_IMAGE") ?? "postgres:16-alpine";
string rabbitImage = Environment.GetEnvironmentVariable("RABBITMQ_IMAGE") ?? "rabbitmq:3.13-management-alpine";
string postgresImage = Environment.GetEnvironmentVariable("POSTGRES_IMAGE") ?? "postgres:17-alpine";
string rabbitImage = Environment.GetEnvironmentVariable("RABBITMQ_IMAGE") ?? "rabbitmq:4.3.0-management";
string minioImage = Environment.GetEnvironmentVariable("MINIO_IMAGE") ??
"minio/minio:RELEASE.2025-07-23T15-54-02Z";
"minio/minio:RELEASE.2025-09-07T16-13-09Z";
string elasticImage = Environment.GetEnvironmentVariable("ELASTIC_IMAGE") ??
"docker.elastic.co/elasticsearch/elasticsearch:9.1.3";
"docker.elastic.co/elasticsearch/elasticsearch:9.4.1";

_postgres = new PostgreSqlBuilder()
.WithImage(postgresImage)
_postgres = new PostgreSqlBuilder(postgresImage)
.WithWaitStrategy(Wait.ForUnixContainer()
.UntilMessageIsLogged("database system is ready to accept connections"))
.Build();

_rabbit = new RabbitMqBuilder()
.WithImage(rabbitImage)
_rabbit = new RabbitMqBuilder(rabbitImage)
.Build();

_minio = new MinioBuilder()
.WithImage(minioImage)
_minio = new MinioBuilder(minioImage)
.Build();

_elastic = new ElasticsearchBuilder()
.WithImage(elasticImage)
_elastic = new ElasticsearchBuilder(elasticImage)
.WithEnvironment("discovery.type", "single-node")
.WithEnvironment("xpack.security.enabled", "false")
.WithEnvironment("ES_JAVA_OPTS", "-Xms512m -Xmx512m")
Expand Down
Loading
Loading