Skip to content

[DEV-12327] Target .NET 10 - #164

Open
felipe-pereira96 wants to merge 8 commits into
masterfrom
DEV-12327
Open

felipe-pereira96 wants to merge 8 commits into
masterfrom
DEV-12327

Conversation

@felipe-pereira96

@felipe-pereira96 felipe-pereira96 commented Nov 16, 2026 •

Copy link
Copy Markdown

Summary

.NET 8 reached end of support on November 10, 2026. This moves the SDK to .NET 10, the current LTS (supported until November 2028), the same way #148 moved it from .NET 6 to 8. It also ties this release to Intake 7.14+ and fixes the two SDK calls that no longer match the current API.

.NET 10

  • All projects that targeted net8.0 now target net10.0: IndicoV2, IndicoV2.Abstractions, the unit and integration test projects, and the 7 examples. IndicoV2.StrawberryShake stays on netstandard2.1.
  • CI and images use the .NET 10 SDK: setup-dotnet 10.0.404 in PR build.yml and publish.yml, and dotnet/sdk:10.0 in the Dockerfile.
  • Deletes .gitlab-ci.yml: GitLab CI hasn't been used in years, and the GitHub workflows cover build and publish.
  • JobAwaiter.WaitReadyAsync calls Enumerable.Contains explicitly. With C# 14, array.Contains(x) binds to the ReadOnlySpan overload, which can't be kept across the await in the same expression (CS4007). Same behavior as before.
  • Removes the Microsoft.CSharp and System.ValueTuple package references. Both ship with .NET 10, and NuGet warns they're not needed (NU1510).
  • AssemblyVersion goes from 7.0.2 to 7.14.0, matching the Intake version, as the SDK versioning does (SDK 7.14 targets Intake 7.14+).

API alignment with Intake 7.14

  • ModelsClient.Predict works again. fog#870 (DEV-15847, first shipped in Intake 7.11.0) changed modelPredict(data:) from [String] to [String!]!. The SDK still declared $data: [String]!, so every Predict call failed GraphQL validation (Variable '$data' of type '[String]!' used in position expecting type '[String!]!') on Intake 7.11+. Models.graphql now declares $data: [String!]! and the schema.graphql copy matches fog's current contract. The public Predict signature doesn't change; the generated client now rejects a null item with ArgumentNullException before sending, which the server would reject anyway. The stricter variable is also accepted by servers before 7.11.
  • OcrClient.ExtractDocumentAsync is marked [Obsolete]. fog#771 (DEV-14380) removed direct document extraction server-side ("use workflow submission instead"), so this call can't succeed on current Intake. It stays in the API so existing code still compiles, with a warning that points to workflow submission. Its integration tests are [Ignore]d.
  • Generated/IndicoGqlClient.StrawberryShake.cs is regenerated by the build. Most of its diff is the generator's formatting under the .NET 10 Roslyn (default ! → default!); the real change is the PredictModel operation (review with git diff -w: 13 lines).

To be released as v7.14.0 (the latest on NuGet is 7.1.0). This version requires .NET 10 and Intake 7.14+; clients that can't move yet can stay on 7.1.0. Existing installs aren't affected: NuGet keeps the version each project pins, 7.1.0 keeps working (including on .NET 10), and a .NET 8 project that tries to update to 7.14.0 fails at restore (NU1202) rather than at runtime.

The package still depends on MimeKit 2.11.0, which has a moderate advisory (GHSA-g7hc-96xr-gvvx, fixed in 4.15.1). It's not new, master ships the same version, but on .NET 10 NuGet also audits transitive dependencies, so the warning now shows in every project that uses IndicoV2. MimeKit 2 → 4 is a major bump and is left for a follow-up.

Jira:

Ticket: https://indicodata.atlassian.net/browse/DEV-12327

Tests

Local, SDK 10.0.404:

  • dotnet build: 0 errors. Warnings vs master: CA2022 0 → 4 (newer analyzer, on two existing Stream.ReadAsync calls in StorageClient and MultipartFormUpload, not changed here), NU1902 8 → 36 (the MimeKit advisory above, now reported on every project), and CS0618 on the two OCR integration tests that still call the now-obsolete ExtractDocumentAsync. The rest unchanged.
  • dotnet test IndicoV2.Tests: 73 pass on net10.0
  • dotnet pack IndicoV2 -p:Version=7.14.0: IndicoClient.7.14.0.nupkg, lib/net10.0 with the same 3 dlls, and the same dependencies as master minus Microsoft.CSharp

Integration tests (IndicoV2.IntegrationTests, 60 tests) against dev-ci (Intake 7.14), run on both master (net8.0) and this branch (net10.0) before the API fixes:

  • Same failures on both branches, apart from GetResultAsync_ShouldReturnJobResult, which reads a job result without waiting for the job and doesn't go through JobAwaiter. So the .NET 10 move adds no regressions.
  • The shared failures are the SDK being behind the API: Predict (2) and OCR (10), fixed and deprecated here, plus stale tests and dev-ci setup (result JSON shape expected by WaitReady/SubmitReviewV1, dataset permissions, review state, submission filters), left for a follow-up.

After the API fixes (ModelClientTests + OcrClientTests):

  • OCR: 10 skipped.
  • GetGroup and TrainingModelWithProgress: pass.
  • Predict: the mutation now passes validation, the job runs and returns predictions. Predict_ShouldReturnPrediction still fails on dev-ci because the test asserts extraction-shaped results (Label/Text/Start/End) and the model group used is a classification model (confidences).

The integration suite is excluded from CI (PR build.yml filters out IntegrationTests), which is why the API drift went unnoticed.


Note

Medium Risk
Requires .NET 10 and Intake 7.14+, so consumers still on .NET 8 or older Intake need to stay on 7.1.0. Predict sends a stricter variable type and ExtractDocumentAsync is marked obsolete; no other behavior changes.

Overview
Retargets the SDK, tests and examples from net8.0 to net10.0, moves CI and the images to the .NET 10 SDK, and versions the package 7.14.0 to match Intake.

Predict is fixed for the [String!]! contract (fog#870), OCR extraction is deprecated (fog#771), JobAwaiter uses Enumerable.Contains to build under C# 14, and two in-box package references and the unused .gitlab-ci.yml are dropped.

@felipe-pereira96 felipe-pereira96 self-assigned this Nov 16, 2026
Comment thread .gitlab-ci.yml Resolved
@mcahill-indico

Copy link
Copy Markdown

Consumers of the package now need .NET 10 or later, same as the .NET 8 move required .NET 8, so this should be released as v8.0.0 (the latest on NuGet is 7.1.0). Clients that can't move yet can stay on 7.x. Existing installs aren't affected: NuGet keeps the version each project pins, 7.x keeps working (including on .NET 10), and a .NET 8 project that tries to update to 8.0.0 fails at restore (NU1202) rather than at runtime.

We should bump the C# version with a minor version as our versioning is set to match the Intake version. So a version 7.14 is compatible with minimum Intake 7.14, 6.10 with Intake 6.10+ etc.

Have you run the test suite locally and verified the results?

@felipe-pereira96

Copy link
Copy Markdown
Author

Consumers of the package now need .NET 10 or later, same as the .NET 8 move required .NET 8, so this should be released as v8.0.0 (the latest on NuGet is 7.1.0). Clients that can't move yet can stay on 7.x. Existing installs aren't affected: NuGet keeps the version each project pins, 7.x keeps working (including on .NET 10), and a .NET 8 project that tries to update to 8.0.0 fails at restore (NU1202) rather than at runtime.

We should bump the C# version with a minor version as our versioning is set to match the Intake version. So a version 7.14 is compatible with minimum Intake 7.14, 6.10 with Intake 6.10+ etc.

Have you run the test suite locally and verified the results?

  • Bumped the version to 7.14.0 to match Intake, and deleted .gitlab-ci.yml
  • 73 unit tests pass locally and now in CI too (CI hadn't actually been running tests, fixed that as well)
  • Integration tests against dev-ci gave the same results on .NET 8 and .NET 10, so no regressions. The failures they did show came from the SDK being out of date with the API. I fixed Predict and deprecated the OCR extraction, which was removed on the server.

This branch has not been deployed

No deployments
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