Skip to content

Chore/absorb ai deck converter breaking change - #2293

Open
harshadixit12 wants to merge 6 commits into
mainfrom
chore/absorb-ai-deck-converter-breaking-change
Open

harshadixit12 wants to merge 6 commits into
mainfrom
chore/absorb-ai-deck-converter-breaking-change

Conversation

@harshadixit12

@harshadixit12 harshadixit12 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

In this PR, we are bumping ai-deck-converter, and as a result of some breaking changes in it - we are making some modifications to how we consume it in decK.

These include:

  1. Introducing a wrapper function over Convert to handle errors and warning reporting
  2. Introducing a const - min runtime version, which will be passed on to ai-deck-converter during Convert
  3. Bumping go version to 1.27.1, and making the lint changes required
  4. Adding an override for test files on the lint config to skip suggesting constants
  5. Removing init function from main package - it is not needed anymore since go v1.20 - which automatically seeds rand package
  6. Adding OPTIONS in the route protocols for tests in file ai2kong

@harshadixit12
harshadixit12 force-pushed the chore/absorb-ai-deck-converter-breaking-change branch from d273eea to 6afd47a Compare October 16, 2026 04:10
@codecov-commenter

codecov-commenter commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.92683% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.37%. Comparing base (bdd5308) to head (a5dbeb2).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
cmd/ai.go 90.47% 2 Missing ⚠️
cmd/ai_sync.go 0.00% 2 Missing ⚠️
kong2tf/builder_default_terraform.go 91.66% 1 Missing ⚠️
sanitize/sanitize.go 50.00% 1 Missing ⚠️
validate/validate.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2293      +/-   ##
==========================================
+ Coverage   36.69%   39.37%   +2.67%     
==========================================
  Files          82       82              
  Lines        7943     7324     -619     
==========================================
- Hits         2915     2884      -31     
+ Misses       4761     4440     -321     
+ Partials      267        0     -267     

☔ View full report in Codecov by Harness.
📢 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.

Comment thread cmd/ai.go Outdated

// aiGatewayMinRuntimeVersion is the newest AI Gateway release the converter
// knows, so conversion keeps emitting the newest output shape.
const aiGatewayMinRuntimeVersion = "2.3"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't think we should be hardcoding versions here, let me see what can be done.

@harshadixit12
harshadixit12 force-pushed the chore/absorb-ai-deck-converter-breaking-change branch from 60a4ea4 to ff8caae Compare October 19, 2026 03:23
Comment thread go.mod
github.com/ettle/strcase v0.2.0
github.com/fatih/color v1.19.0
github.com/google/go-cmp v0.7.0
github.com/gosimple/slug v1.15.0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not new - just being rearranged in the same file

Comment thread cmd/ai.go

// aiGatewayMinRuntimeVersion is the newest AI Gateway release the converter
// knows, so conversion keeps emitting the newest output shape.
const aiGatewayMinRuntimeVersion = "2.2"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is now a required field - context https://github.com/Kong/ai-deck-converter/pull/225/changes

Since gets used in deck file ai2kong command, we can't call gateway to load version and then populate this - so leaving it hardcoded.

Ideal scenario - file ai2kong and ai sync accept a new flag --min-runtime-version and override this, but I'd leave that up as an improvement

@harshadixit12
harshadixit12 marked this pull request as ready for review October 19, 2026 07:42

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