Skip to content

fix: bump OTel packages (NU1902) and add fetch-depth for NBGV#497

Merged
JerrettDavis merged 2 commits intomainfrom
fix/main-green-otel-nbgv
Apr 26, 2026
Merged

fix: bump OTel packages (NU1902) and add fetch-depth for NBGV#497
JerrettDavis merged 2 commits intomainfrom
fix/main-green-otel-nbgv

Conversation

@JerrettDavis
Copy link
Copy Markdown
Owner

Summary

  • bump OpenTelemetry packages to resolve NU1902 restore failures
  • bump Microsoft.Extensions package baselines to 10.0.6 to resolve NU1605 downgrades
  • fetch full git history in train-model for Nerdbank.GitVersioning

Why

  • main is red on restore/build due to OpenTelemetry.Api 1.11.2
  • dependency update PRs for connector packages also fail on Microsoft.Extensions.* 10.0.5 -> 10.0.6 downgrades
  • the scheduled/manual train-model workflow fails on shallow checkout

Expected impact

Notes

JerrettDavis and others added 2 commits April 18, 2026 15:38
v0.5.1 runs on deprecated Node.js 20 and causes intermittent
'Value cannot be null (Parameter name)' errors when writing env vars.
Pin to master SHA b944774 which uses node24, until v0.5.2 is released.

Affects: .github/workflows/ci.yml, .github/workflows/pr-validation.yml

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…model)

- Directory.Packages.props: bump OpenTelemetry packages to address NU1902 warnings
- Directory.Packages.props: align Microsoft.Extensions.* to 10.0.6 (NU1605)
- .github/workflows/train-model.yml: add fetch-depth: 0 for Nerdbank.GitVersioning

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
actions/dotnet/nbgv b944774b6878ef950cc14d1a72bf9c0ffafbb839 🟢 4.6
Details
CheckScoreReason
Code-Review🟢 3Found 4/11 approved changesets -- score normalized to 3
Maintained🟢 1030 commit(s) and 4 issue activity found in the last 90 days -- score normalized to 10
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Security-Policy⚠️ 0security policy file not detected
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: some github tokens can't read classic branch protection rules: https://github.com/ossf/scorecard-action/blob/main/docs/authentication/fine-grained-auth-token.md
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0

Scanned Files

  • .github/workflows/pr-validation.yml

@github-actions
Copy link
Copy Markdown
Contributor

Code Coverage


JerrettDavis added a commit that referenced this pull request Apr 27, 2026
…ndlers (#498)

* fix: suppress CS0618 on AddZipkinExporter to unblock CI

OpenTelemetry.Exporter.Zipkin 1.15.3 marks AddZipkinExporter as
[Obsolete], which the compiler promotes to CS0618 error under
TreatWarningsAsErrors. The project already dropped the Zipkin package
version NU1902 in PR #497 but the call site pragma was never committed.

Wrap the single call site with #pragma warning disable/restore CS0618
so CI compiles cleanly while backward-compat "zipkin" config support
is maintained until a full OTLP migration is done.

Failing file: src/JD.AI.Telemetry/Extensions/TelemetryServiceExtensions.cs
Error:        CS0618 @ line 101 (GitHub main)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: add --ollama-generate and --ollama-validate handlers to training Program.cs

The train-model workflow fails at "Train ML.NET model" (step 9) with a
FileNotFoundException on ollama_training_data.jsonl.

Root cause: Program.cs had no handler for --ollama-generate or
--ollama-validate. The "Synthesize training examples" step passes
`--ollama-generate 150 --output src/.../intent_classifier.zip` but
Program.cs silently ignored the unknown flag and fell through to the
built-in seed-corpus path, writing to /tmp/intent_training_data.csv
instead of the expected src/JD.AI.Workflows/Models/ollama_training_data.jsonl.
When "Train ML.NET model" then ran `--data ollama_training_data.jsonl`,
the file didn't exist → FileNotFoundException → exit non-zero.

Fix:
- Add --ollama-generate <count> handler: calls AiTrainingDataSynthesizer
  .GenerateAsync(count), writes results to ollama_training_data.jsonl in
  the same directory as --output, then exits 0.
- Add --ollama-validate handler: reads --data file, calls ValidateAsync,
  writes disagreement count to validate_summary.txt, then exits 0.
- Both handlers read OLLAMA_HOST env var (set by CI) for the Ollama URL.
- Update AiTrainingDataSynthesizer constructor to accept ollamaHost param
  and forward it to OllamaClient.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
JerrettDavis added a commit that referenced this pull request Apr 27, 2026
…ndlers (#499)

* fix: suppress CS0618 on AddZipkinExporter to unblock CI

OpenTelemetry.Exporter.Zipkin 1.15.3 marks AddZipkinExporter as
[Obsolete], which the compiler promotes to CS0618 error under
TreatWarningsAsErrors. The project already dropped the Zipkin package
version NU1902 in PR #497 but the call site pragma was never committed.

Wrap the single call site with #pragma warning disable/restore CS0618
so CI compiles cleanly while backward-compat "zipkin" config support
is maintained until a full OTLP migration is done.

Failing file: src/JD.AI.Telemetry/Extensions/TelemetryServiceExtensions.cs
Error:        CS0618 @ line 101 (GitHub main)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: add --ollama-generate and --ollama-validate handlers to training Program.cs

The train-model workflow fails at "Train ML.NET model" (step 9) with a
FileNotFoundException on ollama_training_data.jsonl.

Root cause: Program.cs had no handler for --ollama-generate or
--ollama-validate. The "Synthesize training examples" step passes
`--ollama-generate 150 --output src/.../intent_classifier.zip` but
Program.cs silently ignored the unknown flag and fell through to the
built-in seed-corpus path, writing to /tmp/intent_training_data.csv
instead of the expected src/JD.AI.Workflows/Models/ollama_training_data.jsonl.
When "Train ML.NET model" then ran `--data ollama_training_data.jsonl`,
the file didn't exist → FileNotFoundException → exit non-zero.

Fix:
- Add --ollama-generate <count> handler: calls AiTrainingDataSynthesizer
  .GenerateAsync(count), writes results to ollama_training_data.jsonl in
  the same directory as --output, then exits 0.
- Add --ollama-validate handler: reads --data file, calls ValidateAsync,
  writes disagreement count to validate_summary.txt, then exits 0.
- Both handlers read OLLAMA_HOST env var (set by CI) for the Ollama URL.
- Update AiTrainingDataSynthesizer constructor to accept ollamaHost param
  and forward it to OllamaClient.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant