Skip to content

Feat/support json and multi file sync#2158

Merged
harshadixit12 merged 3 commits into
feat/deck-ai-sync-diff-dumpfrom
feat/support-json-and-multi-file-sync
Jul 21, 2026
Merged

Feat/support json and multi file sync#2158
harshadixit12 merged 3 commits into
feat/deck-ai-sync-diff-dumpfrom
feat/support-json-and-multi-file-sync

Conversation

@harshadixit12

Copy link
Copy Markdown
Contributor

Summary

This PR adds two features -

  1. Input and Output support for JSON - for output, json can be picked using --format json
  2. Syncing multiple files using deck ai sync

In deck ai sync - we are reading the files one by one, converting them and merging the file.Content

@codecov-commenter

codecov-commenter commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 27.45098% with 74 lines in your changes missing coverage. Please review.
✅ Project coverage is 35.94%. Comparing base (1eb391b) to head (9a14c50).

Files with missing lines Patch % Lines
cmd/ai_sync.go 0.00% 53 Missing ⚠️
cmd/ai_dump.go 44.00% 12 Missing and 2 partials ⚠️
cmd/file_ai2kong.go 70.83% 3 Missing and 4 partials ⚠️
Additional details and impacted files
@@                       Coverage Diff                       @@
##           feat/deck-ai-sync-diff-dump    #2158      +/-   ##
===============================================================
+ Coverage                        35.41%   35.94%   +0.52%     
===============================================================
  Files                               82       82              
  Lines                             7787     7828      +41     
===============================================================
+ Hits                              2758     2814      +56     
+ Misses                            4777     4749      -28     
- Partials                           252      265      +13     

☔ 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.

@harshadixit12
harshadixit12 marked this pull request as ready for review July 17, 2026 08:23
Comment thread cmd/ai_sync.go
@harshadixit12
harshadixit12 force-pushed the feat/support-json-and-multi-file-sync branch from 9b49e80 to 9a14c50 Compare July 21, 2026 09:05
Comment thread cmd/ai_sync.go
}

for _, f := range files {
content, err := os.ReadFile(f)

@aikido-pr-checks aikido-pr-checks Bot Jul 21, 2026

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 file inclusion attack via reading file - high severity
If an attacker can control the input leading into the ReadFile function, they might be able to read sensitive files and launch further attacks with that information.

Suggested change
content, err := os.ReadFile(f)
if strings.Contains(f, "..") {
return nil, fmt.Errorf("invalid file path")
}
content, err := os.ReadFile(f)

Reply @AikidoSec ignore: [REASON] to ignore this issue.
More info

@harshadixit12
harshadixit12 merged commit 25adf9e into feat/deck-ai-sync-diff-dump Jul 21, 2026
47 checks passed
@harshadixit12
harshadixit12 deleted the feat/support-json-and-multi-file-sync branch July 21, 2026 10:03
harshadixit12 added a commit that referenced this pull request Jul 21, 2026
* feat: support diff and dump

* style: lint-fix

* fix: error out if syncing to konnect

* fix: use positional arg for ai sync

* fix: written format version in dump

* fix: add go.work and go.work.sum to gitignore

* chore: remove go.work and go.work.sum from tracking

* tests: add integration tests for sync and dump

* ci: add integration test workflow for ai-gateway

* fix: rename tag and rebase with file ai2kong

* tests: use new rc, add more tests

* fix: avoid adding global tags in ai gateway format

* fix: address feedback

* chore: bump go-kong and go-database-reconciler

* fix: optimise checking for ai select tag

* fix: remove db propagation delay flag and add more tests for tag matching

* Feat/support json and multi file sync (#2158)

* feat: support json in ai2kong, ai sync and ai dump

* feat: support syncing multiple files

* style: refactor based on self review
harshadixit12 added a commit that referenced this pull request Jul 21, 2026
* feat: support diff and dump

* style: lint-fix

* fix: error out if syncing to konnect

* fix: use positional arg for ai sync

* fix: written format version in dump

* fix: add go.work and go.work.sum to gitignore

* chore: remove go.work and go.work.sum from tracking

* tests: add integration tests for sync and dump

* ci: add integration test workflow for ai-gateway

* fix: rename tag and rebase with file ai2kong

* tests: use new rc, add more tests

* fix: avoid adding global tags in ai gateway format

* fix: address feedback

* chore: bump go-kong and go-database-reconciler

* fix: optimise checking for ai select tag

* fix: remove db propagation delay flag and add more tests for tag matching

* Feat/support json and multi file sync (#2158)

* feat: support json in ai2kong, ai sync and ai dump

* feat: support syncing multiple files

* style: refactor based on self review
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