Skip to content

Revert breaking OpenAPI v3.x upgrades and fix Spectre.Console.Cli signature#287

Merged
christianhelle merged 2 commits intomainfrom
copilot/fix-workflow-failures
Nov 21, 2025
Merged

Revert breaking OpenAPI v3.x upgrades and fix Spectre.Console.Cli signature#287
christianhelle merged 2 commits intomainfrom
copilot/fix-workflow-failures

Conversation

Copy link
Contributor

Copilot AI commented Nov 21, 2025

Recent dependency upgrades introduced incompatible breaking changes causing build failures across all workflows.

Changes

  • Revert Microsoft.OpenApi: 3.0.1 → 1.6.28 in HttpGenerator.Core.csproj

    • Version 3.0.1 is incompatible with Microsoft.OpenApi.Readers 1.6.28 which depends on 1.6.28
    • OpenAPI v3.x is a major rewrite with breaking namespace changes
  • Revert Microsoft.OpenApi.OData: 3.0.0 → 1.7.5 in HttpGenerator.csproj

    • Coordinated downgrade to maintain compatibility with OpenApi 1.6.28
  • Fix Spectre.Console.Cli signature: Add CancellationToken parameter to GenerateCommand.ExecuteAsync

    • Version 0.53.0 added required parameter to AsyncCommand<T>.ExecuteAsync signature
// Before
public override async Task<int> ExecuteAsync(CommandContext context, Settings settings)

// After
public override async Task<int> ExecuteAsync(CommandContext context, Settings settings, CancellationToken cancellationToken = default)

Context

PR #282 attempted to upgrade to OpenAPI.NET v3 for OpenAPI 3.2.0 support, but this requires coordinated upgrades across the entire dependency chain. The Microsoft.OpenApi v3.x series has breaking changes that are incompatible with the current Microsoft.OpenApi.Readers version.

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:

  • demo.netbox.dev
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/HttpGenerator.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/HttpGenerator.Tests.deps.json /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/testhost.dll --port 40847 --endpoint 127.0.0.1:040847 --role client --parentprocessid 4054 --telemetryoptedin false (dns block)
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/HttpGenerator.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/HttpGenerator.Tests.deps.json /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/testhost.dll --port 38055 --endpoint 127.0.0.1:038055 --role client --parentprocessid 5019 --telemetryoptedin false (dns block)
  • developers.intellihr.io
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/HttpGenerator.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/HttpGenerator.Tests.deps.json /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/testhost.dll --port 40847 --endpoint 127.0.0.1:040847 --role client --parentprocessid 4054 --telemetryoptedin false (dns block)
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/HttpGenerator.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/HttpGenerator.Tests.deps.json /home/REDACTED/work/httpgenerator/httpgenerator/src/HttpGenerator.Tests/bin/Release/net8.0/testhost.dll --port 38055 --endpoint 127.0.0.1:038055 --role client --parentprocessid 5019 --telemetryoptedin false (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

The github workflows are failing. Investigate why and fix them


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@coderabbitai
Copy link

coderabbitai bot commented Nov 21, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Comment @coderabbitai help to get the list of available commands and usage tips.

…change

Co-authored-by: christianhelle <710400+christianhelle@users.noreply.github.com>
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copilot AI changed the title [WIP] Investigate and fix failing GitHub workflows Revert breaking OpenAPI v3.x upgrades and fix Spectre.Console.Cli signature Nov 21, 2025
Copilot AI requested a review from christianhelle November 21, 2025 12:25
@codecov
Copy link

codecov bot commented Nov 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.93%. Comparing base (002f64d) to head (d8e4be1).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #287   +/-   ##
=======================================
  Coverage   84.93%   84.93%           
=======================================
  Files          12       12           
  Lines         551      551           
  Branches       76       76           
=======================================
  Hits          468      468           
  Misses         70       70           
  Partials       13       13           
Flag Coverage Δ
unittests 84.93% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@christianhelle christianhelle marked this pull request as ready for review November 21, 2025 13:30
Copilot AI review requested due to automatic review settings November 21, 2025 13:30
@christianhelle christianhelle merged commit 3d6a413 into main Nov 21, 2025
20 of 21 checks passed
@christianhelle christianhelle deleted the copilot/fix-workflow-failures branch November 21, 2025 13:30
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR reverts incompatible OpenAPI v3.x package upgrades that caused build failures and fixes the method signature to comply with Spectre.Console.Cli 0.53.0 requirements.

  • Downgrades Microsoft.OpenApi packages from v3.x to v1.6.x to restore compatibility with the existing dependency chain
  • Updates GenerateCommand.ExecuteAsync signature to include the required CancellationToken parameter
  • Maintains backward compatibility with existing tests through the use of a default parameter value

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/HttpGenerator/HttpGenerator.csproj Reverts Microsoft.OpenApi.OData from 3.0.0 to 1.7.5 for compatibility with OpenApi 1.6.28
src/HttpGenerator.Core/HttpGenerator.Core.csproj Reverts Microsoft.OpenApi from 3.0.1 to 1.6.28 to match Microsoft.OpenApi.Readers version
src/HttpGenerator/GenerateCommand.cs Adds required CancellationToken parameter with default value to satisfy Spectre.Console.Cli 0.53.0 signature requirements
Comments suppressed due to low confidence (1)

src/HttpGenerator/GenerateCommand.cs:264

        foreach (var file in files)
        {
            var fullPath = Path.Combine(outputFolder, file.Filename);
            AnsiConsole.MarkupLine($"   [dim]📄[/] [link]{fullPath}[/]");
        }

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.

3 participants